Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_L1TGlobal_CaloCondition_h
0002 #define L1Trigger_L1TGlobal_CaloCondition_h
0003 
0004 /**
0005  * \class CaloCondition
0006  * 
0007  * 
0008  * Description: evaluation of a CondCalo condition.
0009  * 
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *   
0013  * \author: Vasile Mihai Ghete   - HEPHY Vienna 
0014  *          Vladimir Rekovic - extend for indexing
0015  * 
0016  *
0017  */
0018 
0019 // system include files
0020 #include <iosfwd>
0021 #include <string>
0022 
0023 // user include files
0024 //   base classes
0025 #include "L1Trigger/L1TGlobal/interface/ConditionEvaluation.h"
0026 
0027 // forward declarations
0028 class GlobalCondition;
0029 class CaloTemplate;
0030 
0031 namespace l1t {
0032 
0033   class L1Candidate;
0034 
0035   class GlobalBoard;
0036 
0037   // class declaration
0038   class CaloCondition : public ConditionEvaluation {
0039   public:
0040     /// constructors
0041     ///     default
0042     CaloCondition();
0043 
0044     ///     from base template condition (from event setup usually)
0045     CaloCondition(const GlobalCondition*,
0046                   const GlobalBoard*,
0047                   const int nrL1EG,
0048                   const int nrL1Jet,
0049                   const int nrL1Tau,
0050                   const int ifCaloEtaNumberBits);
0051 
0052     // copy constructor
0053     CaloCondition(const CaloCondition&);
0054 
0055     // destructor
0056     ~CaloCondition() override;
0057 
0058     // assign operator
0059     CaloCondition& operator=(const CaloCondition&);
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     ///   get / set the pointer to a Condition
0070     inline const CaloTemplate* gtCaloTemplate() const { return m_gtCaloTemplate; }
0071 
0072     void setGtCaloTemplate(const CaloTemplate*);
0073 
0074     ///   get / set the pointer to uGt GlobalBoard
0075     inline const GlobalBoard* getuGtB() const { return m_uGtB; }
0076 
0077     void setuGtB(const GlobalBoard*);
0078 
0079     ///   get / set the number of bits for eta of calorimeter objects
0080     inline const int gtIfCaloEtaNumberBits() const { return m_ifCaloEtaNumberBits; }
0081 
0082     void setGtIfCaloEtaNumberBits(const int&);
0083 
0084     ///   get / set maximum number of bins for the delta phi scales
0085     inline const int gtCorrParDeltaPhiNrBins() const { return m_corrParDeltaPhiNrBins; }
0086 
0087     void setGtCorrParDeltaPhiNrBins(const int&);
0088 
0089   private:
0090     ///  copy function for copy constructor and operator=
0091     void copy(const CaloCondition& cp);
0092 
0093     /// load calo candidates
0094     const l1t::L1Candidate* getCandidate(const int bx, const int indexCand) const;
0095 
0096     /// function to check a single object if it matches a condition
0097     const bool checkObjectParameter(const int iCondition, const l1t::L1Candidate& cand, const unsigned int index) const;
0098 
0099   private:
0100     /// pointer to a CaloTemplate
0101     const CaloTemplate* m_gtCaloTemplate;
0102 
0103     /// pointer to uGt GlobalBoard, to be able to get the trigger objects
0104     const GlobalBoard* m_uGtB;
0105 
0106     /// number of bits for eta of calorimeter objects
0107     int m_ifCaloEtaNumberBits;
0108 
0109     // maximum number of bins for the delta phi scales
0110     unsigned int m_corrParDeltaPhiNrBins;
0111   };
0112 
0113 }  // namespace l1t
0114 #endif