test
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 
21 
22 namespace align
23 {
24  namespace tib
25  {
27  std::vector<unsigned int> sphs;
28 
30  inline unsigned int moduleNumber(align::ID, const TrackerTopology*);
31 
34  inline unsigned int stringNumber(align::ID, const TrackerTopology*);
35 
37  inline unsigned int surfaceNumber(align::ID, const TrackerTopology*);
38 
40  inline unsigned int halfShellNumber(align::ID, const TrackerTopology*);
41 
43  inline unsigned int layerNumber(align::ID, const TrackerTopology*);
44 
46  inline unsigned int halfBarrelNumber(align::ID, const TrackerTopology*);
47 
49  inline unsigned int barrelNumber(align::ID, const TrackerTopology*);
50  }
51 }
52 
53 unsigned int align::tib::moduleNumber(align::ID id, const TrackerTopology* tTopo)
54 {
55  return tTopo->tibModule(id);
56 }
57 
58 unsigned int align::tib::stringNumber(align::ID id, const TrackerTopology* tTopo)
59 {
60 
61 
62  std::vector<unsigned int> s = tTopo->tibStringInfo(id);
63  // s[1]: surface lower = 1, upper = 2
64  // s[2]: string no. increases with phi
65 
66  unsigned int l = 2 * (tTopo->tibLayer(id) - 1) + s[1] - 1;
67 
68 // String on +y surface: number = s (1 to sphs)
69 // String in -y surface: number = 2 * sphs + 1 - s (1 to sphs)
70 
71  return s[2] > sphs[l] ? 2 * sphs[l] + 1 - s[2] : s[2];
72 }
73 
74 unsigned int align::tib::surfaceNumber(align::ID id, const TrackerTopology* tTopo)
75 {
76  return tTopo->tibStringInfo(id)[1];
77 }
78 
80 {
81 
82 
83  std::vector<unsigned int> s = tTopo->tibStringInfo(id);
84  // s[1]: surface lower = 1, upper = 2
85  // s[2]: string no. increases with phi
86 
87  unsigned int l = 2 * (tTopo->tibLayer(id) - 1) + s[1] - 1;
88 
89  return s[2] > sphs[l] ? 1 : 2;
90 }
91 
92 unsigned int align::tib::layerNumber(align::ID id, const TrackerTopology* tTopo)
93 {
94  return tTopo->tibLayer(id);
95 }
96 
98 {
99  return tTopo->tibStringInfo(id)[0];
100 }
101 
103 {
104  return 1;
105 }
106 
107 #endif
unsigned int halfBarrelNumber(align::ID, const TrackerTopology *)
Half barrel number is 1 at -z side and 2 at +z side.
Definition: TIBNameSpace.h:97
unsigned int tibLayer(const DetId &id) const
unsigned int stringNumber(align::ID, const TrackerTopology *)
Definition: TIBNameSpace.h:58
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:79
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:53
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:74
unsigned int layerNumber(align::ID, const TrackerTopology *)
Layer number increases with rho from 1 to 8.
Definition: TIBNameSpace.h:92
std::vector< unsigned int > sphs
Number of strings for each surface of a half shell.
Definition: TIBNameSpace.h:27
unsigned int barrelNumber(align::ID, const TrackerTopology *)
Barrel number is 1 for all align::ID&#39;s which belong to this barrel.
Definition: TIBNameSpace.h:102