120{
121
122 msg(MSG::INFO) <<
"Building SCT Detector." <<
endmsg;
124
125
126 int oldPrecision = std::cout.precision(6);
127
128
129 const SCT_GeneralParameters * sctGeneral =
m_geometryManager->generalParameters();
130
131 std::string barrelLabel = "Barrel";
132 std::string forwardPlusLabel = "EndcapA";
133 std::string forwardMinusLabel = "EndcapC";
134
135 bool barrelPresent = sctGeneral->
partPresent(barrelLabel);
136 bool forwardPlusPresent = sctGeneral->
partPresent(forwardPlusLabel);
137 bool forwardMinusPresent = sctGeneral->
partPresent(forwardMinusLabel);
138
139
140
141
142 if (barrelPresent) {
143
144 msg(MSG::DEBUG) <<
"Building the SCT Barrel." <<
endmsg;
145
147
148
150
152 id.setBarrelEC(0);
153
154 sctBarrel.build(id);
155 GeoFullPhysVol *barrelPV = (*m_mapFPV)["SCT_Barrel"];
156 GeoAlignableTransform * barrelTransform = (*m_mapAXF)["SCT_Barrel"];
158
159
160 m_detectorManager->addAlignableTransform(3,
id.getWaferId(), barrelTransform, barrelPV);
161
162 }
163
164
165
166
167 if (forwardPlusPresent) {
168
169 msg(MSG::DEBUG) <<
"Building the SCT Endcap A (positive z)." <<
endmsg;
170
172
173
177
178 sctForwardPlus.build(idFwdPlus);
179
180 GeoFullPhysVol *forwardPlusPV = (*m_mapFPV)["SCT_ForwardPlus"];
181 GeoAlignableTransform * fwdGeoTransformPlus = (*m_mapAXF)["SCT_ForwardPlus"];
182
184
185
187 }
188
189
190
191
192
193 if (forwardMinusPresent) {
194
195 msg(MSG::DEBUG) <<
"Building the SCT Endcap C (negative z)." <<
endmsg;
196
198
200
203
204 sctForwardMinus.build(idFwdMinus);
205
206 GeoFullPhysVol *forwardMinusPV = (*m_mapFPV)["SCT_ForwardMinus"];
207 GeoAlignableTransform * fwdGeoTransformMinus = (*m_mapAXF)["SCT_ForwardMinus"];
209
210
211
213 }
214
215
217
218
221 }
222
223
224
225
226
227
229
234
235 if (barrelPresent) {
240 }
241 if (forwardPlusPresent) {
251 }
252 if (forwardMinusPresent) {
262 }
263 }
264
265 else {
272
273 if (barrelPresent) {
278 }
279 if (forwardPlusPresent) {
289 }
290 if (forwardMinusPresent) {
300 }
301 }
302
303
304 std::cout.precision(oldPrecision);
305
306}
bool partPresent(const std::string &partName) const