CMS 3D CMS Logo

TrackerMuon.h
Go to the documentation of this file.
1 #ifndef DataFormatsL1TMuonPhase2_TrackerMuon_h
2 #define DataFormatsL1TMuonPhase2_TrackerMuon_h
3 
12 
13 namespace l1t {
14 
15  class TrackerMuon;
16 
17  typedef std::vector<TrackerMuon> TrackerMuonCollection;
19  typedef std::vector<edm::Ref<TrackerMuonCollection> > TrackerMuonRefVector;
20 
21  class TrackerMuon : public L1Candidate {
22  public:
24  typedef std::vector<L1TTTrackType> L1TTTrackCollection;
25 
26  TrackerMuon();
27 
29  const edm::Ptr<L1TTTrackType>& trk, bool charge, uint pt, int eta, int phi, int z0, int d0, uint quality);
30 
31  ~TrackerMuon() override;
32 
33  const edm::Ptr<L1TTTrackType>& trkPtr() const { return trkPtr_; }
35 
36  const bool hwCharge() const { return hwCharge_; }
37  const int hwZ0() const { return hwZ0_; }
38  const int hwD0() const { return hwD0_; }
39  const int hwIsoSum() const { return hwIsoSum_; }
40  const int hwIsoSumAp() const { return hwIsoSumAp_; }
41  const uint hwBeta() const { return hwBeta_; }
42  void setBeta(uint beta) { hwBeta_ = beta; }
46 
47  const std::array<uint64_t, 2> word() const { return word_; }
48  void setWord(std::array<uint64_t, 2> word) { word_ = word; }
49  void print() const;
50  const MuonStubRefVector stubs() const { return stubs_; }
51  void addStub(const MuonStubRef& stub) { stubs_.push_back(stub); }
52 
53  bool operator<(const TrackerMuon& other) const { return (hwPt() < other.hwPt()); }
54  bool operator>(const TrackerMuon& other) const { return (hwPt() > other.hwPt()); }
55 
56  private:
57  // used for the Naive producer
59  bool hwCharge_;
60  int hwZ0_;
61  int hwD0_;
63  // The tracker muon is encoded in 96 bits as a 2-element array of uint64_t
64  std::array<uint64_t, 2> word_ = {{0, 0}};
65  //Store the eneryg sum for isolation
66  int hwIsoSum_;
67  //Store the eneryg sum for isolation with ap_type
69 
72  };
73 } // namespace l1t
74 
75 #endif
bool operator>(const TrackerMuon &other) const
Definition: TrackerMuon.h:54
const std::array< uint64_t, 2 > word() const
Definition: TrackerMuon.h:47
const int hwZ0() const
Definition: TrackerMuon.h:37
double pt() const final
transverse momentum
const int hwIsoSum() const
Definition: TrackerMuon.h:39
const uint hwBeta() const
Definition: TrackerMuon.h:41
delete x;
Definition: CaloConfig.h:22
std::array< uint64_t, 2 > word_
Definition: TrackerMuon.h:64
std::vector< edm::Ref< MuonStubCollection > > MuonStubRefVector
Definition: MuonStub.h:44
const MuonStubRefVector stubs() const
Definition: TrackerMuon.h:50
uint64_t word
double p() const final
magnitude of momentum vector
const edm::Ref< l1t::RegionalMuonCandBxCollection > & muonRef() const
Definition: TrackerMuon.h:34
void setHwIsoSumAp(int isoSum)
Definition: TrackerMuon.h:45
const int hwD0() const
Definition: TrackerMuon.h:38
bool operator<(const TrackerMuon &other) const
Definition: TrackerMuon.h:53
void setMuonRef(const edm::Ref< l1t::RegionalMuonCandBxCollection > &p)
Definition: TrackerMuon.h:43
edm::Ptr< L1TTTrackType > trkPtr_
Definition: TrackerMuon.h:58
void print() const
Definition: TrackerMuon.cc:23
~TrackerMuon() override
Definition: TrackerMuon.cc:21
void setWord(std::array< uint64_t, 2 > word)
Definition: TrackerMuon.h:48
static constexpr float d0
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
Definition: TrackerMuon.h:23
std::vector< TrackerMuon > TrackerMuonCollection
Definition: TrackerMuon.h:15
int hwPt() const
Definition: L1Candidate.h:35
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
void setBeta(uint beta)
Definition: TrackerMuon.h:42
void addStub(const MuonStubRef &stub)
Definition: TrackerMuon.h:51
const bool hwCharge() const
Definition: TrackerMuon.h:36
isoSum
===> compute the isolation and find the most isolated track
std::vector< L1TTTrackType > L1TTTrackCollection
Definition: TrackerMuon.h:24
string quality
edm::Ref< TrackerMuonCollection > TrackerMuonRef
Definition: TrackerMuon.h:18
const int hwIsoSumAp() const
Definition: TrackerMuon.h:40
double phi() const final
momentum azimuthal angle
std::vector< edm::Ref< TrackerMuonCollection > > TrackerMuonRefVector
Definition: TrackerMuon.h:19
const edm::Ptr< L1TTTrackType > & trkPtr() const
Definition: TrackerMuon.h:33
MuonStubRefVector stubs_
Definition: TrackerMuon.h:71
int charge() const final
electric charge
edm::Ref< l1t::RegionalMuonCandBxCollection > muRef_
Definition: TrackerMuon.h:70
void setHwIsoSum(int isoSum)
Definition: TrackerMuon.h:44
double eta() const final
momentum pseudorapidity