CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TPENameSpace.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignment_TPENameSpace_H
2 #define Alignment_CommonAlignment_TPENameSpace_H
3 
17 
18 namespace align
19 {
20  namespace tpe
21  {
22  const unsigned int bpqd = 6; // no. of blades per quarter disk
23 
25  inline unsigned int moduleNumber( align::ID );
26 
28  inline unsigned int panelNumber( align::ID );
29 
32  inline unsigned int bladeNumber( align::ID );
33 
35  inline unsigned int halfDiskNumber( align::ID );
36 
38  inline unsigned int halfCylinderNumber( align::ID );
39 
41  inline unsigned int endcapNumber( align::ID );
42  }
43 }
44 
46 {
47  return PXFDetId(id).module();
48 }
49 
51 {
52  return PXFDetId(id).panel();
53 }
54 
56 {
57  unsigned int b = PXFDetId(id).blade(); // 1 to 24 in increasing phi
58 
59 // Blade in 1st quadrant: number = bpqd + 1 - b (1 to bpqd)
60 // Blade in 2nd quadrant: number = b - bpqd (1 to bpqd)
61 // Blade in 3rd quadrant: number = b - bpqd (bpqd + 1 to 2 * bpqd)
62 // Blade in 4th quadrant: number = 5 * bpqd + 1 - b (bpqd + 1 to 2 * bpqd)
63 
64  return b > 3 * bpqd ? // blade in 4th quadrant
65  5 * bpqd + 1 - b :
66  (b > bpqd ? // blade not in 1st quadrant
67  b - bpqd : bpqd + 1 - b);
68 }
69 
71 {
72  return PXFDetId(id).disk();
73 }
74 
76 {
77  unsigned int b = PXFDetId(id).blade(); // 1 to 24 in increasing phi
78 
79  return b > bpqd && b <= 3 * bpqd ? 1 : 2;
80 }
81 
83 {
84  return PXFDetId(id).side();
85 }
86 
87 #endif
unsigned int panel() const
panel id
Definition: PXFDetId.h:52
const unsigned int bpqd
Definition: TPENameSpace.h:22
uint32_t ID
Definition: Definitions.h:26
unsigned int endcapNumber(align::ID)
Endcap number is 1 for -z and 2 for +z.
Definition: TPENameSpace.h:82
unsigned int blade() const
blade id
Definition: PXFDetId.h:48
unsigned int bladeNumber(align::ID)
Definition: TPENameSpace.h:55
unsigned int halfDiskNumber(align::ID)
Half disk number increases with |z| from 1 to 3.
Definition: TPENameSpace.h:70
unsigned int panelNumber(align::ID)
Panel number is 1 for 4 modules, 2 for 3 modules.
Definition: TPENameSpace.h:50
unsigned int module() const
det id
Definition: PXFDetId.h:56
unsigned int halfCylinderNumber(align::ID)
Half cylinder number is 1 at left side (-x) and 2 at right side (+x).
Definition: TPENameSpace.h:75
unsigned int moduleNumber(align::ID)
Module number increases with rho; from 1 to 4.
Definition: TPENameSpace.h:45
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
double b
Definition: hdecay.h:120
unsigned int side() const
positive or negative id
Definition: PXFDetId.h:38