Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef DataFormatsL1TCorrelator_TkMuon_h
0002 #define DataFormatsL1TCorrelator_TkMuon_h
0003 
0004 #include "DataFormats/L1Trigger/interface/L1Candidate.h"
0005 #include "DataFormats/Common/interface/Ref.h"
0006 #include "DataFormats/Common/interface/Ptr.h"
0007 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0008 #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h"
0009 #include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h"
0010 #include "DataFormats/L1TMuon/interface/EMTFTrack.h"
0011 
0012 namespace l1t {
0013   class TkMuon : public L1Candidate {
0014   public:
0015     typedef TTTrack<Ref_Phase2TrackerDigi_> L1TTTrackType;
0016     typedef std::vector<L1TTTrackType> L1TTTrackCollection;
0017 
0018     TkMuon() : theIsolation(-999.), TrkzVtx_(999.), quality_(999), pattern_(0) {}
0019 
0020     TkMuon(const LorentzVector& p4,
0021            const edm::Ref<l1t::RegionalMuonCandBxCollection>& muRef,
0022            const edm::Ptr<L1TTTrackType>& trkPtr,
0023            float tkisol = -999.);
0024 
0025     TkMuon(const LorentzVector& p4,
0026            const edm::Ref<l1t::EMTFTrackCollection>& emtfTrk,
0027            const edm::Ptr<L1TTTrackType>& trkPtr,
0028            float tkisol = -999.);
0029 
0030     //One more constructor for Tracker+ Stubs algorithm not requiring the Muon candidate
0031     TkMuon(const LorentzVector& p4, const edm::Ptr<L1TTTrackType>& trkPtr, float tkisol = -999.);
0032 
0033     //! more basic constructor, in case refs/ptrs can't be set or to be set separately
0034     TkMuon(const L1Candidate& cand) : L1Candidate(cand), theIsolation(-999.), TrkzVtx_(999.), quality_(999) {}
0035 
0036     const edm::Ptr<L1TTTrackType>& trkPtr() const { return trkPtr_; }
0037 
0038     const edm::Ref<l1t::RegionalMuonCandBxCollection>& muRef() const { return muRef_; }
0039     const edm::Ref<l1t::EMTFTrackCollection>& emtfTrk() const { return emtfTrk_; }
0040 
0041     float trkIsol() const { return theIsolation; }
0042     float trkzVtx() const { return TrkzVtx_; }
0043 
0044     float dR() const { return dR_; }
0045     int nTracksMatched() const { return nTracksMatch_; }
0046     double trackCurvature() const { return trackCurvature_; }
0047 
0048     unsigned int quality() const { return quality_; }
0049     unsigned int pattern() const { return pattern_; }
0050 
0051     unsigned int muonDetector() const { return muonDetector_; }
0052 
0053     void setTrkPtr(const edm::Ptr<L1TTTrackType>& p) { trkPtr_ = p; }
0054 
0055     void setTrkzVtx(float TrkzVtx) { TrkzVtx_ = TrkzVtx; }
0056     void setTrkIsol(float TrkIsol) { theIsolation = TrkIsol; }
0057     void setQuality(unsigned int q) { quality_ = q; }
0058     void setPattern(unsigned int p) { pattern_ = p; }
0059 
0060     void setdR(float dR) { dR_ = dR; }
0061     void setNTracksMatched(int nTracksMatch) { nTracksMatch_ = nTracksMatch; }
0062     void setTrackCurvature(double trackCurvature) { trackCurvature_ = trackCurvature; }  // this is signed
0063     void setMuonDetector(unsigned int detector) { muonDetector_ = detector; }
0064 
0065   private:
0066     // used for the Naive producer
0067     edm::Ref<l1t::RegionalMuonCandBxCollection> muRef_;
0068     edm::Ref<l1t::EMTFTrackCollection> emtfTrk_;
0069 
0070     edm::Ptr<L1TTTrackType> trkPtr_;
0071 
0072     float theIsolation;
0073     float TrkzVtx_;
0074     float dR_;
0075     int nTracksMatch_;
0076     double trackCurvature_;
0077 
0078     unsigned int quality_;
0079     unsigned int pattern_;
0080 
0081     int muonDetector_;
0082   };
0083 }  // namespace l1t
0084 
0085 #endif