TrackingVolumeBuilder interface method - returns vector of Volumes.
Helper to collect local garbage and transfer it into global garbage bin on return
139 std::vector<Trk::TrackingVolume*>* lArTrackingVolumes =
new std::vector<Trk::TrackingVolume*>;
147 struct GarbageCollector {
148 explicit GarbageCollector(
MaterialGarbage& globalGarbage) : globalBin(globalGarbage) {}
149 ~GarbageCollector() {
151 std::scoped_lock lock(
mutex);
152 globalBin.merge(
bin);
159 GarbageCollector gc(m_materialGarbage);
164 ATH_MSG_FATAL(
"Could not get LArDetectorManager! Calo TrackingGeometry will not be built");
169 ATH_MSG_DEBUG(
"Retrieved " << numTreeTops <<
" tree tops from the LArDetDescrManager. " );
171 for (
unsigned int itreetop = 0; itreetop<numTreeTops; ++itreetop){
172 PVConstLink currentVPhysVolLink = lArMgr->
getTreeTop(itreetop);
173 const GeoLogVol* currentLogVol = currentVPhysVolLink->getLogVol();
175 unsigned int currentChilds = currentVPhysVolLink->getNChildVols();
177 ATH_MSG_DEBUG(
"Processing " << currentLogVol->getName() <<
"... has "
178 << currentChilds <<
" childs, position " << currentVPhysVolLink->getX().translation());
185 ATH_MSG_DEBUG(
"============ Barrel Section ======================" );
204 gc.bin.insert(lArBarrelPresamplerMaterial);
205 gc.bin.insert(lArBarrelMaterial);
208 std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>> entrySurf =
210 std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>> exitSurf =
221 if(
detStore()->contains<StoredPhysVol>(
"EMB_POS"))
229 GeoFullPhysVol* lArBarrelPosPhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
233 if(
detStore()->contains<StoredPhysVol>(
"EMB_NEG"))
241 GeoFullPhysVol* lArBarrelNegPhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
243 const GeoLogVol* lArBarrelPosLogVol = lArBarrelPosPhysVol ? lArBarrelPosPhysVol->getLogVol() :
nullptr;
244 const GeoLogVol* lArBarrelNegLogVol = lArBarrelNegPhysVol ? lArBarrelNegPhysVol->getLogVol() :
nullptr;
248 double lArBarrelHalflength = 0.;
249 std::vector<double> zBoundaries;
252 if (lArBarrelPosLogVol && lArBarrelNegLogVol){
254 int poschilds = lArBarrelPosPhysVol->getNChildVols();
255 int negchilds = lArBarrelNegPhysVol->getNChildVols();
257 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArBarrelPosPhysVol->getAbsoluteName()
258 <<
" (" << poschilds <<
" childs) ." );
259 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArBarrelNegPhysVol->getAbsoluteName()
260 <<
" (" << negchilds <<
" childs) ." );
263 const GeoShape* lArBarrelPosShape = lArBarrelPosLogVol->getShape();
264 const GeoShape* lArBarrelNegShape = lArBarrelNegLogVol->getShape();
267 const GeoPcon* lArBarrelPosPcon =
dynamic_cast<const GeoPcon*
>(lArBarrelPosShape);
269 const GeoPcon* lArBarrelNegPcon =
dynamic_cast<const GeoPcon*
>(lArBarrelNegShape);
272 if (lArBarrelPosBounds)
273 ATH_MSG_VERBOSE(
" -> Positive Barrel Bounds: " << *lArBarrelPosBounds );
274 if (lArBarrelNegBounds)
275 ATH_MSG_VERBOSE(
" -> Negative Barrel Bounds: " << *lArBarrelNegBounds );
280 if (lArBarrelPosBounds && lArBarrelNegBounds){
283 double lArBarrelRmin = lArBarrelPosBounds->
innerRadius();
284 double lArBarrelRmax = lArBarrelPosBounds->
outerRadius();
285 lArBarrelHalflength = zBoundaries[1];
290 0.5*lArBarrelHalflength);
302 std::vector<Trk::IdentifiedMaterial> matID;
305 matID.emplace_back(lArBarrelMaterial,0);
306 matID.emplace_back(lArBarrelMaterial,baseID+1);
307 matID.emplace_back(lArBarrelMaterial,baseID+2);
308 matID.emplace_back(lArBarrelMaterial,baseID+3);
310 matID.emplace_back(lArBarrelMaterial->
scale(1.3),baseID+1);
311 gc.bin.insert(matID.back().first);
312 matID.emplace_back(lArBarrelMaterial->
scale(1.3),baseID+2);
313 gc.bin.insert(matID.back().first);
314 matID.emplace_back(lArBarrelMaterial->
scale(0.6),baseID+3);
315 gc.bin.insert(matID.back().first);
316 matID.emplace_back(lArBarrelMaterial->
scale(0.7),baseID+3);
317 gc.bin.insert(matID.back().first);
318 matID.emplace_back(lArBarrelMaterial->
scale(0.8),baseID+3);
319 gc.bin.insert(matID.back().first);
320 matID.emplace_back(lArBarrelMaterial->
scale(0.9),baseID+3);
321 gc.bin.insert(matID.back().first);
322 matID.emplace_back(lArBarrelMaterial->
scale(1.1),baseID+3);
323 gc.bin.insert(matID.back().first);
329 std::vector<std::vector<size_t> > indexP(bubn->
bins());
330 std::vector<std::vector<size_t> > indexN;
332 std::vector< Trk::BinUtility*> layBUN(bubn->
bins());
333 std::vector< Trk::BinUtility*> layBUP(bubp->
bins());
339 std::vector<float> offset2{};
341 if (scyl2) offset2 = scyl2->
offset();
342 std::vector<float> offset3{};
344 if (scyl3) offset3 = scyl3->
offset();
346 std::vector<float>
steps;
347 for (
unsigned int i=0;
i< bubn->
bins();
i++) {
350 std::vector<size_t> indx; indx.clear();
353 indx.push_back(
i<14 ? 1:4 );
354 steps.push_back(r2 + offset2[
i] );
355 indx.push_back(
i<14 ? 2:5 );
356 steps.push_back(r3 + offset3[
i]);
358 if (
i>19) indx.push_back(7);
359 else if (
i>17) indx.push_back(8);
360 else if (
i>15) indx.push_back(9);
361 else if (
i>13) indx.push_back(3);
362 else if (
i>11) indx.push_back(6);
363 else if (
i>9) indx.push_back(7);
364 else if (
i>7) indx.push_back(8);
365 else if (
i>5) indx.push_back(8);
366 else if (
i>4) indx.push_back(9);
367 else indx.push_back(3);
373 indexN.push_back(indx);
374 indexP[bubp->
bins()-1-
i] = std::vector<size_t>(indx);
384 lArBarrelMaterialBinPos,
386 "Calo::Detectors::LAr::BarrelPos");
390 lArBarrelMaterialBinNeg,
392 "Calo::Detectors::LAr::BarrelNeg");
395 std::vector<Trk::TrackingVolume*> volsB;
396 volsB.push_back(lArBarrelNeg);
397 volsB.push_back(lArBarrelPos);
401 "Calo::Container::LAr::Barrel");
404 delete lArBarrelPosBounds; lArBarrelPosBounds =
nullptr;
405 delete lArBarrelNegBounds; lArBarrelNegBounds =
nullptr;
410 if(
detStore()->contains<StoredPhysVol>(
"SOLENOID"))
418 GeoFullPhysVol* solenoidPhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
421 const GeoLogVol* solenoidLogVol = solenoidPhysVol ? solenoidPhysVol->getLogVol() :
nullptr;
425 int childs = solenoidPhysVol->getNChildVols();
428 << solenoidPhysVol->getAbsoluteName() <<
" (" << childs <<
" childs) ." );
430 const GeoShape* solenoidShape = solenoidLogVol->getShape();
432 const GeoTubs* solenoidTubs =
dynamic_cast<const GeoTubs*
>(solenoidShape);
435 const GeoMaterial* solenoidMaterialGM = solenoidLogVol->getMaterial();
436 if (solenoidMaterialGM) {
442 if (solenoidBounds) {
449 dummyLayers, dummyVolumes,
460 if(
detStore()->contains<StoredPhysVol>(
"PRESAMPLER_B_POS"))
464 ATH_MSG_DEBUG(
"Unable to retrieve Stored PV PRESAMPLER_B_POS" );
468 GeoFullPhysVol* lArBarrelPresamplerPosPhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
472 if(
detStore()->contains<StoredPhysVol>(
"PRESAMPLER_B_NEG"))
476 ATH_MSG_DEBUG(
"Unable to retrieve Stored PV PRESAMPLER_B_NEG" );
480 GeoFullPhysVol* lArBarrelPresamplerNegPhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
483 const GeoLogVol* lArBarrelPresamplerPosLogVol = lArBarrelPresamplerPosPhysVol ? lArBarrelPresamplerPosPhysVol->getLogVol() :
nullptr;
484 const GeoLogVol* lArBarrelPresamplerNegLogVol = lArBarrelPresamplerNegPhysVol ? lArBarrelPresamplerNegPhysVol->getLogVol() :
nullptr;
487 if (lArBarrelPresamplerPosLogVol && lArBarrelPresamplerNegLogVol){
489 int poschilds = lArBarrelPresamplerPosPhysVol->getNChildVols();
490 int negchilds = lArBarrelPresamplerNegPhysVol->getNChildVols();
493 << lArBarrelPresamplerPosPhysVol->getAbsoluteName() <<
" (" << poschilds <<
" childs) ." );
495 << lArBarrelPresamplerNegPhysVol->getAbsoluteName() <<
" (" << negchilds <<
" childs) ." );
503 const GeoShape* lArBarrelPresamplerPosShape = lArBarrelPresamplerPosLogVol->getShape();
506 const GeoTubs* lArBarrelPresamplerPosTubs =
dynamic_cast<const GeoTubs*
>(lArBarrelPresamplerPosShape);
508 lArBarrelPresamplerPosTubs->getRMax(),
509 0.5*lArBarrelHalflength);
512 if (lArBarrelPresamplerPosBounds){
513 lArBarrelPresamplerNegBounds = lArBarrelPresamplerPosBounds->
clone();
515 << *lArBarrelPresamplerPosBounds );
517 if (lArBarrelPresamplerNegBounds){
519 << *lArBarrelPresamplerNegBounds );
527 std::vector<float> bpsteps{
float(lArBarrelPresamplerPosBounds->
innerRadius()),
532 std::vector<size_t> dummylay (1,0);
534 std::vector<Trk::IdentifiedMaterial> matBP;
537 matBP.emplace_back(lArBarrelPresamplerMaterial,baseID);
543 lArBarrelPresamplerPosBounds,
544 lArBarrelPresamplerMaterialBinPos,
546 "Calo::Detectors::LAr::BarrelPresamplerPos");
549 lArBarrelPresamplerNegBounds,
550 lArBarrelPresamplerMaterialBinNeg,
552 "Calo::Detectors::LAr::BarrelPresamplerNeg");
555 std::vector<Trk::TrackingVolume*> volsBP;
556 volsBP.push_back(lArBarrelPresamplerNeg);
557 volsBP.push_back(lArBarrelPresamplerPos);
561 "Calo::Container::LAr::BarrelPresampler");
566 if (solenoidBounds && lArBarrelPresamplerPosBounds) {
569 lArBarrelHalflength);
576 solenoidLArBarrelGapBounds,
578 dummyLayers, dummyVolumes,
579 "Calo::GapVolumes::LAr::SolenoidPresamplerGap");
584 ATH_MSG_DEBUG(
"============ Endcap Section ======================" );
619 std::unique_ptr<Trk::CylinderVolumeBounds> lArPositiveEndcapBounds;
620 std::unique_ptr<Trk::CylinderVolumeBounds> lArNegativeEndcapBounds;
622 if(
detStore()->contains<StoredPhysVol>(
"EMEC_POS"))
630 GeoFullPhysVol* lArPositiveEndcapPhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
632 const GeoLogVol* lArPositiveEndcapLogVol = lArPositiveEndcapPhysVol ? lArPositiveEndcapPhysVol->getLogVol() :
nullptr;
634 if(
detStore()->contains<StoredPhysVol>(
"EMEC_NEG"))
642 GeoFullPhysVol* lArNegativeEndcapPhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
644 const GeoLogVol* lArNegativeEndcapLogVol = lArNegativeEndcapPhysVol ? lArNegativeEndcapPhysVol->getLogVol() :
nullptr;
647 const GeoMaterial* lArPositiveEndcapMaterial =
nullptr;
650 std::vector<double> positiveEndcapZboundaries;
651 std::vector<double> negativeEndcapZboundaries;
653 double lArEndcapZpos = 0.;
656 if (lArPositiveEndcapLogVol && lArNegativeEndcapLogVol){
658 int poschilds = lArPositiveEndcapPhysVol->getNChildVols();
659 int negchilds = lArNegativeEndcapPhysVol->getNChildVols();
661 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArPositiveEndcapPhysVol->getAbsoluteName()
662 <<
" (" << poschilds <<
" childs)." );
663 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArNegativeEndcapPhysVol->getAbsoluteName()
664 <<
" (" << negchilds <<
" childs)." );
668 const GeoShape* lArPositiveEndcapShape = lArPositiveEndcapLogVol->getShape();
669 const GeoShape* lArNegativeEndcapShape = lArNegativeEndcapLogVol->getShape();
672 const Amg::Transform3D& lArPositiveEndcapTransform = lArPositiveEndcapPhysVol->getAbsoluteTransform();
674 Amg::Vector3D lArPositiveEndcapNomPosition = lArPositiveEndcapTransform.translation();
678 const GeoPcon* lArPositiveEndcapPcon =
dynamic_cast<const GeoPcon*
>(lArPositiveEndcapShape);
679 if (lArPositiveEndcapPcon)
680 lArPositiveEndcapBounds = std::unique_ptr<Trk::CylinderVolumeBounds>
682 positiveEndcapZboundaries));
684 const GeoPcon* lArNegativeEndcapPcon =
dynamic_cast<const GeoPcon*
>(lArNegativeEndcapShape);
685 if (lArNegativeEndcapPcon)
686 lArNegativeEndcapBounds = std::unique_ptr<Trk::CylinderVolumeBounds>
688 negativeEndcapZboundaries));
690 if (lArPositiveEndcapBounds)
691 ATH_MSG_DEBUG(
" -> Positive Endcap Bounds: " << *lArPositiveEndcapBounds );
692 if (lArNegativeEndcapBounds)
693 ATH_MSG_DEBUG(
" -> Negative Endcap Bounds: " << *lArNegativeEndcapBounds );
695 double positiveEndcapZpos = 0.5 *(positiveEndcapZboundaries[1] + positiveEndcapZboundaries[0]);
697 lArEndcapZpos = positiveEndcapZpos+lArPositiveEndcapNomPosition.z();
699 ATH_MSG_DEBUG(
" located at z-positions " << lArEndcapZpos <<
" / " << -lArEndcapZpos );
702 lArPositiveEndcapMaterial = lArPositiveEndcapLogVol->getMaterial();
707 double lArEndcapHalfZ = 0.;
708 double lArEndcapZmin = 0.;
709 double lArEndcapZmax = 0.;
710 double lArEndcapInnerRadius = 0;
711 double lArEndcapOuterRadius = 0;
714 if (lArPositiveEndcapBounds && lArNegativeEndcapBounds && lArPositiveEndcapMaterial){
720 gc.bin.insert(lArEndcapMaterial);
722 lArEndcapHalfZ = lArPositiveEndcapBounds->
halflengthZ();
723 lArEndcapZmin = lArEndcapZpos - lArPositiveEndcapBounds->
halflengthZ();
724 lArEndcapZmax = lArEndcapZpos + lArPositiveEndcapBounds->
halflengthZ();
725 lArEndcapInnerRadius = lArPositiveEndcapBounds->
innerRadius();
726 lArEndcapOuterRadius = lArPositiveEndcapBounds->
outerRadius();
739 std::vector<Trk::IdentifiedMaterial> matEID;
742 matEID.emplace_back(lArEndcapMaterial,0);
743 matEID.emplace_back(lArEndcapMaterial,baseID+1);
744 matEID.emplace_back(lArEndcapMaterial,baseID+2);
745 matEID.emplace_back(lArEndcapMaterial,baseID+3);
747 matEID.emplace_back(lArEndcapMaterial->
scale(1.05),baseID+1);
748 gc.bin.insert(matEID.back().first);
749 matEID.emplace_back(lArEndcapMaterial->
scale(1.1),baseID+1);
750 gc.bin.insert(matEID.back().first);
751 matEID.emplace_back(lArEndcapMaterial->
scale(1.15),baseID+1);
752 gc.bin.insert(matEID.back().first);
753 matEID.emplace_back(lArEndcapMaterial->
scale(1.2),baseID+1);
754 gc.bin.insert(matEID.back().first);
755 matEID.emplace_back(lArEndcapMaterial->
scale(1.25),baseID+1);
756 gc.bin.insert(matEID.back().first);
757 matEID.emplace_back(lArEndcapMaterial->
scale(1.3),baseID+1);
758 gc.bin.insert(matEID.back().first);
759 matEID.emplace_back(lArEndcapMaterial->
scale(1.35),baseID+1);
760 gc.bin.insert(matEID.back().first);
761 matEID.emplace_back(lArEndcapMaterial->
scale(1.4),baseID+1);
762 gc.bin.insert(matEID.back().first);
763 matEID.emplace_back(lArEndcapMaterial->
scale(1.05),baseID+2);
764 gc.bin.insert(matEID.back().first);
765 matEID.emplace_back(lArEndcapMaterial->
scale(1.1),baseID+2);
766 gc.bin.insert(matEID.back().first);
767 matEID.emplace_back(lArEndcapMaterial->
scale(1.15),baseID+2);
768 gc.bin.insert(matEID.back().first);
769 matEID.emplace_back(lArEndcapMaterial->
scale(1.2),baseID+2);
770 gc.bin.insert(matEID.back().first);
771 matEID.emplace_back(lArEndcapMaterial->
scale(1.25),baseID+2);
772 gc.bin.insert(matEID.back().first);
773 matEID.emplace_back(lArEndcapMaterial->
scale(1.3),baseID+2);
774 gc.bin.insert(matEID.back().first);
775 matEID.emplace_back(lArEndcapMaterial->
scale(1.35),baseID+2);
776 gc.bin.insert(matEID.back().first);
777 matEID.emplace_back(lArEndcapMaterial->
scale(1.4),baseID+2);
778 gc.bin.insert(matEID.back().first);
779 matEID.emplace_back(lArEndcapMaterial->
scale(1.45),baseID+2);
780 gc.bin.insert(matEID.back().first);
781 matEID.emplace_back(lArEndcapMaterial->
scale(0.7),baseID+3);
782 gc.bin.insert(matEID.back().first);
783 matEID.emplace_back(lArEndcapMaterial->
scale(0.75),baseID+3);
784 gc.bin.insert(matEID.back().first);
785 matEID.emplace_back(lArEndcapMaterial->
scale(0.8),baseID+3);
786 gc.bin.insert(matEID.back().first);
787 matEID.emplace_back(lArEndcapMaterial->
scale(0.85),baseID+3);
788 gc.bin.insert(matEID.back().first);
789 matEID.emplace_back(lArEndcapMaterial->
scale(0.9),baseID+3);
790 gc.bin.insert(matEID.back().first);
791 matEID.emplace_back(lArEndcapMaterial->
scale(0.95),baseID+3);
792 gc.bin.insert(matEID.back().first);
793 matEID.emplace_back(lArEndcapMaterial->
scale(1.05),baseID+3);
794 gc.bin.insert(matEID.back().first);
795 matEID.emplace_back(lArEndcapMaterial->
scale(1.1),baseID+3);
796 gc.bin.insert(matEID.back().first);
797 matEID.emplace_back(lArEndcapMaterial->
scale(1.15),baseID+3);
798 gc.bin.insert(matEID.back().first);
799 matEID.emplace_back(lArEndcapMaterial->
scale(1.2),baseID+3);
800 gc.bin.insert(matEID.back().first);
803 std::vector< Trk::BinUtility*> layEUP(bup->
bins());
805 std::vector<std::vector<size_t> > indexEP;
811 std::vector<float> offset2;
813 if (sd2) offset2 = sd2->
offset();
814 std::vector<float>offset3;
816 if (sd3) offset3 = sd3->
offset();
818 std::vector<float>
steps;
819 for (
unsigned int i=0;
i< bup->
bins();
i++) {
821 std::vector<size_t> indx; indx.clear();
822 steps.push_back( lArEndcapZmin);
825 if (
i<4) indx.push_back(1);
826 else if (
i<6) indx.push_back(4);
827 else if (
i<8) indx.push_back(5);
828 else if (
i<10) indx.push_back(6);
829 else if (
i<12) indx.push_back(7);
830 else if (
i<14) indx.push_back(8);
831 else if (
i<16) indx.push_back(9);
832 else if (
i<18) indx.push_back(10);
833 else if (
i<23) indx.push_back(11);
834 else indx.push_back(1);
836 float z2c = z2 + offset2[
i];
837 if (z2c!=
steps.back()) {
steps.push_back(z2c); indx.push_back(2);}
838 else { indx.back()=2; }
840 else if (
i<6) indx.back()=12;
841 else if (
i<8) indx.back()=13;
842 else if (
i<10) indx.back()=14;
843 else if (
i<12) indx.back()=15;
844 else if (
i<14) indx.back()=16;
845 else if (
i<16) indx.back()=17;
846 else if (
i<18) indx.back()=18;
847 else if (
i<21) indx.back()=19;
848 else if (
i<23) indx.back()=20;
849 else if (
i<25) indx.back()=14;
850 else if (
i<27) indx.back()=15;
851 else if (
i<29) indx.back()=16;
852 else if (
i<31) indx.back()=17;
853 else if (
i<33) indx.back()=18;
854 else if (
i<35) indx.back()=19;
855 else if (
i<37) indx.back()=20;
857 steps.push_back(z3 + offset3[
i] );
858 if (
i<6) indx.push_back(21);
859 else if (
i<8) indx.push_back(22);
860 else if (
i<10) indx.push_back(23);
861 else if (
i<12) indx.push_back(24);
862 else if (
i<14) indx.push_back(25);
863 else if (
i<16) indx.push_back(26);
864 else if (
i<18) indx.push_back(3);
865 else if (
i<20) indx.push_back(28);
866 else if (
i<23) indx.push_back(29);
867 else if (
i<25) indx.push_back(22);
868 else if (
i<27) indx.push_back(23);
869 else if (
i<29) indx.push_back(24);
870 else if (
i<31) indx.push_back(26);
871 else if (
i<33) indx.push_back(3);
872 else if (
i<35) indx.push_back(27);
873 else indx.push_back(28);
874 steps.push_back(lArEndcapZmax);
877 indexEP.push_back(indx);
881 std::vector< Trk::BinUtility*> layEUN(bun->
bins());
882 std::vector<std::vector<size_t> > indexEN;
883 for (
int j=indexEP.size()-1; j>-1; j--) {
884 std::vector<size_t> indx; indx.clear();
885 for (
int jj=indexEP[j].
size()-1; jj>-1; jj--) {
886 indx.push_back(indexEP[j][jj]);
888 indexEN.push_back(indx);
897 if (sd2) offset2 = sd2->
offset();
900 if (sd3) offset3 = sd3->
offset();
902 for (
unsigned int i=0;
i< bun->
bins();
i++) {
904 steps.push_back(-lArEndcapZmax);
905 steps.push_back(z3 + offset3[
i] );
906 steps.push_back(z2 + offset2[
i] );
907 if (z1!=
steps.back()) {
steps.push_back(z1); }
908 steps.push_back(-lArEndcapZmin);
917 lArPositiveEndcapBounds.release(),
918 lArEndcapMaterialBinnedPos,
921 "Calo::Detectors::LAr::PositiveEndcap");
924 lArNegativeEndcapBounds.release(),
925 lArEndcapMaterialBinnedNeg,
928 "Calo::Detectors::LAr::NegativeEndcap");
936 if(
detStore()->contains<StoredPhysVol>(
"PRESAMPLER_EC_POS"))
940 ATH_MSG_DEBUG(
"Unable to retrieve Stored PV PRESAMPLER_EC_POS" );
944 GeoFullPhysVol* lArECPresamplerPhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
947 const GeoLogVol* lArECPresamplerLogVol = lArECPresamplerPhysVol ? lArECPresamplerPhysVol->getLogVol() :
nullptr;
950 std::vector<Trk::IdentifiedMaterial> matECP;
958 matECP.emplace_back(mAl,0);
959 matECP.emplace_back(mAr,baseID);
961 if ( lArECPresamplerLogVol ) {
963 const GeoShape* lArECPresamplerShape = lArECPresamplerLogVol->getShape();
964 const Amg::Transform3D& lArECPresamplerTransform = lArECPresamplerPhysVol->getAbsoluteTransform();
967 const GeoTubs* psTubs =
dynamic_cast<const GeoTubs*
>(lArECPresamplerShape);
969 float d = psTubs->getZHalfLength();
973 float zec = lArECPresamplerTransform.translation().z()-ecd+
d;
982 std::vector<float> ecp;
983 ecp.push_back( zec-ecd);
984 ecp.push_back( zec+ecd-2*
d);
985 ecp.push_back( zec+ecd);
989 std::vector<size_t> iep{0,1};
997 lArECPresamplerBounds,
998 lArECPresamplerMaterialBinPos,
1000 "Calo::Detectors::LAr::PositiveECPresampler");
1003 std::vector<float> ecpn;
1004 ecpn.push_back(-zec-ecd);
1005 ecpn.push_back(-zec-ecd+2*
d);
1006 ecpn.push_back(-zec+ecd);
1010 std::vector<size_t> ien{1,0};
1016 lArECPresamplerBounds->
clone(),
1017 lArECPresamplerMaterialBinNeg,
1019 "Calo::Detectors::LAr::NegativeECPresampler");
1031 if(
detStore()->contains<StoredPhysVol>(
"HEC1_POS")){
1039 GeoFullPhysVol* lArPositiveHec1PhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
1041 if(
detStore()->contains<StoredPhysVol>(
"HEC2_POS")){
1049 GeoFullPhysVol* lArPositiveHec2PhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
1051 if(
detStore()->contains<StoredPhysVol>(
"HEC1_NEG")){
1059 GeoFullPhysVol* lArNegativeHec1PhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
1061 if(
detStore()->contains<StoredPhysVol>(
"HEC2_NEG")){
1070 GeoFullPhysVol* lArNegativeHec2PhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
1072 const GeoLogVol* lArPositiveHec1LogVol = lArPositiveHec1PhysVol ? lArPositiveHec1PhysVol->getLogVol() :
nullptr;
1073 const GeoLogVol* lArPositiveHec2LogVol = lArPositiveHec2PhysVol ? lArPositiveHec2PhysVol->getLogVol() :
nullptr;
1074 const GeoLogVol* lArNegativeHec1LogVol = lArNegativeHec1PhysVol ? lArNegativeHec1PhysVol->getLogVol() :
nullptr;
1075 const GeoLogVol* lArNegativeHec2LogVol = lArNegativeHec2PhysVol ? lArNegativeHec2PhysVol->getLogVol() :
nullptr;
1077 std::vector<double> positiveEndcapZboundariesHec1;
1078 std::vector<double> positiveEndcapZboundariesHec2;
1079 std::vector<double> negativeEndcapZboundariesHec1;
1080 std::vector<double> negativeEndcapZboundariesHec2;
1084 if (lArPositiveHec1LogVol && lArPositiveHec2LogVol && lArNegativeHec1LogVol && lArNegativeHec2LogVol){
1086 int poschildsHec1 = lArPositiveHec1PhysVol->getNChildVols();
1087 int poschildsHec2 = lArPositiveHec2PhysVol->getNChildVols();
1088 int negchildsHec1 = lArNegativeHec1PhysVol->getNChildVols();
1089 int negchildsHec2 = lArNegativeHec2PhysVol->getNChildVols();
1091 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArPositiveHec1PhysVol->getAbsoluteName()
1092 <<
" (" << poschildsHec1 <<
" childs) ." );
1093 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArNegativeHec2PhysVol->getAbsoluteName()
1094 <<
" (" << poschildsHec2 <<
" childs) ." );
1095 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArPositiveHec1PhysVol->getAbsoluteName()
1096 <<
" (" << negchildsHec1 <<
" childs) ." );
1097 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArNegativeHec2PhysVol->getAbsoluteName()
1098 <<
" (" << negchildsHec2 <<
" childs) ." );
1101 const GeoShape* lArPositiveHec1Shape = lArPositiveHec1LogVol->getShape();
1102 const GeoShape* lArPositiveHec2Shape = lArPositiveHec2LogVol->getShape();
1103 const GeoShape* lArNegativeHec1Shape = lArNegativeHec1LogVol->getShape();
1104 const GeoShape* lArNegativeHec2Shape = lArNegativeHec2LogVol->getShape();
1107 const Amg::Transform3D& lArPositiveHec1Transform = lArPositiveHec1PhysVol->getAbsoluteTransform();
1108 const Amg::Transform3D& lArPositiveHec2Transform = lArPositiveHec2PhysVol->getAbsoluteTransform();
1109 const Amg::Transform3D& lArNegativeHec1Transform = lArNegativeHec1PhysVol->getAbsoluteTransform();
1110 const Amg::Transform3D& lArNegativeHec2Transform = lArNegativeHec2PhysVol->getAbsoluteTransform();
1112 Amg::Vector3D lArPositiveHec1NomPosition = lArPositiveHec1Transform.translation();
1113 Amg::Vector3D lArPositiveHec2NomPosition = lArPositiveHec2Transform.translation();
1114 Amg::Vector3D lArNegativeHec1NomPosition = lArNegativeHec1Transform.translation();
1115 Amg::Vector3D lArNegativeHec2NomPosition = lArNegativeHec2Transform.translation();
1118 const GeoPcon* lArPositiveHec1Pcon =
dynamic_cast<const GeoPcon*
>(lArPositiveHec1Shape);
1120 positiveEndcapZboundariesHec1).release() :
nullptr;
1121 const GeoPcon* lArPositiveHec2Pcon =
dynamic_cast<const GeoPcon*
>(lArPositiveHec2Shape);
1123 positiveEndcapZboundariesHec2).release() :
nullptr;
1124 const GeoPcon* lArNegativeHec1Pcon =
dynamic_cast<const GeoPcon*
>(lArNegativeHec1Shape);
1126 negativeEndcapZboundariesHec1).release() :
nullptr;
1127 const GeoPcon* lArNegativeHec2Pcon =
dynamic_cast<const GeoPcon*
>(lArNegativeHec2Shape);
1129 negativeEndcapZboundariesHec2).release() :
nullptr;
1131 if (lArPositiveHec1Bounds)
1132 ATH_MSG_VERBOSE(
" -> Positive Hec1 Bounds: " << *lArPositiveHec1Bounds );
1133 if (lArPositiveHec2Bounds)
1134 ATH_MSG_VERBOSE(
" -> Positive Hec2 Bounds: " << *lArPositiveHec2Bounds );
1136 if (lArNegativeHec1Bounds)
1137 ATH_MSG_VERBOSE(
" -> Negative Hec1 Bounds: " << *lArNegativeHec1Bounds );
1138 if (lArNegativeHec2Bounds)
1139 ATH_MSG_VERBOSE(
" -> Negative Hec2 Bounds: " << *lArNegativeHec2Bounds );
1142 double positiveHec1Zpos = 0.5 *(positiveEndcapZboundariesHec1[1] + positiveEndcapZboundariesHec1[0]);
1143 double positiveHec2Zpos = 0.5 *(positiveEndcapZboundariesHec2[1] + positiveEndcapZboundariesHec2[0]);
1144 double negativeHec1Zpos = -fabs(0.5 *(negativeEndcapZboundariesHec1[1] + negativeEndcapZboundariesHec1[0]));
1145 double negativeHec2Zpos = -fabs(0.5 *(negativeEndcapZboundariesHec2[1] + negativeEndcapZboundariesHec2[0]));
1147 ATH_MSG_VERBOSE(
" Positive parts located at: " << positiveHec1Zpos + lArPositiveHec1NomPosition.z()
1148 <<
" / " << positiveHec2Zpos + lArPositiveHec2NomPosition.z() );
1150 ATH_MSG_VERBOSE(
" Negative parts located at: " << negativeHec1Zpos + lArNegativeHec1NomPosition.z()
1151 <<
" / " << negativeHec2Zpos + lArNegativeHec2NomPosition.z() );
1171 if(
detStore()->contains<StoredPhysVol>(
"FCAL1_POS"))
1179 GeoFullPhysVol* lArPositiveFcal1PhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
1181 if(
detStore()->contains<StoredPhysVol>(
"FCAL2_POS"))
1189 GeoFullPhysVol* lArPositiveFcal2PhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
1192 if(
detStore()->contains<StoredPhysVol>(
"FCAL3_POS"))
1200 GeoFullPhysVol* lArPositiveFcal3PhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
1202 if(
detStore()->contains<StoredPhysVol>(
"FCAL1_NEG"))
1210 GeoFullPhysVol* lArNegativeFcal1PhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
1212 if(
detStore()->contains<StoredPhysVol>(
"FCAL2_NEG"))
1220 GeoFullPhysVol* lArNegativeFcal2PhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
1222 if(
detStore()->contains<StoredPhysVol>(
"FCAL3_NEG"))
1230 GeoFullPhysVol* lArNegativeFcal3PhysVol = storedPV ? storedPV->
getPhysVol() :
nullptr;
1232 const GeoLogVol* lArPositiveFcal1LogVol = lArPositiveFcal1PhysVol ? lArPositiveFcal1PhysVol->getLogVol() :
nullptr;
1233 const GeoLogVol* lArPositiveFcal2LogVol = lArPositiveFcal2PhysVol ? lArPositiveFcal2PhysVol->getLogVol() :
nullptr;
1234 const GeoLogVol* lArPositiveFcal3LogVol = lArPositiveFcal3PhysVol ? lArPositiveFcal3PhysVol->getLogVol() :
nullptr;
1236 const GeoLogVol* lArNegativeFcal1LogVol = lArNegativeFcal1PhysVol ? lArNegativeFcal1PhysVol->getLogVol() :
nullptr;
1237 const GeoLogVol* lArNegativeFcal2LogVol = lArNegativeFcal2PhysVol ? lArNegativeFcal2PhysVol->getLogVol() :
nullptr;
1238 const GeoLogVol* lArNegativeFcal3LogVol = lArNegativeFcal3PhysVol ? lArNegativeFcal3PhysVol->getLogVol() :
nullptr;
1241 double lArFcalHalflength = 0.;
1242 double lArFcalZposition = 0.;
1243 double lArFcalZmin = 0.;
1244 double lArFcalZmax = 0.;
1247 if (lArPositiveFcal1LogVol &&
1248 lArPositiveFcal2LogVol &&
1249 lArPositiveFcal3LogVol &&
1250 lArNegativeFcal1LogVol &&
1251 lArNegativeFcal2LogVol &&
1252 lArNegativeFcal3LogVol){
1254 int poschildsFcal1 = lArPositiveFcal1PhysVol->getNChildVols();
1255 int poschildsFcal2 = lArPositiveFcal2PhysVol->getNChildVols();
1256 int poschildsFcal3 = lArPositiveFcal3PhysVol->getNChildVols();
1258 int negchildsFcal1 = lArNegativeFcal1PhysVol->getNChildVols();
1259 int negchildsFcal2 = lArNegativeFcal2PhysVol->getNChildVols();
1260 int negchildsFcal3 = lArNegativeFcal3PhysVol->getNChildVols();
1263 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArPositiveFcal1PhysVol->getAbsoluteName()
1264 <<
" (" << poschildsFcal1 <<
" childs) ." );
1265 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArPositiveFcal2PhysVol->getAbsoluteName()
1266 <<
" (" << poschildsFcal2 <<
" childs) ." );
1267 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArPositiveFcal3PhysVol->getAbsoluteName()
1268 <<
" (" << poschildsFcal3 <<
" childs) ." );
1270 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArNegativeFcal1PhysVol->getAbsoluteName()
1271 <<
" (" << negchildsFcal1 <<
" childs) ." );
1272 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArNegativeFcal2PhysVol->getAbsoluteName()
1273 <<
" (" << negchildsFcal2 <<
" childs) ." );
1274 ATH_MSG_VERBOSE(
" -> Retrieved GeoModel Volume " << lArNegativeFcal3PhysVol->getAbsoluteName()
1275 <<
" (" << negchildsFcal3 <<
" childs) ." );
1278 const GeoShape* lArPositiveFcal1Shape = lArPositiveFcal1LogVol->getShape();
1279 const GeoShape* lArPositiveFcal2Shape = lArPositiveFcal2LogVol->getShape();
1280 const GeoShape* lArPositiveFcal3Shape = lArPositiveFcal3LogVol->getShape();
1282 const GeoShape* lArNegativeFcal1Shape = lArNegativeFcal1LogVol->getShape();
1283 const GeoShape* lArNegativeFcal2Shape = lArNegativeFcal2LogVol->getShape();
1284 const GeoShape* lArNegativeFcal3Shape = lArNegativeFcal3LogVol->getShape();
1288 const Amg::Transform3D& lArPositiveFcal1Transform = lArPositiveFcal1PhysVol->getAbsoluteTransform();
1289 const Amg::Transform3D& lArPositiveFcal2Transform = lArPositiveFcal2PhysVol->getAbsoluteTransform();
1290 const Amg::Transform3D& lArPositiveFcal3Transform = lArPositiveFcal3PhysVol->getAbsoluteTransform();
1292 const Amg::Transform3D& lArNegativeFcal1Transform = lArNegativeFcal1PhysVol->getAbsoluteTransform();
1293 const Amg::Transform3D& lArNegativeFcal2Transform = lArNegativeFcal2PhysVol->getAbsoluteTransform();
1294 const Amg::Transform3D& lArNegativeFcal3Transform = lArNegativeFcal3PhysVol->getAbsoluteTransform();
1296 Amg::Vector3D lArPositiveFcal1NomPosition = lArPositiveFcal1Transform.translation();
1297 Amg::Vector3D lArPositiveFcal2NomPosition = lArPositiveFcal2Transform.translation();
1298 Amg::Vector3D lArPositiveFcal3NomPosition = lArPositiveFcal3Transform.translation();
1300 Amg::Vector3D lArNegativeFcal1NomPosition = lArNegativeFcal1Transform.translation();
1301 Amg::Vector3D lArNegativeFcal2NomPosition = lArNegativeFcal2Transform.translation();
1302 Amg::Vector3D lArNegativeFcal3NomPosition = lArNegativeFcal3Transform.translation();
1305 const GeoTubs* lArPositiveFcal1Tubs =
dynamic_cast<const GeoTubs*
>(lArPositiveFcal1Shape);
1307 const GeoTubs* lArPositiveFcal2Tubs =
dynamic_cast<const GeoTubs*
>(lArPositiveFcal2Shape);
1309 const GeoTubs* lArPositiveFcal3Tubs =
dynamic_cast<const GeoTubs*
>(lArPositiveFcal3Shape);
1312 const GeoTubs* lArNegativeFcal1Tubs =
dynamic_cast<const GeoTubs*
>(lArNegativeFcal1Shape);
1314 const GeoTubs* lArNegativeFcal2Tubs =
dynamic_cast<const GeoTubs*
>(lArNegativeFcal2Shape);
1316 const GeoTubs* lArNegativeFcal3Tubs =
dynamic_cast<const GeoTubs*
>(lArNegativeFcal3Shape);
1319 if (lArPositiveFcal1Bounds)
1320 ATH_MSG_VERBOSE(
" -> Positive Fcal1 Bounds: " << *lArPositiveFcal1Bounds );
1321 if (lArPositiveFcal2Bounds)
1322 ATH_MSG_VERBOSE(
" -> Positive Fcal2 Bounds: " << *lArPositiveFcal2Bounds );
1323 if (lArPositiveFcal3Bounds)
1324 ATH_MSG_VERBOSE(
" -> Positive Fcal3 Bounds: " << *lArPositiveFcal3Bounds );
1327 if (lArNegativeFcal1Bounds)
1328 ATH_MSG_VERBOSE(
" -> Negative Fcal1 Bounds: " << *lArNegativeFcal1Bounds );
1329 if (lArNegativeFcal2Bounds)
1330 ATH_MSG_VERBOSE(
" -> Negative Fcal2 Bounds: " << *lArNegativeFcal2Bounds );
1331 if (lArNegativeFcal3Bounds)
1332 ATH_MSG_VERBOSE(
" -> Negative Fcal3 Bounds: " << *lArNegativeFcal3Bounds );
1335 ATH_MSG_VERBOSE(
" Positive parts located at: " << lArPositiveFcal1NomPosition.z()
1336 <<
" / " << lArPositiveFcal2NomPosition.z() <<
" / " << lArPositiveFcal3NomPosition.z() );
1338 ATH_MSG_VERBOSE(
" Negative parts located at: " << lArNegativeFcal1NomPosition.z()
1339 <<
" / " << lArNegativeFcal2NomPosition.z() <<
" / " << lArNegativeFcal3NomPosition.z() );
1344 lArFcalHalflength = lArPositiveFcal3NomPosition.z() + lArPositiveFcal3Bounds->
halflengthZ()
1345 - lArPositiveFcal1NomPosition.z() + lArNegativeFcal1Bounds->
halflengthZ();
1347 lArFcalHalflength *= 0.5;
1351 lArFcalZposition = lArPositiveFcal3NomPosition.z() + lArPositiveFcal3Bounds->
halflengthZ();
1352 lArFcalZposition += lArPositiveFcal1NomPosition.z() - lArNegativeFcal1Bounds->
halflengthZ();
1353 lArFcalZposition *= 0.5;
1361 double lArHecZmax = lArFcalZposition - lArFcalHalflength;
1362 double lArHecZmin = 0;
1363 if (lArPositiveEndcap && lArEndcapHalfZ != 0)
1364 lArHecZmin = lArPositiveEndcap->
center().z() + lArEndcapHalfZ;
1369 double caloSurfZOffset = 0;
1373 double z, rmin, rmax, hphi,
depth;
1376 caloSurfZOffset = lArHecZmin -
z;
1377 lArHecZmax =
z +
depth + caloSurfZOffset;
1379 hecEnd =
z +
depth + caloSurfZOffset;
1383 double lArHecZpos = 0.5*(lArHecZmax + lArHecZmin);
1384 double lArHecHalflength = 0.5*(lArHecZmax - lArHecZmin);
1386 double hecFcalCoverHalflength = 0.5*(hecEnd - lArHecZmax);
1387 double hecFcalCoverZpos = 0.5*(lArHecZmax + hecEnd);
1389 lArFcalHalflength = hecFcalCoverHalflength;
1390 lArFcalZposition = hecFcalCoverZpos;
1393 std::vector<Trk::IdentifiedMaterial> matHEC;
1398 gc.bin.insert(lArHecFcalCoverMaterial);
1399 gc.bin.insert(lArHecMaterial);
1404 gc.bin.insert(matHEC.back().first);
1406 gc.bin.insert(matHEC.back().first);
1408 gc.bin.insert(matHEC.back().first);
1410 gc.bin.insert(matHEC.back().first);
1412 gc.bin.insert(matHEC.back().first);
1416 if (lArPositiveFcal1Bounds && lArNegativeFcal1Bounds){
1418 delete lArPositiveHec1Bounds; lArPositiveHec1Bounds =
nullptr;
1419 delete lArPositiveHec2Bounds; lArPositiveHec2Bounds =
nullptr;
1420 delete lArNegativeHec1Bounds; lArNegativeHec1Bounds =
nullptr;
1421 delete lArNegativeHec2Bounds; lArNegativeHec2Bounds =
nullptr;
1425 lArEndcapOuterRadius,
1426 hecFcalCoverHalflength);
1428 lArNegativeHecFcalCoverBounds = lArPositiveHecFcalCoverBounds->
clone();
1430 ATH_MSG_DEBUG(
"Smoothed LAr Hec (Fcal covering part) bounds : " << *lArPositiveHecFcalCoverBounds );
1431 ATH_MSG_DEBUG(
" -> at z-position: +/- " << hecFcalCoverZpos );
1434 Amg::Vector3D lArPositiveHecFcalCoverPos(0.,0.,hecFcalCoverZpos);
1435 Amg::Vector3D lArPositiveHecFcalCoverNeg(0.,0.,-hecFcalCoverZpos);
1443 std::vector<float> spCover;
1444 spCover.push_back(hecFcalCoverZpos-hecFcalCoverHalflength);
1448 spCover.push_back(hecFcalCoverZpos+hecFcalCoverHalflength);
1452 std::vector<size_t> hfc{0,2,3,4};
1458 lArPositiveHecFcalCoverBounds,
1459 lArHecFcalCoverMaterialBinPos,
1462 "Calo::Detectors::LAr::PositiveHecFcalCover");
1464 std::vector<float> snCover;
1465 snCover.push_back(-hecFcalCoverZpos-hecFcalCoverHalflength);
1469 snCover.push_back(-hecFcalCoverZpos+hecFcalCoverHalflength);
1473 std::vector<size_t> hfcn{4,3,2,0};
1479 lArNegativeHecFcalCoverBounds,
1480 lArHecFcalCoverMaterialBinNeg,
1483 "Calo::Detectors::LAr::NegativeHecFcalCover");
1488 if (lArPositiveFcal1Bounds && lArEndcapOuterRadius != 0){
1492 double lArHecRmin = 0.5*(lArPositiveFcal1Bounds->
outerRadius()+lArEndcapInnerRadius);
1493 double lArHecRmax = lArEndcapOuterRadius;
1497 lArNegativeHecBounds = lArPositiveHecBounds->
clone();
1499 ATH_MSG_DEBUG(
"Smoothed LAr Hec bounds : " << *lArPositiveHecBounds );
1512 std::vector<float> sphec;
1513 sphec.push_back(lArHecZpos-lArHecHalflength);
1515 sphec.push_back(lArHecZpos+lArHecHalflength);
1519 std::vector<size_t> hf{0,1};
1525 lArPositiveHecBounds,
1526 lArHecMaterialBinPos,
1529 "Calo::Detectors::LAr::PositiveHec");
1532 std::vector<float> snhec;
1533 snhec.push_back(-lArHecZpos-lArHecHalflength);
1535 snhec.push_back(-lArHecZpos+lArHecHalflength);
1539 std::vector<size_t>
hfn{1,0};
1545 lArNegativeHecBounds,
1546 lArHecMaterialBinNeg,
1549 "Calo::Detectors::LAr::NegativeHec");
1554 std::vector<Trk::IdentifiedMaterial> matFCAL;
1558 gc.bin.insert(lArFcalMaterial);
1559 gc.bin.insert(lArFcalMaterial0);
1563 matFCAL.emplace_back(lArFcalMaterial0,0);
1564 matFCAL.emplace_back(lArFcalMaterial->
scale(0.5),baseID+1);
1565 gc.bin.insert(matFCAL.back().first);
1566 matFCAL.emplace_back(lArFcalMaterial->
scale(1.5),baseID+2);
1567 gc.bin.insert(matFCAL.back().first);
1568 matFCAL.emplace_back(lArFcalMaterial->
scale(1.4),baseID+3);
1569 gc.bin.insert(matFCAL.back().first);
1572 if (lArPositiveFcal1Bounds && lArPositiveFcal2Bounds && lArPositiveFcal3Bounds &&
1573 lArNegativeFcal1Bounds && lArNegativeFcal2Bounds && lArNegativeFcal3Bounds){
1576 double lArFcalRmin = lArPositiveFcal1Bounds->
innerRadius();
1577 double lArFcalRmax = lArPositiveFcal1Bounds->
outerRadius();
1580 lArNegativeFcalBounds = lArPositiveFcalBounds->
clone();
1582 ATH_MSG_DEBUG(
"Smoothed LAr Fcal bounds : " << *lArPositiveFcalBounds );
1583 ATH_MSG_DEBUG(
" -> at z-position: +/- " << lArFcalZposition );
1586 lArFcalZmin = lArFcalZposition - lArFcalHalflength;
1587 lArFcalZmax = lArFcalZposition + lArFcalHalflength;
1590 delete lArPositiveFcal1Bounds; lArPositiveFcal1Bounds =
nullptr;
1591 delete lArPositiveFcal2Bounds; lArPositiveFcal2Bounds =
nullptr;
1592 delete lArPositiveFcal3Bounds; lArPositiveFcal3Bounds =
nullptr;
1594 delete lArNegativeFcal1Bounds; lArNegativeFcal1Bounds =
nullptr;
1595 delete lArNegativeFcal2Bounds; lArNegativeFcal2Bounds =
nullptr;
1596 delete lArNegativeFcal3Bounds; lArNegativeFcal3Bounds =
nullptr;
1599 std::vector<float> spfc;
1600 spfc.push_back(lArFcalZmin);
1604 spfc.push_back(lArFcalZmax);
1608 std::vector<size_t> hf{0,1,2,3};
1614 std::vector<float> snfc;
1615 snfc.push_back(-lArFcalZmax);
1619 snfc.push_back(-lArFcalZmin);
1623 std::vector<size_t>
hfn{3,2,1,0};
1638 lArPositiveFcalBounds,
1639 lArFcalMaterialBinPos,
1642 "Calo::Detectors::LAr::PositiveFcal");
1645 lArNegativeFcalBounds,
1646 lArFcalMaterialBinNeg,
1649 "Calo::Detectors::LAr::NegativeFcal");
1656 const PVConstLink topEC = lArMgr->
getTreeTop(1U);
1659 const PVConstLink
mbts=
getChild(topEC,
"MBTS_mother",trIn);
1668 if (mbts1) mbtsZ=fabs(trIn.translation().z());
1672 const GeoLogVol* clv = mbts1->getLogVol();
1673 const GeoTrd* trd=
dynamic_cast<const GeoTrd*
> (clv->getShape());
1674 if (trd) mbts_rmin = trIn.translation().perp()-trd->getZHalfLength();
1679 const GeoLogVol* clv = mbts2->getLogVol();
1680 const GeoTrd* trd=
dynamic_cast<const GeoTrd*
> (clv->getShape());
1681 if (trd) mbts_rmax = (tr2.translation().perp()+trd->getZHalfLength())/
cos(acos(-1.)/8);
1689 if (mbtsZ>0. && mbts_rmin>0. && mbts_rmax>0.){
1696 ATH_MSG_DEBUG(
"Filled in LAr MBTS bounds : " << *lArNegativeMBTSBounds );
1707 lArNegativeMBTSBounds->
clone(),
1709 dummyLayers, dummyVolumes,
1710 "Calo::Detectors::MBTS");
1713 lArNegativeMBTSBounds,
1715 dummyLayers, dummyVolumes,
1716 "Calo::Detectors::MBTS");
1720 ATH_MSG_DEBUG(
"Checking the existence of all Tracking Volumes:" );
1723 ATH_MSG_DEBUG(
" -> Calo::GapVolumes::LAr::SolenoidPresamplerGap ");
1725 ATH_MSG_DEBUG(
" -> Calo::Detectors::LAr::BarrelPresampler ");
1729 if (lArPositiveEndcapInnerGap) {
1730 ATH_MSG_DEBUG(
" -> Calo::GapVolumes::LAr::PositiveEndcapInnerGap ");
1733 ATH_MSG_DEBUG(
" -> Calo::Detectors::LAr::PositiveEndcap ");
1739 ATH_MSG_DEBUG(
" -> Calo::Detectors::LAr::LArPositiveHecFcalCover ");
1741 if (lArNegativeEndcapInnerGap) {
1742 ATH_MSG_DEBUG(
" -> Calo::GapVolumes::LAr::NegativeEndcapInnerGap ");
1745 ATH_MSG_DEBUG(
" -> Calo::Detectors::LAr::NegativeEndcap ");
1751 ATH_MSG_DEBUG(
" -> Calo::Detectors::LAr::LArNegativeHecFcalCover ");
1753 ATH_MSG_DEBUG(
" -> Calo::Detectors::LAr::LArPositiveECPresampler ");
1755 ATH_MSG_DEBUG(
" -> Calo::Detectors::LAr::LArNegativeECPresampler ");
1760 if (solenoid && solenoidLArBarrelGap && lArBarrelPresampler && lArBarrel &&
1761 lArPositiveEndcap && lArPositiveHec && lArPositiveFcal && lArPositiveHecFcalCover &&
1762 lArNegativeEndcap && lArNegativeHec && lArNegativeFcal && lArNegativeHecFcalCover){
1767 lArTrackingVolumes->push_back(solenoid);
1769 lArTrackingVolumes->push_back(solenoidLArBarrelGap);
1771 lArTrackingVolumes->push_back(lArBarrelPresampler);
1773 lArTrackingVolumes->push_back(lArBarrel);
1776 lArTrackingVolumes->push_back(lArPositiveEndcapInnerGap);
1777 lArTrackingVolumes->push_back(lArPositiveEndcap);
1779 lArTrackingVolumes->push_back(lArPositiveHec);
1781 lArTrackingVolumes->push_back(lArPositiveFcal);
1783 lArTrackingVolumes->push_back(lArPositiveHecFcalCover);
1786 lArTrackingVolumes->push_back(lArNegativeEndcapInnerGap);
1787 lArTrackingVolumes->push_back(lArNegativeEndcap);
1789 lArTrackingVolumes->push_back(lArNegativeHec);
1791 lArTrackingVolumes->push_back(lArNegativeFcal);
1793 lArTrackingVolumes->push_back(lArNegativeHecFcalCover);
1795 lArTrackingVolumes->push_back(lArPosECPresampler);
1797 lArTrackingVolumes->push_back(lArNegECPresampler);
1801 return lArTrackingVolumes;