Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:29

0001 #ifndef L1Trigger_L1TGlobal_CorrelationThreeBodyTemplate_h
0002 #define L1Trigger_L1TGlobal_CorrelationThreeBodyTemplate_h
0003 
0004 /**
0005  * \class CorrelationThreeBodyTemplate
0006  *
0007  *
0008  * Description: L1 Global Trigger three-body correlation template:
0009  *              include invariant mass calculation for three-muon events
0010  *
0011  * Implementation:
0012  *    <TODO: enter implementation details>
0013  *
0014  * \author: Elisa Fontanesi - Boston University 
0015  *          Starting from CorrelationTemplate.h written by Vasile Mihai Ghete - HEPHY Vienna
0016  *
0017  * $Date$
0018  * $Revision$
0019  *
0020  */
0021 
0022 // system include files
0023 #include <string>
0024 #include <iosfwd>
0025 
0026 // user include files
0027 
0028 //   base class
0029 #include "L1Trigger/L1TGlobal/interface/GlobalCondition.h"
0030 #include "L1Trigger/L1TGlobal/interface/GlobalDefinitions.h"
0031 
0032 // forward declarations
0033 
0034 // class declaration
0035 class CorrelationThreeBodyTemplate : public GlobalCondition {
0036 public:
0037   /// constructor(s)
0038   ///   default
0039   CorrelationThreeBodyTemplate();
0040 
0041   ///   from condition name
0042   CorrelationThreeBodyTemplate(const std::string&);
0043 
0044   ///   from condition name, the category of first, second, and third subcondition,
0045   ///   the index of first, second, third subcondition in the cor* vector
0046   CorrelationThreeBodyTemplate(const std::string&,
0047                                const l1t::GtConditionCategory&,
0048                                const l1t::GtConditionCategory&,
0049                                const l1t::GtConditionCategory&,
0050                                const int,
0051                                const int,
0052                                const int);
0053 
0054   /// copy constructor
0055   CorrelationThreeBodyTemplate(const CorrelationThreeBodyTemplate&);
0056 
0057   /// destructor
0058   ~CorrelationThreeBodyTemplate() override;
0059 
0060   /// assign operator
0061   CorrelationThreeBodyTemplate& operator=(const CorrelationThreeBodyTemplate&);
0062 
0063 public:
0064   /// typedef for correlation three-body parameters
0065   struct CorrelationThreeBodyParameter {
0066     //Cut values in hardware
0067     long long minEtaCutValue;
0068     long long maxEtaCutValue;
0069     unsigned int precEtaCut;
0070 
0071     long long minPhiCutValue;
0072     long long maxPhiCutValue;
0073     unsigned int precPhiCut;
0074 
0075     long long minMassCutValue;
0076     long long maxMassCutValue;
0077     unsigned int precMassCut;
0078 
0079     int corrCutType;
0080 
0081     //Requirement on charge of the three muon legs
0082     unsigned int chargeCorrelation;
0083   };
0084 
0085 public:
0086   /// get / set the category of the three subconditions
0087   inline const l1t::GtConditionCategory cond0Category() const { return m_cond0Category; }
0088   inline const l1t::GtConditionCategory cond1Category() const { return m_cond1Category; }
0089   inline const l1t::GtConditionCategory cond2Category() const { return m_cond2Category; }
0090 
0091   void setCond0Category(const l1t::GtConditionCategory&);
0092   void setCond1Category(const l1t::GtConditionCategory&);
0093   void setCond2Category(const l1t::GtConditionCategory&);
0094 
0095   /// get / set the index of the three subconditions in the cor* vector from menu
0096   inline const int cond0Index() const { return m_cond0Index; }
0097   inline const int cond1Index() const { return m_cond1Index; }
0098   inline const int cond2Index() const { return m_cond2Index; }
0099 
0100   void setCond0Index(const int&);
0101   void setCond1Index(const int&);
0102   void setCond2Index(const int&);
0103 
0104   /// get / set correlation parameters
0105   inline const CorrelationThreeBodyParameter* correlationThreeBodyParameter() const {
0106     return &m_correlationThreeBodyParameter;
0107   }
0108   void setCorrelationThreeBodyParameter(const CorrelationThreeBodyParameter& corrThreeBodyParameter);
0109 
0110   /// print the condition
0111   void print(std::ostream& myCout) const override;
0112 
0113   /// output stream operator
0114   friend std::ostream& operator<<(std::ostream&, const CorrelationThreeBodyTemplate&);
0115 
0116 private:
0117   /// copy function for copy constructor and operator=
0118   void copy(const CorrelationThreeBodyTemplate& cp);
0119 
0120 private:
0121   l1t::GtConditionCategory m_cond0Category;
0122   l1t::GtConditionCategory m_cond1Category;
0123   l1t::GtConditionCategory m_cond2Category;
0124   int m_cond0Index;
0125   int m_cond1Index;
0126   int m_cond2Index;
0127   CorrelationThreeBodyParameter m_correlationThreeBodyParameter;
0128 };
0129 
0130 #endif