CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 19 of file L1TrackId.h.

Member Enumeration Documentation

anonymous enum
Enumerator
kRankBitWidth 

Definition at line 22 of file L1TrackId.h.

Constructor & Destructor Documentation

L1TrackId::L1TrackId ( )

Definition at line 5 of file L1TrackId.cc.

6  {}
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 8 of file L1TrackId.cc.

References CSCTriggerNumbering::chamberFromTriggerLabels(), CSCDetId, and id_.

9  {
11  id_ = CSCDetId(side, 2, 1,
13  0);
14 
15  }
CSCDetId id_
Definition: L1TrackId.h:63
unsigned sector() const
Definition: L1TrackId.h:31
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
L1TrackId::L1TrackId ( const csc::L1TrackId id)

Definition at line 17 of file L1TrackId.cc.

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

18  {
19  m_rank = id.m_rank;
20  m_mode = id.m_mode;
21  m_erase = id.m_erase;
22  m_overlap = id.m_overlap;
23  id_ = id.id_;
24  //stubs = id.stubs; // add stubs back later
25  }
bool m_overlap
Definition: L1TrackId.h:61
unsigned m_rank
Definition: L1TrackId.h:60
CSCDetId id_
Definition: L1TrackId.h:63
unsigned m_mode
Definition: L1TrackId.h:60
uint32_t id_
Definition: DetId.h:55

Member Function Documentation

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

Definition at line 145 of file L1TrackId.cc.

References mode().

146  {
147  int mode;
148  switch (rank)
149  {
150  case 0:
151  mode = 0;
152  break;
153  case 1:
154  mode = 10;
155  break;
156  case 2:
157  mode = 9;
158  break;
159  case 3:
160  mode = 8;
161  break;
162  case 4:
163  mode = 5;
164  break;
165  case 5:
166  mode = 7;
167  break;
168  case 6:
169  mode = 6;
170  break;
171  case 7:
172  mode = 15;
173  break;
174  case 8:
175  mode = 13;
176  break;
177  case 9:
178  mode = 14;
179  break;
180  case 10:
181  mode = 7;
182  break;
183  case 11:
184  mode = 6;
185  break;
186  case 12:
187  mode = 14;
188  break;
189  case 13:
190  mode = 7;
191  break;
192  case 14:
193  mode = 6;
194  break;
195  case 15:
196  mode = 14;
197  break;
198  case 16:
199  mode = 4;
200  break;
201  case 17:
202  mode = 3;
203  break;
204  case 18:
205  mode = 2;
206  break;
207  case 19:
208  mode = 12;
209  break;
210  case 20:
211  mode = 11;
212  break;
213  case 21:
214  mode = 4;
215  break;
216  case 22:
217  mode = 3;
218  break;
219  case 23:
220  mode = 2;
221  break;
222  case 24:
223  mode = 12;
224  break;
225  case 25:
226  mode = 11;
227  break;
228  case 26:
229  mode = 4;
230  break;
231  case 27:
232  mode = 3;
233  break;
234  case 28:
235  mode = 2;
236  break;
237  case 29:
238  mode = 12;
239  break;
240  case 30:
241  mode = 11;
242  break;
243  case 31:
244  mode = 2;
245  break;
246  case 32:
247  mode = 11;
248  break;
249  case 33:
250  mode = 2;
251  break;
252  case 34:
253  mode = 11;
254  break;
255  case 35:
256  mode = 2;
257  break;
258  case 36:
259  mode = 11;
260  break;
261  default:
262  mode = 0;
263  }
264  return mode;
265  }
unsigned rank() const
Definition: L1TrackId.h:34
unsigned mode() const
Definition: L1TrackId.h:35
unsigned csc::L1TrackId::endcap ( ) const
inline

Definition at line 30 of file L1TrackId.h.

References CSCDetId::endcap(), and id_.

Referenced by geometryXMLparser.CSCAlignable::index().

30 { return id_.endcap(); }
int endcap() const
Definition: CSCDetId.h:106
CSCDetId id_
Definition: L1TrackId.h:63
bool csc::L1TrackId::erase ( ) const
inline

Definition at line 57 of file L1TrackId.h.

References m_erase.

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

Definition at line 394 of file L1TrackId.cc.

395  {
396  bool mb = false;
397  switch (rank)
398  {
399  case 9:
400  case 12:
401  case 15:
402  case 19:
403  case 20:
404  case 24:
405  case 25:
406  case 29:
407  case 30:
408  case 32:
409  case 34:
410  case 36:
411  mb = true;
412  break;
413  default:
414  mb = false;
415  }
416  return mb;
417  }
unsigned rank() const
Definition: L1TrackId.h:34
bool L1TrackId::hasME1 ( const unsigned &  rank) const

Functions to determine which stations are in this track.

Definition at line 267 of file L1TrackId.cc.

268  {
269  bool me = false;
270  switch (rank)
271  {
272  case 5:
273  case 6:
274  case 10:
275  case 11:
276  case 12:
277  case 13:
278  case 14:
279  case 16:
280  case 17:
281  case 18:
282  case 21:
283  case 22:
284  case 23:
285  case 26:
286  case 27:
287  case 28:
288  case 31:
289  case 33:
290  case 35:
291  me = true;
292  break;
293  default:
294  me = false;
295  }
296  return me;
297  }
unsigned rank() const
Definition: L1TrackId.h:34
bool L1TrackId::hasME2 ( const unsigned &  rank) const

Definition at line 299 of file L1TrackId.cc.

300  {
301  bool me = false;
302  switch (rank)
303  {
304  case 2:
305  case 3:
306  case 4:
307  case 6:
308  case 7:
309  case 8:
310  case 9:
311  case 11:
312  case 12:
313  case 14:
314  case 15:
315  case 17:
316  case 18:
317  case 19:
318  case 20:
319  case 22:
320  case 23:
321  case 24:
322  case 25:
323  case 27:
324  case 28:
325  case 29:
326  case 30:
327  case 31:
328  case 32:
329  case 33:
330  case 34:
331  case 35:
332  case 36:
333  me = true;
334  break;
335  default:
336  me = false;
337  }
338  return me;
339  }
unsigned rank() const
Definition: L1TrackId.h:34
bool L1TrackId::hasME3 ( const unsigned &  rank) const

Definition at line 341 of file L1TrackId.cc.

342  {
343  bool me = false;
344  switch (rank)
345  {
346  case 1:
347  case 3:
348  case 4:
349  case 5:
350  case 10:
351  case 13:
352  case 16:
353  case 18:
354  case 21:
355  case 23:
356  case 26:
357  case 28:
358  case 31:
359  case 33:
360  case 35:
361  me = true;
362  break;
363  default:
364  me = false;
365  }
366  return me;
367  }
unsigned rank() const
Definition: L1TrackId.h:34
bool L1TrackId::hasME4 ( const unsigned &  rank) const

Definition at line 369 of file L1TrackId.cc.

370  {
371  bool me = false;
372  switch (rank)
373  {
374  case 1:
375  case 2:
376  case 4:
377  case 16:
378  case 17:
379  case 21:
380  case 22:
381  case 26:
382  case 27:
383  case 31:
384  case 33:
385  case 35:
386  me = true;
387  break;
388  default:
389  me = false;
390  }
391  return me;
392  }
unsigned rank() const
Definition: L1TrackId.h:34
bool csc::L1TrackId::inOverlap ( ) const
inline

Definition at line 43 of file L1TrackId.h.

References m_overlap.

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

Definition at line 35 of file L1TrackId.h.

References m_mode.

Referenced by encodeLUTMode(), and setMode().

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

Definition at line 36 of file L1TrackId.h.

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

Definition at line 27 of file L1TrackId.cc.

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

28  {
29  if(&rhs != this)
30  {
31  m_rank = rhs.m_rank;
32  m_mode = rhs.m_mode;
33  m_erase = rhs.m_erase;
34  m_overlap = rhs.m_overlap;
35  id_ = rhs.id_;
36  //stubs = rhs.stubs;
37  }
38  return *this;
39  }
bool m_overlap
Definition: L1TrackId.h:61
unsigned m_rank
Definition: L1TrackId.h:60
CSCDetId id_
Definition: L1TrackId.h:63
unsigned m_mode
Definition: L1TrackId.h:60
void L1TrackId::overlapMode ( const unsigned &  rank,
int &  mode,
int &  stnA,
int &  stnB 
)

Definition at line 78 of file L1TrackId.cc.

79  {
80  switch (rank)
81  {
82  case 7:
83  stnA = 2; stnB = 1;
84  mode = 4;
85  break;
86  case 8:
87  stnA = 3; stnB = 2;
88  mode = 4;
89  break;
90  case 9:
91  stnA = 2; stnB = 1;
92  mode = 2;
93  break;
94  case 12:
95  stnA = 2; stnB = 1;
96  mode = 2;
97  break;
98  case 15:
99  stnA = 2; stnB = 1;
100  mode = 2;
101  break;
102  case 19:
103  stnA = 3; stnB = 2;
104  mode = 2;
105  break;
106  case 20:
107  stnA = 2; stnB = 1;
108  mode = 2;
109  break;
110  case 24:
111  stnA = 3; stnB = 2;
112  mode = 2;
113  break;
114  case 25:
115  stnA = 2; stnB = 1;
116  mode = 2;
117  break;
118  case 29:
119  stnA = 3; stnB = 2;
120  mode = 2;
121  break;
122  case 30:
123  stnA = 2; stnB = 1;
124  mode = 2;
125  break;
126  case 32:
127  stnA = 3; stnB = 2;
128  mode = 2;
129  break;
130  case 34:
131  stnA = 3; stnB = 2;
132  mode = 2;
133  break;
134  case 36:
135  stnA = 3; stnB = 2;
136  mode = 2;
137  break;
138  default:
139  // standard case for CSC tracks
140  stnA = 1; stnB = 2;
141  mode = 0;
142  }
143  }
unsigned rank() const
Definition: L1TrackId.h:34
unsigned mode() const
Definition: L1TrackId.h:35
unsigned csc::L1TrackId::rank ( ) const
inline

Definition at line 34 of file L1TrackId.h.

References m_rank.

Referenced by setRank().

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

Definition at line 31 of file L1TrackId.h.

References id_, and CSCTriggerNumbering::triggerSectorFromLabels().

Referenced by geometryXMLparser.DTAlignable::index().

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

Definition at line 39 of file L1TrackId.h.

References m_mode, and mode().

Referenced by CSCTFSPCoreLogic::run().

39 { m_mode = mode; }
unsigned m_mode
Definition: L1TrackId.h:60
unsigned mode() const
Definition: L1TrackId.h:35
void L1TrackId::setOverlap ( const unsigned &  rank)

Definition at line 46 of file L1TrackId.cc.

References m_overlap.

Referenced by setRank().

47  {
48  if ( (rank == 7) || (rank == 8) ||
49  (rank == 9) || (rank == 12) || (rank == 15) ||
50  (rank == 19) || (rank == 20) ||
51  (rank == 24) || (rank == 25) ||
52  (rank == 29) || (rank == 30) ||
53  (rank == 32) || (rank == 34) || (rank == 36) ) {
54  m_overlap = true;
55  }
56  else m_overlap = false;
57  }
unsigned rank() const
Definition: L1TrackId.h:34
bool m_overlap
Definition: L1TrackId.h:61
void L1TrackId::setRank ( const unsigned &  rank)

Definition at line 59 of file L1TrackId.cc.

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

60  {
61  if (rank<(1<<kRankBitWidth)) // rank >= 0, since rank is unsigned
62  {
63  m_rank = rank;
65  }
66  else
67  {
68  m_rank = 0;
69  }
70  }
unsigned rank() const
Definition: L1TrackId.h:34
unsigned m_rank
Definition: L1TrackId.h:60
void setOverlap(const unsigned &rank)
Definition: L1TrackId.cc:46
bool L1TrackId::sharesHit ( const csc::L1TrackId a_id) const

Definition at line 41 of file L1TrackId.cc.

42  {
43  return false; // finish later
44  }
unsigned csc::L1TrackId::station ( ) const
inline

Definition at line 32 of file L1TrackId.h.

References id_, and CSCDetId::station().

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

32 { return id_.station(); }
CSCDetId id_
Definition: L1TrackId.h:63
int station() const
Definition: CSCDetId.h:99

Member Data Documentation

CSCDetId csc::L1TrackId::id_
private

Definition at line 63 of file L1TrackId.h.

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

bool csc::L1TrackId::m_erase
private

Definition at line 61 of file L1TrackId.h.

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

unsigned csc::L1TrackId::m_mode
private

Definition at line 60 of file L1TrackId.h.

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

bool csc::L1TrackId::m_overlap
private

Definition at line 61 of file L1TrackId.h.

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

unsigned csc::L1TrackId::m_rank
private

Definition at line 60 of file L1TrackId.h.

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