CMS 3D CMS Logo

ConvertedTTTrack.h
Go to the documentation of this file.
1 #ifndef PHASE2GMT_CONEVRTEDTTRACK
2 #define PHASE2GMT_CONEVRTEDTTRACK
6 #include <ap_int.h>
7 
8 namespace Phase2L1GMT {
9 
11  public:
12  ConvertedTTTrack(const ap_uint<1>& charge,
13  const ap_int<BITSTTCURV>& curvature,
14  const ap_int<BITSETA - 1>& abseta,
15  const ap_uint<BITSPT>& pt,
16  const ap_int<BITSETA>& eta,
17  const ap_int<BITSPHI>& phi,
18  const ap_int<BITSZ0>& z0,
19  const ap_int<BITSD0>& d0,
20  const ap_uint<1>& quality,
21  const ap_uint<96>& word)
22  : charge_(charge),
24  abseta_(abseta),
25  pt_(pt),
26  eta_(eta),
27  phi_(phi),
28  z0_(z0),
29  d0_(d0),
31  word_(word) {}
32 
33  const ap_uint<1> charge() const { return charge_; }
34 
35  const ap_int<BITSTTCURV> curvature() const { return curvature_; }
36  const ap_uint<BITSETA - 1> abseta() const { return abseta_; }
37 
38  const ap_uint<BITSPT> pt() const { return pt_; }
39 
40  const ap_int<BITSETA> eta() const { return eta_; }
41  const ap_int<BITSPHI> phi() const { return phi_; }
42 
43  void setPhi(ap_int<BITSPHI> phi) { phi_ = phi; }
44 
45  const ap_int<BITSZ0> z0() const { return z0_; }
46  const ap_int<BITSD0> d0() const { return d0_; }
47  const ap_uint<1> quality() const { return quality_; }
48  const float offline_pt() const { return offline_pt_; }
49  const float offline_eta() const { return offline_eta_; }
50  const float offline_phi() const { return offline_phi_; }
51 
52  const ap_uint<96>& word() const { return word_; }
53  void setOfflineQuantities(float pt, float eta, float phi) {
54  offline_pt_ = pt;
55  offline_eta_ = eta;
56  offline_phi_ = phi;
57  }
58 
59  void print() const {
60  LogDebug("ConvertedTTTrack") << "converted track : charge=" << charge_ << " curvature=" << curvature_
61  << " pt=" << offline_pt_ << "," << pt_ << " eta=" << offline_eta_ << "," << eta_
62  << " phi=" << offline_phi_ << "," << phi_ << " z0=" << z0_ << " d0=" << d0_
63  << " quality=" << quality_;
64  }
65 
66  void printWord() const {
67  LogDebug("ConvertedTTTrack") << "converted track : word=" << std::setfill('0') << std::setw(8) << std::hex
68  << (long long unsigned int)((word_ >> 64).to_uint64()) << std::setfill('0')
69  << std::setw(16) << std::hex
70  << (long long unsigned int)((word_ & 0xffffffffffffffff).to_uint64());
71  }
72 
74 
76 
77  private:
78  ap_uint<1> charge_;
79  ap_int<BITSTTCURV> curvature_;
80  ap_uint<BITSETA - 1> abseta_;
81  ap_uint<BITSPT> pt_;
82  ap_int<BITSETA> eta_;
83  ap_int<BITSPHI> phi_;
84  ap_int<BITSZ0> z0_;
85  ap_int<BITSD0> d0_;
86  ap_uint<1> quality_;
87  float offline_pt_;
88  float offline_eta_;
89  float offline_phi_;
90  ap_uint<96> word_;
91 
93  };
94 } // namespace Phase2L1GMT
95 
96 #endif
const ap_uint< BITSPT > pt() const
const ap_int< BITSZ0 > z0() const
ap_int< BITSTTCURV > curvature_
const float offline_phi() const
const ap_int< BITSPHI > phi() const
edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > trkPtr_
const ap_uint< BITSETA - 1 > abseta() const
const ap_uint< 1 > quality() const
const ap_uint< 1 > charge() const
void setTrkPtr(const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > &trkPtr)
uint64_t word
const ap_int< BITSETA > eta() const
const int BITSETA
Definition: Constants.h:26
ap_uint< BITSETA - 1 > abseta_
const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > trkPtr() const
const float offline_eta() const
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
const ap_int< BITSD0 > d0() const
void setOfflineQuantities(float pt, float eta, float phi)
const float offline_pt() const
void setPhi(ap_int< BITSPHI > phi)
const ap_uint< 96 > & word() const
const ap_int< BITSTTCURV > curvature() const
ConvertedTTTrack(const ap_uint< 1 > &charge, const ap_int< BITSTTCURV > &curvature, const ap_int< BITSETA - 1 > &abseta, const ap_uint< BITSPT > &pt, const ap_int< BITSETA > &eta, const ap_int< BITSPHI > &phi, const ap_int< BITSZ0 > &z0, const ap_int< BITSD0 > &d0, const ap_uint< 1 > &quality, const ap_uint< 96 > &word)
#define LogDebug(id)