Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-08 22:40:04

0001 #ifndef L1Trigger_L1TGlobal_CorrThreeBodyCondition_h
0002 #define L1Trigger_L1TGlobal_CorrThreeBodyCondition_h
0003 
0004 /**
0005  * \class CorrThreeBodyCondition
0006  *
0007  * Description: L1 Global Trigger three-body correlation conditions:                                                                      
0008  *              evaluation of a three-body correlation condition (= three-muon invariant mass)    
0009  *                                                                                                                                               
0010  * Implementation:                                                                                                                                             
0011  *    <TODO: enter implementation details>                                                                                                 
0012  *                                                                                                                                                                         
0013  * \author: Elisa Fontanesi - Boston University                                                                                                                                                            
0014  *          CorrCondition and CorrWithOverlapRemovalCondition classes used as a starting point
0015  *                                                                                                                                                       
0016  */
0017 
0018 // system include files
0019 #include <iosfwd>
0020 #include <string>
0021 
0022 // user include files
0023 //   base classes
0024 #include "L1Trigger/L1TGlobal/interface/ConditionEvaluation.h"
0025 #include "L1Trigger/L1TGlobal/interface/GlobalScales.h"
0026 
0027 // forward declarations
0028 class GlobalCondition;
0029 class CorrelationThreeBodyTemplate;
0030 
0031 namespace l1t {
0032 
0033   class L1Candidate;
0034 
0035   class GlobalBoard;
0036 
0037   // class declaration
0038   class CorrThreeBodyCondition : public ConditionEvaluation {
0039   public:
0040     /// constructors
0041     ///     default
0042     CorrThreeBodyCondition();
0043 
0044     ///     from base template condition (from event setup usually)
0045     CorrThreeBodyCondition(const GlobalCondition*,
0046                            const GlobalCondition*,
0047                            const GlobalCondition*,
0048                            const GlobalCondition*,
0049                            const GlobalBoard*
0050 
0051     );
0052 
0053     // copy constructor
0054     CorrThreeBodyCondition(const CorrThreeBodyCondition&);
0055 
0056     // destructor
0057     ~CorrThreeBodyCondition() override;
0058 
0059     // assign operator
0060     CorrThreeBodyCondition& operator=(const CorrThreeBodyCondition&);
0061 
0062   public:
0063     /// the core function to check if the condition matches
0064     const bool evaluateCondition(const int bxEval) const override;
0065 
0066     /// print condition
0067     void print(std::ostream& myCout) const override;
0068 
0069   public:
0070     ///   get / set the pointer to a Condition
0071     inline const CorrelationThreeBodyTemplate* gtCorrelationThreeBodyTemplate() const {
0072       return m_gtCorrelationThreeBodyTemplate;
0073     }
0074 
0075     void setGtCorrelationThreeBodyTemplate(const CorrelationThreeBodyTemplate*);
0076 
0077     ///   get / set the pointer to uGt GlobalBoard
0078     inline const GlobalBoard* getuGtB() const { return m_uGtB; }
0079 
0080     void setuGtB(const GlobalBoard*);
0081 
0082     void setScales(const GlobalScales*);
0083 
0084   private:
0085     ///  copy function for copy constructor and operator=
0086     void copy(const CorrThreeBodyCondition& cp);
0087 
0088     /// load  candidates
0089     const l1t::L1Candidate* getCandidate(const int bx, const int indexCand) const;
0090 
0091     /// function to check a single object if it matches a condition
0092     const bool checkObjectParameter(const int iCondition, const l1t::L1Candidate& cand) const;
0093 
0094   private:
0095     /// pointer to a CorrelationThreeBodyTemplate
0096     const CorrelationThreeBodyTemplate* m_gtCorrelationThreeBodyTemplate;
0097 
0098     // pointer to subconditions
0099     const GlobalCondition* m_gtCond0;
0100     const GlobalCondition* m_gtCond1;
0101     const GlobalCondition* m_gtCond2;
0102 
0103     /// pointer to uGt GlobalBoard, to be able to get the trigger objects
0104     const GlobalBoard* m_uGtB;
0105 
0106     const GlobalScales* m_gtScales;
0107   };
0108 
0109 }  // namespace l1t
0110 #endif