Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:59

0001 #ifndef DataFormats_L1Trigger_Muon_h
0002 #define DataFormats_L1Trigger_Muon_h
0003 
0004 #include "DataFormats/Common/interface/Ref.h"
0005 #include "DataFormats/L1Trigger/interface/L1Candidate.h"
0006 #include "DataFormats/L1Trigger/interface/BXVector.h"
0007 #include "DataFormats/L1Trigger/interface/L1TObjComparison.h"
0008 
0009 namespace l1t {
0010 
0011   class Muon;
0012   typedef BXVector<Muon> MuonBxCollection;
0013   typedef edm::Ref<MuonBxCollection> MuonRef;
0014   typedef edm::RefVector<MuonBxCollection> MuonRefVector;
0015   typedef std::vector<MuonRef> MuonVectorRef;
0016 
0017   typedef ObjectRefBxCollection<Muon> MuonRefBxCollection;
0018   typedef ObjectRefPair<Muon> MuonRefPair;
0019   typedef ObjectRefPairBxCollection<Muon> MuonRefPairBxCollection;
0020 
0021   class Muon : public L1Candidate {
0022   public:
0023     Muon();
0024 
0025     Muon(const LorentzVector& p4,
0026          int pt = 0,
0027          int eta = 0,
0028          int phi = 0,
0029          int qual = 0,
0030          int charge = 0,
0031          int chargeValid = 0,
0032          int iso = 0,
0033          int tfMuonIndex = -1,
0034          int tag = 0,
0035          bool debug = false,
0036          int isoSum = 0,
0037          int dPhi = 0,
0038          int dEta = 0,
0039          int rank = 0,
0040          int hwEtaAtVtx = 0,
0041          int hwPhiAtVtx = 0,
0042          double etaAtVtx = 0.,
0043          double phiAtVtx = 0.,
0044          int hwPtUnconstrained = 0,
0045          double ptUnconstrained = 0.,
0046          int dXY = 0);
0047 
0048     Muon(const PolarLorentzVector& p4,
0049          int pt = 0,
0050          int eta = 0,
0051          int phi = 0,
0052          int qual = 0,
0053          int charge = 0,
0054          int chargeValid = 0,
0055          int iso = 0,
0056          int tfMuonIndex = -1,
0057          int tag = 0,
0058          bool debug = false,
0059          int isoSum = 0,
0060          int dPhi = 0,
0061          int dEta = 0,
0062          int rank = 0,
0063          int hwEtaAtVtx = 0,
0064          int hwPhiAtVtx = 0,
0065          double etaAtVtx = 0.,
0066          double phiAtVtx = 0.,
0067          int hwPtUnconstrained = 0,
0068          double ptUnconstrained = 0.,
0069          int dXY = 0);
0070 
0071     ~Muon() override;
0072 
0073     // set values
0074     inline void setHwCharge(int charge) { hwCharge_ = charge; };
0075     inline void setHwChargeValid(int valid) { hwChargeValid_ = valid; };
0076     inline void setTfMuonIndex(int index) { tfMuonIndex_ = index; };
0077     inline void setHwTag(int tag) { hwTag_ = tag; };
0078 
0079     inline void setHwEtaAtVtx(int hwEtaAtVtx) { hwEtaAtVtx_ = hwEtaAtVtx; };
0080     inline void setHwPhiAtVtx(int hwPhiAtVtx) { hwPhiAtVtx_ = hwPhiAtVtx; };
0081     inline void setEtaAtVtx(double etaAtVtx) { etaAtVtx_ = etaAtVtx; };
0082     inline void setPhiAtVtx(double phiAtVtx) { phiAtVtx_ = phiAtVtx; };
0083 
0084     inline void setHwIsoSum(int isoSum) { hwIsoSum_ = isoSum; };
0085     inline void setHwDPhiExtra(int dPhi) { hwDPhiExtra_ = dPhi; };
0086     inline void setHwDEtaExtra(int dEta) { hwDEtaExtra_ = dEta; };
0087     inline void setHwRank(int rank) { hwRank_ = rank; };
0088 
0089     inline void setHwPtUnconstrained(int hwPtUnconstrained) { hwPtUnconstrained_ = hwPtUnconstrained; };
0090     inline void setPtUnconstrained(double ptUnconstrained) { ptUnconstrained_ = ptUnconstrained; };
0091     inline void setHwDXY(int hwDXY) { hwDXY_ = hwDXY; };
0092 
0093     inline void setDebug(bool debug) { debug_ = debug; };
0094 
0095     // methods to retrieve values
0096     inline int hwCharge() const { return hwCharge_; };
0097     inline int hwChargeValid() const { return hwChargeValid_; };
0098     inline int tfMuonIndex() const { return tfMuonIndex_; };
0099     inline int hwTag() const { return hwTag_; };
0100 
0101     inline int hwEtaAtVtx() const { return hwEtaAtVtx_; };
0102     inline int hwPhiAtVtx() const { return hwPhiAtVtx_; };
0103     inline double etaAtVtx() const { return etaAtVtx_; };
0104     inline double phiAtVtx() const { return phiAtVtx_; };
0105 
0106     inline int hwIsoSum() const { return hwIsoSum_; };
0107     inline int hwDPhiExtra() const { return hwDPhiExtra_; };
0108     inline int hwDEtaExtra() const { return hwDEtaExtra_; };
0109     inline int hwRank() const { return hwRank_; };
0110 
0111     inline int hwPtUnconstrained() const { return hwPtUnconstrained_; };
0112     inline double ptUnconstrained() const { return ptUnconstrained_; };
0113     inline int hwDXY() const { return hwDXY_; };
0114 
0115     inline bool debug() const { return debug_; };
0116 
0117     virtual bool operator==(const l1t::Muon& rhs) const;
0118     virtual inline bool operator!=(const l1t::Muon& rhs) const { return !(operator==(rhs)); };
0119 
0120   private:
0121     // additional hardware quantities common to L1 global jet
0122     int hwCharge_;
0123     int hwChargeValid_;
0124     int tfMuonIndex_;
0125     int hwTag_;
0126 
0127     // additional hardware quantities only available if debug flag is set
0128     bool debug_;
0129     int hwIsoSum_;
0130     int hwDPhiExtra_;
0131     int hwDEtaExtra_;
0132     int hwRank_;
0133 
0134     // muon coordinates at the vertex
0135     int hwEtaAtVtx_;
0136     int hwPhiAtVtx_;
0137     double etaAtVtx_;
0138     double phiAtVtx_;
0139 
0140     // displacement information
0141     int hwPtUnconstrained_;
0142     double ptUnconstrained_;
0143     int hwDXY_;
0144   };
0145 
0146 }  // namespace l1t
0147 
0148 #endif