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 
18 
19 namespace align
20 {
21  namespace tpe
22  {
23  const unsigned int bpqd = 6; // no. of blades per quarter disk
24 
26  inline unsigned int moduleNumber(align::ID, const TrackerTopology*);
27 
29  inline unsigned int panelNumber(align::ID, const TrackerTopology*);
30 
33  inline unsigned int bladeNumber(align::ID, const TrackerTopology*);
34 
36  inline unsigned int halfDiskNumber(align::ID, const TrackerTopology*);
37 
39  inline unsigned int halfCylinderNumber(align::ID, const TrackerTopology*);
40 
42  inline unsigned int endcapNumber(align::ID, const TrackerTopology*);
43  }
44 }
45 
46 unsigned int align::tpe::moduleNumber(align::ID id, const TrackerTopology* tTopo)
47 {
48  return tTopo->pxfModule(id);
49 }
50 
51 unsigned int align::tpe::panelNumber(align::ID id, const TrackerTopology* tTopo)
52 {
53  return tTopo->pxfPanel(id);
54 }
55 
56 unsigned int align::tpe::bladeNumber(align::ID id, const TrackerTopology* tTopo)
57 {
58  unsigned int b = tTopo->pxfBlade(id); // 1 to 24 in increasing phi
59 
60 // Blade in 1st quadrant: number = bpqd + 1 - b (1 to bpqd)
61 // Blade in 2nd quadrant: number = b - bpqd (1 to bpqd)
62 // Blade in 3rd quadrant: number = b - bpqd (bpqd + 1 to 2 * bpqd)
63 // Blade in 4th quadrant: number = 5 * bpqd + 1 - b (bpqd + 1 to 2 * bpqd)
64 
65  return b > 3 * bpqd ? // blade in 4th quadrant
66  5 * bpqd + 1 - b :
67  (b > bpqd ? // blade not in 1st quadrant
68  b - bpqd : bpqd + 1 - b);
69 }
70 
72 {
73  return tTopo->pxfDisk(id);
74 }
75 
77 {
78  unsigned int b = tTopo->pxfBlade(id); // 1 to 24 in increasing phi
79 
80  return b > bpqd && b <= 3 * bpqd ? 1 : 2;
81 }
82 
83 unsigned int align::tpe::endcapNumber(align::ID id, const TrackerTopology* tTopo)
84 {
85  return tTopo->pxfSide(id);
86 }
87 
88 #endif
const unsigned int bpqd
Definition: TPENameSpace.h:23
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:76
unsigned int bladeNumber(align::ID, const TrackerTopology *)
Definition: TPENameSpace.h:56
unsigned int panelNumber(align::ID, const TrackerTopology *)
Panel number is 1 for 4 modules, 2 for 3 modules.
Definition: TPENameSpace.h:51
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:83
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:46
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:71
unsigned int pxfBlade(const DetId &id) const