CMS 3D CMS Logo

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