CMS 3D CMS Logo

TrackerTopology.h
Go to the documentation of this file.
1 #ifndef TRACKERTOPOLOGY_H
2 #define TRACKERTOPOLOGY_H
3 
7 
8 #include <vector>
9 #include <string>
10 
11 //knower of all things tracker geometry
12 //flexible replacement for PXBDetId and friends
13 //to implement
14 // endcap pixel
15 
17 public:
19  unsigned int layerStartBit_;
20  unsigned int ladderStartBit_;
21  unsigned int moduleStartBit_;
22  unsigned int doubleStartBit_;
23  unsigned int layerMask_;
24  unsigned int ladderMask_;
25  unsigned int moduleMask_;
26  unsigned int doubleMask_;
27  };
28 
30  unsigned int sideStartBit_;
31  unsigned int diskStartBit_;
32  unsigned int bladeStartBit_;
33  unsigned int panelStartBit_;
34  unsigned int moduleStartBit_;
35  unsigned int sideMask_;
36  unsigned int diskMask_;
37  unsigned int bladeMask_;
38  unsigned int panelMask_;
39  unsigned int moduleMask_;
40  };
41 
42  struct TECValues {
43  unsigned int sideStartBit_;
44  unsigned int wheelStartBit_;
45  unsigned int petal_fw_bwStartBit_;
46  unsigned int petalStartBit_;
47  unsigned int ringStartBit_;
48  unsigned int moduleStartBit_;
49  unsigned int sterStartBit_;
50  unsigned int sideMask_;
51  unsigned int wheelMask_;
52  unsigned int petal_fw_bwMask_;
53  unsigned int petalMask_;
54  unsigned int ringMask_;
55  unsigned int moduleMask_;
56  unsigned int sterMask_;
57  };
58 
59  struct TIBValues {
60  unsigned int layerStartBit_;
61  unsigned int str_fw_bwStartBit_;
62  unsigned int str_int_extStartBit_;
63  unsigned int strStartBit_;
64  unsigned int moduleStartBit_;
65  unsigned int sterStartBit_;
66 
67  unsigned int layerMask_;
68  unsigned int str_fw_bwMask_;
69  unsigned int str_int_extMask_;
70  unsigned int strMask_;
71  unsigned int moduleMask_;
72  unsigned int sterMask_;
73  };
74 
75  struct TIDValues {
76  unsigned int sideStartBit_;
77  unsigned int wheelStartBit_;
78  unsigned int ringStartBit_;
79  unsigned int module_fw_bwStartBit_;
80  unsigned int moduleStartBit_;
81  unsigned int sterStartBit_;
82  unsigned int sideMask_;
83  unsigned int wheelMask_;
84  unsigned int ringMask_;
85  unsigned int module_fw_bwMask_;
86  unsigned int moduleMask_;
87  unsigned int sterMask_;
88  };
89 
90  struct TOBValues {
91  unsigned int layerStartBit_;
92  unsigned int rod_fw_bwStartBit_;
93  unsigned int rodStartBit_;
94  unsigned int moduleStartBit_;
95  unsigned int sterStartBit_;
96  unsigned int layerMask_;
97  unsigned int rod_fw_bwMask_;
98  unsigned int rodMask_;
99  unsigned int moduleMask_;
100  unsigned int sterMask_;
101  };
102 
103  enum DetIdFields {
112  /* TODO: this can be extended for all subdetectors */
114  };
115 
117  public:
118  explicit SameLayerComparator(const TrackerTopology *topo) : topo_(topo) {}
119 
120  bool operator()(DetId i1, DetId i2) const {
121  if (i1.det() == i2.det() && i1.subdetId() == i2.subdetId() && topo_->side(i1) == topo_->side(i2) &&
122  topo_->layer(i1) == topo_->layer(i2)) {
123  return false;
124  }
125  return i1 < i2;
126  }
127 
128  bool operator()(uint32_t i1, uint32_t i2) const { return operator()(DetId(i1), DetId(i2)); }
129 
130  private:
132  };
133 
135  const PixelEndcapValues &pxf,
136  const TECValues &tecv,
137  const TIBValues &tibv,
138  const TIDValues &tidv,
139  const TOBValues &tobv);
140 
141  unsigned int side(const DetId &id) const;
142  unsigned int layer(const DetId &id) const;
143  unsigned int module(const DetId &id) const;
144 
145  // layer numbers
146  unsigned int pxbLayer(const DetId &id) const {
147  return int((id.rawId() >> pbVals_.layerStartBit_) & pbVals_.layerMask_);
148  }
149  unsigned int tobLayer(const DetId &id) const {
150  return int((id.rawId() >> tobVals_.layerStartBit_) & tobVals_.layerMask_);
151  }
152  unsigned int tibLayer(const DetId &id) const {
153  return int((id.rawId() >> tibVals_.layerStartBit_) & tibVals_.layerMask_);
154  }
155 
156  //ladder
157  unsigned int pxbLadder(const DetId &id) const {
158  return ((id.rawId() >> pbVals_.ladderStartBit_) & pbVals_.ladderMask_);
159  }
160 
161  //module
162  unsigned int pxbModule(const DetId &id) const {
163  return ((id.rawId() >> pbVals_.moduleStartBit_) & pbVals_.moduleMask_);
164  }
165  unsigned int pxfModule(const DetId &id) const {
166  return int((id.rawId() >> pfVals_.moduleStartBit_) & pfVals_.moduleMask_);
167  }
168  unsigned int tobModule(const DetId &id) const {
169  return ((id.rawId() >> tobVals_.moduleStartBit_) & tobVals_.moduleMask_);
170  }
171  unsigned int tecModule(const DetId &id) const {
172  return ((id.rawId() >> tecVals_.moduleStartBit_) & tecVals_.moduleMask_);
173  }
174  unsigned int tibModule(const DetId &id) const {
175  return ((id.rawId() >> tibVals_.moduleStartBit_) & tibVals_.moduleMask_);
176  }
177  unsigned int tidModule(const DetId &id) const {
178  return ((id.rawId() >> tidVals_.moduleStartBit_) & tidVals_.moduleMask_);
179  }
180 
181  //side
182  unsigned int tobSide(const DetId &id) const {
184  }
185 
186  unsigned int tecSide(const DetId &id) const { return ((id.rawId() >> tecVals_.sideStartBit_) & tecVals_.sideMask_); }
187 
188  unsigned int tibSide(const DetId &id) const {
190  }
191 
192  unsigned int tidSide(const DetId &id) const { return ((id.rawId() >> tidVals_.sideStartBit_) & tidVals_.sideMask_); }
193 
194  unsigned int pxfSide(const DetId &id) const { return ((id.rawId() >> pfVals_.sideStartBit_) & pfVals_.sideMask_); }
195 
196  //rod
197  unsigned int tobRod(const DetId &id) const { return ((id.rawId() >> tobVals_.rodStartBit_) & tobVals_.rodMask_); }
198 
199  //wheel
200  unsigned int tecWheel(const DetId &id) const {
201  return ((id.rawId() >> tecVals_.wheelStartBit_) & tecVals_.wheelMask_);
202  }
203  unsigned int tidWheel(const DetId &id) const {
204  return ((id.rawId() >> tidVals_.wheelStartBit_) & tidVals_.wheelMask_);
205  }
206 
207  //order
208  unsigned int tecOrder(const DetId &id) const {
210  }
211  unsigned int tibOrder(const DetId &id) const {
213  }
214  unsigned int tidOrder(const DetId &id) const {
216  }
217 
219  unsigned int tecRing(const DetId &id) const { return ((id.rawId() >> tecVals_.ringStartBit_) & tecVals_.ringMask_); }
220  unsigned int tidRing(const DetId &id) const { return ((id.rawId() >> tidVals_.ringStartBit_) & tidVals_.ringMask_); }
221 
222  //petal
223  unsigned int tecPetalNumber(const DetId &id) const {
224  return ((id.rawId() >> tecVals_.petalStartBit_) & tecVals_.petalMask_);
225  }
226 
227  //misc tob
228  std::vector<unsigned int> tobRodInfo(const DetId &id) const {
229  std::vector<unsigned int> num;
230  num.push_back(tobSide(id));
231  num.push_back(tobRod(id));
232  return num;
233  }
234 
235  //generic function to return DetIds and boolean factors
236  uint32_t glued(const DetId &id) const;
237  uint32_t stack(const DetId &id) const;
238  uint32_t doubleSensor(const DetId &id) const;
239  uint32_t lower(const DetId &id) const;
240  uint32_t upper(const DetId &id) const;
241  uint32_t first(const DetId &id) const;
242  uint32_t second(const DetId &id) const;
243 
244  bool isStereo(const DetId &id) const;
245  bool isRPhi(const DetId &id) const;
246  bool isDoubleSens(const DetId &id) const;
247  bool isLower(const DetId &id) const;
248  bool isUpper(const DetId &id) const;
249  bool isFirst(const DetId &id) const;
250  bool isSecond(const DetId &id) const;
251 
252  //specific function to return boolean factors
253  bool tobIsDoubleSide(const DetId &id) const { return tobGlued(id) == 0 && (tobLayer(id) == 1 || tobLayer(id) == 2); }
254  bool tecIsDoubleSide(const DetId &id) const {
255  return tecGlued(id) == 0 && (tecRing(id) == 1 || tecRing(id) == 2 || tecRing(id) == 5);
256  }
257  bool tibIsDoubleSide(const DetId &id) const { return tibGlued(id) == 0 && (tibLayer(id) == 1 || tibLayer(id) == 2); }
258  bool tidIsDoubleSide(const DetId &id) const { return tidGlued(id) == 0 && (tidRing(id) == 1 || tidRing(id) == 2); }
259 
260  bool tobIsZPlusSide(const DetId &id) const { return !tobIsZMinusSide(id); }
261  bool tobIsZMinusSide(const DetId &id) const { return tobSide(id) == 1; }
262 
263  bool tibIsZPlusSide(const DetId &id) const { return !tibIsZMinusSide(id); }
264  bool tibIsZMinusSide(const DetId &id) const { return tibSide(id) == 1; }
265 
266  bool tidIsZPlusSide(const DetId &id) const { return !tidIsZMinusSide(id); }
267  bool tidIsZMinusSide(const DetId &id) const { return tidSide(id) == 1; }
268 
269  bool tecIsZPlusSide(const DetId &id) const { return !tecIsZMinusSide(id); }
270  bool tecIsZMinusSide(const DetId &id) const { return tecSide(id) == 1; }
271 
272  bool tobIsStereo(const DetId &id) const { return tobStereo(id) != 0 && !tobIsDoubleSide(id); }
273  bool tecIsStereo(const DetId &id) const { return tecStereo(id) != 0 && !tecIsDoubleSide(id); }
274  bool tibIsStereo(const DetId &id) const { return tibStereo(id) != 0 && !tibIsDoubleSide(id); }
275  bool tidIsStereo(const DetId &id) const { return tidStereo(id) != 0 && !tidIsDoubleSide(id); }
276 
277  bool tobIsRPhi(const DetId &id) const { return tobRPhi(id) != 0 && !tobIsDoubleSide(id); }
278  bool tecIsRPhi(const DetId &id) const { return tecRPhi(id) != 0 && !tecIsDoubleSide(id); }
279  bool tibIsRPhi(const DetId &id) const { return tibRPhi(id) != 0 && !tibIsDoubleSide(id); }
280  bool tidIsRPhi(const DetId &id) const { return tidRPhi(id) != 0 && !tidIsDoubleSide(id); }
281 
282  //phase0 stereo
283  uint32_t tobStereo(const DetId &id) const {
284  return (((id.rawId() >> tobVals_.sterStartBit_) & tobVals_.sterMask_) == 1) ? 1 : 0;
285  }
286 
287  uint32_t tibStereo(const DetId &id) const {
288  return (((id.rawId() >> tibVals_.sterStartBit_) & tibVals_.sterMask_) == 1) ? 1 : 0;
289  }
290 
291  uint32_t tidStereo(const DetId &id) const {
292  return (((id.rawId() >> tidVals_.sterStartBit_) & tidVals_.sterMask_) == 1) ? 1 : 0;
293  }
294 
295  uint32_t tecStereo(const DetId &id) const {
296  return (((id.rawId() >> tecVals_.sterStartBit_) & tecVals_.sterMask_) == 1) ? 1 : 0;
297  }
298 
299  //phase 2 split sensor
300  uint32_t pixFirst(const DetId &id) const {
301  return (((id.rawId() >> pbVals_.doubleStartBit_) & pbVals_.doubleMask_) == 1) ? 1 : 0;
302  }
303 
304  //phase0 stereo == phase2 lower
305  uint32_t tibLower(const DetId &id) const { return tibStereo(id); }
306  uint32_t tidLower(const DetId &id) const { return tidStereo(id); }
307  uint32_t tobLower(const DetId &id) const { return tobStereo(id); }
308  uint32_t tecLower(const DetId &id) const { return tecStereo(id); }
309 
310  //phase0 rphi
311  uint32_t tobRPhi(const DetId &id) const {
312  if (((id.rawId() >> tobVals_.sterStartBit_) & tobVals_.sterMask_) == 2) {
313  return ((id.rawId() >> tobVals_.sterStartBit_) & tobVals_.sterMask_);
314  } else {
315  return 0;
316  }
317  }
318 
319  uint32_t tibRPhi(const DetId &id) const {
320  if (((id.rawId() >> tibVals_.sterStartBit_) & tibVals_.sterMask_) == 2) {
321  return ((id.rawId() >> tibVals_.sterStartBit_) & tibVals_.sterMask_);
322  } else {
323  return 0;
324  }
325  }
326 
327  uint32_t tidRPhi(const DetId &id) const {
328  if (((id.rawId() >> tidVals_.sterStartBit_) & tidVals_.sterMask_) == 2) {
329  return ((id.rawId() >> tidVals_.sterStartBit_) & tidVals_.sterMask_);
330  } else {
331  return 0;
332  }
333  }
334 
335  uint32_t tecRPhi(const DetId &id) const {
336  if (((id.rawId() >> tecVals_.sterStartBit_) & tecVals_.sterMask_) == 2) {
337  return ((id.rawId() >> tecVals_.sterStartBit_) & tecVals_.sterMask_);
338  } else {
339  return 0;
340  }
341  }
342 
343  uint32_t pixSecond(const DetId &id) const {
344  if (((id.rawId() >> pbVals_.doubleStartBit_) & pbVals_.doubleMask_) == 2) {
345  return ((id.rawId() >> pbVals_.doubleStartBit_) & pbVals_.doubleMask_);
346  } else {
347  return 0;
348  }
349  }
350 
351  //phase0 rphi == phase2 upper
352  uint32_t tibUpper(const DetId &id) const { return tibRPhi(id); }
353  uint32_t tidUpper(const DetId &id) const { return tidRPhi(id); }
354  uint32_t tobUpper(const DetId &id) const { return tobRPhi(id); }
355  uint32_t tecUpper(const DetId &id) const { return tecRPhi(id); }
356 
357  //phase0 glued
358  uint32_t tibGlued(const DetId &id) const {
359  uint32_t testId = (id.rawId() >> tibVals_.sterStartBit_) & tibVals_.sterMask_;
360  return (testId == 0) ? 0 : (id.rawId() - testId);
361  }
362 
363  uint32_t tecGlued(const DetId &id) const {
364  uint32_t testId = (id.rawId() >> tecVals_.sterStartBit_) & tecVals_.sterMask_;
365  return (testId == 0) ? 0 : (id.rawId() - testId);
366  }
367 
368  uint32_t tobGlued(const DetId &id) const {
369  uint32_t testId = (id.rawId() >> tobVals_.sterStartBit_) & tobVals_.sterMask_;
370  return (testId == 0) ? 0 : (id.rawId() - testId);
371  }
372 
373  uint32_t tidGlued(const DetId &id) const {
374  uint32_t testId = (id.rawId() >> tidVals_.sterStartBit_) & tidVals_.sterMask_;
375  return (testId == 0) ? 0 : (id.rawId() - testId);
376  }
377 
378  uint32_t pixDouble(const DetId &id) const {
379  uint32_t testId = (id.rawId() >> pbVals_.doubleStartBit_) & pbVals_.doubleMask_;
380  return (testId == 0) ? 0 : (id.rawId() - testId);
381  }
382 
383  //phase0 glued == phase2 stack
384  uint32_t tibStack(const DetId &id) const { return tibGlued(id); }
385  uint32_t tidStack(const DetId &id) const { return tidGlued(id); }
386  uint32_t tobStack(const DetId &id) const { return tobGlued(id); }
387  uint32_t tecStack(const DetId &id) const { return tecGlued(id); }
388 
389  //these should be used now!!
390  DetId partnerDetId(const DetId &id) const;
391 
392  DetId pixPartnerDetId(const DetId &id) const {
393  if (((id.rawId() >> pbVals_.doubleStartBit_) & pbVals_.doubleMask_) == 1) {
394  return DetId(id.rawId() + 1);
395  } else if (((id.rawId() >> pbVals_.doubleStartBit_) & pbVals_.doubleMask_) == 2) {
396  return DetId(id.rawId() - 1);
397  } else {
398  return DetId();
399  }
400  }
401 
402  DetId tibPartnerDetId(const DetId &id) const {
403  if (((id.rawId() >> tibVals_.sterStartBit_) & tibVals_.sterMask_) == 1) {
404  return DetId(id.rawId() + 1);
405  } else if (((id.rawId() >> tibVals_.sterStartBit_) & tibVals_.sterMask_) == 2) {
406  return DetId(id.rawId() - 1);
407  } else {
408  return DetId();
409  }
410  }
411 
412  DetId tobPartnerDetId(const DetId &id) const {
413  if (((id.rawId() >> tobVals_.sterStartBit_) & tobVals_.sterMask_) == 1) {
414  return DetId(id.rawId() + 1);
415  } else if (((id.rawId() >> tobVals_.sterStartBit_) & tobVals_.sterMask_) == 2) {
416  return DetId(id.rawId() - 1);
417  } else {
418  return DetId();
419  }
420  }
421 
422  DetId tidPartnerDetId(const DetId &id) const {
423  if (((id.rawId() >> tidVals_.sterStartBit_) & tidVals_.sterMask_) == 1) {
424  return DetId(id.rawId() + 1);
425  } else if (((id.rawId() >> tidVals_.sterStartBit_) & tidVals_.sterMask_) == 2) {
426  return DetId(id.rawId() - 1);
427  } else {
428  return DetId();
429  }
430  }
431 
432  uint32_t tecPartnerDetId(const DetId &id) const {
433  if (((id.rawId() >> tecVals_.sterStartBit_) & tecVals_.sterMask_) == 1) {
434  return DetId(id.rawId() + 1);
435  } else if (((id.rawId() >> tecVals_.sterStartBit_) & tecVals_.sterMask_) == 2) {
436  return DetId(id.rawId() - 1);
437  } else {
438  return DetId();
439  }
440  }
441 
442  //misc tec
443  std::vector<unsigned int> tecPetalInfo(const DetId &id) const {
444  std::vector<unsigned int> num;
445  num.push_back(tecOrder(id));
446  num.push_back(tecPetalNumber(id));
447  return num;
448  }
449 
450  bool tecIsBackPetal(const DetId &id) const { return (tecOrder(id) == 1); }
451 
452  bool tecIsFrontPetal(const DetId &id) const { return !tecIsBackPetal(id); }
453 
454  //misc tib
455  unsigned int tibString(const DetId &id) const { return (id.rawId() >> tibVals_.strStartBit_) & tibVals_.strMask_; }
456 
457  std::vector<unsigned int> tibStringInfo(const DetId &id) const {
458  std::vector<unsigned int> num;
459  num.push_back(tibSide(id));
460  num.push_back(tibOrder(id));
461  num.push_back(tibString(id));
462  return num;
463  }
464 
465  bool tibIsInternalString(const DetId &id) const { return (tibOrder(id) == 1); }
466 
467  bool tibIsExternalString(const DetId &id) const { return !tibIsInternalString(id); }
468 
469  //misc tid
470  std::vector<unsigned int> tidModuleInfo(const DetId &id) const {
471  std::vector<unsigned int> num;
472  num.push_back(tidOrder(id));
473  num.push_back(tidModule(id));
474  return num;
475  }
476 
477  bool tidIsBackRing(const DetId &id) const { return (tidOrder(id) == 1); }
478 
479  bool tidIsFrontRing(const DetId &id) const { return !tidIsBackRing(id); }
480 
481  //misc pf
482  unsigned int pxfDisk(const DetId &id) const { return int((id.rawId() >> pfVals_.diskStartBit_) & pfVals_.diskMask_); }
483  unsigned int pxfBlade(const DetId &id) const {
484  return int((id.rawId() >> pfVals_.bladeStartBit_) & pfVals_.bladeMask_);
485  }
486  unsigned int pxfPanel(const DetId &id) const {
487  return int((id.rawId() >> pfVals_.panelStartBit_) & pfVals_.panelMask_);
488  }
489 
490  //old constructors, now return DetId
491  DetId pxbDetId(uint32_t layer, uint32_t ladder, uint32_t module) const {
492  //uply
494  uint32_t rawid = id.rawId();
495  rawid |= (layer & pbVals_.layerMask_) << pbVals_.layerStartBit_ |
498  return DetId(rawid);
499  }
500 
501  DetId pxfDetId(uint32_t side, uint32_t disk, uint32_t blade, uint32_t panel, uint32_t module) const {
503  uint32_t rawid = id.rawId();
508  return DetId(rawid);
509  }
510 
511  DetId tecDetId(uint32_t side,
512  uint32_t wheel,
513  uint32_t petal_fw_bw,
514  uint32_t petal,
515  uint32_t ring,
516  uint32_t module,
517  uint32_t ster) const {
519  uint32_t rawid = id.rawId();
520 
521  rawid |= (side & tecVals_.sideMask_) << tecVals_.sideStartBit_ |
528  return DetId(rawid);
529  }
530 
532  uint32_t layer, uint32_t str_fw_bw, uint32_t str_int_ext, uint32_t str, uint32_t module, uint32_t ster) const {
534  uint32_t rawid = id.rawId();
541  return DetId(rawid);
542  }
543 
545  uint32_t side, uint32_t wheel, uint32_t ring, uint32_t module_fw_bw, uint32_t module, uint32_t ster) const {
547  uint32_t rawid = id.rawId();
548  rawid |= (side & tidVals_.sideMask_) << tidVals_.sideStartBit_ |
554  return DetId(rawid);
555  }
556 
557  DetId tobDetId(uint32_t layer, uint32_t rod_fw_bw, uint32_t rod, uint32_t module, uint32_t ster) const {
559  uint32_t rawid = id.rawId();
565  return DetId(rawid);
566  }
567 
568  std::pair<DetId, SameLayerComparator> pxbDetIdLayerComparator(uint32_t layer) const {
569  return std::make_pair(pxbDetId(layer, 1, 1), SameLayerComparator(this));
570  }
571 
572  std::pair<DetId, SameLayerComparator> pxfDetIdDiskComparator(uint32_t side, uint32_t disk) const {
573  return std::make_pair(pxfDetId(side, disk, 1, 1, 1), SameLayerComparator(this));
574  }
575 
576  std::pair<DetId, SameLayerComparator> tecDetIdWheelComparator(uint32_t side, uint32_t wheel) const {
577  return std::make_pair(tecDetId(side, wheel, 1, 1, 1, 1, 1), SameLayerComparator(this));
578  }
579 
580  std::pair<DetId, SameLayerComparator> tibDetIdLayerComparator(uint32_t layer) const {
581  return std::make_pair(tibDetId(layer, 1, 1, 1, 1, 1), SameLayerComparator(this));
582  }
583 
584  std::pair<DetId, SameLayerComparator> tidDetIdWheelComparator(uint32_t side, uint32_t wheel) const {
585  return std::make_pair(tidDetId(side, wheel, 1, 1, 1, 1), SameLayerComparator(this));
586  }
587 
588  std::pair<DetId, SameLayerComparator> tobDetIdLayerComparator(uint32_t layer) const {
589  return std::make_pair(tobDetId(layer, 1, 1, 1, 1), SameLayerComparator(this));
590  }
591 
592  std::string print(DetId detid) const;
593 
594  SiStripModuleGeometry moduleGeometry(const DetId &id) const;
595 
596  int getOTLayerNumber(const DetId &id) const;
597  int getITPixelLayerNumber(const DetId &id) const;
598 
599  // Those is only implemented for Pixel right now, but can be extended to all
600  // subdetectors.
601 
602  // Extract the raw bit value for a given field type.
603  // E.g. getField(id, PBLadder) == pxbLadder(id)
604  unsigned int getField(const DetId &id, DetIdFields idx) const {
605  return ((id.rawId() >> bits_per_field[idx].startBit) & bits_per_field[idx].mask);
606  }
607  // checks whether a given field can be extracted from a given DetId.
608  // This boils down to checking whether it is the correct subdetector.
609  bool hasField(const DetId &id, DetIdFields idx) const { return id.subdetId() == bits_per_field[idx].subdet; }
610 
611 private:
614 
619 
621  unsigned int startBit;
622  unsigned int mask;
623  int subdet;
624  };
626 };
627 
628 #endif
unsigned int tecPetalNumber(const DetId &id) const
const TECValues tecVals_
std::pair< DetId, SameLayerComparator > tecDetIdWheelComparator(uint32_t side, uint32_t wheel) const
bool isUpper(const DetId &id) const
uint32_t second(const DetId &id) const
bool tibIsDoubleSide(const DetId &id) const
bool tecIsDoubleSide(const DetId &id) const
bool operator()(DetId i1, DetId i2) const
bool tidIsDoubleSide(const DetId &id) const
uint32_t tidLower(const DetId &id) const
bool tidIsZPlusSide(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
DetId tibPartnerDetId(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
unsigned int tibSide(const DetId &id) const
uint32_t pixFirst(const DetId &id) const
std::pair< DetId, SameLayerComparator > pxbDetIdLayerComparator(uint32_t layer) const
bool tibIsZPlusSide(const DetId &id) const
unsigned int tobSide(const DetId &id) const
std::vector< unsigned int > tidModuleInfo(const DetId &id) const
bool tobIsZMinusSide(const DetId &id) const
uint32_t tibRPhi(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
const PixelEndcapValues pfVals_
unsigned int tibOrder(const DetId &id) const
DetId tibDetId(uint32_t layer, uint32_t str_fw_bw, uint32_t str_int_ext, uint32_t str, uint32_t module, uint32_t ster) const
bool tecIsFrontPetal(const DetId &id) const
uint32_t tidStereo(const DetId &id) const
unsigned int tibModule(const DetId &id) const
unsigned int tidSide(const DetId &id) const
return((rh ^ lh) &mask)
std::string print(DetId detid) const
unsigned int pxfModule(const DetId &id) const
bool tibIsExternalString(const DetId &id) const
std::vector< unsigned int > tecPetalInfo(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
bool tibIsZMinusSide(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
bool tidIsBackRing(const DetId &id) const
uint32_t tibGlued(const DetId &id) const
DetId tidPartnerDetId(const DetId &id) const
unsigned int getField(const DetId &id, DetIdFields idx) const
unsigned int tibString(const DetId &id) const
DetId pixPartnerDetId(const DetId &id) const
bool tecIsZMinusSide(const DetId &id) const
DetId tobDetId(uint32_t layer, uint32_t rod_fw_bw, uint32_t rod, uint32_t module, uint32_t ster) const
const BitmaskAndSubdet bits_per_field[DETID_FIELDS_MAX]
bool isStereo(const DetId &id) const
bool isRPhi(const DetId &id) const
unsigned int pxbLadder(const DetId &id) const
unsigned int side(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
bool tibIsStereo(const DetId &id) const
bool tobIsDoubleSide(const DetId &id) const
uint32_t pixDouble(const DetId &id) const
unsigned int layer(const DetId &id) const
bool tidIsZMinusSide(const DetId &id) const
DetId tidDetId(uint32_t side, uint32_t wheel, uint32_t ring, uint32_t module_fw_bw, uint32_t module, uint32_t ster) const
const PixelBarrelValues pbVals_
bool tobIsStereo(const DetId &id) const
bool tibIsRPhi(const DetId &id) const
uint32_t doubleSensor(const DetId &id) const
unsigned int module(const DetId &id) const
std::pair< DetId, SameLayerComparator > tobDetIdLayerComparator(uint32_t layer) const
int getITPixelLayerNumber(const DetId &id) const
unsigned int tidModule(const DetId &id) const
unsigned int tecModule(const DetId &id) const
uint32_t tobGlued(const DetId &id) const
bool operator()(uint32_t i1, uint32_t i2) const
uint32_t tobStereo(const DetId &id) const
unsigned int tidOrder(const DetId &id) const
uint32_t tidUpper(const DetId &id) const
int getOTLayerNumber(const DetId &id) const
unsigned int tecSide(const DetId &id) const
uint32_t tidGlued(const DetId &id) const
uint32_t tidStack(const DetId &id) const
uint32_t tobUpper(const DetId &id) const
uint32_t tecPartnerDetId(const DetId &id) const
SameLayerComparator(const TrackerTopology *topo)
unsigned int pxfDisk(const DetId &id) const
const TIBValues tibVals_
std::pair< DetId, SameLayerComparator > pxfDetIdDiskComparator(uint32_t side, uint32_t disk) const
SiStripModuleGeometry
Definition: SiStripEnums.h:8
uint32_t stack(const DetId &id) const
unsigned int tecOrder(const DetId &id) const
DetId partnerDetId(const DetId &id) const
bool tobIsZPlusSide(const DetId &id) const
bool isDoubleSens(const DetId &id) const
DetId pxbDetId(uint32_t layer, uint32_t ladder, uint32_t module) const
uint32_t tecRPhi(const DetId &id) const
DetId pxfDetId(uint32_t side, uint32_t disk, uint32_t blade, uint32_t panel, uint32_t module) const
bool tobIsRPhi(const DetId &id) const
bool tidIsRPhi(const DetId &id) const
bool tecIsRPhi(const DetId &id) const
uint32_t tecLower(const DetId &id) const
uint32_t glued(const DetId &id) const
unsigned int pxfPanel(const DetId &id) const
bool tidIsFrontRing(const DetId &id) const
SiStripModuleGeometry moduleGeometry(const DetId &id) const
const TOBValues tobVals_
bool tecIsBackPetal(const DetId &id) const
Definition: DetId.h:17
DetId tobPartnerDetId(const DetId &id) const
bool isLower(const DetId &id) const
unsigned int pxfSide(const DetId &id) const
std::vector< unsigned int > tibStringInfo(const DetId &id) const
bool isSecond(const DetId &id) const
uint32_t lower(const DetId &id) const
unsigned int module_fw_bwStartBit_
uint32_t tecUpper(const DetId &id) const
bool tecIsZPlusSide(const DetId &id) const
bool tecIsStereo(const DetId &id) const
bool tibIsInternalString(const DetId &id) const
unsigned int tobRod(const DetId &id) const
bool tidIsStereo(const DetId &id) const
const TIDValues tidVals_
std::vector< unsigned int > tobRodInfo(const DetId &id) const
bool hasField(const DetId &id, DetIdFields idx) const
std::pair< DetId, SameLayerComparator > tidDetIdWheelComparator(uint32_t side, uint32_t wheel) const
uint32_t first(const DetId &id) const
uint32_t tobLower(const DetId &id) const
unsigned int tidRing(const DetId &id) const
uint32_t tibStack(const DetId &id) const
uint32_t tecStereo(const DetId &id) const
uint32_t tidRPhi(const DetId &id) const
uint32_t tibLower(const DetId &id) const
uint32_t tibUpper(const DetId &id) const
uint32_t pixSecond(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
std::pair< DetId, SameLayerComparator > tibDetIdLayerComparator(uint32_t layer) const
unsigned int tobModule(const DetId &id) const
unsigned int pxbModule(const DetId &id) const
uint32_t tobStack(const DetId &id) const
#define str(s)
uint32_t tecStack(const DetId &id) const
bool isFirst(const DetId &id) const
uint32_t tecGlued(const DetId &id) const
uint32_t tobRPhi(const DetId &id) const
TrackerTopology(const PixelBarrelValues &pxb, const PixelEndcapValues &pxf, const TECValues &tecv, const TIBValues &tibv, const TIDValues &tidv, const TOBValues &tobv)
DetId tecDetId(uint32_t side, uint32_t wheel, uint32_t petal_fw_bw, uint32_t petal, uint32_t ring, uint32_t module, uint32_t ster) const
uint32_t tibStereo(const DetId &id) const
uint32_t upper(const DetId &id) const