56{
57 IRDBAccessSvc* rdbAccess{nullptr};
58 IGeoModelSvc * geoModel{nullptr};
59
61
63
64 SmartIF<IGeoModelSvc> gModel{
m_svcLocator->service(
"GeoModelSvc")};
65 if(!gModel.isValid()) {
66 throw std::runtime_error("Error in FCALConstruction, cannot access GeoModelSvc");
67 }
68 geoModel = gModel.get();
69 SmartIF<IRDBAccessSvc> rAccess{
m_svcLocator->service(
"RDBAccessSvc")};
70 if(!rAccess.isValid()) {
71 throw std::runtime_error("Error in FCALConstruction, cannot access RDBAccessSvc");
72 }
73 rdbAccess = rAccess.get();
74 DecodeVersionKey larVersionKey(geoModel, "LAr");
75
80 throw std::runtime_error("Error getting FCAL Module parameters from database");
81 }
82 }
83
88 throw std::runtime_error("Error, no lar position table in database!");
89 }
90 }
91
92 }
93
94
95 const bool F1=true,F2=true,F3=true;
96
99 throw std::runtime_error("Error in FCALConstruction, cannot access DetectorStore");
100 }
101
102 StoredMaterialManager* materialManager = nullptr;
103 if (StatusCode::SUCCESS !=
detStore->retrieve(materialManager, std::string(
"MATERIALS")))
return nullptr;
104
105 const GeoMaterial *Copper = materialManager->
getMaterial(
"std::Copper");
106 if (!Copper) throw std::runtime_error("Error in FCALConstruction, std::Copper is not found.");
107
108 const GeoMaterial *Iron = materialManager->
getMaterial(
"std::Iron");
109 if (!Iron) throw std::runtime_error("Error in FCALConstruction, std::Iron is not found.");
110
111 const GeoMaterial *Lead = materialManager->
getMaterial(
"std::Lead");
112 if (!Lead) throw std::runtime_error("Error in FCALConstruction, std::Lead is not found.");
113
114 const GeoMaterial *LAr = materialManager->
getMaterial(
"std::LiquidArgon");
115 if (!LAr) throw std::runtime_error("Error in FCALConstruction, std::LiquidArgon is not found.");
116
117 const GeoMaterial *Air = materialManager->
getMaterial(
"std::Air");
118 if (!Air) throw std::runtime_error("Error in FCALConstruction, std::Air is not found.");
119
120 const GeoMaterial *Kapton = materialManager->
getMaterial(
"std::Kapton");
121 if (!Kapton) throw std::runtime_error("Error in FCALConstruction, std::Kapton is not found.");
122
123 const GeoMaterial *Glue = materialManager->
getMaterial(
"LAr::Glue");
124 if (!Glue) throw std::runtime_error("Error in FCALConstruction, LAr::Glue is not found.");
125
126 const GeoMaterial *G10 = materialManager->
getMaterial(
"LAr::G10");
127 if (!G10) throw std::runtime_error("Error in FCALConstruction, LAr::G10 is not found.");
128
129
130 const GeoMaterial *FCal1Absorber = materialManager->
getMaterial(
"LAr::FCal1Absorber");
131 if (!FCal1Absorber) throw std::runtime_error("Error in FCALConstruction, LAr::FCal1Absorber is not found.");
132
133 const GeoMaterial *FCal23Absorber = materialManager->
getMaterial(
"LAr::FCal23Absorber");
134 if (!FCal23Absorber) throw std::runtime_error("Error in FCALConstruction, LAr::FCal23Absorber is not found.");
135
136 const GeoMaterial *FCalCableHarness = materialManager->
getMaterial(
"LAr::FCalCableHarness");
137 if (!FCalCableHarness) throw std::runtime_error("Error in FCALConstruction, LAr::FCalCableHarness is not found.");
138
139 const GeoMaterial *FCal23Slugs = materialManager->
getMaterial(
"LAr::FCal23Slugs");
140 if (!FCal23Slugs) throw std::runtime_error("Error in FCALConstruction, LAr::FCal23Slugs is not found.");
141
142
143 auto cmap = std::make_unique<FCAL_ChannelMap>(0);
144
145 GeoIntrusivePtr<GeoFullPhysVol> fcalPhysical{nullptr};
146
147 std::string baseName = "LAr::FCAL::";
148
149 double startZFCal1 = (*m_fcalMod)[0]->getDouble("STARTPOSITION");
150
151 double startZFCal3 = (*m_fcalMod)[2]->getDouble("STARTPOSITION");
152
153 double outerModuleRadius1=(*m_fcalMod)[0]->getDouble("OUTERMODULERADIUS");
154 double outerModuleRadius2=(*m_fcalMod)[1]->getDouble("OUTERMODULERADIUS");
155 double outerModuleRadius3=(*m_fcalMod)[2]->getDouble("OUTERMODULERADIUS");
156 double innerModuleRadius1=(*m_fcalMod)[0]->getDouble("INNERMODULERADIUS");
157 double innerModuleRadius2=(*m_fcalMod)[1]->getDouble("INNERMODULERADIUS");
158 double innerModuleRadius3=(*m_fcalMod)[2]->getDouble("INNERMODULERADIUS");
159 double fullModuleDepth1=(*m_fcalMod)[0]->getDouble("FULLMODULEDEPTH");
160 double fullModuleDepth2=(*m_fcalMod)[1]->getDouble("FULLMODULEDEPTH");
161 double fullModuleDepth3=(*m_fcalMod)[2]->getDouble("FULLMODULEDEPTH");
162 double fullGapDepth1=(*m_fcalMod)[0]->getDouble("FULLGAPDEPTH");
163 double fullGapDepth2=(*m_fcalMod)[1]->getDouble("FULLGAPDEPTH");
164 double fullGapDepth3=(*m_fcalMod)[2]->getDouble("FULLGAPDEPTH");
165 double outerGapRadius1=(*m_fcalMod)[0]->getDouble("OUTERGAPRADIUS");
166 double outerGapRadius2=(*m_fcalMod)[1]->getDouble("OUTERGAPRADIUS");
167 double outerGapRadius3=(*m_fcalMod)[2]->getDouble("OUTERGAPRADIUS");
168 double innerGapRadius1=(*m_fcalMod)[0]->getDouble("INNERGAPRADIUS");
169 double innerGapRadius2=(*m_fcalMod)[1]->getDouble("INNERGAPRADIUS");
170 double innerGapRadius3=(*m_fcalMod)[2]->getDouble("INNERGAPRADIUS");
171
172
173
174 {
175
176 double outerRadius = std::max(outerModuleRadius1,std::max(outerModuleRadius2,outerModuleRadius3));
177 double innerRadius = std::min(innerModuleRadius1,std::min(innerModuleRadius2,innerModuleRadius3));
178 double depthZFCal3 = fullModuleDepth3;
179 double stopZFCal3 = startZFCal3 + depthZFCal3;
180
181 double totalDepth = stopZFCal3 - startZFCal1;
182 double halfDepth = totalDepth/2.;
183
184 std::string
name = baseName +
"LiquidArgonC";
185 GeoTubs *tubs = new GeoTubs(innerRadius,outerRadius,halfDepth,0,360*Gaudi::Units::deg);
186 GeoLogVol *logVol= new GeoLogVol(name, tubs, LAr);
187 fcalPhysical = new GeoFullPhysVol(logVol);
188 }
189
190
191
192 if (F1)
193 {
194
195
196 GeoIntrusivePtr<GeoFullPhysVol> modPhysical{nullptr};
197 {
198 double halfDepth = fullModuleDepth1/2;
199 double innerRadius = innerModuleRadius1;
200 double outerRadius = outerModuleRadius1;
201 GeoIntrusivePtr<GeoFullPhysVol>physVol;
202
205 }
206 else {
207 GeoTubs *tubs =
new GeoTubs( innerRadius, outerRadius, halfDepth, 0, 2*
M_PI);
208 GeoLogVol *logVol = new GeoLogVol(baseName + "Module1::Absorber", tubs, FCal1Absorber);
209 physVol = new GeoFullPhysVol(logVol);
210 }
211
212
213
215 if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ;
217 GeoAlignableTransform *xfAbs1 = new GeoAlignableTransform(xfPos);
218
219 fcalPhysical->add(xfAbs1);
220 if (!bPos) fcalPhysical->add(new GeoTransform(GeoTrf::RotateY3D(180*Gaudi::Units::deg)));
221 fcalPhysical->add(physVol);
222 modPhysical = physVol;
223
224 std::string
tag = bPos? std::string(
"FCAL1_POS") : std::string(
"FCAL1_NEG");
226
227 StoredPhysVol *sPhysVol = new StoredPhysVol(physVol);
229 if(!
status.isSuccess())
throw std::runtime_error ((std::string(
"Cannot store")+tag).c_str());
230
231 StoredAlignX *sAlignX = new StoredAlignX(xfAbs1);
233 if(!
status.isSuccess())
throw std::runtime_error ((std::string(
"Cannot store")+tag).c_str());
234
235 }
236
238 double troughDepth = 1.0 * Gaudi::Units::cm;
239 double outerRadius = outerModuleRadius1;
240 double innerRadius = outerRadius - troughDepth;
241 double halfLength = fullModuleDepth1/ 2.0;
242 double deltaPhi = 5.625 * Gaudi::Units::deg;
243 double startPhi = 11.25 * Gaudi::Units::deg -
deltaPhi/2.0;
244 GeoTubs * tubs =
new GeoTubs(innerRadius,outerRadius,halfLength,startPhi,
deltaPhi );
245 GeoLogVol *logVol = new GeoLogVol(baseName+"Module1::CableTrough",tubs,FCalCableHarness);
246 GeoIntrusivePtr<GeoPhysVol>physVol = new GeoPhysVol(logVol);
247 GeoGenfun::Variable
i;
248 GeoGenfun::GENFUNCTION rotationAngle = 22.5*Gaudi::Units::deg*
i;
249 GeoXF::TRANSFUNCTION xf = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),rotationAngle);
250 GeoSerialTransformer *
st =
new GeoSerialTransformer(physVol,&xf,16);
251 modPhysical->add(st);
252 }
253
255 double halfDepth = fullGapDepth1/2.0;
256 double innerRadius = innerGapRadius1;
257 double outerRadius = outerGapRadius1;
258 GeoIntrusivePtr<GeoPhysVol>physVol{nullptr};
260 GeoTubs *tubs =
new GeoTubs(innerRadius,outerRadius,halfDepth,0.0, 2.0*
M_PI);
261 GeoLogVol *logVol = new GeoLogVol(baseName + "Module1::Gap",tubs, LAr);
262 physVol = new GeoPhysVol(logVol);
263 modPhysical->add(new GeoSerialIdentifier(0));
264 }
265
267
268 int myGroup=1;
269
270
271 unsigned fieldModNumber(2);
272 unsigned fieldTileName(1);
273 unsigned fieldI(4);
274 unsigned fieldJ(5);
275 unsigned fieldId(3);
276 unsigned fieldX(6);
277 unsigned fieldY(7);
278 unsigned fieldHvFt(8);
279
280 std::unique_ptr<IRDBQuery>
query;
281 DecodeVersionKey larVersionKey(geoModel, "LAr");
282 query = rdbAccess->
getQuery(
"LArFCalElectrodes", larVersionKey.tag(),larVersionKey.node());
283 if(!query) {
284 query = rdbAccess->
getQuery(
"LArFCalElectrodes",
"LArFCalElectrodes-00");
285 if(!query)
286 throw std::runtime_error("Error getting Session and Query pointers");
287 }
290 throw std::runtime_error("Error, unable to fetch fcal electrodes from the database!");
291
292
293 while(
query->next()) {
294
295 if(myGroup!=
query->data<
int>(fieldModNumber))
continue;
296
297
298 int thisTubeI=
query->data<
int>(fieldI);
299 int thisTubeJ=
query->data<
int>(fieldJ);
300 int thisTubeID =
query->data<
int>(fieldId);
301 int thisTubeMod = myGroup;
302 double thisTubeX=
query->data<
double>(fieldX);
303 double thisTubeY=
query->data<
double>(fieldY);
304
305
306 cmap->add_tube(
query->data<std::string>(fieldTileName),
307 thisTubeMod, thisTubeID, thisTubeI,thisTubeJ, thisTubeX, thisTubeY,
308 query->data<std::string>(fieldHvFt));
309
312 GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(thisTubeX*Gaudi::Units::cm, thisTubeY*Gaudi::Units::cm,0));
313 modPhysical->add(xf);
314 modPhysical->add(physVol);
315 }
316 }
317
320 }
321 }
322 if (F2)
323 {
324
325 GeoIntrusivePtr<GeoFullPhysVol> modPhysical{nullptr};
326 {
327 double halfDepth = fullModuleDepth2/2;
328 double innerRadius = innerModuleRadius2;
329 double outerRadius = outerModuleRadius2;
330 GeoIntrusivePtr<GeoFullPhysVol>physVol;
331
334 }
335 else {
336 GeoTubs *tubs =
new GeoTubs( innerRadius, outerRadius, halfDepth, 0, 2*
M_PI);
337 GeoLogVol *logVol = new GeoLogVol(baseName + "Module2::Absorber", tubs, FCal23Absorber);
338 physVol = new GeoFullPhysVol(logVol);
339 }
340
341
342
344 if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ;
346 GeoAlignableTransform *xfAbs2 = new GeoAlignableTransform(xfPos);
347
348 fcalPhysical->add(xfAbs2);
349 if (!bPos) fcalPhysical->add(new GeoTransform(GeoTrf::RotateY3D(180*Gaudi::Units::deg)));
350 fcalPhysical->add(physVol);
351 modPhysical = physVol;
352
353 std::string
tag = bPos? std::string(
"FCAL2_POS") : std::string(
"FCAL2_NEG");
355
356 StoredPhysVol *sPhysVol = new StoredPhysVol(physVol);
358 if(!
status.isSuccess())
throw std::runtime_error ((std::string(
"Cannot store")+tag).c_str());
359
360 StoredAlignX *sAlignX = new StoredAlignX(xfAbs2);
362 if(!
status.isSuccess())
throw std::runtime_error ((std::string(
"Cannot store")+tag).c_str());
363
364 }
365
367 double troughDepth = 1.0 * Gaudi::Units::cm;
368 double outerRadius = outerModuleRadius2;
369 double innerRadius = outerRadius - troughDepth;
370 double halfLength = fullModuleDepth2/ 2.0;
371 double deltaPhi = 5.625 * Gaudi::Units::deg;
372 double startPhi = 11.25 * Gaudi::Units::deg -
deltaPhi/2.0;
373 GeoTubs * tubs =
new GeoTubs(innerRadius,outerRadius,halfLength,startPhi,
deltaPhi );
374 GeoLogVol *logVol = new GeoLogVol(baseName+"Module2::CableTrough",tubs,FCalCableHarness);
375 GeoIntrusivePtr<GeoPhysVol>physVol = new GeoPhysVol(logVol);
376 GeoGenfun::Variable
i;
377 GeoGenfun::GENFUNCTION rotationAngle = 22.5*Gaudi::Units::deg*
i;
378 GeoXF::TRANSFUNCTION xf = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),rotationAngle);
379 GeoSerialTransformer *
st =
new GeoSerialTransformer(physVol,&xf,16);
380 modPhysical->add(st);
381 }
382
383
385 double halfDepth = fullGapDepth2/2.0;
386 double innerRadius = innerGapRadius2;
387 double outerRadius = outerGapRadius2;
388
389 GeoIntrusivePtr<GeoPhysVol> gapPhys{nullptr};
390 GeoIntrusivePtr<GeoPhysVol> rodPhys{nullptr};
392 GeoTubs *gapTubs =
new GeoTubs(0,outerRadius,halfDepth,0.0, 2.0*
M_PI);
393 GeoLogVol *gapLog = new GeoLogVol(baseName + "Module2::Gap",gapTubs, LAr);
394 gapPhys = new GeoPhysVol(gapLog);
395
396 GeoTubs *rodTubs =
new GeoTubs(0,innerRadius,halfDepth,0.0, 2.0*
M_PI);
397 GeoLogVol *rodLog = new GeoLogVol(baseName + "Module2::Rod",rodTubs, FCal23Slugs);
398 rodPhys = new GeoPhysVol(rodLog);
399 gapPhys->add(rodPhys);
400 modPhysical->add(new GeoSerialIdentifier(0));
401 }
402
404
405 int myGroup=2;
406
407
408 unsigned fieldModNumber(2);
409 unsigned fieldTileName(1);
410 unsigned fieldI(4);
411 unsigned fieldJ(5);
412 unsigned fieldId(3);
413 unsigned fieldX(6);
414 unsigned fieldY(7);
415 unsigned fieldHvFt(8);
416
417 std::unique_ptr<IRDBQuery>
query;
418 DecodeVersionKey larVersionKey(geoModel, "LAr");
419 query = rdbAccess->
getQuery(
"LArFCalElectrodes", larVersionKey.tag(),larVersionKey.node());
420 if(!query) {
421 query = rdbAccess->
getQuery(
"LArFCalElectrodes",
"LArFCalElectrodes-00");
422 if(!query)
423 throw std::runtime_error("Error getting Session and Query pointers");
424 }
427 throw std::runtime_error("Error, unable to fetch fcal electrodes from the database!");
428
429 while(
query->next()) {
430
431 if(myGroup!=
query->data<
int>(fieldModNumber))
continue;
432
433
434
435 int thisTubeI=
query->data<
int>(fieldI);
436 int thisTubeJ=
query->data<
int>(fieldJ);
437 int thisTubeID =
query->data<
int>(fieldId);
438 int thisTubeMod = myGroup;
439 double thisTubeX=
query->data<
double>(fieldX);
440 double thisTubeY=
query->data<
double>(fieldY);
441
442
443 cmap->add_tube(
query->data<std::string>(fieldTileName),
444 thisTubeMod, thisTubeID, thisTubeI,thisTubeJ, thisTubeX, thisTubeY,
445 query->data<std::string>(fieldHvFt));
446
449 GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(thisTubeX*Gaudi::Units::cm, thisTubeY*Gaudi::Units::cm,0));
450 modPhysical->add(xf);
451 modPhysical->add(gapPhys);
452 }
453 }
454
457 }
458 }
459
460 if (F3)
461 {
462
463 GeoIntrusivePtr<GeoFullPhysVol> modPhysical{nullptr};
464 {
465 double halfDepth = fullModuleDepth3/2;
466 double innerRadius = innerModuleRadius3;
467 double outerRadius = outerModuleRadius3;
468 GeoIntrusivePtr<GeoFullPhysVol>physVol;
469
472 }
473 else {
474 GeoTubs *tubs =
new GeoTubs( innerRadius, outerRadius, halfDepth, 0, 2*
M_PI);
475 GeoLogVol *logVol = new GeoLogVol(baseName + "Module3::Absorber", tubs, FCal23Absorber);
476 physVol = new GeoFullPhysVol(logVol);
477 }
478
479
481 if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ;
483 GeoAlignableTransform *xfAbs3 = new GeoAlignableTransform(xfPos);
484
485 fcalPhysical->add(xfAbs3);
486 if (!bPos) fcalPhysical->add(new GeoTransform(GeoTrf::RotateY3D(180*Gaudi::Units::deg)));
487 fcalPhysical->add(physVol);
488 modPhysical = physVol;
489
490 std::string
tag = bPos? std::string(
"FCAL3_POS") : std::string(
"FCAL3_NEG");
492
493 StoredPhysVol *sPhysVol = new StoredPhysVol(physVol);
495 if(!
status.isSuccess())
throw std::runtime_error ((std::string(
"Cannot store")+tag).c_str());
496
497 StoredAlignX *sAlignX = new StoredAlignX(xfAbs3);
499 if(!
status.isSuccess())
throw std::runtime_error ((std::string(
"Cannot store")+tag).c_str());
500
501
502 }
503
505 static const double rotAngles[] =
506 { 11.25 * Gaudi::Units::deg,
507 22.50 * Gaudi::Units::deg,
508 45.00 * Gaudi::Units::deg,
509 56.25 * Gaudi::Units::deg,
510 67.50 * Gaudi::Units::deg,
511 90.00 * Gaudi::Units::deg,
512 101.25 * Gaudi::Units::deg,
513 112.50 * Gaudi::Units::deg,
514 135.00 * Gaudi::Units::deg,
515 146.25 * Gaudi::Units::deg,
516 157.50 * Gaudi::Units::deg,
517 180.00 * Gaudi::Units::deg,
518 191.25 * Gaudi::Units::deg,
519 202.50 * Gaudi::Units::deg,
520 225.00 * Gaudi::Units::deg,
521 236.25 * Gaudi::Units::deg,
522 247.50 * Gaudi::Units::deg,
523 270.00 * Gaudi::Units::deg,
524 281.25 * Gaudi::Units::deg,
525 292.50 * Gaudi::Units::deg,
526 315.00 * Gaudi::Units::deg,
527 326.25 * Gaudi::Units::deg,
528 337.50 * Gaudi::Units::deg,
529 360.00 * Gaudi::Units::deg };
530
531 GeoGenfun::ArrayFunction rotationAngle(rotAngles,rotAngles+24);
532 double troughDepth = 1.0 * Gaudi::Units::cm;
533 double outerRadius = outerModuleRadius3;
534 double innerRadius = outerRadius - troughDepth;
535 double halfLength = fullModuleDepth3/ 2.0;
536 double deltaPhi = 5.625 * Gaudi::Units::deg;
537 double startPhi = 11.25 * Gaudi::Units::deg -
deltaPhi/2.0;
538 GeoTubs * tubs =
new GeoTubs(innerRadius,outerRadius,halfLength,startPhi,
deltaPhi );
539 GeoLogVol *logVol = new GeoLogVol(baseName+"Module3::CableTrough",tubs,FCalCableHarness);
540 GeoIntrusivePtr<GeoPhysVol>physVol = new GeoPhysVol(logVol);
541 GeoXF::TRANSFUNCTION xf = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),rotationAngle);
542 GeoSerialTransformer *
st =
new GeoSerialTransformer(physVol,&xf,24);
543 modPhysical->add(st);
544 }
545
546
548 double halfDepth = fullGapDepth3/2.0;
549 double innerRadius = innerGapRadius3;
550 double outerRadius = outerGapRadius3;
551
552 GeoIntrusivePtr<GeoPhysVol> gapPhys{nullptr};
553 GeoIntrusivePtr<GeoPhysVol> rodPhys{nullptr};
555 GeoTubs *gapTubs =
new GeoTubs(0,outerRadius,halfDepth,0.0, 2.0*
M_PI);
556 GeoLogVol *gapLog = new GeoLogVol(baseName + "Module3::Gap",gapTubs, LAr);
557 gapPhys = new GeoPhysVol(gapLog);
558
559 GeoTubs *rodTubs =
new GeoTubs(0,innerRadius,halfDepth,0.0, 2.0*
M_PI);
560 GeoLogVol *rodLog = new GeoLogVol(baseName + "Module3::Rod",rodTubs, FCal23Slugs);
561 rodPhys = new GeoPhysVol(rodLog);
562 gapPhys->add(rodPhys);
563 modPhysical->add(new GeoSerialIdentifier(0));
564 }
565
567
568 int myGroup=3;
569
570
571 unsigned fieldModNumber(2);
572 unsigned fieldTileName(1);
573 unsigned fieldI(4);
574 unsigned fieldJ(5);
575 unsigned fieldId(3);
576 unsigned fieldX(6);
577 unsigned fieldY(7);
578 unsigned fieldHvFt(8);
579
580 std::unique_ptr<IRDBQuery>
query;
581 DecodeVersionKey larVersionKey(geoModel, "LAr");
582 query = rdbAccess->
getQuery(
"LArFCalElectrodes", larVersionKey.tag(),larVersionKey.node());
583 if(!query) {
584 query = rdbAccess->
getQuery(
"LArFCalElectrodes",
"LArFCalElectrodes-00");
585 if(!query)
586 throw std::runtime_error("Error getting Session and Query pointers");
587 }
590 throw std::runtime_error("Error, unable to fetch fcal electrodes from the database!");
591
592 while(
query->next()) {
593
594 if(myGroup!=
query->data<
int>(fieldModNumber))
continue;
595
596
597 int thisTubeI=
query->data<
int>(fieldI);
598 int thisTubeJ=
query->data<
int>(fieldJ);
599 int thisTubeID =
query->data<
int>(fieldId);
600 int thisTubeMod = myGroup;
601 double thisTubeX=
query->data<
double>(fieldX);
602 double thisTubeY=
query->data<
double>(fieldY);
603
604
605 cmap->add_tube(
query->data<std::string>(fieldTileName),
606 thisTubeMod, thisTubeID, thisTubeI,thisTubeJ, thisTubeX, thisTubeY,
607 query->data<std::string>(fieldHvFt));
608
611 GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(thisTubeX*Gaudi::Units::cm, thisTubeY*Gaudi::Units::cm,0));
612 modPhysical->add(xf);
613 modPhysical->add(gapPhys);
614 }
615 }
616
619 }
620 }
621
622
623
624
625 if (!
detStore->contains<FCAL_ChannelMap>(
"FCAL_ChannelMap")) {
626 cmap->finish();
628 if(!
status.isSuccess())
throw std::runtime_error (
"Cannot store FCAL_ChannelMap");
629 }
630
631 return fcalPhysical;
632}
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
static const IRDBRecord * getTransformRecord(IRDBRecordset_ptr positionRecSet, const std::string &key)
static GeoTrf::Transform3D getTransform(const IRDBRecord *currentRec)
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
virtual std::unique_ptr< IRDBQuery > getQuery(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
GeoIntrusivePtr< GeoFullPhysVol > m_absPhysical2
IRDBRecordset_ptr m_LArPosition
GeoIntrusivePtr< GeoFullPhysVol > m_absPhysical3
GeoIntrusivePtr< GeoFullPhysVol > m_absPhysical1
ISvcLocator * m_svcLocator
IRDBRecordset_ptr m_fcalMod
virtual const GeoMaterial * getMaterial(const std::string &name)=0
::StatusCode StatusCode
StatusCode definition for legacy code.