CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TPBNameSpace.h
Go to the documentation of this file.
1 #ifndef Alignment_TrackerAlignment_TPBNameSpace_H
2 #define Alignment_TrackerAlignment_TPBNameSpace_H
3 
17 
18 namespace align
19 {
20  namespace tpb
21  {
23  const unsigned int lpqc[] = {5, 8, 11};
24 
26  inline unsigned int moduleNumber( align::ID );
27 
30  inline unsigned int ladderNumber( align::ID );
31 
33  inline unsigned int layerNumber( align::ID );
34 
36  inline unsigned int halfBarrelNumber( align::ID );
37  }
38 }
39 
41 {
42  return PXBDetId(id).module();
43 }
44 
46 {
47  PXBDetId detId(id);
48 
49  unsigned int l = detId.ladder(); // increases with phi
50  unsigned int c = detId.layer() - 1;
51 
52 // Ladder in 1st quadrant: number = lpqc + 1 - l (1 to lpqc)
53 // Ladder in 2nd quadrant: number = l - lpqc (1 to lpqc)
54 // Ladder in 3rd quadrant: number = l - lpqc (lpqc + 1 to 2 * lpqc)
55 // Ladder in 4th quadrant: number = 5 * lpqc + 1 - l (lpqc + 1 to 2 * lpqc)
56 
57  return l > 3 * lpqc[c] ? // ladder in 4th quadrant
58  5 * lpqc[c] + 1 - l :
59  (l > lpqc[c] ? // ladder not in 1st quadrant
60  l - lpqc[c] : lpqc[c] + 1 - l);
61 }
62 
64 {
65  return PXBDetId(id).layer();
66 }
67 
69 {
70  PXBDetId detId(id);
71 
72  unsigned int l = detId.ladder(); // increases with phi
73  unsigned int c = detId.layer() - 1;
74 
75  return l > lpqc[c] && l <= 3 * lpqc[c] ? 1 : 2;
76 }
77 
78 #endif
uint32_t ID
Definition: Definitions.h:26
unsigned int layerNumber(align::ID)
Layer number increases with rho from 1 to 3.
Definition: TPBNameSpace.h:63
unsigned int ladder() const
ladder id
Definition: PXBDetId.h:39
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
unsigned int ladderNumber(align::ID)
Definition: TPBNameSpace.h:45
unsigned int module() const
det id
Definition: PXBDetId.h:43
const unsigned int lpqc[]
Number of ladders for each quarter cylinder.
Definition: TPBNameSpace.h:23
unsigned int halfBarrelNumber(align::ID)
Half barrel number is 1 at left side (-x) and 2 at right side (+x).
Definition: TPBNameSpace.h:68
unsigned int moduleNumber(align::ID)
Module number increases with z from 1 to 8.
Definition: TPBNameSpace.h:40