Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-14 23:16:58

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                            const GlobalScales*);
0051 
0052     // copy constructor
0053     CorrThreeBodyCondition(const CorrThreeBodyCondition&);
0054 
0055     // destructor
0056     ~CorrThreeBodyCondition() override;
0057 
0058     // assign operator
0059     CorrThreeBodyCondition& operator=(const CorrThreeBodyCondition&);
0060 
0061   public:
0062     /// the core function to check if the condition matches
0063     const bool evaluateCondition(const int bxEval) const override;
0064 
0065     /// print condition
0066     void print(std::ostream& myCout) const override;
0067 
0068   public:
0069     inline const CorrelationThreeBodyTemplate* gtCorrelationThreeBodyTemplate() const {
0070       return m_gtCorrelationThreeBodyTemplate;
0071     }
0072     void setGtCorrelationThreeBodyTemplate(const CorrelationThreeBodyTemplate*);
0073 
0074     inline const GlobalBoard* getuGtB() const { return m_uGtB; }
0075     void setuGtB(const GlobalBoard*);
0076 
0077     inline const GlobalScales* getScales() const { return m_gtScales; }
0078     void setScales(const GlobalScales*);
0079 
0080   private:
0081     ///  copy function for copy constructor and operator=
0082     void copy(const CorrThreeBodyCondition& cp);
0083 
0084     /// load  candidates
0085     const l1t::L1Candidate* getCandidate(const int bx, const int indexCand) const;
0086 
0087     /// function to check a single object if it matches a condition
0088     const bool checkObjectParameter(const int iCondition, const l1t::L1Candidate& cand) const;
0089 
0090   private:
0091     /// pointer to a CorrelationThreeBodyTemplate
0092     const CorrelationThreeBodyTemplate* m_gtCorrelationThreeBodyTemplate;
0093 
0094     // pointer to subconditions
0095     const GlobalCondition* m_gtCond0;
0096     const GlobalCondition* m_gtCond1;
0097     const GlobalCondition* m_gtCond2;
0098 
0099     /// pointer to uGt GlobalBoard, to be able to get the trigger objects
0100     const GlobalBoard* m_uGtB;
0101 
0102     const GlobalScales* m_gtScales;
0103   };
0104 
0105 }  // namespace l1t
0106 #endif