ATLAS Offline Software
SCT_ForwardModuleParameters.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
11 
12 #include "GaudiKernel/SystemOfUnits.h"
13 
14 #include <cmath>
15 
16 
18 {
19  m_rdb = rdb;
20 }
21 
22 //
23 // Forward Sensor
24 //
25 int
27 {
28  return m_rdb->fwdSensor(iModuleType)->getInt("NUMWAFERS");
29 }
30 
31 double
33 {
34  return m_rdb->fwdSensor(iModuleType)->getDouble("THICKNESS") * Gaudi::Units::mm;
35 }
36 
37 double
39 {
40  return m_rdb->fwdSensor(iModuleType)->getDouble("INNERWIDTHNEAR") * Gaudi::Units::mm;
41 }
42 
43 double
45 {
46  return m_rdb->fwdSensor(iModuleType)->getDouble("INNERWIDTHFAR") * Gaudi::Units::mm;
47 }
48 
49 double
51 {
52  return m_rdb->fwdSensor(iModuleType)->getDouble("OUTERWIDTHNEAR") * Gaudi::Units::mm;
53 }
54 
55 double
57 {
58  return m_rdb->fwdSensor(iModuleType)->getDouble("OUTERWIDTHFAR") * Gaudi::Units::mm;
59 }
60 
61 double
63 {
64  return m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHNEAR") * Gaudi::Units::mm;
65 }
66 
67 double
69 {
70  return m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHFAR") * Gaudi::Units::mm;
71 }
72 
73 double
75 {
76  return m_rdb->fwdSensor(iModuleType)->getDouble("RADIUSNEAR") * Gaudi::Units::mm;
77 }
78 
79 double
81 {
82  return m_rdb->fwdSensor(iModuleType)->getDouble("RADIUSFAR") * Gaudi::Units::mm;
83 }
84 
85 std::string
87 {
88  return m_rdb->fwdSensor(iModuleType)->getString("MATERIALNEAR");
89 }
90 
91 std::string
93 {
94  return m_rdb->fwdSensor(iModuleType)->getString("MATERIALFAR");
95 }
96 
97 bool
99 {
100  return m_rdb->fwdSensor(iModuleType)->getInt("ACTIVENEAR");
101 }
102 
103 bool
105 {
106  return m_rdb->fwdSensor(iModuleType)->getInt("ACTIVEFAR");
107 }
108 
109 double
111 {
112  return m_rdb->fwdSensor(iModuleType)->getDouble("ACTIVEHALFLENGTHNEAR") * Gaudi::Units::mm;
113 }
114 
115 double
117 {
118  return m_rdb->fwdSensor(iModuleType)->getDouble("ACTIVEHALFLENGTHFAR") * Gaudi::Units::mm;
119 }
120 
121 double
123 {
124  return m_rdb->fwdSensor(iModuleType)->getDouble("ANGULARPITCH") * Gaudi::Units::radian;
125 }
126 
127 int
129 {
130  return m_rdb->fwdSensor(iModuleType)->getInt("NUMSTRIPS");
131 }
132 
133 int
135 {
136  return m_rdb->fwdSensor(iModuleType)->getInt("NUMREADOUTSTRIPS");
137 }
138 
139 int
141 {
142  return m_rdb->fwdSensor(iModuleType)->getInt("STRIPSHIFT");
143 }
144 
145 
146 //
147 // Forward Hybrid
148 //
149 double
151 {
152  return m_rdb->fwdHybrid()->getDouble("THICKNESS") * Gaudi::Units::mm;
153 }
154 
155 double
157 {
158  return m_rdb->fwdHybrid()->getDouble("INNERWIDTH") * Gaudi::Units::mm;
159 }
160 
161 double
163 {
164  return m_rdb->fwdHybrid()->getDouble("OUTERWIDTH") * Gaudi::Units::mm;
165 }
166 
167 double
169 {
170  return m_rdb->fwdHybrid()->getDouble("LENGTH") * Gaudi::Units::mm;
171 }
172 
173 double
175 {
176  return m_rdb->fwdHybrid()->getDouble("LENGTHTOCORNER") * Gaudi::Units::mm;
177 }
178 
179 double
181 {
182  return m_rdb->fwdHybrid()->getDouble("MOUNTPOINTTOINEDGE") * Gaudi::Units::mm;
183 }
184 
185 std::string
187 {
188  return m_rdb->fwdHybrid()->getString("MATERIAL");
189 }
190 
191 //
192 // Forward Spine
193 //
194 double
196 {
197  return m_rdb->fwdSpine(iModuleType)->getDouble("THICKNESS") * Gaudi::Units::mm;
198 }
199 
200 double
202 {
203  return m_rdb->fwdSpine(iModuleType)->getDouble("WIDTH") * Gaudi::Units::mm;
204 }
205 
206 double
208 {
209  return m_rdb->fwdSpine(iModuleType)->getDouble("ENDTOMODULECENTER") * Gaudi::Units::mm;
210 }
211 
212 
213 double
215 {
216  return m_rdb->fwdSpine(iModuleType)->getDouble("ENDLOCATORTOENDMOUNT") * Gaudi::Units::mm;
217 }
218 
219 
220 std::string
222 {
223  return m_rdb->fwdSpine(iModuleType)->getString("MATERIAL");
224 }
225 
226 //
227 // Forward SubSpine
228 //
229 
230 double
232 {
233  return m_rdb->fwdSpine(iModuleType)->getDouble("SUBINNERWIDTH") * Gaudi::Units::mm;
234 }
235 
236 double
238 {
239  return m_rdb->fwdSpine(iModuleType)->getDouble("SUBINNERLENGTH") * Gaudi::Units::mm;
240 }
241 
242 double
244 {
245  return m_rdb->fwdSpine(iModuleType)->getDouble("SUBINNERREFDIST") * Gaudi::Units::mm;
246 }
247 
248 double
250 {
251  return m_rdb->fwdSpine(iModuleType)->getDouble("SUBMIDDLEWIDTH") * Gaudi::Units::mm;
252 }
253 
254 double
256 {
257  return m_rdb->fwdSpine(iModuleType)->getDouble("SUBMIDDLELENGTH") * Gaudi::Units::mm;
258 }
259 
260 double
262 {
263  return m_rdb->fwdSpine(iModuleType)->getDouble("SUBMIDDLEREFDIST") * Gaudi::Units::mm;
264 }
265 
266 double
268 {
269  return m_rdb->fwdSpine(iModuleType)->getDouble("SUBOUTERWIDTH") * Gaudi::Units::mm;
270 }
271 
272 double
274 {
275  return m_rdb->fwdSpine(iModuleType)->getDouble("SUBOUTERLENGTH") * Gaudi::Units::mm;
276 }
277 
278 double
280 {
281  return m_rdb->fwdSpine(iModuleType)->getDouble("SUBOUTERREFDIST") * Gaudi::Units::mm;
282 }
283 
284 std::string
286 {
287  return m_rdb->fwdSpine(iModuleType)->getString("SUBMATERIAL");
288 }
289 
290 
291 
292 //
293 // Forward Module
294 //
295 int
297 {
298  return m_rdb->fwdModuleSize();
299 }
300 
301 double
303 {
304  return m_rdb->fwdModule(iModuleType)->getDouble("STEREOANGLE") * Gaudi::Units::milliradian;
305 }
306 
307 int
309 {
310  return m_rdb->fwdModule(iModuleType)->getInt("STEREOUPPERSIGN");
311 }
312 
313 int
315 {
316  // Old geometries have lower module side = 0 and upper = 1
317  if (m_rdb->fwdModule(iModuleType)->isFieldNull("SIDEUPPER")) {
318  return 1;
319  }
320  return m_rdb->fwdModule(iModuleType)->getInt("SIDEUPPER");
321 }
322 
323 double
325 {
326  return m_rdb->fwdModule(iModuleType)->getDouble("GLUETHICKNESS") * Gaudi::Units::mm;
327 }
328 
329 double
331 {
332  return m_rdb->fwdModule(iModuleType)->getDouble("MOUNTPOINT") * Gaudi::Units::mm;
333 }
334 
335 double
337 {
338  return m_rdb->fwdModule(iModuleType)->getDouble("DISTBTWMOUNTPOINTS") * Gaudi::Units::mm;
339 }
340 
341 double
343 {
344  return m_rdb->fwdModule(iModuleType)->getDouble("HYBRIDEDGETOSPINE")*Gaudi::Units::mm;
345 }
346 
347 bool
349 {
350  return m_rdb->fwdModule(iModuleType)->getInt("HYBRIDISONINNEREDGE");
351 }
352 
353 //
354 // Module Connectors
355 //
356 bool
358 {
359  return m_rdb->fwdModuleConnectorTable()->size() > 0;
360 }
361 
362 double
364 {
365  return m_rdb->fwdModuleConnector()->getDouble("DELTAR") * Gaudi::Units::mm;
366 }
367 
368 double
370 {
371  return m_rdb->fwdModuleConnector()->getDouble("RPHI") * Gaudi::Units::mm;
372 }
373 
374 double
376 {
377  return m_rdb->fwdModuleConnector()->getDouble("THICKNESS") * Gaudi::Units::mm;
378 }
379 
380 std::string
382 {
383  return m_rdb->fwdModuleConnector()->getString("MATERIAL");
384 }
385 
386 
IRDBRecord::getInt
virtual int getInt(const std::string &fieldName) const =0
Get int field value.
SCT_DataBase::fwdHybrid
const IRDBRecord * fwdHybrid() const
Definition: SCT_DataBase.cxx:212
SCT_ForwardModuleParameters::fwdSpineThickness
double fwdSpineThickness(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:195
SCT_ForwardModuleParameters::fwdSensorActiveHalfLengthNear
double fwdSensorActiveHalfLengthNear(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:110
SCT_ForwardModuleParameters::fwdSubSpineInnerRefDist
double fwdSubSpineInnerRefDist(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:243
SCT_ForwardModuleParameters::m_rdb
SCT_DataBase * m_rdb
Definition: SCT_ForwardModuleParameters.h:96
SCT_ForwardModuleParameters::fwdSpineEndLocatorToEndMount
double fwdSpineEndLocatorToEndMount(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:214
SCT_DataBase::fwdModule
const IRDBRecord * fwdModule(int i) const
Definition: SCT_DataBase.cxx:214
SCT_ForwardModuleParameters::fwdHybridMaterial
std::string fwdHybridMaterial() const
Definition: SCT_ForwardModuleParameters.cxx:186
SCT_ForwardModuleParameters::fwdModuleMountPoint
double fwdModuleMountPoint(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:330
SCT_ForwardModuleParameters::fwdSensorActiveFar
bool fwdSensorActiveFar(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:104
SCT_DataBase.h
SCT_ForwardModuleParameters::fwdHybridOuterWidth
double fwdHybridOuterWidth() const
Definition: SCT_ForwardModuleParameters.cxx:162
SCT_ForwardModuleParameters::fwdSensorMaterialFar
std::string fwdSensorMaterialFar(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:92
SCT_ForwardModuleParameters::fwdHybridThickness
double fwdHybridThickness() const
Definition: SCT_ForwardModuleParameters.cxx:150
IRDBRecord::getString
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
SCT_ForwardModuleParameters::fwdHybridIsOnInnerEdge
bool fwdHybridIsOnInnerEdge(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:348
SCT_ForwardModuleParameters::fwdModuleGlueThickness
double fwdModuleGlueThickness(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:324
SCT_ForwardModuleParameters::fwdModuleDistBtwMountPoints
double fwdModuleDistBtwMountPoints(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:336
SCT_ForwardModuleParameters::fwdSensorAngularPitch
double fwdSensorAngularPitch(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:122
SCT_ForwardModuleParameters::fwdSensorNumStrips
int fwdSensorNumStrips(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:128
SCT_ForwardModuleParameters::fwdModuleConnectorMaterial
std::string fwdModuleConnectorMaterial() const
Definition: SCT_ForwardModuleParameters.cxx:381
SCT_DataBase::fwdSpine
const IRDBRecord * fwdSpine(int i) const
Definition: SCT_DataBase.cxx:213
SCT_ForwardModuleParameters::fwdSensorOuterWidthFar
double fwdSensorOuterWidthFar(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:56
SCT_ForwardModuleParameters::fwdSensorActiveNear
bool fwdSensorActiveNear(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:98
SCT_ForwardModuleParameters::fwdSensorLengthNear
double fwdSensorLengthNear(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:62
SCT_ForwardModuleParameters::fwdModuleConnectorRPhi
double fwdModuleConnectorRPhi() const
Definition: SCT_ForwardModuleParameters.cxx:369
SCT_ForwardModuleParameters::fwdModuleConnectorDeltaR
double fwdModuleConnectorDeltaR() const
Definition: SCT_ForwardModuleParameters.cxx:363
SCT_DataBase::fwdSensor
const IRDBRecord * fwdSensor(int i) const
Definition: SCT_DataBase.cxx:211
python.SystemOfUnits.radian
int radian
Definition: SystemOfUnits.py:104
python.SystemOfUnits.milliradian
int milliradian
Definition: SystemOfUnits.py:105
SCT_ForwardModuleParameters::fwdSubSpineInnerWidth
double fwdSubSpineInnerWidth(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:231
SCT_ForwardModuleParameters::fwdModuleConnectorPresent
bool fwdModuleConnectorPresent() const
Definition: SCT_ForwardModuleParameters.cxx:357
SCT_ForwardModuleParameters::fwdSensorRadiusNear
double fwdSensorRadiusNear(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:74
SCT_DataBase::fwdModuleConnectorTable
IRDBRecordset_ptr fwdModuleConnectorTable() const
Definition: SCT_DataBase.cxx:216
SCT_DataBase::fwdModuleSize
int fwdModuleSize() const
Definition: SCT_DataBase.cxx:215
SCT_ForwardModuleParameters::fwdModuleStereoAngle
double fwdModuleStereoAngle(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:302
SCT_DataBase
Definition: SCT_DataBase.h:17
SCT_ForwardModuleParameters::fwdModuleStereoUpperSign
int fwdModuleStereoUpperSign(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:308
SCT_ForwardModuleParameters::fwdSubSpineMiddleLength
double fwdSubSpineMiddleLength(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:255
SCT_ForwardModuleParameters::fwdSensorInnerWidthNear
double fwdSensorInnerWidthNear(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:38
SCT_ForwardModuleParameters.h
SCT_DataBase::fwdModuleConnector
const IRDBRecord * fwdModuleConnector() const
Definition: SCT_DataBase.cxx:217
SCT_ForwardModuleParameters::fwdSubSpineOuterWidth
double fwdSubSpineOuterWidth(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:267
SCT_ForwardModuleParameters::fwdHybridLength
double fwdHybridLength() const
Definition: SCT_ForwardModuleParameters.cxx:168
SCT_ForwardModuleParameters::fwdModuleNumTypes
int fwdModuleNumTypes() const
Definition: SCT_ForwardModuleParameters.cxx:296
SCT_ForwardModuleParameters::fwdModuleUpperSideNumber
int fwdModuleUpperSideNumber(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:314
SCT_ForwardModuleParameters::SCT_ForwardModuleParameters
SCT_ForwardModuleParameters(SCT_DataBase *rdb)
Definition: SCT_ForwardModuleParameters.cxx:17
SCT_ForwardModuleParameters::fwdHybridMountPointToInnerEdge
double fwdHybridMountPointToInnerEdge() const
Definition: SCT_ForwardModuleParameters.cxx:180
SCT_ForwardModuleParameters::fwdSensorStripShift
int fwdSensorStripShift(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:140
SCT_ForwardModuleParameters::fwdSpineWidth
double fwdSpineWidth(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:201
SCT_ForwardModuleParameters::fwdSensorThickness
double fwdSensorThickness(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:32
SCT_ForwardModuleParameters::fwdSensorInnerWidthFar
double fwdSensorInnerWidthFar(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:44
SCT_ForwardModuleParameters::fwdSensorNumWafers
int fwdSensorNumWafers(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:26
SCT_ForwardModuleParameters::fwdSensorOuterWidthNear
double fwdSensorOuterWidthNear(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:50
SCT_ForwardModuleParameters::fwdSensorLengthFar
double fwdSensorLengthFar(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:68
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
SCT_ForwardModuleParameters::fwdModuleHybridEdgeToSpine
double fwdModuleHybridEdgeToSpine(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:342
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
SCT_ForwardModuleParameters::fwdModuleConnectorThickness
double fwdModuleConnectorThickness() const
Definition: SCT_ForwardModuleParameters.cxx:375
SCT_ForwardModuleParameters::fwdSensorRadiusFar
double fwdSensorRadiusFar(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:80
IRDBRecord::isFieldNull
virtual bool isFieldNull(const std::string &fieldName) const =0
Check if the field value is NULL.
SCT_ForwardModuleParameters::fwdSubSpineOuterRefDist
double fwdSubSpineOuterRefDist(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:279
SCT_ForwardModuleParameters::fwdSensorNumReadoutStrips
int fwdSensorNumReadoutStrips(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:134
SCT_ForwardModuleParameters::fwdHybridInnerWidth
double fwdHybridInnerWidth() const
Definition: SCT_ForwardModuleParameters.cxx:156
SCT_ForwardModuleParameters::fwdSpineMaterial
std::string fwdSpineMaterial(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:221
SCT_ForwardModuleParameters::fwdSubSpineInnerLength
double fwdSubSpineInnerLength(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:237
IRDBRecord::getDouble
virtual double getDouble(const std::string &fieldName) const =0
Get double field value.
SCT_ForwardModuleParameters::fwdSubSpineMaterial
std::string fwdSubSpineMaterial(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:285
SCT_ForwardModuleParameters::fwdSensorMaterialNear
std::string fwdSensorMaterialNear(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:86
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.
SCT_ForwardModuleParameters::fwdSubSpineMiddleRefDist
double fwdSubSpineMiddleRefDist(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:261
SCT_ForwardModuleParameters::fwdSubSpineOuterLength
double fwdSubSpineOuterLength(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:273
SCT_ForwardModuleParameters::fwdSensorActiveHalfLengthFar
double fwdSensorActiveHalfLengthFar(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:116
SCT_ForwardModuleParameters::fwdSubSpineMiddleWidth
double fwdSubSpineMiddleWidth(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:249
SCT_ForwardModuleParameters::fwdSpineEndToModuleCenter
double fwdSpineEndToModuleCenter(int iModuleType) const
Definition: SCT_ForwardModuleParameters.cxx:207
SCT_ForwardModuleParameters::fwdHybridLengthToCorner
double fwdHybridLengthToCorner() const
Definition: SCT_ForwardModuleParameters.cxx:174