CMS 3D CMS Logo

L1TrackId.cc
Go to the documentation of this file.
2 
3 namespace csc {
5 
6  L1TrackId::L1TrackId(const unsigned& side, const unsigned& sector) {
9  }
10 
12  m_rank = id.m_rank;
13  m_mode = id.m_mode;
14  m_erase = id.m_erase;
15  m_overlap = id.m_overlap;
16  id_ = id.id_;
17  //stubs = id.stubs; // add stubs back later
18  }
19 
21  if (&rhs != this) {
22  m_rank = rhs.m_rank;
23  m_mode = rhs.m_mode;
24  m_erase = rhs.m_erase;
25  m_overlap = rhs.m_overlap;
26  id_ = rhs.id_;
27  //stubs = rhs.stubs;
28  }
29  return *this;
30  }
31 
32  bool L1TrackId::sharesHit(const csc::L1TrackId& a_id) const {
33  return false; // finish later
34  }
35 
36  void L1TrackId::setOverlap(const unsigned& rank) {
37  if ((rank == 7) || (rank == 8) || (rank == 9) || (rank == 12) || (rank == 15) || (rank == 19) || (rank == 20) ||
38  (rank == 24) || (rank == 25) || (rank == 29) || (rank == 30) || (rank == 32) || (rank == 34) || (rank == 36)) {
39  m_overlap = true;
40  } else
41  m_overlap = false;
42  }
43 
44  void L1TrackId::setRank(const unsigned& rank) {
45  if (rank < (1 << kRankBitWidth)) // rank >= 0, since rank is unsigned
46  {
47  m_rank = rank;
49  } else {
50  m_rank = 0;
51  }
52  }
53 
54  // Helper function to determine which 2 segments from overlap region
55  // track participate in 2-stn Pt assignment, and what mode to use,
56  // based on track rank
57  // four modes in this order: B1-E1, B1-E2, B2-E1, B2-E2
58  // Let's include only mode 2, 4 tracks (7-27-00)
59  void L1TrackId::overlapMode(const unsigned& rank, int& mode, int& stnA, int& stnB) {
60  switch (rank) {
61  case 7:
62  stnA = 2;
63  stnB = 1;
64  mode = 4;
65  break;
66  case 8:
67  stnA = 3;
68  stnB = 2;
69  mode = 4;
70  break;
71  case 9:
72  stnA = 2;
73  stnB = 1;
74  mode = 2;
75  break;
76  case 12:
77  stnA = 2;
78  stnB = 1;
79  mode = 2;
80  break;
81  case 15:
82  stnA = 2;
83  stnB = 1;
84  mode = 2;
85  break;
86  case 19:
87  stnA = 3;
88  stnB = 2;
89  mode = 2;
90  break;
91  case 20:
92  stnA = 2;
93  stnB = 1;
94  mode = 2;
95  break;
96  case 24:
97  stnA = 3;
98  stnB = 2;
99  mode = 2;
100  break;
101  case 25:
102  stnA = 2;
103  stnB = 1;
104  mode = 2;
105  break;
106  case 29:
107  stnA = 3;
108  stnB = 2;
109  mode = 2;
110  break;
111  case 30:
112  stnA = 2;
113  stnB = 1;
114  mode = 2;
115  break;
116  case 32:
117  stnA = 3;
118  stnB = 2;
119  mode = 2;
120  break;
121  case 34:
122  stnA = 3;
123  stnB = 2;
124  mode = 2;
125  break;
126  case 36:
127  stnA = 3;
128  stnB = 2;
129  mode = 2;
130  break;
131  default:
132  // standard case for CSC tracks
133  stnA = 1;
134  stnB = 2;
135  mode = 0;
136  }
137  }
138 
139  unsigned L1TrackId::encodeLUTMode(const unsigned& rank) const {
140  int mode;
141  switch (rank) {
142  case 0:
143  mode = 0;
144  break;
145  case 1:
146  mode = 10;
147  break;
148  case 2:
149  mode = 9;
150  break;
151  case 3:
152  mode = 8;
153  break;
154  case 4:
155  mode = 5;
156  break;
157  case 5:
158  mode = 7;
159  break;
160  case 6:
161  mode = 6;
162  break;
163  case 7:
164  mode = 15;
165  break;
166  case 8:
167  mode = 13;
168  break;
169  case 9:
170  mode = 14;
171  break;
172  case 10:
173  mode = 7;
174  break;
175  case 11:
176  mode = 6;
177  break;
178  case 12:
179  mode = 14;
180  break;
181  case 13:
182  mode = 7;
183  break;
184  case 14:
185  mode = 6;
186  break;
187  case 15:
188  mode = 14;
189  break;
190  case 16:
191  mode = 4;
192  break;
193  case 17:
194  mode = 3;
195  break;
196  case 18:
197  mode = 2;
198  break;
199  case 19:
200  mode = 12;
201  break;
202  case 20:
203  mode = 11;
204  break;
205  case 21:
206  mode = 4;
207  break;
208  case 22:
209  mode = 3;
210  break;
211  case 23:
212  mode = 2;
213  break;
214  case 24:
215  mode = 12;
216  break;
217  case 25:
218  mode = 11;
219  break;
220  case 26:
221  mode = 4;
222  break;
223  case 27:
224  mode = 3;
225  break;
226  case 28:
227  mode = 2;
228  break;
229  case 29:
230  mode = 12;
231  break;
232  case 30:
233  mode = 11;
234  break;
235  case 31:
236  mode = 2;
237  break;
238  case 32:
239  mode = 11;
240  break;
241  case 33:
242  mode = 2;
243  break;
244  case 34:
245  mode = 11;
246  break;
247  case 35:
248  mode = 2;
249  break;
250  case 36:
251  mode = 11;
252  break;
253  default:
254  mode = 0;
255  }
256  return mode;
257  }
258 
259  bool L1TrackId::hasME1(const unsigned& rank) const {
260  bool me = false;
261  switch (rank) {
262  case 5:
263  case 6:
264  case 10:
265  case 11:
266  case 12:
267  case 13:
268  case 14:
269  case 16:
270  case 17:
271  case 18:
272  case 21:
273  case 22:
274  case 23:
275  case 26:
276  case 27:
277  case 28:
278  case 31:
279  case 33:
280  case 35:
281  me = true;
282  break;
283  default:
284  me = false;
285  }
286  return me;
287  }
288 
289  bool L1TrackId::hasME2(const unsigned& rank) const {
290  bool me = false;
291  switch (rank) {
292  case 2:
293  case 3:
294  case 4:
295  case 6:
296  case 7:
297  case 8:
298  case 9:
299  case 11:
300  case 12:
301  case 14:
302  case 15:
303  case 17:
304  case 18:
305  case 19:
306  case 20:
307  case 22:
308  case 23:
309  case 24:
310  case 25:
311  case 27:
312  case 28:
313  case 29:
314  case 30:
315  case 31:
316  case 32:
317  case 33:
318  case 34:
319  case 35:
320  case 36:
321  me = true;
322  break;
323  default:
324  me = false;
325  }
326  return me;
327  }
328 
329  bool L1TrackId::hasME3(const unsigned& rank) const {
330  bool me = false;
331  switch (rank) {
332  case 1:
333  case 3:
334  case 4:
335  case 5:
336  case 10:
337  case 13:
338  case 16:
339  case 18:
340  case 21:
341  case 23:
342  case 26:
343  case 28:
344  case 31:
345  case 33:
346  case 35:
347  me = true;
348  break;
349  default:
350  me = false;
351  }
352  return me;
353  }
354 
355  bool L1TrackId::hasME4(const unsigned& rank) const {
356  bool me = false;
357  switch (rank) {
358  case 1:
359  case 2:
360  case 4:
361  case 16:
362  case 17:
363  case 21:
364  case 22:
365  case 26:
366  case 27:
367  case 31:
368  case 33:
369  case 35:
370  me = true;
371  break;
372  default:
373  me = false;
374  }
375  return me;
376  }
377 
378  bool L1TrackId::hasMB1(const unsigned& rank) const {
379  bool mb = false;
380  switch (rank) {
381  case 9:
382  case 12:
383  case 15:
384  case 19:
385  case 20:
386  case 24:
387  case 25:
388  case 29:
389  case 30:
390  case 32:
391  case 34:
392  case 36:
393  mb = true;
394  break;
395  default:
396  mb = false;
397  }
398  return mb;
399  }
400 
401 } // namespace csc
csc::L1TrackId::m_rank
unsigned m_rank
Definition: L1TrackId.h:58
csc::L1TrackId::setOverlap
void setOverlap(const unsigned &rank)
Definition: L1TrackId.cc:36
csc::L1TrackId::m_mode
unsigned m_mode
Definition: L1TrackId.h:58
csc::L1TrackId::encodeLUTMode
unsigned encodeLUTMode(const unsigned &rank) const
Definition: L1TrackId.cc:139
csc::L1TrackId::hasME2
bool hasME2(const unsigned &rank) const
Definition: L1TrackId.cc:289
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
csc::L1TrackId::operator=
const L1TrackId & operator=(const csc::L1TrackId &)
Definition: L1TrackId.cc:20
csc::L1TrackId::mode
unsigned mode() const
Definition: L1TrackId.h:33
csc::L1TrackId::L1TrackId
L1TrackId()
Definition: L1TrackId.cc:4
L1TrackId.h
csc::L1TrackId::m_overlap
bool m_overlap
Definition: L1TrackId.h:59
csc
Definition: L1Track.h:19
csc::L1TrackId::kRankBitWidth
Definition: L1TrackId.h:20
csc::L1TrackId::setRank
void setRank(const unsigned &rank)
Definition: L1TrackId.cc:44
csc::L1TrackId::overlapMode
void overlapMode(const unsigned &rank, int &mode, int &stnA, int &stnB)
Definition: L1TrackId.cc:59
csc::L1TrackId
Definition: L1TrackId.h:18
csc::L1TrackId::sharesHit
bool sharesHit(const csc::L1TrackId &) const
Definition: L1TrackId.cc:32
DetId::id_
uint32_t id_
Definition: DetId.h:69
CSCDetId
Definition: CSCDetId.h:26
csc::L1TrackId::m_erase
bool m_erase
Definition: L1TrackId.h:59
CSCTriggerNumbering::chamberFromTriggerLabels
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
Definition: CSCTriggerNumbering.cc:30
csc::L1TrackId::hasME4
bool hasME4(const unsigned &rank) const
Definition: L1TrackId.cc:355
csc::L1TrackId::sector
unsigned sector() const
Definition: L1TrackId.h:29
csc::L1TrackId::rank
unsigned rank() const
Definition: L1TrackId.h:32
csc::L1TrackId::id_
CSCDetId id_
Definition: L1TrackId.h:61
csc::L1TrackId::hasMB1
bool hasMB1(const unsigned &rank) const
Definition: L1TrackId.cc:378
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
csc::L1TrackId::hasME1
bool hasME1(const unsigned &rank) const
Functions to determine which stations are in this track.
Definition: L1TrackId.cc:259
csc::L1TrackId::hasME3
bool hasME3(const unsigned &rank) const
Definition: L1TrackId.cc:329