50{
51 ISvcLocator* svcLocator = Gaudi::svcLocator();
53 log << MSG::INFO <<
"Start building EC electronics geometry" <<
endmsg;
54
55 SmartIF<StoreGateSvc>
detStore{svcLocator->service(
"DetectorStore")};
57 throw std::runtime_error("Error in EndcapDMConstruction, cannot access DetectorStore");
58
59 SmartIF<IGeoModelSvc> geoModel{svcLocator->service("GeoModelSvc")};
60 if(!geoModel.isValid())
61 throw std::runtime_error("Error in EndcapDMConstruction, cannot access GeoModelSvc");
62
63 SmartIF<IRDBAccessSvc> rdbAccess{svcLocator->service("RDBAccessSvc")};
64 if(!rdbAccess.isValid())
65 throw std::runtime_error("Error in EndcapDMConstruction, cannot access RDBAccessSvc");
66
67 DecodeVersionKey keyLAr(geoModel, "LAr");
68 StoredMaterialManager* materialManager = nullptr;
69 if(StatusCode::SUCCESS !=
detStore->retrieve(materialManager, std::string(
"MATERIALS")))
70 throw std::runtime_error("Error in EndcapDMConstruction, stored MaterialManager is not found");
71
72 IRDBRecordset_ptr LArEndcapCrate = rdbAccess->getRecordsetPtr(
"LArEndcapCrate",keyLAr.tag(),keyLAr.node());
73 if(LArEndcapCrate->
size()==0) {
74 log << MSG::INFO <<
"Skip building EC electronics. Database flag not set" <<
endmsg;
75 return;
76 }
77 IRDBRecordset_ptr LArEndcapCratePhiPos = rdbAccess->getRecordsetPtr(
"LArEndcapCratePhiPos",keyLAr.tag(),keyLAr.node());
78 IRDBRecordset_ptr BarrelDMTraps = rdbAccess->getRecordsetPtr(
"BarrelDMTraps",keyLAr.tag(),keyLAr.node());
79 IRDBRecordset_ptr BarrelDMTrds = rdbAccess->getRecordsetPtr(
"BarrelDMTrds",keyLAr.tag(),keyLAr.node());
80 IRDBRecordset_ptr BarrelDMTubes = rdbAccess->getRecordsetPtr(
"BarrelDMTubes",keyLAr.tag(),keyLAr.node());
81 IRDBRecordset_ptr BarrelDMBoxes = rdbAccess->getRecordsetPtr(
"BarrelDMBoxes",keyLAr.tag(),keyLAr.node());
82
83 std::map<std::string, unsigned int> boxMap;
84 for(
unsigned int j=0; j<BarrelDMBoxes->
size(); j++) {
85 const std::string&
key = (*BarrelDMBoxes)[j]->getString(
"BOXNAME");
87 }
88 std::map<std::string, unsigned int> tubeMap;
89 for(
unsigned int i=0;
i<BarrelDMTubes->
size();
i++) {
90 const std::string&
key = (*BarrelDMTubes)[
i]->getString(
"TUBENAME");
92 }
93 std::map<std::string, unsigned int> ecCrateMap;
94 for(
unsigned int i=0;
i<LArEndcapCrate->
size();
i++) {
95 const std::string&
key = (*LArEndcapCrate)[
i]->getString(
"BOXNAME");
97 }
98
99 unsigned int recordIndex;
100
101
102 const GeoMaterial *alu = materialManager->
getMaterial(
"std::Aluminium");
103 const GeoMaterial* matBoardsEnvelope = materialManager->
getMaterial(
"LAr::BoardsEnvelope");
104
106 recordIndex = tubeMap["Ped2"];
107 double ped2zhlen = (*BarrelDMTubes)[recordIndex]->getDouble("ZHLEN");
108 double ped2minr = (*BarrelDMTubes)[recordIndex]->getDouble("MINR");
109 double ped2maxr = (*BarrelDMTubes)[recordIndex]->getDouble("MAXR");
110 double ped2ytr = (*BarrelDMTubes)[recordIndex]->getDouble("YTR");
111 recordIndex = tubeMap["Ped3"];
112 double ped3zhlen = (*BarrelDMTubes)[recordIndex]->getDouble("ZHLEN");
113 double ped3minr = (*BarrelDMTubes)[recordIndex]->getDouble("MINR");
114 double ped3maxr = (*BarrelDMTubes)[recordIndex]->getDouble("MAXR");
115 double ped3xtr = (*BarrelDMTubes)[recordIndex]->getDouble("XTR");
116
117 recordIndex = boxMap["Pedest"];
118 double pedesthlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
119 double pedesthwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
120 double pedesthhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
121 double pedestxtr = (*BarrelDMBoxes)[recordIndex]->getDouble("XTR");
122 double pedestztr = (*BarrelDMBoxes)[recordIndex]->getDouble("ZTR");
123 recordIndex = boxMap["Ped1"];
124 double ped1hlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
125 double ped1hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
126 double ped1hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
127 recordIndex = boxMap["Crate1"];
128 double crate1hlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
129 double crate1hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
130 double crate1hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
131 double crate1xtr = (*BarrelDMBoxes)[recordIndex]->getDouble("XTR");
132 double crate1ztr = (*BarrelDMBoxes)[recordIndex]->getDouble("ZTR");
133 recordIndex = boxMap["Crate2"];
134 double crate2hlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
135 double crate2hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
136 double crate2hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
137 recordIndex = boxMap["Crate3"];
138 double crate3hlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
139 double crate3hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
140 double crate3hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
141 double crate3xtr = (*BarrelDMBoxes)[recordIndex]->getDouble("XTR");
142 recordIndex = boxMap["BoardE"];
143 double BoardEhlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
144 double BoardEhwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
145 double BoardEhhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
146 double BoardExtr = (*BarrelDMBoxes)[recordIndex]->getDouble("XTR");
147 double BoardEytr = (*BarrelDMBoxes)[recordIndex]->getDouble("YTR");
148 double BoardEztr = (*BarrelDMBoxes)[recordIndex]->getDouble("ZTR");
149
150
151 std::map<std::string, unsigned int>::const_iterator
it = ecCrateMap.find(
"Crate1");
152 if(it != ecCrateMap.end()) {
153 recordIndex = ecCrateMap["Crate1"];
154 double ztrEC = (*LArEndcapCrate)[recordIndex]->getDouble("ZTR");
155
157 ztrEC += 6.;
158 log << MSG::DEBUG <<
"FEC position corrected to " << ztrEC
159 <<
" to fit mother volume" <<
endmsg;
160 }
161 crate1ztr = ztrEC;
162 pedestztr = ztrEC;
163 BoardEztr = ztrEC;
165
166 } else {
167
168 double xtrEC = (*LArEndcapCrate)[recordIndex]->getDouble("XTR");
169 crate1xtr = xtrEC;
170 }
171 }
173 it = ecCrateMap.find(
"Pedest");
174 if(it!=ecCrateMap.end()) {
175 recordIndex = ecCrateMap["Pedest"];
176 pedestxtr = (*LArEndcapCrate)[recordIndex]->getDouble("XTR");
177 }
178 it = ecCrateMap.find(
"BoardE");
179 if(it!=ecCrateMap.end()) {
180 recordIndex = ecCrateMap["BoardE"];
181 BoardExtr = (*LArEndcapCrate)[recordIndex]->getDouble("XTR");
182 }
183 }
184
186
187
188 GeoBox *Pedestal = new GeoBox(pedesthlen, pedesthwdt, pedesthhgt - epsilon);
189 GeoBox *Ped1 = new GeoBox(ped1hlen, ped1hwdt, ped1hhgt - epsilon);
190 GeoTube *Ped2 = new GeoTube(ped2minr, ped2maxr, ped2zhlen);
191 GeoTube *Ped3 = new GeoTube(ped3minr,ped3maxr , ped3zhlen);
192 const GeoShape & CratePed=((*Pedestal).subtract(*Ped1).
193 subtract((*Ped2) <<GeoTrf::TranslateY3D(-ped2ytr)*GeoTrf::RotateY3D(90*Gaudi::Units::deg)).
194 subtract((*Ped3) <<GeoTrf::TranslateX3D(-ped3xtr)).
195 subtract((*Ped2) <<GeoTrf::TranslateY3D(ped2ytr)*GeoTrf::RotateY3D(90*Gaudi::Units::deg)));
196
197 GeoLogVol *lvped = new GeoLogVol("LAr::DM::Ped",&CratePed,alu);
198 GeoIntrusivePtr<GeoPhysVol>pedestal = new GeoPhysVol(lvped);
199
200
201 GeoBox *Crate1 = new GeoBox(crate1hlen, crate1hwdt, crate1hhgt - epsilon);
202 GeoBox *Crate2 = new GeoBox(crate2hlen, crate2hwdt, crate2hhgt - epsilon);
203 GeoBox *Crate3 = new GeoBox(crate3hlen, crate3hwdt, crate3hhgt - epsilon);
204 const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<GeoTrf::TranslateX3D(-crate3xtr));
205
206 GeoLogVol *lvcrate = new GeoLogVol("LAr::DM::Crate",&FEBCrate,alu);
207 GeoIntrusivePtr<GeoPhysVol>crate = new GeoPhysVol(lvcrate);
208
209
210 GeoBox *BoardEnvelope = new GeoBox(BoardEhlen, BoardEhwdt, BoardEhhgt - epsilon);
211 GeoLogVol *lvbenv = new GeoLogVol("LAr::DM::FEBoard",BoardEnvelope,matBoardsEnvelope);
212 GeoIntrusivePtr<GeoPhysVol>boardenvelope = new GeoPhysVol(lvbenv);
213
214
215 GeoTransform* xfCrateBase(new GeoTransform(GeoTrf::TranslateX3D(crate1xtr)*GeoTrf::TranslateZ3D(crate1ztr)));
216 GeoTransform* xfPedestBase(new GeoTransform(GeoTrf::TranslateX3D(pedestxtr)*GeoTrf::TranslateZ3D(pedestztr)));
217 GeoTransform* xfBoardEBase1(new GeoTransform(GeoTrf::TranslateY3D(BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr)));
218 GeoTransform* xfBoardEBase2(new GeoTransform(GeoTrf::TranslateY3D(-BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr)));
219
220 for(
unsigned i(0);
i<LArEndcapCratePhiPos->
size(); ++
i) {
221 double phiPos = (*LArEndcapCratePhiPos)[
i]->getDouble(
"PHIPOS")*Gaudi::Units::deg;
222 GeoTransform* xfPhiPos(new GeoTransform(GeoTrf::RotateZ3D(phiPos)));
223
224 envelope->add(xfPhiPos);
225 envelope->add(xfCrateBase);
226 envelope->add(crate);
227
228 envelope->add(xfPhiPos);
229 envelope->add(xfPedestBase);
230 envelope->add(pedestal);
231
232 envelope->add(xfPhiPos);
233 envelope->add(xfBoardEBase1);
234 envelope->add(boardenvelope);
235
236 envelope->add(xfPhiPos);
237 envelope->add(xfBoardEBase2);
238 envelope->add(boardenvelope);
239 }
240
242 std::string
name =
"LAr::Endcap::SignalFT::";
243 log << MSG::DEBUG <<
"creating " <<
name <<
" volumes" <<
endmsg;
244
245 const GeoMaterial* iron = materialManager->
getMaterial(
"std::Iron");
246
247 const double wflange_height = 37.*Gaudi::Units::mm;
248 const double wflange_R = 0.5*360.*Gaudi::Units::mm;
249 const GeoMaterial* wflange_mat = materialManager->
getMaterial(
"LAr::FT::WarmFlange");
250
251 GeoShape* wflange = new GeoTube(0., wflange_R, wflange_height/2);
252 GeoLogVol* wflangeLV = new GeoLogVol(name + "WarmFlange", wflange, wflange_mat);
253 GeoIntrusivePtr<GeoPhysVol> wflangePV = new GeoPhysVol(wflangeLV);
254
255 const double bellow_height = 225.*Gaudi::Units::mm;
256 const double bellow_Router = 0.5*299.*Gaudi::Units::mm;
257 const double bellow_wall = 15.*Gaudi::Units::mm;
258 const GeoMaterial* bellow_mat = materialManager->
getMaterial(
"LAr::FT::Bellow");
259
260 const double bellow_Rinner = bellow_Router - bellow_wall;
261 GeoShape* bellow = new GeoTube(bellow_Rinner, bellow_Router, bellow_height/2);
262 GeoLogVol* bellowLV = new GeoLogVol(name + "Bellow", bellow, bellow_mat);
263 GeoIntrusivePtr<GeoPhysVol> bellowPV = new GeoPhysVol(bellowLV);
264
265 const GeoMaterial* vcables_mat = materialManager->
getMaterial(
"LAr::FT::VacuumCables");
266
267 GeoShape* vcables = new GeoTube(0., bellow_Rinner, bellow_height/2);
268 GeoLogVol* vcablesLV = new GeoLogVol(name + "VacuumCables", vcables, vcables_mat);
269 GeoIntrusivePtr<GeoPhysVol> vcablesPV = new GeoPhysVol(vcablesLV);
270
271 const double cflange_height = 35.*Gaudi::Units::mm;
272 const double cflange_Router = 0.5*283.*Gaudi::Units::mm;
273 const GeoMaterial* cflange_mat = materialManager->
getMaterial(
"LAr::FT::ColdFlange");
274 GeoShape* cflange = new GeoTube(0., cflange_Router, cflange_height/2);
275 GeoLogVol* cflangeLV = new GeoLogVol(name + "ColdFlange", cflange, cflange_mat);
276 GeoIntrusivePtr<GeoPhysVol> cflangePV = new GeoPhysVol(cflangeLV);
277
278 const double coldbox1_Router = cflange_Router;
279 const double coldbox1_wall = 0.134*2.54*Gaudi::Units::cm;
280 const double coldbox1_height = 90.*Gaudi::Units::mm;
281 const double coldbox2_height = 16.*Gaudi::Units::mm;
282 const double hole_r = 0.5*133.*Gaudi::Units::mm;
283 const double hole_shift = -31.*Gaudi::Units::mm;
284 const double coldbox3_Router = 0.5*140.*Gaudi::Units::mm;
285 const double coldbox3_height = 220.*Gaudi::Units::mm;
286 const GeoMaterial* coldbox_mat = iron;
287 GeoShape* coldbox1 = new GeoTube(coldbox1_Router - coldbox1_wall, coldbox1_Router, coldbox1_height/2);
288 GeoShape* coldbox11 = new GeoTube(0., coldbox1_Router, coldbox1_height/2);
289 GeoLogVol* coldbox1LV = new GeoLogVol(name + "ColdBox1", coldbox1, coldbox_mat);
290 GeoIntrusivePtr<GeoPhysVol> coldbox1PV = new GeoPhysVol(coldbox1LV);
291 GeoShape* coldbox21 = new GeoTube(0., coldbox1_Router, coldbox2_height/2);
292 GeoShape* coldbox22 = new GeoTube(0., hole_r, coldbox2_height);
293 const GeoShape& coldbox2 = coldbox21->subtract((*coldbox22) << GeoTrf::TranslateY3D(hole_shift));
294 GeoLogVol* coldbox2LV = new GeoLogVol(name + "ColdBox2", &coldbox2, coldbox_mat);
295 GeoIntrusivePtr<GeoPhysVol> coldbox2PV = new GeoPhysVol(coldbox2LV);
296 GeoShape* coldbox3 = new GeoTube(hole_r, coldbox3_Router, coldbox3_height/2);
297 GeoShape* coldbox31 = new GeoTube(0., coldbox3_Router, coldbox3_height/2);
298 GeoLogVol* coldbox3LV = new GeoLogVol(name + "ColdBox3", coldbox3, coldbox_mat);
299 GeoIntrusivePtr<GeoPhysVol> coldbox3PV = new GeoPhysVol(coldbox3LV);
300
301 GeoTrf::TranslateZ3D bellow_pos(-wflange_height/2 - bellow_height/2);
302 GeoTrf::TranslateZ3D cflange_pos(-wflange_height/2 - bellow_height - cflange_height/2);
303 GeoTrf::TranslateZ3D coldbox1_pos(-wflange_height/2 - bellow_height - cflange_height - coldbox1_height/2);
304 GeoTrf::TranslateZ3D coldbox2_pos(-wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height/2);
305 GeoTrf::Translate3D coldbox2hole_pos(
306 0., hole_shift,
307 -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height/2
308 );
309 GeoTrf::Translate3D coldbox3_pos(
310 0., hole_shift,
311 -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height - coldbox3_height/2
312 );
313
314 const GeoShape& FTenvelope = wflange->add(
315 (*bellow) << bellow_pos
316 ).add(
317 (*cflange) << cflange_pos
318 ).add(
319 (*coldbox11) << coldbox1_pos
320 ).add(
321 (*coldbox21) << coldbox2_pos
322 ).add(
323 (*coldbox31) << coldbox3_pos
324 );
325
326 GeoLogVol* FTLV = new GeoLogVol(name + "Envelope",
327 &FTenvelope,
329 );
330 GeoIntrusivePtr<GeoPhysVol> FTPV = new GeoPhysVol(FTLV);
331
332 FTPV->add(wflangePV);
333 GeoTransform *bellow_trf = new GeoTransform(bellow_pos);
334 FTPV->add(bellow_trf);
335 FTPV->add(bellowPV);
336 FTPV->add(bellow_trf);
337 FTPV->add(vcablesPV);
338 GeoTransform *cflange_trf = new GeoTransform(cflange_pos);
339 FTPV->add(cflange_trf);
340 FTPV->add(cflangePV);
341 GeoTransform *coldbox1_trf = new GeoTransform(coldbox1_pos);
342 FTPV->add(coldbox1_trf);
343 FTPV->add(coldbox1PV);
344 GeoTransform *coldbox2_trf = new GeoTransform(coldbox2_pos);
345 FTPV->add(coldbox2_trf);
346 FTPV->add(coldbox2PV);
347 GeoTransform *coldbox3_trf = new GeoTransform(coldbox3_pos);
348 FTPV->add(coldbox3_trf);
349 FTPV->add(coldbox3PV);
350
351 const GeoMaterial* lar_mat = materialManager->
getMaterial(
"std::LiquidArgon");
352 GeoShape* lar1 = new GeoTube(0., coldbox1_Router - coldbox1_wall, coldbox1_height/2);
353 GeoShape* lar2 = new GeoTube(0., hole_r, coldbox1_height);
354 const GeoShape& lar = lar1->subtract((*lar2) << GeoTrf::TranslateY3D(hole_shift));
355 GeoLogVol* larLV = new GeoLogVol(name + "LAr", &lar, lar_mat);
356 GeoIntrusivePtr<GeoPhysVol> larPV = new GeoPhysVol(larLV);
357 FTPV->add(coldbox1_trf);
358 FTPV->add(larPV);
359
360 const GeoMaterial *pigtail_mat = materialManager->
getMaterial(
"LAr::FT::Pigtail");
361
362 const double pth = (coldbox1_height + coldbox2_height + coldbox3_height) / 2;
363 GeoTransform *pigtail_trf = new GeoTransform(
364 GeoTrf::Translate3D(0, hole_shift,
365 -wflange_height/2 - bellow_height - cflange_height - pth
366 ));
367 GeoShape* pigtail = new GeoTube(0., hole_r, pth);
368 GeoLogVol* pigtailLV = new GeoLogVol(name + "Pigtails", pigtail, pigtail_mat);
369 GeoIntrusivePtr<GeoPhysVol> pigtailPV = new GeoPhysVol(pigtailLV);
370 FTPV->add(pigtail_trf);
371 FTPV->add(pigtailPV);
372
373
374 const double ocable_len = 10.*Gaudi::Units::cm;
375 const double ocable_R = (1.1/2)*sqrt(1920*2.85)*Gaudi::Units::mm;
376 const GeoMaterial* ocable_mat = materialManager->
getMaterial(
"LAr::FT::Cable");
377 GeoShape* ocable = new GeoTube(0., ocable_R, ocable_len / 2);
378 GeoLogVol* ocableLV = new GeoLogVol("LAr::Endcap::FTCables", ocable, ocable_mat);
379 GeoIntrusivePtr<GeoPhysVol> ocablePV = new GeoPhysVol(ocableLV);
380
381 const double chimney_height = 277.*Gaudi::Units::mm;
382 const double chimney_wall = 5.*Gaudi::Units::mm;
383 const double chimney_Router = 0.5*351.*Gaudi::Units::mm;
384 const GeoMaterial* chimney_mat = iron;
385 GeoShape* chimney1 = new GeoTube(chimney_Router - chimney_wall, chimney_Router, chimney_height/2);
386 const double ch_lowring_h = 30.*Gaudi::Units::mm;
387 const double ch_lowring_r = 20.*Gaudi::Units::mm;
388 GeoShape* chimney2 = new GeoTube(chimney_Router, chimney_Router + ch_lowring_r, ch_lowring_h/2);
389 const double ch_upring_r = 5.*Gaudi::Units::mm;
390 const double ch_upring_h = 20.*Gaudi::Units::mm;
391 GeoShape* chimney3 = new GeoTube(bellow_Router, chimney_Router + ch_upring_r, ch_upring_h/2);
392 const GeoShape& chimney = chimney1->add(
393 (*chimney2) << GeoTrf::TranslateZ3D(-chimney_height/2 + ch_lowring_h/2)
394 ).add(
395 (*chimney3) << GeoTrf::TranslateZ3D(chimney_height/2 - ch_upring_h/2)
396 );
397 GeoLogVol* chimneyLV = new GeoLogVol("LAr::Endcap::FTChimney", &chimney, chimney_mat);
398 GeoIntrusivePtr<GeoPhysVol> chimneyPV = new GeoPhysVol(chimneyLV);
399
400
401 const double cryo_Router = 2475.*Gaudi::Units::mm;
402 const double z_pos = -(472 - 412 + 247)*Gaudi::Units::mm;
403 const double r0 = cryo_Router + chimney_height + wflange_height/2;
404 const double r1 = cryo_Router + chimney_height/2;
405 const double r2 = cryo_Router + chimney_height + wflange_height + ocable_len/2;
406 auto put1 = [&envelope, z_pos](GeoIntrusivePtr<GeoPhysVol>
object,
double r,
double phi)
407 {
408 envelope->add(new GeoTransform(
410 GeoTrf::RotateX3D(90.*Gaudi::Units::deg) *
411 GeoTrf::RotateY3D(
phi + 90.*Gaudi::Units::deg)
412 ));
413 envelope->add(object);
414 };
415
416 auto put = [&put1, &FTPV, &chimneyPV, &ocablePV,
r0,
r1,
r2](
double phi)
417 {
419 put1(chimneyPV, r1,
phi);
420 put1(ocablePV, r2,
phi);
421 };
422
423 const double dphi = 5.*Gaudi::Units::deg;
424 for(
unsigned int i{0};
i < LArEndcapCratePhiPos->
size(); ++
i){
425 const int num = (*LArEndcapCratePhiPos)[
i]->getInt(
"CRATENUM");
426 const double phi = (*LArEndcapCratePhiPos)[
i]->getDouble(
"PHIPOS")*Gaudi::Units::deg;
427 if(num == 10){
429 } else {
432 }
433 }
434 } else {
435
436
437
438
439
440 IRDBRecordset_ptr EndcapDMTubes = rdbAccess->getRecordsetPtr(
"LArEndcapDMTubes",keyLAr.tag(),keyLAr.node());
441 if(EndcapDMTubes->
size()) {
442 const GeoMaterial* matECServices = materialManager->
getMaterial(
"LAr::LArECServices");
443 for(
unsigned i(0);
i<EndcapDMTubes->
size(); ++
i) {
444 GeoTube* endcapTube = new GeoTube((*EndcapDMTubes)[i]->getDouble("RMIN"),(*EndcapDMTubes)[i]->getDouble("RMAX"),(*EndcapDMTubes)[i]->getDouble("DZ"));
445 GeoLogVol* endcapTubeLv = new GeoLogVol((*EndcapDMTubes)[i]->getString("TUBENAME"),endcapTube,matECServices);
446 GeoIntrusivePtr<GeoPhysVol> endcapTubePv = new GeoPhysVol(endcapTubeLv);
447 envelope->add(new GeoTransform(GeoTrf::TranslateZ3D((*EndcapDMTubes)[i]->getDouble("ZPOS"))));
448 envelope->add(endcapTubePv);
449 }
450 }
451 }
452}
Scalar phi() const
phi method
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
virtual unsigned int size() const =0
virtual const GeoMaterial * getMaterial(const std::string &name)=0
IMessageSvc * getMessageSvc(bool quiet=false)
const double r0
electron radius{cm}