Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:50

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