Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-11 03:34:02

0001 #ifndef DataFormats_L1Trigger_MuonShower_h
0002 #define DataFormats_L1Trigger_MuonShower_h
0003 
0004 /*
0005   This class is derived from the L1Candidate primarily to interface easily
0006   with the Global Muon Trigger. In the trigger system the MuonShower object
0007   carries only up to 4 bits of information, 2 for in-time showers,
0008   2 for out-of-time showers.
0009 */
0010 
0011 #include "DataFormats/Common/interface/Ref.h"
0012 #include "DataFormats/L1Trigger/interface/L1Candidate.h"
0013 #include "DataFormats/L1Trigger/interface/BXVector.h"
0014 #include "DataFormats/L1Trigger/interface/L1TObjComparison.h"
0015 
0016 namespace l1t {
0017 
0018   class MuonShower;
0019   typedef BXVector<MuonShower> MuonShowerBxCollection;
0020   typedef edm::Ref<MuonShowerBxCollection> MuonShowerRef;
0021   typedef edm::RefVector<MuonShowerBxCollection> MuonShowerRefVector;
0022   typedef std::vector<MuonShowerRef> MuonShowerVectorRef;
0023 
0024   typedef ObjectRefBxCollection<MuonShower> MuonShowerRefBxCollection;
0025   typedef ObjectRefPair<MuonShower> MuonShowerRefPair;
0026   typedef ObjectRefPairBxCollection<MuonShower> MuonShowerRefPairBxCollection;
0027 
0028   class MuonShower : public L1Candidate {
0029   public:
0030     MuonShower(bool oneNominalInTime = false,
0031                bool oneNominalOutOfTime = false,
0032                bool twoLooseInTime = false,
0033                bool twoLooseOutOfTime = false,
0034                bool oneTightInTime = false,
0035                bool oneTightOutOfTime = false,
0036                bool twoLooseDiffSectorsIntime = false);
0037 
0038     ~MuonShower() override;
0039 
0040     /*
0041      * We currently have three valid cases:
0042      * - 1 nominal shower (baseline trigger for physics at Run-3)
0043      * - 1 tight shower (backup trigger)
0044      * - 2 loose showers in different sectors (to extend the physics reach)
0045      *
0046      * uGT receives shower information on five bits:
0047      * - 2 bits for in-time showers (mus0, mus1 in UTM)
0048      * - 2 bits for out-of-time showers (musOutOfTime0, musOutOfTime1 in UTM)
0049      * - 1 bit for the newly added two loose showers in different sectors (mus2 in UTM)
0050      * Disclaimer: The notion of "in time" and "out of time" showers is outdated, as there
0051      * are no plans for out of time showers anymore, however the naming has been kept here
0052      * to avoid confusion with the way things have been named from the start.
0053      *
0054      * The mapping as it is currently understood is:
0055      * - 1 nominal shower -> mus0
0056      * - 1 tight shower -> mus1
0057      * - 2 loose showers in differnt sectors -> mus2
0058      */
0059 
0060     void setOneNominalInTime(const bool bit) { oneNominalInTime_ = bit; }
0061     void setOneTightInTime(const bool bit) { oneTightInTime_ = bit; }
0062     void setTwoLooseDiffSectorsInTime(const bool bit) { twoLooseDiffSectorsInTime_ = bit; }
0063     void setMusOutOfTime0(const bool bit) { musOutOfTime0_ = bit; }
0064     void setMusOutOfTime1(const bool bit) { musOutOfTime1_ = bit; }
0065 
0066     bool isOneNominalInTime() const { return oneNominalInTime_; }
0067     bool isOneTightInTime() const { return oneTightInTime_; }
0068     bool isTwoLooseDiffSectorsInTime() const { return twoLooseDiffSectorsInTime_; }
0069     bool musOutOfTime0() const { return musOutOfTime0_; }
0070     bool musOutOfTime1() const { return musOutOfTime1_; }
0071 
0072     // at least one bit must be valid
0073     bool isValid() const;
0074 
0075     // to be developed during Run-3
0076     bool isTwoLooseInTime() const { return false; }
0077     // these options require more study
0078     bool isOneNominalOutOfTime() const { return false; }
0079     bool isTwoLooseOutOfTime() const { return false; }
0080     bool isOneTightOutOfTime() const { return false; }
0081 
0082     bool operator==(const l1t::MuonShower& rhs) const;
0083     inline bool operator!=(const l1t::MuonShower& rhs) const { return !(operator==(rhs)); };
0084 
0085   private:
0086     using L1Candidate::operator==;
0087     using L1Candidate::operator!=;
0088     // Run-3 definitions as provided in DN-20-033
0089     // in time and out-of-time qualities. only 2 bits each.
0090     bool oneNominalInTime_;
0091     bool oneTightInTime_;
0092     bool twoLooseDiffSectorsInTime_;
0093     bool musOutOfTime0_;
0094     bool musOutOfTime1_;
0095   };
0096 
0097 }  // namespace l1t
0098 
0099 #endif