Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-04-21 01:53:29

0001 #ifndef L1Trigger_L1TGlobal_MuonTemplate_h
0002 #define L1Trigger_L1TGlobal_MuonTemplate_h
0003 
0004 /**
0005  * \class MuonTemplate
0006  *
0007  *
0008  * Description: L1 Global Trigger muon template.
0009  *
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *
0013  * \author: Vasile Mihai Ghete - HEPHY Vienna
0014  *          
0015  * \new features: Vladimir Rekovic
0016  *                - extend for indexing
0017  * \new features: Bernhard Arnold, Elisa Fontanesi                                                   
0018  *                - added etaWindows for the checkRangeEta function: it allows to use up to five eta cuts in L1 algorithms 
0019  *                - extended for muon track finder index feature (used for Run 3 muon monitoring seeds)                   
0020  * $Date$
0021  * $Revision$
0022  *
0023  */
0024 
0025 // system include files
0026 #include <string>
0027 #include <iosfwd>
0028 
0029 // user include files
0030 
0031 //   base class
0032 #include "L1Trigger/L1TGlobal/interface/GlobalCondition.h"
0033 
0034 // forward declarations
0035 
0036 // class declaration
0037 class MuonTemplate : public GlobalCondition {
0038 public:
0039   // constructor
0040   MuonTemplate();
0041 
0042   // constructor
0043   MuonTemplate(const std::string&);
0044 
0045   // constructor
0046   MuonTemplate(const std::string&, const l1t::GtConditionType&);
0047 
0048   // copy constructor
0049   MuonTemplate(const MuonTemplate&);
0050 
0051   // destructor
0052   ~MuonTemplate() override;
0053 
0054   // assign operator
0055   MuonTemplate& operator=(const MuonTemplate&);
0056 
0057 public:
0058   struct Window {
0059     unsigned int lower;
0060     unsigned int upper;
0061   };
0062 
0063   // typedef for a single object template
0064   struct ObjectParameter {
0065     unsigned int unconstrainedPtHigh;
0066     unsigned int unconstrainedPtLow;
0067     unsigned int impactParameterHigh;
0068     unsigned int impactParameterLow;
0069     unsigned int ptHighThreshold;
0070     unsigned int ptLowThreshold;
0071     unsigned int indexHigh;
0072     unsigned int indexLow;
0073     bool enableMip;
0074     bool enableIso;
0075     bool requestIso;
0076     unsigned int qualityLUT;
0077     unsigned int isolationLUT;
0078     unsigned int impactParameterLUT;
0079     unsigned long long etaRange;
0080     unsigned int phiHigh;
0081     unsigned int phiLow;
0082 
0083     int charge;
0084 
0085     std::vector<Window> etaWindows;
0086 
0087     unsigned int phiWindow1Lower;
0088     unsigned int phiWindow1Upper;
0089     unsigned int phiWindow2Lower;
0090     unsigned int phiWindow2Upper;
0091 
0092     std::vector<Window> tfMuonIndexWindows;
0093   };
0094 
0095   // typedef for correlation parameters
0096   // chargeCorrelation is defined always
0097   // see documentation for meaning
0098   struct CorrelationParameter {
0099     unsigned int chargeCorrelation;
0100     //unsigned long long deltaEtaRange;
0101 
0102     unsigned long long deltaPhiRange0Word;
0103     unsigned long long deltaPhiRange1Word;
0104     //unsigned int deltaPhiMaxbits;
0105 
0106     unsigned long long deltaEtaRange;
0107 
0108     unsigned long long deltaPhiRange;
0109     unsigned int deltaPhiMaxbits;
0110 
0111     unsigned int deltaEtaRangeLower;
0112     unsigned int deltaEtaRangeUpper;
0113 
0114     unsigned int deltaPhiRangeLower;
0115     unsigned int deltaPhiRangeUpper;
0116   };
0117 
0118 public:
0119   inline const std::vector<ObjectParameter>* objectParameter() const { return &m_objectParameter; }
0120 
0121   inline const CorrelationParameter* correlationParameter() const { return &m_correlationParameter; }
0122 
0123   /// set functions
0124   void setConditionParameter(const std::vector<ObjectParameter>& objParameter,
0125                              const CorrelationParameter& corrParameter);
0126 
0127   /// print the condition
0128   void print(std::ostream& myCout) const override;
0129 
0130   /// output stream operator
0131   friend std::ostream& operator<<(std::ostream&, const MuonTemplate&);
0132 
0133 private:
0134   /// copy function for copy constructor and operator=
0135   void copy(const MuonTemplate& cp);
0136 
0137 private:
0138   /// variables containing the parameters
0139   std::vector<ObjectParameter> m_objectParameter;
0140   CorrelationParameter m_correlationParameter;
0141 };
0142 
0143 #endif