1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
#ifndef Alignment_TrackerAlignment_TrackerNameSpace_H
#define Alignment_TrackerAlignment_TrackerNameSpace_H
#include "CondFormats/Alignment/interface/Definitions.h"
class TrackerTopology;
class TrackerAlignmentLevelBuilder;
namespace align {
class TrackerNameSpace {
/// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
friend class ::TrackerAlignmentLevelBuilder;
public:
TrackerNameSpace(const TrackerTopology*);
TrackerNameSpace(const TrackerNameSpace&) = default;
TrackerNameSpace& operator=(const TrackerNameSpace&) = default;
TrackerNameSpace(TrackerNameSpace&&) = default;
TrackerNameSpace& operator=(TrackerNameSpace&&) = default;
virtual ~TrackerNameSpace() = default;
class TPB {
/// grant access for the enclosing TrackerNameSpace
friend class TrackerNameSpace;
/// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
friend class ::TrackerAlignmentLevelBuilder;
public:
TPB(const TrackerTopology*);
TPB(const TPB&) = default;
TPB& operator=(const TPB&) = default;
TPB(TPB&&) = default;
TPB& operator=(TPB&&) = default;
virtual ~TPB() = default;
/// Module number increases with z from 1 to 8.
unsigned int moduleNumber(align::ID) const;
/// Ladder number increases from 1 at the top to 2 * lpqc at the bottom
/// of each half cylinder.
unsigned int ladderNumber(align::ID) const;
/// Layer number increases with rho from 1 to 3.
unsigned int layerNumber(align::ID) const;
/// Half barrel number is 1 at left side (-x) and 2 at right side (+x).
unsigned int halfBarrelNumber(align::ID) const;
/// Barrel number is 1 for all align::ID's which belong to this barrel
unsigned int barrelNumber(align::ID) const;
private:
const TrackerTopology* trackerTopology_;
/// Number of ladders for each quarter cylinder.
std::vector<unsigned int> lpqc_;
};
class TPE {
/// grant access for the enclosing TrackerNameSpace
friend class TrackerNameSpace;
/// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
friend class ::TrackerAlignmentLevelBuilder;
public:
TPE(const TrackerTopology*);
TPE(const TPE&) = default;
TPE& operator=(const TPE&) = default;
TPE(TPE&&) = default;
TPE& operator=(TPE&&) = default;
virtual ~TPE() = default;
/// Module number increases with rho; from 1 to 4.
unsigned int moduleNumber(align::ID) const;
/// Panel number is 1 for 4 modules, 2 for 3 modules.
unsigned int panelNumber(align::ID) const;
/// Blade number increases from 1 at the top to 12 at the bottom
/// of each half disk.
unsigned int bladeNumber(align::ID) const;
/// Half disk number increases with |z| from 1 to 3.
unsigned int halfDiskNumber(align::ID) const;
/// Half cylinder number is 1 at left side (-x) and 2 at right side (+x).
unsigned int halfCylinderNumber(align::ID) const;
/// Endcap number is 1 for -z and 2 for +z.
unsigned int endcapNumber(align::ID) const;
private:
const TrackerTopology* trackerTopology_;
/// no. of blades per quarter disk
unsigned int bpqd_;
};
class TIB {
/// grant access for the enclosing TrackerNameSpace
friend class TrackerNameSpace;
/// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
friend class ::TrackerAlignmentLevelBuilder;
public:
TIB(const TrackerTopology*);
TIB(const TIB&) = default;
TIB& operator=(const TIB&) = default;
TIB(TIB&&) = default;
TIB& operator=(TIB&&) = default;
virtual ~TIB() = default;
/// Module number increases with |z| from 1 to 3.
unsigned int moduleNumber(align::ID) const;
/// String number increases with |phi| from right (1) to left (sphs)
/// of each half shell.
unsigned int stringNumber(align::ID) const;
/// Surface number is 1 for inner and 2 for outer.
unsigned int surfaceNumber(align::ID) const;
/// Half shell number is 1 for bottom (-y) and 2 for top (+y).
unsigned int halfShellNumber(align::ID) const;
/// Layer number increases with rho from 1 to 8.
unsigned int layerNumber(align::ID) const;
/// Half barrel number is 1 at -z side and 2 at +z side.
unsigned int halfBarrelNumber(align::ID) const;
/// Barrel number is 1 for all align::ID's which belong to this barrel
unsigned int barrelNumber(align::ID) const;
private:
const TrackerTopology* trackerTopology_;
/// Number of strings for each surface of a half shell.
std::vector<unsigned int> sphs_;
};
class TOB {
/// grant access for the enclosing TrackerNameSpace
friend class TrackerNameSpace;
/// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
friend class ::TrackerAlignmentLevelBuilder;
public:
TOB(const TrackerTopology*);
TOB(const TOB&) = default;
TOB& operator=(const TOB&) = default;
TOB(TOB&&) = default;
TOB& operator=(TOB&&) = default;
virtual ~TOB() = default;
/// Module number increases with |z| from 1 to 6.
unsigned int moduleNumber(align::ID) const;
/// Rod number increases with phi.
unsigned int rodNumber(align::ID) const;
/// Layer number increases with rho from 1 to 6.
unsigned int layerNumber(align::ID) const;
/// HalfBarrel number is 1 at -z side and 2 at +z side.
unsigned int halfBarrelNumber(align::ID) const;
/// Barrel number is 1 for all align::ID's which belong to this barrel
unsigned int barrelNumber(align::ID) const;
private:
const TrackerTopology* trackerTopology_;
};
class TID {
/// grant access for the enclosing TrackerNameSpace
friend class TrackerNameSpace;
/// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
friend class ::TrackerAlignmentLevelBuilder;
public:
TID(const TrackerTopology*);
TID(const TID&) = default;
TID& operator=(const TID&) = default;
TID(TID&&) = default;
TID& operator=(TID&&) = default;
virtual ~TID() = default;
/// Module number increases with phi.
unsigned int moduleNumber(align::ID) const;
/// Side number is 1 for back ring and 2 for front (towards IP).
unsigned int sideNumber(align::ID) const;
/// Ring number increases with rho from 1 to 3.
unsigned int ringNumber(align::ID) const;
/// Disk number increases with |z| from 1 to 3.
unsigned int diskNumber(align::ID) const;
/// Endcap number is 1 at -z side and 2 at +z side.
unsigned int endcapNumber(align::ID) const;
private:
const TrackerTopology* trackerTopology_;
};
class TEC {
/// grant access for the enclosing TrackerNameSpace
friend class TrackerNameSpace;
/// grant access for the TrackerAlignmentLevelBuilder (in global namespace)
friend class ::TrackerAlignmentLevelBuilder;
public:
TEC(const TrackerTopology*);
TEC(const TEC&) = default;
TEC& operator=(const TEC&) = default;
TEC(TEC&&) = default;
TEC& operator=(TEC&&) = default;
virtual ~TEC() = default;
/// Module number increases (decreases) with phi for +z (-z) endcap.
unsigned int moduleNumber(align::ID) const;
/// Ring number increases with rho.
unsigned int ringNumber(align::ID) const;
/// Petal number increases with phi from 1 to 8.
unsigned int petalNumber(align::ID) const;
/// Side number is 1 for back disk and 2 for front (towards IP).
unsigned int sideNumber(align::ID) const;
/// Disk number increases with |z| from 1 to 9.
unsigned int diskNumber(align::ID) const;
/// Endcap number is 1 at -z side and 2 at +z side.
unsigned int endcapNumber(align::ID) const;
private:
const TrackerTopology* trackerTopology_;
};
const TrackerTopology* trackerTopology() const { return trackerTopology_; }
const TPB& tpb() const { return tpb_; }
const TPE& tpe() const { return tpe_; }
const TIB& tib() const { return tib_; }
const TOB& tob() const { return tob_; }
const TID& tid() const { return tid_; }
const TEC& tec() const { return tec_; }
private:
const TrackerTopology* trackerTopology_;
TPB tpb_;
TPE tpe_;
TIB tib_;
TOB tob_;
TID tid_;
TEC tec_;
};
}; // namespace align
#endif /* Alignment_TrackerAlignment_TrackerNameSpace_H */
|