Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_L1TGlobal_CorrCondition_h
0002 #define L1Trigger_L1TGlobal_CorrCondition_h
0003 
0004 /**
0005  * \class CorrCondition
0006  * 
0007  * 
0008  * Description: evaluation of a correlation 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/L1TGlobal/interface/ConditionEvaluation.h"
0025 #include "L1Trigger/L1TGlobal/interface/GlobalScales.h"
0026 
0027 // forward declarations
0028 class GlobalCondition;
0029 class CorrelationTemplate;
0030 
0031 namespace l1t {
0032 
0033   class L1Candidate;
0034 
0035   class GlobalBoard;
0036 
0037   // class declaration
0038   class CorrCondition : public ConditionEvaluation {
0039   public:
0040     /// constructors
0041     ///     default
0042     CorrCondition();
0043 
0044     ///     from base template condition (from event setup usually)
0045     CorrCondition(const GlobalCondition*, const GlobalCondition*, const GlobalCondition*, const GlobalBoard*
0046 
0047     );
0048 
0049     // copy constructor
0050     CorrCondition(const CorrCondition&);
0051 
0052     // destructor
0053     ~CorrCondition() override;
0054 
0055     // assign operator
0056     CorrCondition& operator=(const CorrCondition&);
0057 
0058   public:
0059     /// the core function to check if the condition matches
0060     const bool evaluateCondition(const int bxEval) const override;
0061 
0062     /// print condition
0063     void print(std::ostream& myCout) const override;
0064 
0065   public:
0066     ///   get / set the pointer to a Condition
0067     inline const CorrelationTemplate* gtCorrelationTemplate() const { return m_gtCorrelationTemplate; }
0068 
0069     void setGtCorrelationTemplate(const CorrelationTemplate*);
0070 
0071     ///   get / set the pointer to uGt GlobalBoard
0072     inline const GlobalBoard* getuGtB() const { return m_uGtB; }
0073 
0074     void setuGtB(const GlobalBoard*);
0075 
0076     void setScales(const GlobalScales*);
0077 
0078     /*   //BLW Comment out for now
0079     ///   get / set the number of bits for eta of calorimeter objects
0080     inline const int gtIfCaloEtaNumberBits() const {
0081         return m_ifCaloEtaNumberBits;
0082     }
0083 
0084 
0085     void setGtIfCaloEtaNumberBits(const int&);
0086 
0087     ///   get / set maximum number of bins for the delta phi scales
0088     inline const int gtCorrParDeltaPhiNrBins() const {
0089         return m_corrParDeltaPhiNrBins;
0090     }
0091 
0092     void setGtCorrParDeltaPhiNrBins(const int&);
0093 */
0094   private:
0095     ///  copy function for copy constructor and operator=
0096     void copy(const CorrCondition& cp);
0097 
0098     /// load  candidates
0099     const l1t::L1Candidate* getCandidate(const int bx, const int indexCand) const;
0100 
0101     /// function to check a single object if it matches a condition
0102     const bool checkObjectParameter(const int iCondition, const l1t::L1Candidate& cand) const;
0103 
0104   private:
0105     /// pointer to a CorrelationTemplate
0106     const CorrelationTemplate* m_gtCorrelationTemplate;
0107 
0108     // pointer to subconditions
0109     const GlobalCondition* m_gtCond0;
0110     const GlobalCondition* m_gtCond1;
0111 
0112     /// pointer to uGt GlobalBoard, to be able to get the trigger objects
0113     const GlobalBoard* m_uGtB;
0114 
0115     const GlobalScales* m_gtScales;
0116 
0117     /*   //BLW comment out for now
0118     /// number of bits for eta of calorimeter objects
0119     int m_ifCaloEtaNumberBits;
0120 
0121     // maximum number of bins for the delta phi scales
0122     unsigned int m_corrParDeltaPhiNrBins;
0123 */
0124   };
0125 
0126 }  // namespace l1t
0127 #endif