CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
csc::L1TrackId Class Reference

#include <L1TrackId.h>

Public Types

enum  { kRankBitWidth = 6 }
 

Public Member Functions

unsigned encodeLUTMode (const unsigned &rank) const
 
unsigned endcap () const
 
bool erase () const
 
bool hasMB1 (const unsigned &rank) const
 
bool hasME1 (const unsigned &rank) const
 Functions to determine which stations are in this track. More...
 
bool hasME2 (const unsigned &rank) const
 
bool hasME3 (const unsigned &rank) const
 
bool hasME4 (const unsigned &rank) const
 
bool inOverlap () const
 
 L1TrackId ()
 
 L1TrackId (const unsigned &side, const unsigned &sector)
 
 L1TrackId (const csc::L1TrackId &)
 
unsigned mode () const
 
unsigned numSegments () const
 
const L1TrackIdoperator= (const csc::L1TrackId &)
 
void overlapMode (const unsigned &rank, int &mode, int &stnA, int &stnB)
 
unsigned rank () const
 
unsigned sector () const
 
void setMode (const unsigned &mode)
 
void setOverlap (const unsigned &rank)
 
void setRank (const unsigned &rank)
 
bool sharesHit (const csc::L1TrackId &) const
 
unsigned station () const
 

Private Attributes

CSCDetId id_
 
bool m_erase
 
unsigned m_mode
 
bool m_overlap
 
unsigned m_rank
 

Detailed Description

Definition at line 18 of file L1TrackId.h.

Member Enumeration Documentation

anonymous enum
Enumerator
kRankBitWidth 

Definition at line 20 of file L1TrackId.h.

Constructor & Destructor Documentation

L1TrackId::L1TrackId ( )

Definition at line 4 of file L1TrackId.cc.

4 {}
L1TrackId::L1TrackId ( const unsigned &  side,
const unsigned &  sector 
)

Use a fake cscid and station... We just need to know endcap and sector

Definition at line 6 of file L1TrackId.cc.

References CSCTriggerNumbering::chamberFromTriggerLabels(), and id_.

6  {
9  }
CSCDetId id_
Definition: L1TrackId.h:61
unsigned sector() const
Definition: L1TrackId.h:29
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
L1TrackId::L1TrackId ( const csc::L1TrackId id)

Definition at line 11 of file L1TrackId.cc.

References id_, DetId::id_, m_erase, m_mode, m_overlap, and m_rank.

11  {
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  }
bool m_overlap
Definition: L1TrackId.h:59
unsigned m_rank
Definition: L1TrackId.h:58
CSCDetId id_
Definition: L1TrackId.h:61
unsigned m_mode
Definition: L1TrackId.h:58
uint32_t id_
Definition: DetId.h:69

Member Function Documentation

unsigned L1TrackId::encodeLUTMode ( const unsigned &  rank) const

Definition at line 139 of file L1TrackId.cc.

References mode().

Referenced by inOverlap().

139  {
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  }
unsigned rank() const
Definition: L1TrackId.h:32
unsigned mode() const
Definition: L1TrackId.h:33
unsigned csc::L1TrackId::endcap ( ) const
inline

Definition at line 28 of file L1TrackId.h.

References CSCDetId::endcap(), and id_.

Referenced by geometryXMLparser.CSCAlignable::index().

28 { return id_.endcap(); }
int endcap() const
Definition: CSCDetId.h:85
CSCDetId id_
Definition: L1TrackId.h:61
bool csc::L1TrackId::erase ( ) const
inline

Definition at line 55 of file L1TrackId.h.

References m_erase.

55 { return m_erase; }
bool L1TrackId::hasMB1 ( const unsigned &  rank) const

Definition at line 378 of file L1TrackId.cc.

Referenced by inOverlap().

378  {
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  }
unsigned rank() const
Definition: L1TrackId.h:32
bool L1TrackId::hasME1 ( const unsigned &  rank) const

Functions to determine which stations are in this track.

Definition at line 259 of file L1TrackId.cc.

References hlt_dqm_clientPB-live_cfg::me.

Referenced by inOverlap().

259  {
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  }
unsigned rank() const
Definition: L1TrackId.h:32
bool L1TrackId::hasME2 ( const unsigned &  rank) const

Definition at line 289 of file L1TrackId.cc.

References hlt_dqm_clientPB-live_cfg::me.

Referenced by inOverlap().

289  {
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  }
unsigned rank() const
Definition: L1TrackId.h:32
bool L1TrackId::hasME3 ( const unsigned &  rank) const

Definition at line 329 of file L1TrackId.cc.

References hlt_dqm_clientPB-live_cfg::me.

Referenced by inOverlap().

329  {
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  }
unsigned rank() const
Definition: L1TrackId.h:32
bool L1TrackId::hasME4 ( const unsigned &  rank) const

Definition at line 355 of file L1TrackId.cc.

References hlt_dqm_clientPB-live_cfg::me.

Referenced by inOverlap().

355  {
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  }
unsigned rank() const
Definition: L1TrackId.h:32
bool csc::L1TrackId::inOverlap ( ) const
inline

Definition at line 41 of file L1TrackId.h.

References encodeLUTMode(), hasMB1(), hasME1(), hasME2(), hasME3(), hasME4(), m_overlap, mode(), and overlapMode().

41 { return m_overlap; }
bool m_overlap
Definition: L1TrackId.h:59
unsigned csc::L1TrackId::mode ( void  ) const
inline

Definition at line 33 of file L1TrackId.h.

References m_mode.

Referenced by encodeLUTMode(), inOverlap(), and setMode().

33 { return m_mode; }
unsigned m_mode
Definition: L1TrackId.h:58
unsigned csc::L1TrackId::numSegments ( ) const
inline

Definition at line 34 of file L1TrackId.h.

References rank(), and setRank().

34 { return 0; } // finish later
const csc::L1TrackId & L1TrackId::operator= ( const csc::L1TrackId rhs)

Definition at line 20 of file L1TrackId.cc.

References id_, m_erase, m_mode, m_overlap, and m_rank.

20  {
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  }
bool m_overlap
Definition: L1TrackId.h:59
unsigned m_rank
Definition: L1TrackId.h:58
CSCDetId id_
Definition: L1TrackId.h:61
unsigned m_mode
Definition: L1TrackId.h:58
void L1TrackId::overlapMode ( const unsigned &  rank,
int &  mode,
int &  stnA,
int &  stnB 
)

Definition at line 59 of file L1TrackId.cc.

Referenced by inOverlap().

59  {
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  }
unsigned rank() const
Definition: L1TrackId.h:32
unsigned mode() const
Definition: L1TrackId.h:33
unsigned csc::L1TrackId::rank ( ) const
inline

Definition at line 32 of file L1TrackId.h.

References m_rank.

Referenced by numSegments(), and setRank().

32 { return m_rank; }
unsigned m_rank
Definition: L1TrackId.h:58
unsigned csc::L1TrackId::sector ( ) const
inline

Definition at line 29 of file L1TrackId.h.

References id_, and CSCTriggerNumbering::triggerSectorFromLabels().

Referenced by geometryXMLparser.DTAlignable::index().

CSCDetId id_
Definition: L1TrackId.h:61
static int triggerSectorFromLabels(int station, int ring, int chamber)
void csc::L1TrackId::setMode ( const unsigned &  mode)
inline

Definition at line 37 of file L1TrackId.h.

References m_mode, mode(), setOverlap(), and sharesHit().

Referenced by CSCTFSPCoreLogic::run().

37 { m_mode = mode; }
unsigned m_mode
Definition: L1TrackId.h:58
unsigned mode() const
Definition: L1TrackId.h:33
void L1TrackId::setOverlap ( const unsigned &  rank)

Definition at line 36 of file L1TrackId.cc.

References m_overlap.

Referenced by setMode(), and setRank().

36  {
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  }
unsigned rank() const
Definition: L1TrackId.h:32
bool m_overlap
Definition: L1TrackId.h:59
void L1TrackId::setRank ( const unsigned &  rank)

Definition at line 44 of file L1TrackId.cc.

References kRankBitWidth, m_rank, rank(), and setOverlap().

Referenced by numSegments().

44  {
45  if (rank < (1 << kRankBitWidth)) // rank >= 0, since rank is unsigned
46  {
47  m_rank = rank;
49  } else {
50  m_rank = 0;
51  }
52  }
unsigned rank() const
Definition: L1TrackId.h:32
unsigned m_rank
Definition: L1TrackId.h:58
void setOverlap(const unsigned &rank)
Definition: L1TrackId.cc:36
bool L1TrackId::sharesHit ( const csc::L1TrackId a_id) const

Definition at line 32 of file L1TrackId.cc.

Referenced by setMode().

32  {
33  return false; // finish later
34  }
unsigned csc::L1TrackId::station ( ) const
inline

Definition at line 30 of file L1TrackId.h.

References id_, and CSCDetId::station().

Referenced by geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

30 { return id_.station(); }
CSCDetId id_
Definition: L1TrackId.h:61
int station() const
Definition: CSCDetId.h:79

Member Data Documentation

CSCDetId csc::L1TrackId::id_
private

Definition at line 61 of file L1TrackId.h.

Referenced by endcap(), L1TrackId(), operator=(), sector(), and station().

bool csc::L1TrackId::m_erase
private

Definition at line 59 of file L1TrackId.h.

Referenced by erase(), L1TrackId(), and operator=().

unsigned csc::L1TrackId::m_mode
private

Definition at line 58 of file L1TrackId.h.

Referenced by L1TrackId(), mode(), operator=(), and setMode().

bool csc::L1TrackId::m_overlap
private

Definition at line 59 of file L1TrackId.h.

Referenced by inOverlap(), L1TrackId(), operator=(), and setOverlap().

unsigned csc::L1TrackId::m_rank
private

Definition at line 58 of file L1TrackId.h.

Referenced by L1TrackId(), operator=(), rank(), and setRank().