Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_L1TGlobal_CorrelationWithOverlapRemovalTemplate_h
0002 #define L1Trigger_L1TGlobal_CorrelationWithOverlapRemovalTemplate_h
0003 
0004 /**
0005  * \class CorrelationWithOverlapRemovalTemplate,  motivated by class CorrealtionTemplate
0006  *
0007  *
0008  * Description: L1 Global Trigger correlation with overlap removal template.
0009  * Includes spatial correlation for two objects and removal of overlap with third object
0010  *
0011  * Implementation:
0012  *    <TODO: enter implementation details>
0013  *
0014  * \author: Vladimir Rekovic
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 CorrelationWithOverlapRemovalTemplate : public GlobalCondition {
0035 public:
0036   /// constructor(s)
0037   ///   default
0038   CorrelationWithOverlapRemovalTemplate();
0039 
0040   ///   from condition name
0041   CorrelationWithOverlapRemovalTemplate(const std::string&);
0042 
0043   ///   from condition name, the category of first sub-condition, the category of the
0044   ///   second sub-condition, the category of third sub-condition, the index of first sub-condition in the cor* vector,
0045   ///   the index of second sub-condition in the cor* vector, the index of second sub-condition in the cor* vector
0046   CorrelationWithOverlapRemovalTemplate(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   CorrelationWithOverlapRemovalTemplate(const CorrelationWithOverlapRemovalTemplate&);
0056 
0057   /// destructor
0058   ~CorrelationWithOverlapRemovalTemplate() override;
0059 
0060   /// assign operator
0061   CorrelationWithOverlapRemovalTemplate& operator=(const CorrelationWithOverlapRemovalTemplate&);
0062 
0063 public:
0064   /// typedef for correlation parameters
0065   struct CorrelationWithOverlapRemovalParameter {
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 minDRCutValue;
0076     long long maxDRCutValue;
0077 
0078     unsigned int precDRCut;
0079 
0080     long long minMassCutValue;
0081     long long maxMassCutValue;
0082     unsigned int precMassCut;
0083 
0084     long long minTBPTCutValue;
0085     long long maxTBPTCutValue;
0086     unsigned int precTBPTCut;
0087 
0088     long long minOverlapRemovalEtaCutValue;
0089     long long maxOverlapRemovalEtaCutValue;
0090     unsigned int precOverlapRemovalEtaCut;
0091 
0092     long long minOverlapRemovalPhiCutValue;
0093     long long maxOverlapRemovalPhiCutValue;
0094     unsigned int precOverlapRemovalPhiCut;
0095 
0096     long long minOverlapRemovalDRCutValue;
0097     long long maxOverlapRemovalDRCutValue;
0098     unsigned int precOverlapRemovalDRCut;
0099 
0100     //Requirement on charge of legs (currently only Mu-Mu).
0101     unsigned int chargeCorrelation;
0102 
0103     int corrCutType;
0104   };
0105 
0106 public:
0107   /// get / set the category of the thre sub-conditions
0108   inline const l1t::GtConditionCategory cond0Category() const { return m_cond0Category; }
0109 
0110   inline const l1t::GtConditionCategory cond1Category() const { return m_cond1Category; }
0111 
0112   inline const l1t::GtConditionCategory cond2Category() const { return m_cond2Category; }
0113 
0114   void setCond0Category(const l1t::GtConditionCategory&);
0115   void setCond1Category(const l1t::GtConditionCategory&);
0116   void setCond2Category(const l1t::GtConditionCategory&);
0117 
0118   /// get / set the index of the two sub-conditions in the cor* vector from menu
0119   inline const int cond0Index() const { return m_cond0Index; }
0120 
0121   inline const int cond1Index() const { return m_cond1Index; }
0122 
0123   inline const int cond2Index() const { return m_cond2Index; }
0124 
0125   void setCond0Index(const int&);
0126   void setCond1Index(const int&);
0127   void setCond2Index(const int&);
0128 
0129   /// get / set correlation parameters
0130 
0131   inline const CorrelationWithOverlapRemovalParameter* correlationParameter() const { return &m_correlationParameter; }
0132 
0133   void setCorrelationWithOverlapRemovalParameter(const CorrelationWithOverlapRemovalParameter& corrParameter);
0134 
0135   /// print the condition
0136   void print(std::ostream& myCout) const override;
0137 
0138   /// output stream operator
0139   friend std::ostream& operator<<(std::ostream&, const CorrelationWithOverlapRemovalTemplate&);
0140 
0141 private:
0142   /// copy function for copy constructor and operator=
0143   void copy(const CorrelationWithOverlapRemovalTemplate& cp);
0144 
0145 private:
0146   l1t::GtConditionCategory m_cond0Category;
0147   l1t::GtConditionCategory m_cond1Category;
0148   l1t::GtConditionCategory m_cond2Category;
0149   int m_cond0Index;
0150   int m_cond1Index;
0151   int m_cond2Index;
0152   CorrelationWithOverlapRemovalParameter m_correlationParameter;
0153 };
0154 
0155 #endif