CMS 3D CMS Logo

EMTFTrack.h
Go to the documentation of this file.
1 // Class for muon tracks in EMTF - AWB 04.01.16
2 // Mostly copied from L1Trigger/L1TMuonEndCap/interface/MuonInternalTrack.h
3 
4 #ifndef DataFormats_L1TMuon_EMTFTrack_h
5 #define DataFormats_L1TMuon_EMTFTrack_h
6 
7 #include <cstdint>
8 #include <vector>
9 
13 
14 namespace l1t {
15 
16  struct EMTFPtLUT {
18  uint16_t mode;
19  uint16_t theta;
20  uint16_t st1_ring2;
21  uint16_t eta;
22  uint16_t delta_ph[6]; // index: 0=12, 1=13, 2=14, 3=23, 4=24, 5=34
23  uint16_t delta_th[6]; // ^
24  uint16_t sign_ph[6]; // ^
25  uint16_t sign_th[6]; // ^
26  uint16_t cpattern[4]; // index: 0=ME1, 1=ME2, 2=ME3, 3=ME4
27  uint16_t fr[4]; // ^
28  uint16_t bt_vi[5]; // index: 0=ME1sub1, 1=ME1sub2, 2=ME2, 3=ME3, 4=ME4
29  uint16_t bt_hi[5]; // ^
30  uint16_t bt_ci[5]; // ^
31  uint16_t bt_si[5]; // ^
32  };
33 
34  class EMTFTrack {
35  public:
37  : _PtLUT(),
38  endcap(-99),
39  sector(-99),
40  sector_idx(-99),
41  mode(-99),
42  mode_CSC(0),
43  mode_RPC(0),
44  mode_neighbor(0),
45  mode_inv(-99),
46  rank(-99),
47  winner(-99),
48  charge(-99),
49  bx(-99),
50  first_bx(-99),
51  second_bx(-99),
52  pt(-99),
53  pt_XML(-99),
54  zone(-99),
55  ph_num(-99),
56  ph_q(-99),
57  theta_fp(-99),
58  theta(-99),
59  eta(-99),
60  phi_fp(-99),
61  phi_loc(-99),
62  phi_glob(-999),
63  gmt_pt(-99),
64  gmt_phi(-999),
65  gmt_eta(-999),
66  gmt_quality(-99),
67  gmt_charge(-99),
68  gmt_charge_valid(-99),
69  track_num(-99),
70  numHits(-99){};
71 
72  virtual ~EMTFTrack(){};
73 
74  void ImportSP(const emtf::SP _SP, int _sector);
75  // void ImportPtLUT( int _mode, unsigned long _address );
76 
77  void clear_Hits() {
78  _Hits.clear();
79  numHits = 0;
80  mode_CSC = 0;
81  mode_RPC = 0;
82  mode_neighbor = 0;
83  }
84 
85  void push_Hit(const EMTFHit& hit) {
86  _Hits.push_back(hit);
87  numHits = _Hits.size();
88  if (hit.Is_CSC())
89  mode_CSC |= (1 << (4 - hit.Station()));
90  if (hit.Is_RPC())
91  mode_RPC |= (1 << (4 - hit.Station()));
92  if (hit.Neighbor())
93  mode_neighbor |= (1 << (4 - hit.Station()));
94  }
95 
97  clear_Hits();
98  for (const auto& hit : hits)
99  push_Hit(hit);
100  }
101 
102  void clear_HitIdx() { _HitIdx.clear(); }
103  void push_HitIdx(unsigned int bits) { _HitIdx.push_back(bits); }
104  void set_HitIdx(const std::vector<unsigned int>& bits) { _HitIdx = bits; }
105 
106  int NumHits() const { return numHits; }
107  EMTFHitCollection Hits() const { return _Hits; }
108  std::vector<unsigned int> HitIdx() const { return _HitIdx; }
109 
111  EMTFPtLUT PtLUT() const { return _PtLUT; }
112 
113  void set_endcap(int bits) { endcap = bits; }
114  void set_sector(int bits) { sector = bits; }
116  void set_mode(int bits) { mode = bits; }
117  void set_mode_inv(int bits) { mode_inv = bits; }
118  void set_rank(int bits) { rank = bits; }
119  void set_winner(int bits) { winner = bits; }
120  void set_charge(int bits) { charge = bits; }
121  void set_bx(int bits) { bx = bits; }
122  void set_first_bx(int bits) { first_bx = bits; }
123  void set_second_bx(int bits) { second_bx = bits; }
124  void set_pt(float val) { pt = val; }
125  void set_pt_XML(float val) { pt_XML = val; }
126  void set_zone(int bits) { zone = bits; }
127  void set_ph_num(int bits) { ph_num = bits; }
128  void set_ph_q(int bits) { ph_q = bits; }
129  void set_theta_fp(int bits) { theta_fp = bits; }
130  void set_theta(float val) { theta = val; }
131  void set_eta(float val) { eta = val; }
132  void set_phi_fp(int bits) { phi_fp = bits; }
133  void set_phi_loc(float val) { phi_loc = val; }
134  void set_phi_glob(float val) { phi_glob = val; }
135  void set_gmt_pt(int bits) { gmt_pt = bits; }
136  void set_gmt_phi(int bits) { gmt_phi = bits; }
137  void set_gmt_eta(int bits) { gmt_eta = bits; }
141  void set_track_num(int bits) { track_num = bits; }
142 
143  int Endcap() const { return endcap; }
144  int Sector() const { return sector; }
145  int Sector_idx() const { return sector_idx; }
146  int Mode() const { return mode; }
147  int Mode_CSC() const { return mode_CSC; }
148  int Mode_RPC() const { return mode_RPC; }
149  int Mode_neighbor() const { return mode_neighbor; }
150  int Mode_inv() const { return mode_inv; }
151  int Rank() const { return rank; }
152  int Winner() const { return winner; }
153  int Charge() const { return charge; }
154  int BX() const { return bx; }
155  int First_BX() const { return first_bx; }
156  int Second_BX() const { return second_bx; }
157  float Pt() const { return pt; }
158  float Pt_XML() const { return pt_XML; }
159  int Zone() const { return zone; }
160  int Ph_num() const { return ph_num; }
161  int Ph_q() const { return ph_q; }
162  int Theta_fp() const { return theta_fp; }
163  float Theta() const { return theta; }
164  float Eta() const { return eta; }
165  int Phi_fp() const { return phi_fp; }
166  float Phi_loc() const { return phi_loc; }
167  float Phi_glob() const { return phi_glob; }
168  int GMT_pt() const { return gmt_pt; }
169  int GMT_phi() const { return gmt_phi; }
170  int GMT_eta() const { return gmt_eta; }
171  int GMT_quality() const { return gmt_quality; }
172  int GMT_charge() const { return gmt_charge; }
173  int GMT_charge_valid() const { return gmt_charge_valid; }
174  int Track_num() const { return track_num; }
175 
176  private:
178  std::vector<unsigned int> _HitIdx;
179 
181 
182  int endcap; // +/-1. For ME+ and ME-.
183  int sector; // 1 - 6.
184  int sector_idx; // 0 - 11. 0 - 5 for ME+, 6 - 11 for ME-.
185  int mode; // 0 - 15.
186  int mode_CSC; // 0 - 15, CSC-only
187  int mode_RPC; // 0 - 15, RPC-only
188  int mode_neighbor; // 0 - 15, only neighbor hits
189  int mode_inv; // 15 - 0.
190  int rank; // 0 - 127 (Range? - AWB 03.03.17)
191  int winner; // 0 - 2. (Range? - AWB 03.03.17)
192  int charge; // +/-1. For physical charge (reversed from GMT convention)
193  int bx; // -3 - +3.
194  int first_bx; // -3 - +3.
195  int second_bx; // -3 - +3.
196  float pt; // 0 - 255
197  float pt_XML; // 0 - 999
198  int zone; // 0 - 3.
199  int ph_num;
200  int ph_q;
201  int theta_fp; // 0 - 127
202  float theta; // 0 - 90.
203  float eta; // +/-2.5.
204  int phi_fp; // 0 - 4920
205  float phi_loc; // -22 - 60 (Range? - AWB 03.03.17)
206  float phi_glob; // +/-180.
207  int gmt_pt;
208  int gmt_phi;
209  int gmt_eta;
213  int track_num; // 0 - ??. (Range? - AWB 03.03.17)
214  int numHits; // 1 - 4.
215 
216  }; // End of class EMTFTrack
217 
218  // Define a vector of EMTFTrack
219  typedef std::vector<EMTFTrack> EMTFTrackCollection;
220 
221 } // End of namespace l1t
222 
223 #endif /* define DataFormats_L1TMuon_EMTFTrack_h */
l1t::EMTFTrack::Zone
int Zone() const
Definition: EMTFTrack.h:159
l1t::EMTFTrack::winner
int winner
Definition: EMTFTrack.h:191
l1t::EMTFTrack::clear_Hits
void clear_Hits()
Definition: EMTFTrack.h:77
l1t::EMTFPtLUT::bt_hi
uint16_t bt_hi[5]
Definition: EMTFTrack.h:29
l1t::EMTFTrack::PtLUT
EMTFPtLUT PtLUT() const
Definition: EMTFTrack.h:111
l1t::EMTFTrack::sector
int sector
Definition: EMTFTrack.h:183
l1t::EMTFTrack::mode_RPC
int mode_RPC
Definition: EMTFTrack.h:187
l1t::EMTFTrack::mode_CSC
int mode_CSC
Definition: EMTFTrack.h:186
l1t::EMTFPtLUT::mode
uint16_t mode
Definition: EMTFTrack.h:18
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
l1t::EMTFTrack::set_gmt_phi
void set_gmt_phi(int bits)
Definition: EMTFTrack.h:136
l1t::EMTFTrack::set_ph_q
void set_ph_q(int bits)
Definition: EMTFTrack.h:128
l1t::EMTFTrack::Mode_RPC
int Mode_RPC() const
Definition: EMTFTrack.h:148
l1t::EMTFPtLUT
Definition: EMTFTrack.h:16
l1t::EMTFPtLUT::delta_ph
uint16_t delta_ph[6]
Definition: EMTFTrack.h:22
l1t::EMTFPtLUT::bt_si
uint16_t bt_si[5]
Definition: EMTFTrack.h:31
l1t::EMTFTrack::set_phi_fp
void set_phi_fp(int bits)
Definition: EMTFTrack.h:132
l1t::EMTFTrack::set_sector
void set_sector(int bits)
Definition: EMTFTrack.h:114
l1t::EMTFTrack::mode_neighbor
int mode_neighbor
Definition: EMTFTrack.h:188
l1t::EMTFTrack::charge
int charge
Definition: EMTFTrack.h:192
l1t::EMTFTrack::ph_num
int ph_num
Definition: EMTFTrack.h:199
l1t::EMTFTrack::set_mode
void set_mode(int bits)
Definition: EMTFTrack.h:116
l1t::EMTFTrack::theta
float theta
Definition: EMTFTrack.h:202
l1t::EMTFPtLUT::eta
uint16_t eta
Definition: EMTFTrack.h:21
l1t::EMTFTrack::zone
int zone
Definition: EMTFTrack.h:198
l1t::EMTFTrack::Mode
int Mode() const
Definition: EMTFTrack.h:146
l1t::EMTFTrack::Winner
int Winner() const
Definition: EMTFTrack.h:152
l1t::EMTFTrack::ImportSP
void ImportSP(const emtf::SP _SP, int _sector)
l1t::EMTFTrack::Theta
float Theta() const
Definition: EMTFTrack.h:163
l1t::EMTFTrack::bx
int bx
Definition: EMTFTrack.h:193
l1t::EMTFTrack::Sector
int Sector() const
Definition: EMTFTrack.h:144
l1t::EMTFTrack::_PtLUT
EMTFPtLUT _PtLUT
Definition: EMTFTrack.h:180
l1t::EMTFTrack::Theta_fp
int Theta_fp() const
Definition: EMTFTrack.h:162
l1t::EMTFTrack::phi_loc
float phi_loc
Definition: EMTFTrack.h:205
l1t::EMTFTrack::set_phi_loc
void set_phi_loc(float val)
Definition: EMTFTrack.h:133
l1t::EMTFPtLUT::sign_ph
uint16_t sign_ph[6]
Definition: EMTFTrack.h:24
l1t::EMTFTrack::set_Hits
void set_Hits(const EMTFHitCollection &hits)
Definition: EMTFTrack.h:96
l1t::EMTFTrack::pt_XML
float pt_XML
Definition: EMTFTrack.h:197
l1t::EMTFTrack::sector_idx
int sector_idx
Definition: EMTFTrack.h:184
l1t::EMTFTrack::~EMTFTrack
virtual ~EMTFTrack()
Definition: EMTFTrack.h:72
l1t::EMTFTrack::Pt
float Pt() const
Definition: EMTFTrack.h:157
l1t::EMTFTrack::eta
float eta
Definition: EMTFTrack.h:203
l1t::EMTFPtLUT::theta
uint16_t theta
Definition: EMTFTrack.h:19
l1t::EMTFTrack::Mode_inv
int Mode_inv() const
Definition: EMTFTrack.h:150
l1t::EMTFTrack::set_zone
void set_zone(int bits)
Definition: EMTFTrack.h:126
l1t::EMTFTrack::NumHits
int NumHits() const
Definition: EMTFTrack.h:106
l1t::EMTFTrack::BX
int BX() const
Definition: EMTFTrack.h:154
l1t::EMTFTrackCollection
std::vector< EMTFTrack > EMTFTrackCollection
Definition: EMTFTrack.h:219
l1t::EMTFPtLUT::bt_vi
uint16_t bt_vi[5]
Definition: EMTFTrack.h:28
l1t::EMTFTrack::push_Hit
void push_Hit(const EMTFHit &hit)
Definition: EMTFTrack.h:85
l1t::EMTFTrack::Pt_XML
float Pt_XML() const
Definition: EMTFTrack.h:158
l1t::emtf::SP
Definition: SP.h:11
l1t::EMTFTrack::_Hits
EMTFHitCollection _Hits
Definition: EMTFTrack.h:177
l1t::EMTFTrack::EMTFTrack
EMTFTrack()
Definition: EMTFTrack.h:36
l1t::EMTFTrack::phi_fp
int phi_fp
Definition: EMTFTrack.h:204
l1t::EMTFTrack::Rank
int Rank() const
Definition: EMTFTrack.h:151
l1t::EMTFTrack::clear_HitIdx
void clear_HitIdx()
Definition: EMTFTrack.h:102
l1t::EMTFTrack::set_first_bx
void set_first_bx(int bits)
Definition: EMTFTrack.h:122
l1t::EMTFTrack::HitIdx
std::vector< unsigned int > HitIdx() const
Definition: EMTFTrack.h:108
l1t::EMTFTrack::Mode_CSC
int Mode_CSC() const
Definition: EMTFTrack.h:147
l1t::EMTFTrack::set_theta
void set_theta(float val)
Definition: EMTFTrack.h:130
l1t::EMTFPtLUT::fr
uint16_t fr[4]
Definition: EMTFTrack.h:27
l1t::EMTFTrack::set_HitIdx
void set_HitIdx(const std::vector< unsigned int > &bits)
Definition: EMTFTrack.h:104
l1t::EMTFTrack::rank
int rank
Definition: EMTFTrack.h:190
l1t::EMTFTrack::set_pt_XML
void set_pt_XML(float val)
Definition: EMTFTrack.h:125
l1t::EMTFTrack::theta_fp
int theta_fp
Definition: EMTFTrack.h:201
l1t::EMTFTrack::set_charge
void set_charge(int bits)
Definition: EMTFTrack.h:120
l1t::EMTFTrack::GMT_phi
int GMT_phi() const
Definition: EMTFTrack.h:169
l1t::EMTFTrack::Endcap
int Endcap() const
Definition: EMTFTrack.h:143
l1t::EMTFTrack::set_pt
void set_pt(float val)
Definition: EMTFTrack.h:124
l1t::EMTFTrack::gmt_pt
int gmt_pt
Definition: EMTFTrack.h:207
l1t::EMTFTrack::Hits
EMTFHitCollection Hits() const
Definition: EMTFTrack.h:107
l1t::EMTFTrack::pt
float pt
Definition: EMTFTrack.h:196
l1t::EMTFTrack::gmt_quality
int gmt_quality
Definition: EMTFTrack.h:210
l1t::EMTFTrack
Definition: EMTFTrack.h:34
l1t::EMTFTrack::set_gmt_charge_valid
void set_gmt_charge_valid(int bits)
Definition: EMTFTrack.h:140
l1t::EMTFTrack::_HitIdx
std::vector< unsigned int > _HitIdx
Definition: EMTFTrack.h:178
l1t::EMTFTrack::GMT_quality
int GMT_quality() const
Definition: EMTFTrack.h:171
l1t::EMTFPtLUT::delta_th
uint16_t delta_th[6]
Definition: EMTFTrack.h:23
l1t::EMTFPtLUT::st1_ring2
uint16_t st1_ring2
Definition: EMTFTrack.h:20
l1t::EMTFTrack::Phi_fp
int Phi_fp() const
Definition: EMTFTrack.h:165
l1t::EMTFTrack::phi_glob
float phi_glob
Definition: EMTFTrack.h:206
l1t::EMTFTrack::set_sector_idx
void set_sector_idx(int bits)
Definition: EMTFTrack.h:115
l1t::EMTFHit
Definition: EMTFHit.h:22
l1t::EMTFTrack::set_theta_fp
void set_theta_fp(int bits)
Definition: EMTFTrack.h:129
l1t::EMTFTrack::Sector_idx
int Sector_idx() const
Definition: EMTFTrack.h:145
l1t
delete x;
Definition: CaloConfig.h:22
l1t::EMTFTrack::Phi_glob
float Phi_glob() const
Definition: EMTFTrack.h:167
l1t::EMTFTrack::Eta
float Eta() const
Definition: EMTFTrack.h:164
l1t::EMTFPtLUT::address
uint64_t address
Definition: EMTFTrack.h:17
l1t::EMTFTrack::set_track_num
void set_track_num(int bits)
Definition: EMTFTrack.h:141
l1t::EMTFTrack::push_HitIdx
void push_HitIdx(unsigned int bits)
Definition: EMTFTrack.h:103
EMTFHit.h
l1t::EMTFTrack::First_BX
int First_BX() const
Definition: EMTFTrack.h:155
l1t::EMTFTrack::track_num
int track_num
Definition: EMTFTrack.h:213
l1t::EMTFTrack::set_bx
void set_bx(int bits)
Definition: EMTFTrack.h:121
l1t::EMTFPtLUT::cpattern
uint16_t cpattern[4]
Definition: EMTFTrack.h:26
l1t::EMTFTrack::set_gmt_charge
void set_gmt_charge(int bits)
Definition: EMTFTrack.h:139
l1t::EMTFTrack::Second_BX
int Second_BX() const
Definition: EMTFTrack.h:156
l1t::EMTFTrack::Track_num
int Track_num() const
Definition: EMTFTrack.h:174
l1t::EMTFTrack::Ph_q
int Ph_q() const
Definition: EMTFTrack.h:161
l1t::EMTFTrack::set_gmt_quality
void set_gmt_quality(int bits)
Definition: EMTFTrack.h:138
l1t::EMTFTrack::mode_inv
int mode_inv
Definition: EMTFTrack.h:189
l1t::EMTFTrack::gmt_eta
int gmt_eta
Definition: EMTFTrack.h:209
bits
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
Definition: EventSelector-behavior.doc:35
heppy_batch.val
val
Definition: heppy_batch.py:351
l1t::EMTFTrack::set_ph_num
void set_ph_num(int bits)
Definition: EMTFTrack.h:127
l1t::EMTFTrack::Ph_num
int Ph_num() const
Definition: EMTFTrack.h:160
l1t::EMTFTrack::set_PtLUT
void set_PtLUT(EMTFPtLUT bits)
Definition: EMTFTrack.h:110
l1t::EMTFTrack::set_winner
void set_winner(int bits)
Definition: EMTFTrack.h:119
l1t::EMTFTrack::numHits
int numHits
Definition: EMTFTrack.h:214
l1t::EMTFTrack::mode
int mode
Definition: EMTFTrack.h:185
l1t::EMTFTrack::set_gmt_pt
void set_gmt_pt(int bits)
Definition: EMTFTrack.h:135
l1t::EMTFPtLUT::sign_th
uint16_t sign_th[6]
Definition: EMTFTrack.h:25
l1t::EMTFTrack::second_bx
int second_bx
Definition: EMTFTrack.h:195
l1t::EMTFTrack::GMT_charge_valid
int GMT_charge_valid() const
Definition: EMTFTrack.h:173
EMTFRoad.h
l1t::EMTFTrack::set_mode_inv
void set_mode_inv(int bits)
Definition: EMTFTrack.h:117
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
l1t::EMTFTrack::gmt_phi
int gmt_phi
Definition: EMTFTrack.h:208
l1t::EMTFTrack::first_bx
int first_bx
Definition: EMTFTrack.h:194
l1t::EMTFTrack::set_phi_glob
void set_phi_glob(float val)
Definition: EMTFTrack.h:134
l1t::EMTFTrack::gmt_charge
int gmt_charge
Definition: EMTFTrack.h:211
l1t::EMTFTrack::GMT_pt
int GMT_pt() const
Definition: EMTFTrack.h:168
l1t::EMTFTrack::set_endcap
void set_endcap(int bits)
Definition: EMTFTrack.h:113
l1t::EMTFTrack::Charge
int Charge() const
Definition: EMTFTrack.h:153
l1t::EMTFPtLUT::bt_ci
uint16_t bt_ci[5]
Definition: EMTFTrack.h:30
l1t::EMTFTrack::GMT_charge
int GMT_charge() const
Definition: EMTFTrack.h:172
SP.h
l1t::EMTFTrack::set_rank
void set_rank(int bits)
Definition: EMTFTrack.h:118
l1t::EMTFTrack::set_second_bx
void set_second_bx(int bits)
Definition: EMTFTrack.h:123
l1t::EMTFTrack::ph_q
int ph_q
Definition: EMTFTrack.h:200
l1t::EMTFTrack::Mode_neighbor
int Mode_neighbor() const
Definition: EMTFTrack.h:149
l1t::EMTFTrack::Phi_loc
float Phi_loc() const
Definition: EMTFTrack.h:166
l1t::EMTFTrack::endcap
int endcap
Definition: EMTFTrack.h:182
l1t::EMTFTrack::GMT_eta
int GMT_eta() const
Definition: EMTFTrack.h:170
hit
Definition: SiStripHitEffFromCalibTree.cc:88
l1t::EMTFTrack::set_gmt_eta
void set_gmt_eta(int bits)
Definition: EMTFTrack.h:137
l1t::EMTFHitCollection
std::vector< EMTFHit > EMTFHitCollection
Definition: EMTFHit.h:302
l1t::EMTFTrack::gmt_charge_valid
int gmt_charge_valid
Definition: EMTFTrack.h:212
l1t::EMTFTrack::set_eta
void set_eta(float val)
Definition: EMTFTrack.h:131