Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_L1TGlobal_MuCondition_h
0002 #define L1Trigger_L1TGlobal_MuCondition_h
0003 
0004 /**
0005  * \class MuCondition
0006  * 
0007  * 
0008  * Description: evaluation of a CondMuon condition.
0009  * 
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *   
0013  *          Vladimir Rekovic - extend for indexing
0014  */
0015 
0016 // system include files
0017 #include <iosfwd>
0018 #include <string>
0019 
0020 // user include files
0021 //   base classes
0022 #include "L1Trigger/L1TGlobal/interface/ConditionEvaluation.h"
0023 
0024 #include "DataFormats/L1Trigger/interface/Muon.h"
0025 
0026 // forward declarations
0027 class GlobalCondition;
0028 class MuonTemplate;
0029 
0030 namespace l1t {
0031 
0032   class L1MuGMTCand;
0033 
0034   class GlobalBoard;
0035 
0036   // class declaration
0037   class MuCondition : public ConditionEvaluation {
0038   public:
0039     /// constructors
0040     ///     default
0041     MuCondition();
0042 
0043     ///     from base template condition (from event setup usually)
0044     MuCondition(const GlobalCondition*, const GlobalBoard*, const int nrL1Mu, const int ifMuEtaNumberBits);
0045 
0046     // copy constructor
0047     MuCondition(const MuCondition&);
0048 
0049     // destructor
0050     ~MuCondition() override;
0051 
0052     // assign operator
0053     MuCondition& operator=(const MuCondition&);
0054 
0055   public:
0056     /// the core function to check if the condition matches
0057     const bool evaluateCondition(const int bxEval) const override;
0058 
0059     /// print condition
0060     void print(std::ostream& myCout) const override;
0061 
0062   public:
0063     ///   get / set the pointer to a Condition
0064     inline const MuonTemplate* gtMuonTemplate() const { return m_gtMuonTemplate; }
0065 
0066     void setGtMuonTemplate(const MuonTemplate*);
0067 
0068     ///   get / set the pointer to GTL
0069     inline const GlobalBoard* gtGTL() const { return m_gtGTL; }
0070 
0071     void setGtGTL(const GlobalBoard*);
0072 
0073     ///   get / set the number of bits for eta of muon objects
0074     inline const int gtIfMuEtaNumberBits() const { return m_ifMuEtaNumberBits; }
0075 
0076     void setGtIfMuEtaNumberBits(const int&);
0077 
0078     ///   get / set maximum number of bins for the delta phi scales
0079     inline const int gtCorrParDeltaPhiNrBins() const { return m_corrParDeltaPhiNrBins; }
0080 
0081     void setGtCorrParDeltaPhiNrBins(const int&);
0082 
0083   private:
0084     /// copy function for copy constructor and operator=
0085     void copy(const MuCondition& cp);
0086 
0087     /// load muon candidates
0088     const l1t::Muon* getCandidate(const int bx, const int indexCand) const;
0089 
0090     /// function to check a single object if it matches a condition
0091     const bool checkObjectParameter(const int iCondition, const l1t::Muon& cand, const unsigned int index) const;
0092 
0093   private:
0094     /// pointer to a MuonTemplate
0095     const MuonTemplate* m_gtMuonTemplate;
0096 
0097     /// pointer to GTL, to be able to get the trigger objects
0098     const GlobalBoard* m_gtGTL;
0099 
0100     /// number of bits for eta of muon objects
0101     int m_ifMuEtaNumberBits;
0102 
0103     // maximum number of bins for the delta phi scales
0104     unsigned int m_corrParDeltaPhiNrBins;
0105   };
0106 
0107 }  // namespace l1t
0108 #endif