CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TIBNameSpace.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignment_TIBNameSpace_H
2 #define Alignment_CommonAlignment_TIBNameSpace_H
3 
18 
19 namespace align
20 {
21  namespace tib
22  {
24  const unsigned int sphs[] = {13, 15, 17, 19, 22, 23, 26, 28};
25 
27  inline unsigned int moduleNumber(align::ID, const TrackerTopology*);
28 
31  inline unsigned int stringNumber(align::ID, const TrackerTopology*);
32 
34  inline unsigned int surfaceNumber(align::ID, const TrackerTopology*);
35 
37  inline unsigned int halfShellNumber(align::ID, const TrackerTopology*);
38 
40  inline unsigned int layerNumber(align::ID, const TrackerTopology*);
41 
43  inline unsigned int halfBarrelNumber(align::ID, const TrackerTopology*);
44  }
45 }
46 
47 unsigned int align::tib::moduleNumber(align::ID id, const TrackerTopology* tTopo)
48 {
49  return tTopo->tibModule(id);
50 }
51 
52 unsigned int align::tib::stringNumber(align::ID id, const TrackerTopology* tTopo)
53 {
54 
55 
56  std::vector<unsigned int> s = tTopo->tibStringInfo(id);
57  // s[1]: surface lower = 1, upper = 2
58  // s[2]: string no. increases with phi
59 
60  unsigned int l = 2 * (tTopo->tibLayer(id) - 1) + s[1] - 1;
61 
62 // String on +y surface: number = s (1 to sphs)
63 // String in -y surface: number = 2 * sphs + 1 - s (1 to sphs)
64 
65  return s[2] > sphs[l] ? 2 * sphs[l] + 1 - s[2] : s[2];
66 }
67 
68 unsigned int align::tib::surfaceNumber(align::ID id, const TrackerTopology* tTopo)
69 {
70  return tTopo->tibStringInfo(id)[1];
71 }
72 
74 {
75 
76 
77  std::vector<unsigned int> s = tTopo->tibStringInfo(id);
78  // s[1]: surface lower = 1, upper = 2
79  // s[2]: string no. increases with phi
80 
81  unsigned int l = 2 * (tTopo->tibLayer(id) - 1) + s[1] - 1;
82 
83  return s[2] > sphs[l] ? 1 : 2;
84 }
85 
86 unsigned int align::tib::layerNumber(align::ID id, const TrackerTopology* tTopo)
87 {
88  return tTopo->tibLayer(id);
89 }
90 
92 {
93  return tTopo->tibStringInfo(id)[0];
94 }
95 
96 #endif
unsigned int halfBarrelNumber(align::ID, const TrackerTopology *)
Half barrel number is 1 at -z side and 2 at +z side.
Definition: TIBNameSpace.h:91
unsigned int tibLayer(const DetId &id) const
unsigned int stringNumber(align::ID, const TrackerTopology *)
Definition: TIBNameSpace.h:52
uint32_t ID
Definition: Definitions.h:26
unsigned int halfShellNumber(align::ID, const TrackerTopology *)
Half shell number is 1 for bottom (-y) and 2 for top (+y).
Definition: TIBNameSpace.h:73
std::vector< unsigned int > tibStringInfo(const DetId &id) const
unsigned int moduleNumber(align::ID, const TrackerTopology *)
Module number increases with |z| from 1 to 3.
Definition: TIBNameSpace.h:47
const unsigned int sphs[]
Number of strings for each surface of a half shell.
Definition: TIBNameSpace.h:24
unsigned int tibModule(const DetId &id) const
unsigned int surfaceNumber(align::ID, const TrackerTopology *)
Surface number is 1 for inner and 2 for outer.
Definition: TIBNameSpace.h:68
unsigned int layerNumber(align::ID, const TrackerTopology *)
Layer number increases with rho from 1 to 8.
Definition: TIBNameSpace.h:86