Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_L1TGlobal_MuonShowerCondition_h
0002 #define L1Trigger_L1TGlobal_MuonShowerCondition_h
0003 
0004 /**
0005  * \class MuonShowerCondition
0006  *
0007  * Description: evaluation of a CondMuonShower condition.
0008  */
0009 
0010 // system include files
0011 #include <iosfwd>
0012 #include <string>
0013 
0014 // user include files
0015 //   base classes
0016 #include "L1Trigger/L1TGlobal/interface/ConditionEvaluation.h"
0017 
0018 #include "DataFormats/L1Trigger/interface/MuonShower.h"
0019 
0020 // forward declarations
0021 class GlobalCondition;
0022 class MuonShowerTemplate;
0023 
0024 namespace l1t {
0025 
0026   class GlobalBoard;
0027 
0028   // class declaration
0029   class MuonShowerCondition : public ConditionEvaluation {
0030   public:
0031     /// constructors
0032     ///     default
0033     MuonShowerCondition();
0034 
0035     ///     from base template condition (from event setup usually)
0036     MuonShowerCondition(const GlobalCondition*, const GlobalBoard*, const int nrL1MuShower);
0037 
0038     // copy constructor
0039     MuonShowerCondition(const MuonShowerCondition&);
0040 
0041     // destructor
0042     ~MuonShowerCondition() override;
0043 
0044     // assign operator
0045     MuonShowerCondition& operator=(const MuonShowerCondition&);
0046 
0047     /// the core function to check if the condition matches
0048     const bool evaluateCondition(const int bxEval) const override;
0049 
0050     /// print condition
0051     void print(std::ostream& myCout) const override;
0052 
0053     ///   get / set the pointer to a Condition
0054     inline const MuonShowerTemplate* gtMuonShowerTemplate() const { return m_gtMuonShowerTemplate; }
0055 
0056     void setGtMuonShowerTemplate(const MuonShowerTemplate*);
0057 
0058     ///   get / set the pointer to GTL
0059     inline const GlobalBoard* gtGTL() const { return m_gtGTL; }
0060 
0061     void setGtGTL(const GlobalBoard*);
0062 
0063   private:
0064     /// copy function for copy constructor and operator=
0065     void copy(const MuonShowerCondition& cp);
0066 
0067     /// load muon candidates
0068     const l1t::MuonShower* getCandidate(const int bx, const int indexCand) const;
0069 
0070     /// function to check a single object if it matches a condition
0071     const bool checkObjectParameter(const int iCondition, const l1t::MuonShower& cand, const unsigned int index) const;
0072 
0073     /// pointer to a MuonShowerTemplate
0074     const MuonShowerTemplate* m_gtMuonShowerTemplate;
0075 
0076     /// pointer to GTL, to be able to get the trigger objects
0077     const GlobalBoard* m_gtGTL;
0078   };
0079 
0080 }  // namespace l1t
0081 #endif