test
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 
21 
22 namespace align
23 {
24  namespace tpe
25  {
27  unsigned int bpqd;
28 
30  inline unsigned int moduleNumber(align::ID, const TrackerTopology*);
31 
33  inline unsigned int panelNumber(align::ID, const TrackerTopology*);
34 
37  inline unsigned int bladeNumber(align::ID, const TrackerTopology*);
38 
40  inline unsigned int halfDiskNumber(align::ID, const TrackerTopology*);
41 
43  inline unsigned int halfCylinderNumber(align::ID, const TrackerTopology*);
44 
46  inline unsigned int endcapNumber(align::ID, const TrackerTopology*);
47  }
48 }
49 
50 unsigned int align::tpe::moduleNumber(align::ID id, const TrackerTopology* tTopo)
51 {
52  return tTopo->pxfModule(id);
53 }
54 
55 unsigned int align::tpe::panelNumber(align::ID id, const TrackerTopology* tTopo)
56 {
57  return tTopo->pxfPanel(id);
58 }
59 
60 unsigned int align::tpe::bladeNumber(align::ID id, const TrackerTopology* tTopo)
61 {
62  unsigned int b = tTopo->pxfBlade(id); // 1 to 24 in increasing phi
63 
64 // Blade in 1st quadrant: number = bpqd + 1 - b (1 to bpqd)
65 // Blade in 2nd quadrant: number = b - bpqd (1 to bpqd)
66 // Blade in 3rd quadrant: number = b - bpqd (bpqd + 1 to 2 * bpqd)
67 // Blade in 4th quadrant: number = 5 * bpqd + 1 - b (bpqd + 1 to 2 * bpqd)
68 
69  return b > 3 * bpqd ? // blade in 4th quadrant
70  5 * bpqd + 1 - b :
71  (b > bpqd ? // blade not in 1st quadrant
72  b - bpqd : bpqd + 1 - b);
73 }
74 
76 {
77  return tTopo->pxfDisk(id);
78 }
79 
81 {
82  unsigned int b = tTopo->pxfBlade(id); // 1 to 24 in increasing phi
83 
84  return b > bpqd && b <= 3 * bpqd ? 1 : 2;
85 }
86 
87 unsigned int align::tpe::endcapNumber(align::ID id, const TrackerTopology* tTopo)
88 {
89  return tTopo->pxfSide(id);
90 }
91 
92 #endif
unsigned int pxfDisk(const DetId &id) const
uint32_t ID
Definition: Definitions.h:26
unsigned int halfCylinderNumber(align::ID, const TrackerTopology *)
Half cylinder number is 1 at left side (-x) and 2 at right side (+x).
Definition: TPENameSpace.h:80
unsigned int bladeNumber(align::ID, const TrackerTopology *)
Definition: TPENameSpace.h:60
unsigned int panelNumber(align::ID, const TrackerTopology *)
Panel number is 1 for 4 modules, 2 for 3 modules.
Definition: TPENameSpace.h:55
unsigned int bpqd
no. of blades per quarter disk
Definition: TPENameSpace.h:27
unsigned int pxfModule(const DetId &id) const
unsigned int endcapNumber(align::ID, const TrackerTopology *)
Endcap number is 1 for -z and 2 for +z.
Definition: TPENameSpace.h:87
double b
Definition: hdecay.h:120
unsigned int moduleNumber(align::ID, const TrackerTopology *)
Module number increases with rho; from 1 to 4.
Definition: TPENameSpace.h:50
unsigned int pxfSide(const DetId &id) const
unsigned int pxfPanel(const DetId &id) const
unsigned int halfDiskNumber(align::ID, const TrackerTopology *)
Half disk number increases with |z| from 1 to 3.
Definition: TPENameSpace.h:75
unsigned int pxfBlade(const DetId &id) const