Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-08 06:27:46

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 
0037     ~MuonShower() override;
0038 
0039     /*
0040       In CMSSW we consider 3 valid cases:
0041       - 1 nominal shower (baseline trigger for physics at Run-3)
0042       - 1 tight shower (backup trigger)
0043       - 2 loose showers (to extend the physics reach)
0044 
0045       In the uGT and UTM library, the hadronic shower trigger data is split
0046       over 4 bits: 2 for in-time trigger data, 2 for out-of-time trigger data
0047       - mus0, mus1 for in-time
0048       - musOutOfTime0, musOutOfTime1 for out-of-time
0049 
0050       The mapping for Run-3 startup is as follows:
0051       - 1 nominal shower -> 0b01 (mus0)
0052       - 1 tight shower -> 0b10 (mus1)
0053 
0054       The 2 loose showers case would be mapped onto musOutOfTime0 and musOutOfTime1 later during Run-3
0055     */
0056 
0057     void setOneNominalInTime(const bool bit) { oneNominalInTime_ = bit; }
0058     void setOneTightInTime(const bool bit) { oneTightInTime_ = bit; }
0059     void setMus0(const bool bit) { oneNominalInTime_ = bit; }
0060     void setMus1(const bool bit) { oneTightInTime_ = bit; }
0061     void setMusOutOfTime0(const bool bit) { musOutOfTime0_ = bit; }
0062     void setMusOutOfTime1(const bool bit) { musOutOfTime1_ = bit; }
0063 
0064     bool mus0() const { return oneNominalInTime_; }
0065     bool mus1() const { return oneTightInTime_; }
0066     bool musOutOfTime0() const { return musOutOfTime0_; }
0067     bool musOutOfTime1() const { return musOutOfTime1_; }
0068 
0069     // at least one bit must be valid
0070     bool isValid() const;
0071 
0072     // useful members for trigger performance studies
0073     // needed at startup Run-3
0074     bool isOneNominalInTime() const { return oneNominalInTime_; }
0075     bool isOneTightInTime() const { return oneTightInTime_; }
0076     // to be developed during Run-3
0077     bool isTwoLooseInTime() const { return false; }
0078     // these options require more study
0079     bool isOneNominalOutOfTime() const { return false; }
0080     bool isTwoLooseOutOfTime() const { return false; }
0081     bool isOneTightOutOfTime() const { return false; }
0082 
0083     virtual bool operator==(const l1t::MuonShower& rhs) const;
0084     virtual inline bool operator!=(const l1t::MuonShower& rhs) const { return !(operator==(rhs)); };
0085 
0086   private:
0087     // Run-3 definitions as provided in DN-20-033
0088     // in time and out-of-time qualities. only 2 bits each.
0089     bool oneNominalInTime_;
0090     bool oneTightInTime_;
0091     bool musOutOfTime0_;
0092     bool musOutOfTime1_;
0093   };
0094 
0095 }  // namespace l1t
0096 
0097 #endif