TrackingVolumeBuilder interface method - returns vector of Volumes.
133 std::vector<Trk::TrackingVolume*>* tileTrackingVolumes =
new std::vector<Trk::TrackingVolume*>;
144 double plug1Z = 3405.;
145 double plug2Z = 3512.075;
146 double plug1R = 3440.;
147 double plug2R = 2959.;
148 double plug1hZ = 154.5;
149 double plug2hZ = 47.425;
166 std::unique_ptr<Trk::CylinderVolumeBounds> tileBarrelGirderBounds;
177 std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>> entrySurf =
179 std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>> exitSurf =
183 auto barrelProperties = std::make_unique<Trk::Material>(22.7, 212., 45.8, 21.4, 0.0062);
184 auto extendedBarrelProperties = std::make_unique<Trk::Material>(22.7, 210., 45.8, 21.4, 0.0062);
194 ATH_MSG_DEBUG(
"Retrieved " << numTreeTops <<
" tree tops from the TileDetDescrManager. " );
197 std::vector<Trk::IdentifiedMaterial> matTB;
199 matTB.emplace_back(barrelProperties.get(),0);
200 matTB.emplace_back(barrelProperties.get(),baseID);
201 matTB.emplace_back(barrelProperties.get(),baseID+1);
202 matTB.emplace_back(barrelProperties.get(),baseID+2);
205 std::vector<size_t> ltb{0,1,2,3};
208 std::vector<Trk::IdentifiedMaterial> matETB;
210 matETB.emplace_back(extendedBarrelProperties.get(),0);
211 matETB.emplace_back(extendedBarrelProperties.get(),baseID);
212 matETB.emplace_back(extendedBarrelProperties.get(),baseID+1);
213 matETB.emplace_back(extendedBarrelProperties.get(),baseID+2);
217 Trk::Material barrelFingerGapProperties(353., 2254., 20.7, 10., 0.00057);
220 Trk::Material fingerGapProperties(552., 3925., 16.4, 8.1, 0.00034);
222 for (
unsigned int itreetop = 0; itreetop<numTreeTops; ++itreetop){
232 const GeoLogVol* currentLogVol = currentVPhysVolLink->getLogVol();
234 unsigned int currentChilds = currentVPhysVolLink->getNChildVols();
236 ATH_MSG_DEBUG(
"Processing " << currentLogVol->getName() <<
"... has "
237 << currentChilds <<
" childs." );
238 const GeoShape* currentShape = currentLogVol->getShape();
240 std::vector<double> zboundaries;
244 for (
unsigned int ichild = 0; ichild < currentChilds; ++ichild){
246 PVConstLink currentChildLink = currentVPhysVolLink->getChildVol(ichild);
248 const GeoLogVol* childLogVol = currentChildLink->getLogVol();
249 const GeoShape* childShape = childLogVol->getShape();
250 ATH_MSG_VERBOSE(
" Child: " << childLogVol->getName() <<
" has shape " << childShape->type() );
252 const GeoTubs* currentTubs =
dynamic_cast<const GeoTubs*
>(childShape);
256 double childZposition = childTransform.translation().z();
258 if (childCylVolBounds){
261 ATH_MSG_VERBOSE(
" ---> Position in z: " << childTransform.translation().z() );
272 if ( fabs(childZposition)< 100.*
mm ){
277 tileBarrelGirderBounds = make_unique<Trk::CylinderVolumeBounds>(
depth,childCylVolBounds->
outerRadius(),childCylVolBounds->
halflengthZ());
282 std::vector<float>
steps;
294 barrelMaterialBinned,
296 "Calo::Detectors::Tile::Barrel");
302 std::string volumeName;
303 std::string girderName;
304 std::vector<double> girderLayerRadius;
305 std::vector<double> layerRadius;
306 std::vector<double> layerEnvelope;
308 bool tileExtendedBoundsUsed =
false;
309 std::unique_ptr<Trk::CylinderVolumeBounds> gapVolBounds;
313 volumeName = childZposition > 0. ?
314 "Calo::Detectors::Tile::PositiveExtendedBarrel" :
"Calo::Detectors::Tile::NegativeExtendedBarrel";
319 }
else if (childCylVolBounds->
halflengthZ() > 100.){
323 }
else if ( childLogVol->getName()==
"Gap" && !gapBounds ) {
325 gapVolBounds = make_unique<Trk::CylinderVolumeBounds>(childCylVolBounds->
innerRadius(),childCylVolBounds->
outerRadius(),
328 gapZ = fabs(childZposition);
346 std::vector<float>
steps;
354 extendedMaterialBinned =
new Trk::BinnedMaterial(extendedBarrelProperties.get(),eBU,ltb,matETB);
359 extendedMaterialBinned,
362 tileExtendedBoundsUsed =
true;
365 if ( gapVolBounds ) {
366 gapBounds = gapVolBounds.release();
368 }
else if (tileExtendedBounds) {
371 std::vector<float>
steps;
379 extendedMaterialBinned =
new Trk::BinnedMaterial(extendedBarrelProperties.get(),eBU,ltb,matETB);
384 extendedMaterialBinned,
387 tileExtendedBoundsUsed =
true;
392 if (childZposition > 0.) {
393 tilePositiveExtendedBarrel = tileExtendedTrackingVolume;
394 tilePositiveExtendedBarrelBounds = *tileExtendedBounds;
397 tileNegativeExtendedBarrel = tileExtendedTrackingVolume;
399 }
else if (childCylVolBounds->
halflengthZ() > 100.) {
400 tileZ = fabs(childZposition)+childCylVolBounds->
halflengthZ();
402 if (!tileExtendedBoundsUsed)
403 delete tileExtendedBounds;
407 delete childCylVolBounds;
411 if (!gapBounds) std::abort();
412 if (!tileBarrelGirderBounds) std::abort();
413 if (!tilePositiveExtendedBarrel) std::abort();
414 if (!tileNegativeExtendedBarrel) std::abort();
416 ATH_MSG_DEBUG(
"TileDetDescrManager parsed successfully! " );
420 auto tileGirderBounds = std::make_unique<Trk::CylinderVolumeBounds>
426 tileGirderBounds.release(),
428 dummyLayers, dummyVolumes,
429 "Calo::Girder::TileCombined");
433 double tileExtZ = tilePositiveExtendedBarrel->
center().z()-tilePositiveExtendedBarrelBounds.
halflengthZ();
436 std::vector<Trk::IdentifiedMaterial> matITC;
439 matITC.emplace_back(barrelProperties.get(),baseID+15);
440 matITC.emplace_back(barrelProperties.get(),baseID+16);
441 matITC.emplace_back(barrelProperties.get(),baseID+17);
444 double p1Z = 0.5*(plug1Z-plug1hZ+tileExtZ);
445 double hp1Z = 0.5*(tileExtZ-plug1Z+plug1hZ);
456 std::vector<size_t> dummylay(1,1);
469 "Calo::Detectors::Tile::ITCPlug1Pos");
472 itcPlug1Bounds->
clone(),
475 "Calo::Detectors::Tile::ITCPlug1Neg");
480 double p2Z = 0.5*(plug2Z-plug2hZ+tileExtZ);
481 double hp2Z = 0.5*(tileExtZ-plug2Z+plug2hZ);
491 std::vector<size_t> p2lay(1,0);
492 std::vector<float> p2steps{
float(plug2R),
float(plug1R)};
502 "Calo::Detectors::Tile::ITCPlug2Pos");
505 itcPlug2Bounds->
clone(),
508 "Calo::Detectors::Tile::ITCPlug2Neg");
513 float gapi = 0.5*(gapZ-gapBounds->
halflengthZ()+tileExtZ);
514 double hgZ = 0.5*(tileExtZ-gapZ+gapBounds->
halflengthZ());
525 std::vector<size_t> glay(1,2);
534 "Calo::Detectors::Tile::GapPos");
544 "Calo::Detectors::Tile::GapNeg");
550 float zgBuff = 0.5*(p1i+
gi);
551 float hgBuff = 0.5*(
gi-p1i);
565 dummyLayers, dummyVolumes,
566 "Calo::GapVolumes::Tile::GapBufferPos");
570 gapBuffBounds->
clone(),
572 dummyLayers, dummyVolumes,
573 "Calo::GapVolumes::Tile::GapBufferNeg");
577 std::vector<Trk::TrackingVolume*> volsPosGap;
578 volsPosGap.push_back(gBufferPos);
579 volsPosGap.push_back(gapPos);
583 "Calo::Container::PositiveGap");
587 std::vector<Trk::TrackingVolume*> volsNegGap;
588 volsNegGap.push_back(gapNeg);
589 volsNegGap.push_back(gBufferNeg);
593 "Calo::Container::NegativeGap");
597 float z2Buff = 0.5*(p1i+p2i);
598 float h2Buff = 0.5*(p2i-p1i);
612 dummyLayers, dummyVolumes,
613 "Calo::GapVolumes::Tile::Plug2BufferPos");
617 p2BuffBounds->
clone(),
619 dummyLayers, dummyVolumes,
620 "Calo::GapVolumes::Tile::Plug2BufferNeg");
624 std::vector<Trk::TrackingVolume*> volsPosP2;
625 volsPosP2.push_back(p2BufferPos);
626 volsPosP2.push_back(itcPlug2Pos);
630 "Calo::Container::PositiveP2");
634 std::vector<Trk::TrackingVolume*> volsNegP2;
635 volsNegP2.push_back(itcPlug2Neg);
636 volsNegP2.push_back(p2BufferNeg);
640 "Calo::Container::NegativeP2");
645 if (positiveGapSector && positiveP2Sector) {
646 std::vector<Trk::TrackingVolume*> volsITCPos;
647 volsITCPos.push_back(positiveGapSector);
648 volsITCPos.push_back(positiveP2Sector);
649 volsITCPos.push_back(itcPlug1Pos);
653 "Calo::Container::ITCPos");
656 if (negativeGapSector && negativeP2Sector) {
657 std::vector<Trk::TrackingVolume*> volsITCNeg;
658 volsITCNeg.push_back(negativeGapSector);
659 volsITCNeg.push_back(negativeP2Sector);
660 volsITCNeg.push_back(itcPlug1Neg);
664 "Calo::Container::ITCNeg");
675 double zFG = 0.5*(tileBarrelBounds->
halflengthZ()+p1i);
676 double hZ = 0.5*(p1i-tileBarrelBounds->
halflengthZ());
685 tileBarrelFingerGapBounds,
686 barrelFingerGapProperties,
687 dummyLayers, dummyVolumes,
688 "Calo::GapVolumes::Tile::BarrelPositiveFingerGap");
691 tileBarrelFingerGapBounds->
clone(),
692 barrelFingerGapProperties,
693 dummyLayers, dummyVolumes,
694 "Calo::GapVolumes::Tile::BarrelNegativeFingerGap");
699 double zBE = tilePositiveExtendedBarrel->
center().z()+tilePositiveExtendedBarrelBounds.
halflengthZ();
700 zFG = 0.5*(tileZ + zBE);
701 hZ = 0.5*(tileZ - zBE);
714 tilePositiveFingerGapBounds,
716 dummyLayers, dummyVolumes,
717 "Calo::GapVolumes::Tile::PositiveFingerGap");
720 tilePositiveFingerGapBounds->
clone(),
722 dummyLayers, dummyVolumes,
723 "Calo::GapVolumes::Tile::NegativeFingerGap");
744 std::vector<Trk::TrackingVolume*> tileVols;
745 tileVols.push_back(tileNegativeFingerGap);
746 tileVols.push_back(tileNegativeExtendedBarrel);
747 tileVols.push_back(negativeITCSector);
748 tileVols.push_back(tileBarrelNegativeFingerGap);
749 tileVols.push_back(tileBarrel);
750 tileVols.push_back(tileBarrelPositiveFingerGap);
751 tileVols.push_back(positiveITCSector);
752 tileVols.push_back(tilePositiveExtendedBarrel);
753 tileVols.push_back(tilePositiveFingerGap);
757 "Calo::Container::Tile::InnerSector");
760 std::vector<Trk::TrackingVolume*> tileVolumes;
761 tileVolumes.push_back(tileCombinedSector);
762 tileVolumes.push_back(tileGirder);
766 "Calo::Container::Tile::Combined");
770 tileTrackingVolumes->push_back(
tile);
771 tileTrackingVolumes->push_back(tilePositiveExtendedBarrel);
774 ATH_MSG_DEBUG(
"Checking the existence of all Tracking Volumes:" );
796 return tileTrackingVolumes;