Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef GlobalTrigger_L1GtCaloCondition_h
0002 #define GlobalTrigger_L1GtCaloCondition_h
0003 
0004 /**
0005  * \class L1GtCaloCondition
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  *
0015  *
0016  */
0017 
0018 // system include files
0019 #include <iosfwd>
0020 #include <string>
0021 
0022 // user include files
0023 //   base classes
0024 #include "L1Trigger/GlobalTrigger/interface/L1GtConditionEvaluation.h"
0025 
0026 // forward declarations
0027 class L1GtCondition;
0028 class L1GtCaloTemplate;
0029 
0030 class L1GctCand;
0031 
0032 class L1GlobalTriggerPSB;
0033 
0034 // class declaration
0035 class L1GtCaloCondition : public L1GtConditionEvaluation {
0036 public:
0037   /// constructors
0038   ///     default
0039   L1GtCaloCondition();
0040 
0041   ///     from base template condition (from event setup usually)
0042   L1GtCaloCondition(const L1GtCondition *,
0043                     const L1GlobalTriggerPSB *,
0044                     const int nrL1NoIsoEG,
0045                     const int nrL1IsoEG,
0046                     const int nrL1CenJet,
0047                     const int nrL1ForJet,
0048                     const int nrL1TauJet,
0049                     const int ifCaloEtaNumberBits);
0050 
0051   // copy constructor
0052   L1GtCaloCondition(const L1GtCaloCondition &);
0053 
0054   // destructor
0055   ~L1GtCaloCondition() override;
0056 
0057   // assign operator
0058   L1GtCaloCondition &operator=(const L1GtCaloCondition &);
0059 
0060 public:
0061   /// the core function to check if the condition matches
0062   const bool evaluateCondition() const override;
0063 
0064   /// print condition
0065   void print(std::ostream &myCout) const override;
0066 
0067 public:
0068   ///   get / set the pointer to a L1GtCondition
0069   inline const L1GtCaloTemplate *gtCaloTemplate() const { return m_gtCaloTemplate; }
0070 
0071   void setGtCaloTemplate(const L1GtCaloTemplate *);
0072 
0073   ///   get / set the pointer to PSB
0074   inline const L1GlobalTriggerPSB *gtPSB() const { return m_gtPSB; }
0075 
0076   void setGtPSB(const L1GlobalTriggerPSB *);
0077 
0078   ///   get / set the number of bits for eta of calorimeter objects
0079   inline const int gtIfCaloEtaNumberBits() const { return m_ifCaloEtaNumberBits; }
0080 
0081   void setGtIfCaloEtaNumberBits(const int &);
0082 
0083   ///   get / set maximum number of bins for the delta phi scales
0084   inline const int gtCorrParDeltaPhiNrBins() const { return m_corrParDeltaPhiNrBins; }
0085 
0086   void setGtCorrParDeltaPhiNrBins(const int &);
0087 
0088 private:
0089   /// copy function for copy constructor and operator=
0090   void copy(const L1GtCaloCondition &cp);
0091 
0092   /// load calo candidates
0093   const L1GctCand *getCandidate(const int indexCand) const;
0094 
0095   /// function to check a single object if it matches a condition
0096   const bool checkObjectParameter(const int iCondition, const L1GctCand &cand) const;
0097 
0098 private:
0099   /// pointer to a L1GtCaloTemplate
0100   const L1GtCaloTemplate *m_gtCaloTemplate;
0101 
0102   /// pointer to PSB, to be able to get the trigger objects
0103   const L1GlobalTriggerPSB *m_gtPSB;
0104 
0105   /// number of bits for eta of calorimeter objects
0106   int m_ifCaloEtaNumberBits;
0107 
0108   // maximum number of bins for the delta phi scales
0109   unsigned int m_corrParDeltaPhiNrBins;
0110 };
0111 
0112 #endif