Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-14 11:44:51

0001 #ifndef DataFormats_L1Trigger_RegionalMuonShower_h
0002 #define DataFormats_L1Trigger_RegionalMuonShower_h
0003 
0004 #include "DataFormats/Common/interface/Ref.h"
0005 #include "DataFormats/L1Trigger/interface/BXVector.h"
0006 #include "DataFormats/L1Trigger/interface/L1TObjComparison.h"
0007 
0008 #include "RegionalMuonCandFwd.h"  // For tftype.
0009 
0010 namespace l1t {
0011 
0012   class RegionalMuonShower;
0013   typedef BXVector<RegionalMuonShower> RegionalMuonShowerBxCollection;
0014   typedef ObjectRefBxCollection<RegionalMuonShower> RegionalMuonShowerRefBxCollection;
0015   typedef ObjectRefPair<RegionalMuonShower> RegionalMuonShowerRefPair;
0016   typedef ObjectRefPairBxCollection<RegionalMuonShower> RegionalMuonShowerRefPairBxCollection;
0017 
0018   class RegionalMuonShower {
0019   public:
0020     RegionalMuonShower(bool oneNominalInTime = false,
0021                        bool oneNominalOutOfTime = false,
0022                        bool twoLooseInTime = false,
0023                        bool twoLooseOutOfTime = false,
0024                        bool oneTightInTime = false,
0025                        bool oneTightOutOfTime = false);
0026 
0027     ~RegionalMuonShower();
0028 
0029     void setOneNominalInTime(const bool bit) { isOneNominalInTime_ = bit; }
0030     void setOneNominalOutOfTime(const bool bit) { isOneNominalOutOfTime_ = bit; }
0031     void setOneTightInTime(const bool bit) { isOneTightInTime_ = bit; }
0032     void setOneTightOutOfTime(const bool bit) { isOneTightOutOfTime_ = bit; }
0033     void setTwoLooseOutOfTime(const bool bit) { isTwoLooseOutOfTime_ = bit; }
0034     void setTwoLooseInTime(const bool bit) { isTwoLooseInTime_ = bit; }
0035 
0036     /// Set the processor ID, track-finder type. From these two, the link is set
0037     void setTFIdentifiers(int processor, tftype trackFinder);
0038 
0039     bool isValid() const;
0040     bool isOneNominalInTime() const { return isOneNominalInTime_; }
0041     bool isOneNominalOutOfTime() const { return isOneNominalOutOfTime_; }
0042     bool isOneTightInTime() const { return isOneTightInTime_; }
0043     bool isOneTightOutOfTime() const { return isOneTightOutOfTime_; }
0044     bool isTwoLooseInTime() const { return isTwoLooseInTime_; }
0045     bool isTwoLooseOutOfTime() const { return isTwoLooseOutOfTime_; }
0046 
0047     /// Get link on which the MicroGMT receives the candidate
0048     const int link() const { return link_; };
0049     /// Get processor ID on which the candidate was found (0..5 for OMTF/EMTF; 0..11 for BMTF)
0050     const int processor() const { return processor_; };
0051     /// Get track-finder which found the muon (bmtf, emtf_pos/emtf_neg or omtf_pos/omtf_neg)
0052     const tftype trackFinderType() const { return trackFinder_; };
0053 
0054     bool operator==(const l1t::RegionalMuonShower& rhs) const;
0055     inline bool operator!=(const l1t::RegionalMuonShower& rhs) const { return !(operator==(rhs)); };
0056 
0057   private:
0058     // Run-3 definitions as provided in DN-20-033
0059     // in time and out-of-time qualities. only 2 bits each.
0060     bool isOneNominalInTime_;
0061     bool isOneNominalOutOfTime_;
0062     bool isOneTightInTime_;
0063     bool isOneTightOutOfTime_;
0064     bool isTwoLooseInTime_;
0065     bool isTwoLooseOutOfTime_;
0066     int link_;
0067     int processor_;
0068     tftype trackFinder_;
0069   };
0070 
0071 }  // namespace l1t
0072 
0073 #endif