ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::MuonTrackingGeometryBuilder Class Referencefinal

The Muon::MuonTrackingGeometryBuilder retrieves MuonStationBuilder and MuonInertMaterialBuilder for the Muon Detector sub detectors and combines the given Volumes to a full Trk::TrackingGeometry. More...

#include <MuonTrackingGeometryBuilder.h>

Inheritance diagram for Muon::MuonTrackingGeometryBuilder:
Collaboration diagram for Muon::MuonTrackingGeometryBuilder:

Public Types

using DetachedVolPtr = std::unique_ptr<Trk::DetachedTrackingVolume>
 TrackingGeometry Interface method.
using DetachedVolVec = std::vector<DetachedVolPtr>
using VolumeSpanPtr = std::shared_ptr<const Trk::VolumeSpan>
using DetachedVolSpanPair = std::pair<Trk::DetachedTrackingVolume*, VolumeSpanPtr>
using VolumeSpanArray = std::array<std::vector<DetachedVolSpanPair>, 9>
using TrackingVolumePtr = std::unique_ptr<Trk::TrackingVolume>
using SharedTrackingVolume = std::shared_ptr<Trk::TrackingVolume>
using TrackingVolumeVec = std::vector<TrackingVolumePtr>

Public Member Functions

 MuonTrackingGeometryBuilder (const std::string &, const std::string &, const IInterface *)
 Constructor.
virtual ~MuonTrackingGeometryBuilder ()=default
 Destructor.
virtual StatusCode initialize () override
 AlgTool initailize method.
virtual std::unique_ptr< Trk::TrackingGeometrytrackingGeometry (Trk::TrackingVolume *tvol=0) const override
 TrackingGeometry Interface method.
virtual Trk::GeometrySignature geometrySignature () const override
 The unique signature.
std::unique_ptr< Trk::TrackingGeometrytrackingGeometryImpl (DetachedVolVec &&stations, DetachedVolVec &&inertObjs, Trk::TrackingVolume *tvol) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
 DeclareInterfaceID (IGeometryBuilder, 1, 0)
 Creates the InterfaceID and interfaceID() method.

Static Public Member Functions

static Trk::GeometrySignature signature ()
 The unique signature.

Protected Member Functions

VolumeSpanArray findVolumesSpan (const DetachedVolVec &objs, double zTol, double phiTol, const LocalVariablesContainer &aLVC) const
 Private method to filter detached volumes in z span.
TrackingVolumePtr processVolume (const Trk::Volume &, int, int, const std::string &, LocalVariablesContainer &aLVC, bool hasStations) const
 Private methods to define subvolumes and fill them with detached volumes.
TrackingVolumePtr processVolume (const Trk::Volume &, int, const std::string &, LocalVariablesContainer &aLVC, bool hasStations) const
TrackingVolumePtr processShield (const Trk::Volume &, int, const std::string &, LocalVariablesContainer &aLVC, bool hasStations) const
std::vector< Trk::DetachedTrackingVolume * > getDetachedObjects (const Trk::Volume &trkVol, std::vector< Trk::DetachedTrackingVolume * > &, LocalVariablesContainer &aLVC, int mode=0) const
 Private method to find detached volumes.
bool enclosed (const Trk::Volume &volume, const Trk::VolumeSpan &span, LocalVariablesContainer &aLVC) const
 Private method to check if constituent enclosed.
void getZParts (LocalVariablesContainer &aLVC) const
 Private method to retrieve z partition.
void getPhiParts (int, LocalVariablesContainer &aLVC) const
 Private method to retrieve phi partition.
void getHParts (LocalVariablesContainer &aLVC) const
 Private method to retrieve h partition.
void blendMaterial (LocalVariablesContainer &aLVC) const
 Private method to blend the inert material.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Static Protected Member Functions

static void getShieldParts (LocalVariablesContainer &aLVC)
 Private method to retrieve shield partition.

Protected Attributes

Trk::VolumeConverter m_volumeConverter
 Volume helper to find geometrical span of enclosed volumes.
ToolHandle< Trk::ITrackingVolumeArrayCreatorm_trackingVolumeArrayCreator
 Helper Tool to create TrackingVolume Arrays.
ToolHandle< Trk::ITrackingVolumeHelperm_trackingVolumeHelper
 Helper Tool to create TrackingVolumes.
ServiceHandle< IEnvelopeDefSvcm_enclosingEnvelopeSvc
 service to provide input volume size
Gaudi::Property< bool > m_muonSimple {this, "SimpleMuonGeometry", false}
Gaudi::Property< bool > m_loadMSentry {this, "LoadMSEntry", false}
Gaudi::Property< bool > m_muonActive {this, "BuildActiveMaterial", true}
Gaudi::Property< bool > m_muonInert {this, "BuildInertMaterial", true}
Gaudi::Property< double > m_innerBarrelRadius
 < minimal extend in radial dimension of the muon barrel
Gaudi::Property< double > m_outerBarrelRadius
 maximal extend in z of the muon barrel
Gaudi::Property< double > m_barrelZ {this, "BarrelZ", 6785.}
 maximal extend in z of the inner part of muon endcap
Gaudi::Property< double > m_innerEndcapZ {this, "InnerEndcapZ", 12900.}
 maximal extend in z of the outer part of muon endcap
Gaudi::Property< double > m_outerEndcapZ {this, "OuterEndcapZ", 26046.}
Gaudi::Property< int > m_barrelEtaPartition {this, "EtaBarrelPartitions", 9}
Gaudi::Property< int > m_innerEndcapEtaPartition
Gaudi::Property< int > m_outerEndcapEtaPartition
Gaudi::Property< int > m_phiPartition {this, "PhiPartitions", 16}
Gaudi::Property< bool > m_adjustStatic {this, "AdjustStatic", true}
Gaudi::Property< bool > m_static3d {this, "StaticPartition3D", true}
Gaudi::Property< bool > m_blendInertMaterial
Gaudi::Property< bool > m_removeBlended
Gaudi::Property< double > m_alignTolerance
Gaudi::Property< int > m_colorCode {this, "ColorCode", 0}
Gaudi::Property< int > m_activeAdjustLevel {this, "ActiveAdjustLevel", 2}
Gaudi::Property< int > m_inertAdjustLevel {this, "InertAdjustLevel", 1}
Gaudi::Property< std::string > m_entryVolume
Gaudi::Property< std::string > m_exitVolume

Static Protected Attributes

static constexpr double m_bigWheel {15600.}
 maximal extend in z of the big wheel
static constexpr double m_outerWheel {21000.}
 minimal extend in z of the outer wheel (EO)
static constexpr double m_ectZ {7920.}
 minimal extent in z of the ECT
static constexpr double m_beamPipeRadius {70.}
static constexpr double m_innerShieldRadius {850.}
static constexpr double m_outerShieldRadius {1500.}
static constexpr double m_diskShieldZ {6915.}

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< Trk::IDetachedTrackingVolumeBuilderm_stationBuilder
 A Tool for station type creation.
ToolHandle< Muon::MuonInertMaterialBuilderm_inertBuilder
 A Tool for inert object creation.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

The Muon::MuonTrackingGeometryBuilder retrieves MuonStationBuilder and MuonInertMaterialBuilder for the Muon Detector sub detectors and combines the given Volumes to a full Trk::TrackingGeometry.

Inheriting directly from IGeometryBuilder it can use the protected member functions of the IGeometryBuilder to glue Volumes together and exchange BoundarySurfaces

Author
Sarka.nosp@m..Tod.nosp@m.orova.nosp@m.@cer.nosp@m.n.ch

Definition at line 34 of file MuonTrackingGeometryBuilder.h.

Member Typedef Documentation

◆ DetachedVolPtr

TrackingGeometry Interface method.

Definition at line 62 of file MuonTrackingGeometryBuilderImpl.h.

◆ DetachedVolSpanPair

◆ DetachedVolVec

◆ SharedTrackingVolume

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ TrackingVolumePtr

◆ TrackingVolumeVec

◆ VolumeSpanArray

using Muon::MuonTrackingGeometryBuilderImpl::VolumeSpanArray = std::array<std::vector<DetachedVolSpanPair>, 9>
inherited

Definition at line 66 of file MuonTrackingGeometryBuilderImpl.h.

◆ VolumeSpanPtr

Constructor & Destructor Documentation

◆ MuonTrackingGeometryBuilder()

Muon::MuonTrackingGeometryBuilder::MuonTrackingGeometryBuilder ( const std::string & t,
const std::string & n,
const IInterface * p )

Constructor.

Definition at line 13 of file MuonTrackingGeometryBuilder.cxx.

16 declareInterface<Trk::IGeometryBuilder>(this);
17}
MuonTrackingGeometryBuilderImpl(const std::string &, const std::string &, const IInterface *)

◆ ~MuonTrackingGeometryBuilder()

virtual Muon::MuonTrackingGeometryBuilder::~MuonTrackingGeometryBuilder ( )
virtualdefault

Destructor.

Member Function Documentation

◆ blendMaterial()

void Muon::MuonTrackingGeometryBuilderImpl::blendMaterial ( LocalVariablesContainer & aLVC) const
protectedinherited

Private method to blend the inert material.

Definition at line 2750 of file MuonTrackingGeometryBuilderImpl.cxx.

2751 {
2752 // loop over map
2753 // std::map<const Trk::DetachedTrackingVolume*,std::vector<const
2754 // Trk::TrackingVolume*>* >::iterator mIter = m_blendMap.begin();
2755 for (const auto&[viter, vv] : aLVC.m_blendMap) {
2756 // find material source
2757 const Trk::Material* detMat = viter->trackingVolume();
2758 double csVol = m_volumeConverter.calculateVolume(*viter->trackingVolume());
2759 std::unique_ptr<const Trk::VolumeSpan> span{m_volumeConverter.findVolumeSpan(viter->trackingVolume()->volumeBounds(),
2760 viter->trackingVolume()->transform(), 0., 0.)};
2761 if (span && csVol > 0) {
2762 double enVol = 0.;
2763 // loop over frame volumes, check if confined
2764 std::vector<bool> fEncl;
2765 // blending factors can be saved, and not recalculated for each
2766 // clone
2767 for (auto *const fIter : vv) {
2768 fEncl.push_back(enclosed(*fIter, *span, aLVC));
2769 if (fEncl.back())
2770 enVol += m_volumeConverter.calculateVolume(*fIter);
2771 }
2772 // diluting factor
2773 double dil = enVol > 0. ? csVol / enVol : 0.;
2774 if (dil > 0.) {
2775 for (auto fIter = vv.begin(); fIter != vv.end(); ++fIter) {
2776 if (fEncl[fIter - vv.begin()]) {
2777 Trk::TrackingVolume* vol = (*fIter);
2778 vol->addMaterial(*detMat, dil);
2779 if (m_colorCode == 0) {
2780 vol->registerColorCode(12);
2781 }
2782 ATH_MSG_VERBOSE((*fIter)->volumeName()
2783 << " acquires material from "
2784 << viter->name());
2785 }
2786 }
2787 ATH_MSG_VERBOSE("diluting factor:" << dil << " for "
2788 << viter->name()
2789 << ", blended ");
2790
2791 } else {
2792 ATH_MSG_VERBOSE("diluting factor:" << dil << " for "
2793 << viter->name()
2794 << ", not blended ");
2795 }
2796 }
2797 }
2798}
#define ATH_MSG_VERBOSE(x,...)
bool enclosed(const Trk::Volume &volume, const Trk::VolumeSpan &span, LocalVariablesContainer &aLVC) const
Private method to check if constituent enclosed.
Trk::VolumeConverter m_volumeConverter
Volume helper to find geometrical span of enclosed volumes.
void registerColorCode(unsigned int icolor)
Register the color code.
void addMaterial(const Material &mat, float fact=1.)
add Material
CxxUtils::transform_view_with_at< PackedLinkVector_span, ELSpanConverter > span

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ DeclareInterfaceID()

Trk::IGeometryBuilder::DeclareInterfaceID ( IGeometryBuilder ,
1 ,
0  )
inherited

Creates the InterfaceID and interfaceID() method.

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ enclosed()

bool Muon::MuonTrackingGeometryBuilderImpl::enclosed ( const Trk::Volume & volume,
const Trk::VolumeSpan & span,
LocalVariablesContainer & aLVC ) const
protectedinherited

Private method to check if constituent enclosed.

Definition at line 2024 of file MuonTrackingGeometryBuilderImpl.cxx.

2026 {
2027 bool encl = false;
2028 constexpr double tol = 1.;
2029 constexpr double ptol = 0.11; // 0.08 for BT, 0.11 feet
2030
2031 // get min/max Z/Phi from volume (allways a cylinder/bevelled cylinder
2032 // volume )
2033 const auto *cyl = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(vol.volumeBounds()));
2034 const auto *bcyl =dynamic_cast<const Trk::BevelledCylinderVolumeBounds*>(&(vol.volumeBounds()));
2035
2036 double rmed{0.}, dphi{0.}, hz{0.}, rMin{0.}, rMax{0.};
2037 if (cyl) {
2038 rmed = cyl->mediumRadius();
2039 dphi = cyl->halfPhiSector();
2040 hz = cyl->halflengthZ();
2041 rMin = cyl->innerRadius();
2042 rMax = cyl->outerRadius();
2043 } else if (bcyl) {
2044 rmed = bcyl->mediumRadius();
2045 dphi = bcyl->halfPhiSector();
2046 hz = bcyl->halflengthZ();
2047 rMin = bcyl->innerRadius();
2048 rMax = bcyl->outerRadius();
2049 } else
2050 return false;
2051
2052 const Amg::Vector3D center = vol.transform() * (rmed* Amg::Vector3D::UnitX());
2053
2054 double zMin = center[2] - hz;
2055 double zMax = center[2] + hz;
2056 double pMin = 0.;
2057 double pMax = +2 * M_PI;
2058 bool phiLim = false;
2059 if (dphi < M_PI) {
2060 pMin = center.phi() - dphi + M_PI;
2061 pMax = center.phi() + dphi + M_PI;
2062 phiLim = true;
2063 }
2064 //
2065 ATH_MSG_VERBOSE("enclosing volume:z:" << zMin << "," << zMax
2066 << ":r:" << rMin << "," << rMax
2067 << ":phi:" << pMin << "," << pMax);
2068 //
2069 bool rLimit = (!aLVC.m_static3d ||
2070 (span.rMin < rMax - tol && span.rMax > rMin + tol));
2071 if (rLimit && span.zMin < zMax - tol && span.zMax > zMin + tol) {
2072 if (phiLim) {
2073 if (pMin >= 0 && pMax <= 2 * M_PI) {
2074 if (span.phiMin <= span.phiMax && span.phiMin < pMax + ptol &&
2075 span.phiMax > pMin - ptol)
2076 return true;
2077 if (span.phiMin > span.phiMax &&
2078 (span.phiMin < pMax - ptol || span.phiMax > pMin + ptol))
2079 return true;
2080 } else if (pMin < 0) {
2081 if (span.phiMin <= span.phiMax &&
2082 (span.phiMin < pMax + ptol ||
2083 span.phiMax > pMin - ptol + 2 * M_PI))
2084 return true;
2085 if (span.phiMin > span.phiMax)
2086 return true;
2087 } else if (pMax > 2 * M_PI) {
2088 if (span.phiMin <= span.phiMax &&
2089 (span.phiMin < pMax + ptol - 2 * M_PI ||
2090 span.phiMax > pMin - ptol))
2091 return true;
2092 if (span.phiMin > span.phiMax)
2093 return true;
2094 }
2095 } else {
2096 return true;
2097 }
2098 }
2099 return encl;
2100}
#define M_PI
Eigen::Matrix< double, 3, 1 > Vector3D

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ findVolumesSpan()

VolumeSpanArray Muon::MuonTrackingGeometryBuilderImpl::findVolumesSpan ( const DetachedVolVec & objs,
double zTol,
double phiTol,
const LocalVariablesContainer & aLVC ) const
protectedinherited

Private method to filter detached volumes in z span.

Definition at line 851 of file MuonTrackingGeometryBuilderImpl.cxx.

854 {
855 VolumeSpanArray spans{};
856
857 if (objs.empty()) {
858 return spans;
859 }
860
861 for (const auto& obj : objs) {
862 VolumeSpanPtr span{m_volumeConverter.findVolumeSpan(obj->trackingVolume()->volumeBounds(),
863 obj->trackingVolume()->transform(), zTol, phiTol)};
864 double x0 = obj->trackingVolume()->X0;
865 double intX0 = std::abs(span->zMin - span->zMax) / (x0 + 0.000000001);
866 double l0 = obj->trackingVolume()->L0;
867 ATH_MSG_DEBUG("span:" << obj->name() << "," << span->zMin << ","
868 << span->zMax << "," << span->phiMin << ","
869 << span->phiMax << "," << span->rMin << ","
870 << span->rMax << " X0 " << x0 << " L0 " << l0
871 << " intX0 for span0 span1 " << intX0);
872
873 int nspans = 0;
874 // negative outer wheel
875 if (span->zMin < -m_bigWheel) {
876 spans[0].emplace_back(obj.get(), span);
877 nspans++;
878 }
879 // negative big wheel
880 if (span->zMin < -aLVC.m_innerEndcapZ && span->zMax > -m_bigWheel) {
881 spans[1].emplace_back(obj.get(), span);
882 nspans++;
883 }
884 // neg.ect
885 if (span->zMin < -m_ectZ && span->zMax > -aLVC.m_innerEndcapZ) {
886 spans[2].emplace_back(obj.get(), span);
887 nspans++;
888 }
889 // neg.small wheel
890 if (span->zMin < -m_diskShieldZ && span->zMax > -m_ectZ) {
891 spans[3].emplace_back(obj.get(), span);
892 nspans++;
893 }
894 // barrel
895 if (span->zMin < m_diskShieldZ && span->zMax > -m_diskShieldZ) {
896 spans[4].emplace_back(obj.get(), span);
897 nspans++;
898 }
899 // pos.small wheel
900 if (span->zMin < m_ectZ && span->zMax > m_diskShieldZ) {
901 spans[5].emplace_back(obj.get(), span);
902 nspans++;
903 }
904 // pos.ect
905 if (span->zMin < aLVC.m_innerEndcapZ && span->zMax > m_ectZ) {
906 spans[6].emplace_back(obj.get(), span);
907 nspans++;
908 }
909 // positive big wheel
910 if (span->zMin < m_bigWheel && span->zMax > aLVC.m_innerEndcapZ) {
911 spans[7].emplace_back(obj.get(), span);
912 nspans++;
913 }
914 // positive outer wheel
915 if (span->zMax > m_bigWheel) {
916 spans[8].emplace_back(obj.get(), span);
917 nspans++;
918 }
919
920 if (nspans == 0)
921 ATH_MSG_WARNING(" object not selected in span regions "
922 << obj->name());
923 if (nspans > 1)
924 ATH_MSG_VERBOSE(" object selected in " << nspans << " span regions "
925 << obj->name());
926 }
927
928 return spans;
929}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
static constexpr double m_ectZ
minimal extent in z of the ECT
static constexpr double m_bigWheel
maximal extend in z of the big wheel
std::array< std::vector< DetachedVolSpanPair >, 9 > VolumeSpanArray
std::shared_ptr< const Trk::VolumeSpan > VolumeSpanPtr

◆ geometrySignature()

virtual Trk::GeometrySignature Muon::MuonTrackingGeometryBuilder::geometrySignature ( ) const
inlineoverridevirtual

The unique signature.

Implements Trk::IGeometryBuilder.

Definition at line 50 of file MuonTrackingGeometryBuilder.h.

50 {
52 }
static Trk::GeometrySignature signature()
The unique signature.

◆ getDetachedObjects()

std::vector< Trk::DetachedTrackingVolume * > Muon::MuonTrackingGeometryBuilderImpl::getDetachedObjects ( const Trk::Volume & trkVol,
std::vector< Trk::DetachedTrackingVolume * > & blendVols,
LocalVariablesContainer & aLVC,
int mode = 0 ) const
protectedinherited

Private method to find detached volumes.

Definition at line 1824 of file MuonTrackingGeometryBuilderImpl.cxx.

1827 {
1828 // mode : 0 all, 1 active only, 2 inert only
1829
1830 std::vector<Trk::DetachedTrackingVolume*> detTVs{};
1831
1832 // get min/max Z/Phi from volume (allways a cylinder/bevelled cylinder
1833 // volume )
1834 const auto *cyl = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(vol.volumeBounds()));
1835 const auto *bcyl = dynamic_cast<const Trk::BevelledCylinderVolumeBounds*>(&(vol.volumeBounds()));
1836
1837 double rmed{0.}, dphi{0.}, hz{0.}, rMin{0.}, rMax{0.}, rMaxc{0.};
1838 int type = 0;
1839 if (cyl) {
1840 rmed = cyl->mediumRadius();
1841 dphi = cyl->halfPhiSector();
1842 hz = cyl->halflengthZ();
1843 rMin = cyl->innerRadius();
1844 rMax = cyl->outerRadius();
1845 rMaxc = rMax;
1846 } else if (bcyl) {
1847 rmed = bcyl->mediumRadius();
1848 dphi = bcyl->halfPhiSector();
1849 hz = bcyl->halflengthZ();
1850 rMin = bcyl->innerRadius();
1851 rMax = bcyl->outerRadius();
1852 rMaxc = rMax;
1853 type = bcyl->type();
1854 if (type > 1)
1855 rMaxc *= 1. / cos(dphi);
1856 } else {
1857 return detTVs;
1858 }
1859 const Amg::Vector3D center = vol.transform() * (rmed *Amg::Vector3D::UnitX());
1860
1861 double zMin = center[2] - hz;
1862 double zMax = center[2] + hz;
1863 double pMin = 0.;
1864 double pMax = +2 * M_PI;
1865 bool phiLim = false;
1866 if (dphi < M_PI) {
1867 pMin = center.phi() - dphi + M_PI;
1868 pMax = center.phi() + dphi + M_PI;
1869 phiLim = true;
1870 }
1871
1872 ATH_MSG_VERBOSE(" zMin " << zMin << " zMax " << zMax << " rMin " << rMin
1873 << " rMax " << rMax << " rMaxc " << rMaxc
1874 << " phi limits " << pMin << " phiMax " << pMax
1875 << " phiLim " << phiLim);
1876
1877 // define detector region : can extend over several
1878 int gMin = (zMax <= -m_bigWheel) ? 0 : 1;
1879 if (zMin >= m_bigWheel)
1880 gMin = 8;
1881 else if (zMin >= aLVC.m_innerEndcapZ)
1882 gMin = 7;
1883 else if (zMin >= m_ectZ)
1884 gMin = 6;
1885 else if (zMin >= m_diskShieldZ)
1886 gMin = 5;
1887 else if (zMin >= -m_diskShieldZ)
1888 gMin = 4;
1889 else if (zMin >= -m_ectZ)
1890 gMin = 3;
1891 else if (zMin >= -aLVC.m_innerEndcapZ)
1892 gMin = 2;
1893 int gMax = (zMax >= m_bigWheel) ? 8 : 7;
1894 if (zMax <= -m_bigWheel)
1895 gMax = 0;
1896 else if (zMax <= -aLVC.m_innerEndcapZ)
1897 gMax = 1;
1898 else if (zMax <= -m_ectZ)
1899 gMax = 2;
1900 else if (zMax <= -m_diskShieldZ)
1901 gMax = 3;
1902 else if (zMax <= m_diskShieldZ)
1903 gMax = 4;
1904 else if (zMax <= m_ectZ)
1905 gMax = 5;
1906 else if (zMax <= aLVC.m_innerEndcapZ)
1907 gMax = 6;
1908
1909 ATH_MSG_VERBOSE(" active volumes gMin " << gMin << " gMax " << gMax);
1910
1911 // active, use corrected rMax
1912 if (mode < 2 && !aLVC.m_stationSpan.empty()) {
1913 for (int gMode = gMin; gMode <= gMax; gMode++) {
1914 for (const auto&[station, s] : (aLVC.m_stationSpan)[gMode]) {
1915 bool rLimit = !aLVC.m_static3d || (s->rMin <= rMaxc && s->rMax >= rMin);
1916 // Check meanZ for BME stations
1917 bool meanZOK = false;
1918 if (station->name() == "BME1_Station" ||
1919 station->name() == "BME2_Station") {
1920 if ((s->zMin + s->zMax) / 2. < zMax &&
1921 (s->zMin + s->zMax) / 2. > zMin)
1922 meanZOK = true;
1923 if ((s->phiMin + s->phiMax) / 2 < pMin && phiLim)
1924 meanZOK = false;
1925 // if ((s->phiMin + s->phiMax) / 2 < pMin && phiLim)
1926 // meanZOK = false;
1927 }
1928 if (rLimit &&
1929 ((s->zMin < zMax && s->zMax > zMin) || meanZOK)) {
1930 bool accepted = false;
1931 if (phiLim) {
1932 if (pMin >= 0 && pMax <= 2 * M_PI) {
1933 if (s->phiMin <= s->phiMax &&
1934 s->phiMin <= pMax && s->phiMax >= pMin)
1935 accepted = true;
1936 if (s->phiMin > s->phiMax &&
1937 (s->phiMin <= pMax || s->phiMax >= pMin))
1938 accepted = true;
1939 } else if (pMin < 0) {
1940 if (s->phiMin <= s->phiMax &&
1941 (s->phiMin <= pMax ||
1942 s->phiMax >= pMin + 2 * M_PI))
1943 accepted = true;
1944 if (s->phiMin > s->phiMax)
1945 accepted = true;
1946 } else if (pMax > 2 * M_PI) {
1947 if (s->phiMin <= s->phiMax &&
1948 (s->phiMin <= pMax - 2 * M_PI ||
1949 s->phiMax >= pMin))
1950 accepted = true;
1951 if (s->phiMin > s->phiMax)
1952 accepted = true;
1953 }
1954 } else
1955 accepted = true;
1956 if (meanZOK)
1957 accepted = true;
1958 if (accepted) {
1959 detTVs.push_back(station);
1960 ATH_MSG_VERBOSE(" active volume accepted by rLimit "
1961 << station->name() << " zMin " << zMin
1962 << " zMax " << zMax << " rMin " << rMin
1963 << " rMax " << rMax << " PhiMin "
1964 << pMin << " PhiMax " << pMax);
1965 }
1966 }
1967 }
1968 }
1969 }
1970 // passive
1971 if (mode != 1 && !aLVC.m_inertSpan.empty()) {
1972 for (int gMode = gMin; gMode <= gMax; gMode++) {
1973 for (const auto& [inert, s]: (aLVC.m_inertSpan)[gMode]) {
1974 bool rLimit = (!aLVC.m_static3d ||
1975 (s->rMin <= rMaxc && s->rMax >= rMin));
1976 if (rLimit && s->zMin < zMax && s->zMax > zMin) {
1977 bool accepted = false;
1978 if (phiLim) {
1979 if (pMin >= 0 && pMax <= 2 * M_PI) {
1980 if (s->phiMin <= s->phiMax &&
1981 s->phiMin <= pMax && s->phiMax >= pMin)
1982 accepted = true;
1983 if (s->phiMin > s->phiMax &&
1984 (s->phiMin <= pMax || s->phiMax >= pMin))
1985 accepted = true;
1986 } else if (pMin < 0) {
1987 if (s->phiMin <= s->phiMax &&
1988 (s->phiMin <= pMax ||
1989 s->phiMax >= pMin + 2 * M_PI))
1990 accepted = true;
1991 if (s->phiMin > s->phiMax)
1992 accepted = true;
1993 } else if (pMax > 2 * M_PI) {
1994 if (s->phiMin <= s->phiMax &&
1995 (s->phiMin <= pMax - 2 * M_PI ||
1996 s->phiMax >= pMin))
1997 accepted = true;
1998 if (s->phiMin > s->phiMax)
1999 accepted = true;
2000 }
2001 } else
2002 accepted = true;
2003 if (accepted) {
2004 bool perm =
2005 inert->name().compare(inert->name().size() - 4, 4,
2006 "PERM") == 0;
2007 if (!m_blendInertMaterial || !m_removeBlended || perm)
2008 detTVs.push_back(inert);
2009 if (m_blendInertMaterial && !perm)
2010 blendVols.push_back(inert);
2011 ATH_MSG_VERBOSE(" Inert volume accepted by rLimit "
2012 << inert->name() << " zMin " << zMin
2013 << " zMax " << zMax << " rMin " << rMin
2014 << " rMax " << rMax << " PhiMin "
2015 << pMin << " PhiMax " << pMax);
2016 }
2017 }
2018 }
2019 }
2020 }
2021 return detTVs;
2022}

◆ getHParts()

void Muon::MuonTrackingGeometryBuilderImpl::getHParts ( LocalVariablesContainer & aLVC) const
protectedinherited

Private method to retrieve h partition.

Definition at line 2414 of file MuonTrackingGeometryBuilderImpl.cxx.

2415 {
2416 // hardcode for the moment
2417 aLVC.m_hPartitions.clear(); // barrel, inner endcap, outer endcap
2418
2419 // 0: barrel 2x2
2420 // non BT sector
2421 std::vector<std::pair<int, float> > barrelZ0F0;
2422 barrelZ0F0.emplace_back(0, aLVC.m_innerBarrelRadius);
2423 if (m_activeAdjustLevel > 0) {
2424 barrelZ0F0.emplace_back(0, 4450.); // for DiskShieldingBackDisk
2425 barrelZ0F0.emplace_back(0, 6500.); // BI/BM
2426 barrelZ0F0.emplace_back(0, 8900.); // BM/BO
2427 barrelZ0F0.emplace_back(0, 13000.); // outer envelope
2428 }
2429 barrelZ0F0.emplace_back(0, aLVC.m_outerBarrelRadius);
2430
2431 std::vector<std::pair<int, float> > barrelZ0F1;
2432 barrelZ0F1.emplace_back(0, aLVC.m_innerBarrelRadius);
2433 if (m_inertAdjustLevel > 0) {
2434 barrelZ0F1.emplace_back(1, 4500.);
2435 barrelZ0F1.emplace_back(1, 5900.);
2436 } else if (m_activeAdjustLevel > 0)
2437 barrelZ0F1.emplace_back(0, 4450.);
2438 if (m_activeAdjustLevel > 0)
2439 barrelZ0F1.emplace_back(0, 6500.);
2440 if (m_inertAdjustLevel > 0)
2441 barrelZ0F1.emplace_back(1, 8900.);
2442 else if (m_activeAdjustLevel > 0)
2443 barrelZ0F1.emplace_back(0, 8900.);
2444 if (m_inertAdjustLevel > 0)
2445 barrelZ0F1.emplace_back(1, 10100.);
2446 barrelZ0F1.emplace_back(0, 13000.); // outer envelope
2447 barrelZ0F1.emplace_back(0, aLVC.m_outerBarrelRadius);
2448
2449 // BT sector
2450 std::vector<std::pair<int, float> > barrelZ1F0;
2451 barrelZ1F0.emplace_back(0, aLVC.m_innerBarrelRadius);
2452 if (static_cast<int>(m_activeAdjustLevel) +
2453 static_cast<int>(m_inertAdjustLevel) >
2454 0)
2455 barrelZ1F0.emplace_back(0, 4450.);
2456 if (m_inertAdjustLevel > 0) {
2457 barrelZ1F0.emplace_back(1, 5800.);
2458 barrelZ1F0.emplace_back(1, 6500.);
2459 } else if (m_activeAdjustLevel > 0)
2460 barrelZ1F0.emplace_back(0, 6500.);
2461 if (m_inertAdjustLevel > 0) {
2462 barrelZ1F0.emplace_back(1, 6750.);
2463 barrelZ1F0.emplace_back(1, 8400.);
2464 }
2465 if (m_activeAdjustLevel > 0)
2466 barrelZ1F0.emplace_back(0, 8770.); // adapted for cryoring (from 8900)
2467 if (m_inertAdjustLevel > 0)
2468 barrelZ1F0.emplace_back(1, 9850.); // adapted for cryoring (from 9600)
2469 barrelZ1F0.emplace_back(0, 13000.); // outer envelope
2470 barrelZ1F0.emplace_back(0, aLVC.m_outerBarrelRadius);
2471
2472 std::vector<std::pair<int, float> > barrelZ1F1;
2473 barrelZ1F1.emplace_back(0, aLVC.m_innerBarrelRadius);
2474 if (m_inertAdjustLevel > 0) {
2475 barrelZ1F1.emplace_back(1, 4500.);
2476 barrelZ1F1.emplace_back(1, 6000.);
2477 } else if (m_activeAdjustLevel > 0)
2478 barrelZ1F1.emplace_back(0, 4450.);
2479 if (m_activeAdjustLevel > 0)
2480 barrelZ1F1.emplace_back(0, 6500.);
2481 if (m_inertAdjustLevel > 0)
2482 barrelZ1F1.emplace_back(1, 6800.);
2483 if (m_inertAdjustLevel > 0) {
2484 barrelZ1F1.emplace_back(1, 8900.);
2485 barrelZ1F1.emplace_back(1, 10100.);
2486 } else if (m_activeAdjustLevel > 0)
2487 barrelZ1F1.emplace_back(0, 8900.);
2488 barrelZ1F1.emplace_back(0, 13000.); // outer envelope
2489 barrelZ1F1.emplace_back(0, aLVC.m_outerBarrelRadius);
2490
2491 std::vector<std::vector<std::vector<std::pair<int, float> > > > barrelZF(2);
2492 barrelZF[0].push_back(std::move(barrelZ0F0));
2493 barrelZF[0].push_back(std::move(barrelZ0F1));
2494 barrelZF[1].push_back(std::move(barrelZ1F0));
2495 barrelZF[1].push_back(std::move(barrelZ1F1));
2496
2497 // small wheel 1x2 ( no z BT sector)
2498 // non BT sector
2499 std::vector<std::pair<int, float> > swZ0F0;
2500 swZ0F0.emplace_back(0, m_innerShieldRadius);
2501 if (m_activeAdjustLevel > 1) {
2502 swZ0F0.emplace_back(0, 2700.);
2503 }
2504 if (static_cast<int>(m_activeAdjustLevel) +
2505 static_cast<int>(m_inertAdjustLevel) >
2506 0)
2507 swZ0F0.emplace_back(0, 4450.);
2508 if (m_activeAdjustLevel > 0) {
2509 swZ0F0.emplace_back(0, 6560.); // BI/BM
2510 swZ0F0.emplace_back(0, 8900.); // BM/BO
2511 }
2512 swZ0F0.emplace_back(0, aLVC.m_outerBarrelRadius);
2513
2514 // phi BT sector
2515 std::vector<std::pair<int, float> > swZ0F1;
2516 swZ0F1.emplace_back(0, m_innerShieldRadius);
2517 if (m_activeAdjustLevel > 1)
2518 swZ0F1.emplace_back(0, 2700.);
2519 if (static_cast<int>(m_inertAdjustLevel) +
2520 static_cast<int>(m_activeAdjustLevel) >
2521 0)
2522 swZ0F1.emplace_back(0, 4450.);
2523 if (m_inertAdjustLevel > 0)
2524 swZ0F1.emplace_back(1, 5900.);
2525 if (m_activeAdjustLevel > 0)
2526 swZ0F1.emplace_back(0, 6560.);
2527 if (m_inertAdjustLevel > 0) {
2528 swZ0F1.emplace_back(1, 8900.);
2529 swZ0F1.emplace_back(1, 10100.);
2530 } else if (m_activeAdjustLevel > 0)
2531 swZ0F1.emplace_back(0, 8900.);
2532 swZ0F1.emplace_back(0, aLVC.m_outerBarrelRadius);
2533
2534 std::vector<std::vector<std::vector<std::pair<int, float> > > > swZF(1);
2535 swZF[0].push_back(std::move(swZ0F0));
2536 swZF[0].push_back(std::move(swZ0F1));
2537
2538 // inner endcap/ECT 2x3
2539 // ect coil, non-BT z
2540 std::vector<std::pair<int, float> > innerZ0F0;
2541 innerZ0F0.emplace_back(0, m_innerShieldRadius);
2542 if (m_inertAdjustLevel > 0)
2543 innerZ0F0.emplace_back(0, 1100.);
2544 if (m_inertAdjustLevel > 1)
2545 innerZ0F0.emplace_back(1, 5150.);
2546 if (m_inertAdjustLevel > 0)
2547 innerZ0F0.emplace_back(1, 5300.);
2548 if (m_activeAdjustLevel > 0) {
2549 innerZ0F0.emplace_back(0, 6500.);
2550 innerZ0F0.emplace_back(0, 8900.);
2551 }
2552 innerZ0F0.emplace_back(0, aLVC.m_outerBarrelRadius);
2553
2554 // coil gap, non-BT z
2555 std::vector<std::pair<int, float> > innerZ0F1;
2556 innerZ0F1.emplace_back(0, m_innerShieldRadius);
2557 if (m_inertAdjustLevel > 0)
2558 innerZ0F1.emplace_back(0, 1100.);
2559 if (m_inertAdjustLevel > 1) {
2560 innerZ0F1.emplace_back(1, 1400.);
2561 innerZ0F1.emplace_back(1, 1685.);
2562 }
2563 if (m_inertAdjustLevel > 0) {
2564 innerZ0F1.emplace_back(1, 4700.);
2565 innerZ0F1.emplace_back(1, 5900.);
2566 }
2567 if (m_activeAdjustLevel > 0) {
2568 innerZ0F1.emplace_back(0, 6500.);
2569 innerZ0F1.emplace_back(0, 8900.);
2570 }
2571 innerZ0F1.emplace_back(0, aLVC.m_outerBarrelRadius);
2572
2573 // BT coil, no-BT z
2574 std::vector<std::pair<int, float> > innerZ0F2;
2575 innerZ0F2.emplace_back(0, m_innerShieldRadius);
2576 if (m_inertAdjustLevel > 0)
2577 innerZ0F2.emplace_back(0, 1100.);
2578 if (m_inertAdjustLevel > 1) {
2579 innerZ0F2.emplace_back(1, 1400.);
2580 innerZ0F2.emplace_back(1, 1685.);
2581 }
2582 if (m_inertAdjustLevel > 0) {
2583 innerZ0F2.emplace_back(1, 4450.);
2584 innerZ0F2.emplace_back(1, 5900.);
2585 }
2586 if (m_activeAdjustLevel > 0)
2587 innerZ0F2.emplace_back(0, 6500.);
2588 if (m_inertAdjustLevel > 0) {
2589 innerZ0F2.emplace_back(1, 8900.);
2590 innerZ0F2.emplace_back(1, 10100.);
2591 } else if (m_activeAdjustLevel > 0)
2592 innerZ0F2.emplace_back(0, 8900.);
2593 innerZ0F2.emplace_back(0, aLVC.m_outerBarrelRadius);
2594
2595 // ect coil, z BT sector
2596 std::vector<std::pair<int, float> > innerZ1F0;
2597 innerZ1F0.emplace_back(0, m_innerShieldRadius);
2598 if (m_inertAdjustLevel > 0)
2599 innerZ1F0.emplace_back(0, 1100.);
2600 if (m_inertAdjustLevel > 1)
2601 innerZ1F0.emplace_back(1, 5150.);
2602 if (m_inertAdjustLevel > 0)
2603 innerZ1F0.emplace_back(1, 5300.);
2604 if (m_inertAdjustLevel > 0)
2605 innerZ1F0.emplace_back(1, 5800.);
2606 if (m_inertAdjustLevel > 0)
2607 innerZ1F0.emplace_back(1, 6750.);
2608 else if (m_activeAdjustLevel > 0)
2609 innerZ1F0.emplace_back(0, 6500.);
2610 if (m_inertAdjustLevel > 0) {
2611 innerZ1F0.emplace_back(1, 8400.);
2612 innerZ1F0.emplace_back(1, 9600.);
2613 } else if (m_activeAdjustLevel > 0)
2614 innerZ1F0.emplace_back(0, 8900.);
2615 innerZ1F0.emplace_back(0, aLVC.m_outerBarrelRadius);
2616
2617 // coil gap, BT z sector
2618 std::vector<std::pair<int, float> > innerZ1F1;
2619 innerZ1F1.emplace_back(0, m_innerShieldRadius);
2620 if (m_inertAdjustLevel > 0)
2621 innerZ1F1.emplace_back(0, 1100.);
2622 if (m_inertAdjustLevel > 1) {
2623 innerZ1F1.emplace_back(1, 1400.);
2624 innerZ1F1.emplace_back(1, 1685.);
2625 }
2626 if (m_inertAdjustLevel > 0) {
2627 innerZ1F1.emplace_back(1, 4700.);
2628 innerZ1F1.emplace_back(1, 5800.);
2629 innerZ1F1.emplace_back(1, 6750.);
2630 } else if (m_activeAdjustLevel > 0)
2631 innerZ1F1.emplace_back(0, 6500.);
2632 if (m_inertAdjustLevel > 0) {
2633 innerZ1F1.emplace_back(1, 8400.);
2634 innerZ1F1.emplace_back(1, 9600.);
2635 } else if (m_activeAdjustLevel > 0)
2636 innerZ1F1.emplace_back(0, 8900.);
2637 innerZ1F1.emplace_back(0, aLVC.m_outerBarrelRadius);
2638
2639 // BT coil, BT z sector
2640 std::vector<std::pair<int, float> > innerZ1F2;
2641 innerZ1F2.emplace_back(0, m_innerShieldRadius);
2642 if (m_inertAdjustLevel > 0)
2643 innerZ1F2.emplace_back(0, 1100.);
2644 if (m_inertAdjustLevel > 1) {
2645 innerZ1F2.emplace_back(1, 1400.);
2646 innerZ1F2.emplace_back(1, 1685.);
2647 }
2648 innerZ1F2.emplace_back(0, 4150.);
2649 if (m_inertAdjustLevel > 0) {
2650 innerZ1F2.emplace_back(1, 4700.);
2651 innerZ1F2.emplace_back(1, 5900.);
2652 innerZ1F2.emplace_back(1, 6800.);
2653 } else if (m_activeAdjustLevel > 0)
2654 innerZ1F2.emplace_back(0, 6500.);
2655 if (m_inertAdjustLevel > 0) {
2656 innerZ1F2.emplace_back(1, 8900.);
2657 innerZ1F2.emplace_back(1, 10100.);
2658 } else if (m_activeAdjustLevel > 0)
2659 innerZ1F2.emplace_back(0, 8900.);
2660 innerZ1F2.emplace_back(0, aLVC.m_outerBarrelRadius);
2661
2662 std::vector<std::vector<std::vector<std::pair<int, float> > > > innerZF(2);
2663 innerZF[0].push_back(std::move(innerZ0F0));
2664 innerZF[0].push_back(std::move(innerZ0F1));
2665 innerZF[0].push_back(std::move(innerZ0F2));
2666 innerZF[1].push_back(std::move(innerZ1F0));
2667 innerZF[1].push_back(std::move(innerZ1F1));
2668 innerZF[1].push_back(std::move(innerZ1F2));
2669
2670 // outer 1x1
2671 std::vector<std::pair<int, float> > outerZ0F0;
2672 outerZ0F0.emplace_back(0, m_outerShieldRadius);
2673 outerZ0F0.emplace_back(0, 2750.); // outer envelope
2674 outerZ0F0.emplace_back(0, 12650.); // outer envelope
2675 outerZ0F0.emplace_back(0, 13400.); // outer envelope
2676 outerZ0F0.emplace_back(0, aLVC.m_outerBarrelRadius);
2677
2678 std::vector<std::pair<int, float> > outerZ0F1;
2679 outerZ0F1.emplace_back(0, m_outerShieldRadius);
2680 outerZ0F1.emplace_back(0, 2750.); // outer envelope
2681 if (m_activeAdjustLevel > 0) {
2682 outerZ0F1.emplace_back(0, 3600.);
2683 outerZ0F1.emplace_back(0, 5300.);
2684 outerZ0F1.emplace_back(0, 7000.);
2685 outerZ0F1.emplace_back(0, 8500.);
2686 outerZ0F1.emplace_back(0, 10000.);
2687 outerZ0F1.emplace_back(0, 12000.);
2688 }
2689 outerZ0F1.emplace_back(0, 12650.); // outer envelope
2690 outerZ0F1.emplace_back(0, 13400.); // outer envelope
2691 outerZ0F1.emplace_back(0, aLVC.m_outerBarrelRadius);
2692
2693 std::vector<std::vector<std::vector<std::pair<int, float> > > > outerZF(2);
2694 outerZF[0].push_back(outerZ0F0);
2695 outerZF[0].push_back(outerZ0F0);
2696 outerZF[0].push_back(std::move(outerZ0F0));
2697 //
2698 outerZF[1].push_back(outerZ0F1);
2699 outerZF[1].push_back(outerZ0F1);
2700 outerZF[1].push_back(std::move(outerZ0F1));
2701
2702 // collect everything
2703 aLVC.m_hPartitions.push_back(std::move(barrelZF));
2704 aLVC.m_hPartitions.push_back(std::move(swZF));
2705 aLVC.m_hPartitions.push_back(std::move(innerZF));
2706 aLVC.m_hPartitions.push_back(std::move(outerZF));
2707}

◆ getPhiParts()

void Muon::MuonTrackingGeometryBuilderImpl::getPhiParts ( int mode,
LocalVariablesContainer & aLVC ) const
protectedinherited

Private method to retrieve phi partition.

Definition at line 2337 of file MuonTrackingGeometryBuilderImpl.cxx.

2338 {
2339 if (mode == 0) { // trivial
2340 aLVC.m_adjustedPhi.clear();
2341 aLVC.m_adjustedPhiType.clear();
2342 aLVC.m_adjustedPhi.push_back(0.);
2343 aLVC.m_adjustedPhiType.push_back(0);
2344
2345 } else if (mode == 1) {
2346 int phiNum = 1;
2347 if (m_activeAdjustLevel > 0)
2348 phiNum = m_phiPartition;
2349 aLVC.m_adjustedPhi.resize(phiNum);
2350 aLVC.m_adjustedPhiType.resize(phiNum);
2351 aLVC.m_adjustedPhi[0] = 0.;
2352 aLVC.m_adjustedPhiType[0] = 0;
2353 int ic = 0;
2354 while (ic < phiNum - 1) {
2355 ic++;
2356 aLVC.m_adjustedPhi[ic] =
2357 aLVC.m_adjustedPhi[ic - 1] + 2. * M_PI / phiNum;
2358 aLVC.m_adjustedPhiType[ic] = 0;
2359 }
2360
2361 } else if (mode == 2) { // barrel(BT)
2362 // hardcode for the moment
2363 aLVC.m_adjustedPhi.resize(16);
2364 aLVC.m_adjustedPhiType.resize(16);
2365
2366 double phiSect[2];
2367 phiSect[0] = (M_PI / 8 - 0.105);
2368 phiSect[1] = 0.105;
2369
2370 aLVC.m_adjustedPhi[0] = -phiSect[0];
2371 aLVC.m_adjustedPhiType[0] = 0;
2372 int ic = 0;
2373 int is = 1;
2374
2375 while (ic < 15) {
2376 ic++;
2377 is = 1 - is;
2378 aLVC.m_adjustedPhi[ic] =
2379 aLVC.m_adjustedPhi[ic - 1] + 2 * phiSect[is];
2380 aLVC.m_adjustedPhiType[ic] = 1 - is;
2381 }
2382
2383 } else if (mode == 3) { // ECT(+BT)
2384 // hardcode for the moment
2385 aLVC.m_adjustedPhi.resize(32);
2386 aLVC.m_adjustedPhiType.resize(32);
2387
2388 double phiSect[3];
2389 phiSect[0] = 0.126;
2390 phiSect[2] = 0.105;
2391 phiSect[1] = 0.5 * (M_PI / 8. - phiSect[0] - phiSect[2]);
2392
2393 aLVC.m_adjustedPhi[0] = -phiSect[0];
2394 aLVC.m_adjustedPhiType[0] = 0;
2395 aLVC.m_adjustedPhi[1] = aLVC.m_adjustedPhi[0] + 2 * phiSect[0];
2396 aLVC.m_adjustedPhiType[1] = 1;
2397 int ic = 1;
2398 int is = 0;
2399
2400 while (ic < 31) {
2401 ic++;
2402 is = 2 - is;
2403 aLVC.m_adjustedPhi[ic] =
2404 aLVC.m_adjustedPhi[ic - 1] + 2 * phiSect[1];
2405 aLVC.m_adjustedPhiType[ic] = is;
2406 ic++;
2407 aLVC.m_adjustedPhi[ic] =
2408 aLVC.m_adjustedPhi[ic - 1] + 2 * phiSect[is];
2409 aLVC.m_adjustedPhiType[ic] = 1;
2410 }
2411 }
2412}
int ic
Definition grepfile.py:33

◆ getShieldParts()

void Muon::MuonTrackingGeometryBuilderImpl::getShieldParts ( LocalVariablesContainer & aLVC)
staticprotectedinherited

Private method to retrieve shield partition.

Definition at line 2709 of file MuonTrackingGeometryBuilderImpl.cxx.

2710 {
2711 aLVC.m_shieldZPart.resize(18);
2712
2713 aLVC.m_shieldZPart[0] = -21900.; // elm2
2714 aLVC.m_shieldZPart[1] = -21500.; // elm1
2715 aLVC.m_shieldZPart[2] = -21000.; // octogon
2716 aLVC.m_shieldZPart[3] = -18000.; // tube
2717 aLVC.m_shieldZPart[4] = -12882.; // ect
2718 aLVC.m_shieldZPart[5] = -7930.; // ect
2719 aLVC.m_shieldZPart[6] = -7914.; // cone
2720 aLVC.m_shieldZPart[7] = -6941.; // disk
2721 aLVC.m_shieldZPart[8] = -6783.; //
2722 for (unsigned int i = 9; i < 18; i++)
2723 aLVC.m_shieldZPart[i] = -aLVC.m_shieldZPart[17 - i];
2724
2725 aLVC.m_shieldHPart.clear();
2726
2727 std::vector<std::pair<int, float> > outerShield;
2728 outerShield.emplace_back(0, m_beamPipeRadius);
2729 outerShield.emplace_back(0, 279.); // outer envelope
2730 outerShield.emplace_back(0, 436.7); // outer envelope
2731 outerShield.emplace_back(0, 1050.); // outer envelope
2732 outerShield.emplace_back(0, m_outerShieldRadius);
2733 aLVC.m_shieldHPart.push_back(std::move(outerShield));
2734
2735 std::vector<std::pair<int, float> > innerShield;
2736 innerShield.emplace_back(0, m_beamPipeRadius);
2737 innerShield.emplace_back(0, 530.);
2738 innerShield.emplace_back(0, m_innerShieldRadius);
2739 aLVC.m_shieldHPart.push_back(std::move(innerShield));
2740
2741 std::vector<std::pair<int, float> > diskShield;
2742 diskShield.emplace_back(0, 0.);
2743 diskShield.emplace_back(0, 540.);
2744 diskShield.emplace_back(0, 750.);
2745 diskShield.emplace_back(0, 2700.);
2746 diskShield.emplace_back(0, 4255.);
2747 aLVC.m_shieldHPart.push_back(std::move(diskShield));
2748}

◆ getZParts()

void Muon::MuonTrackingGeometryBuilderImpl::getZParts ( LocalVariablesContainer & aLVC) const
protectedinherited

Private method to retrieve z partition.

Definition at line 2101 of file MuonTrackingGeometryBuilderImpl.cxx.

2102 {
2103 // activeAdjustLevel: 1: separate MDT stations
2104 // +(inertLevel=0) barrel Z partition
2105 // 2: split TGC
2106 // +(inertLevel=0) barrel R partition
2107 // 3: split TGC supports
2108 // inertAdjustLevel: 1: BT,ECT
2109
2110 // hardcode for the moment
2111 aLVC.m_zPartitions.clear();
2112 aLVC.m_zPartitionsType.clear();
2113 aLVC.m_zPartitions.reserve(120);
2114 aLVC.m_zPartitionsType.reserve(120);
2115
2116 // outer endcap
2117 aLVC.m_zPartitions.push_back(-aLVC.m_outerEndcapZ);
2118 aLVC.m_zPartitionsType.push_back(1); // EO
2119 aLVC.m_zPartitions.push_back(-23001.);
2120 aLVC.m_zPartitionsType.push_back(1); // oute envelope change
2121 // if (m_activeAdjustLevel>0) { m_zPartitions.push_back(-21630.);
2122 // m_zPartitionsType.push_back(1); } // EOL
2123 aLVC.m_zPartitions.push_back(-22030.);
2124 aLVC.m_zPartitionsType.push_back(1); // EOL
2125 aLVC.m_zPartitions.push_back(-m_outerWheel);
2126 aLVC.m_zPartitionsType.push_back(0); // Octogon
2127 // m_zPartitions.push_back(-17990.); m_zPartitionsType.push_back(0); //
2128 // buffer
2129 aLVC.m_zPartitions.push_back(-18650.);
2130 aLVC.m_zPartitionsType.push_back(0); // buffer
2131 aLVC.m_zPartitions.push_back(-m_bigWheel);
2132 aLVC.m_zPartitionsType.push_back(1); // TGC3
2133 if (m_activeAdjustLevel > 2) {
2134 aLVC.m_zPartitions.push_back(-15225.);
2135 aLVC.m_zPartitionsType.push_back(1);
2136 }
2137 if (m_activeAdjustLevel > 1) {
2138 aLVC.m_zPartitions.push_back(-15172.);
2139 aLVC.m_zPartitionsType.push_back(1);
2140 } // end supp
2141 if (m_activeAdjustLevel > 2) {
2142 aLVC.m_zPartitions.push_back(-15128.);
2143 aLVC.m_zPartitionsType.push_back(1);
2144 } // supp
2145 if (m_activeAdjustLevel > 2) {
2146 aLVC.m_zPartitions.push_back(-15070.);
2147 aLVC.m_zPartitionsType.push_back(1);
2148 }
2149 if (m_activeAdjustLevel > 0) {
2150 aLVC.m_zPartitions.push_back(-14940.);
2151 aLVC.m_zPartitionsType.push_back(1);
2152 } //
2153 if (m_activeAdjustLevel > 2) {
2154 aLVC.m_zPartitions.push_back(-14805.);
2155 aLVC.m_zPartitionsType.push_back(1);
2156 }
2157 if (m_activeAdjustLevel > 1) {
2158 aLVC.m_zPartitions.push_back(-14733.);
2159 aLVC.m_zPartitionsType.push_back(1);
2160 } // end supp.
2161 if (m_activeAdjustLevel > 2) {
2162 aLVC.m_zPartitions.push_back(-14708.);
2163 aLVC.m_zPartitionsType.push_back(1);
2164 } // supp.
2165 if (m_activeAdjustLevel > 2) {
2166 aLVC.m_zPartitions.push_back(-14650.);
2167 aLVC.m_zPartitionsType.push_back(1);
2168 } //
2169 if (m_activeAdjustLevel > 0) {
2170 aLVC.m_zPartitions.push_back(-14560.);
2171 aLVC.m_zPartitionsType.push_back(1);
2172 } // EML
2173 if (m_activeAdjustLevel > 0) {
2174 aLVC.m_zPartitions.push_back(-14080.);
2175 aLVC.m_zPartitionsType.push_back(1);
2176 } // EMS
2177 if (m_activeAdjustLevel > 0) {
2178 aLVC.m_zPartitions.push_back(-13620.);
2179 aLVC.m_zPartitionsType.push_back(1);
2180 } // TGC
2181 if (m_activeAdjustLevel > 2) {
2182 aLVC.m_zPartitions.push_back(-13525.);
2183 aLVC.m_zPartitionsType.push_back(1);
2184 } // TGC
2185 if (m_activeAdjustLevel > 1) {
2186 aLVC.m_zPartitions.push_back(-13448.5);
2187 aLVC.m_zPartitionsType.push_back(1);
2188 } // end supp.
2189 if (m_activeAdjustLevel > 2) {
2190 aLVC.m_zPartitions.push_back(-13421.5);
2191 aLVC.m_zPartitionsType.push_back(1);
2192 } // supp.
2193 if (m_activeAdjustLevel > 2) {
2194 aLVC.m_zPartitions.push_back(-13346);
2195 aLVC.m_zPartitionsType.push_back(1);
2196 } // TGC
2197
2198 // inner endcap
2199 aLVC.m_zPartitions.push_back(-aLVC.m_innerEndcapZ);
2200 aLVC.m_zPartitionsType.push_back(0); //
2201 if (m_inertAdjustLevel > 0) {
2202 aLVC.m_zPartitions.push_back(-12790);
2203 aLVC.m_zPartitionsType.push_back(0);
2204 } // ECT
2205 if (m_inertAdjustLevel > 1) {
2206 aLVC.m_zPartitions.push_back(-12100.);
2207 aLVC.m_zPartitionsType.push_back(0);
2208 } //
2209 if (m_inertAdjustLevel > 0) {
2210 aLVC.m_zPartitions.push_back(-12000.);
2211 aLVC.m_zPartitionsType.push_back(0);
2212 } //
2213 if (m_inertAdjustLevel > 0) {
2214 aLVC.m_zPartitions.push_back(-11210.);
2215 aLVC.m_zPartitionsType.push_back(1);
2216 } // BT
2217 if (m_inertAdjustLevel > 0) {
2218 aLVC.m_zPartitions.push_back(-10480.);
2219 aLVC.m_zPartitionsType.push_back(0);
2220 } //
2221 if (m_inertAdjustLevel > 0) {
2222 aLVC.m_zPartitions.push_back(-9700.);
2223 aLVC.m_zPartitionsType.push_back(0);
2224 } //
2225 if (m_inertAdjustLevel > 1) {
2226 aLVC.m_zPartitions.push_back(-9300.);
2227 aLVC.m_zPartitionsType.push_back(0);
2228 } // rib
2229 if (m_inertAdjustLevel > 1) {
2230 aLVC.m_zPartitions.push_back(-8800.);
2231 aLVC.m_zPartitionsType.push_back(0);
2232 } // ect
2233 if (m_inertAdjustLevel > 0) {
2234 aLVC.m_zPartitions.push_back(-8610.);
2235 aLVC.m_zPartitionsType.push_back(1);
2236 } // BT
2237 if (m_inertAdjustLevel > 0) {
2238 aLVC.m_zPartitions.push_back(-8000.);
2239 aLVC.m_zPartitionsType.push_back(1);
2240 } // BT
2241 aLVC.m_zPartitions.push_back(-m_ectZ);
2242 aLVC.m_zPartitionsType.push_back(0); // ECT/small wheel
2243 if (m_activeAdjustLevel > 0) {
2244 aLVC.m_zPartitions.push_back(-7450.);
2245 aLVC.m_zPartitionsType.push_back(0);
2246 } // EIS
2247 if (m_activeAdjustLevel > 2) {
2248 aLVC.m_zPartitions.push_back(-7364.);
2249 aLVC.m_zPartitionsType.push_back(0);
2250 } // EIS
2251 if (m_activeAdjustLevel > 0 || m_inertAdjustLevel > 0) {
2252 aLVC.m_zPartitions.push_back(-7170.);
2253 aLVC.m_zPartitionsType.push_back(0);
2254 } // cone assembly,TGC
2255 if (m_activeAdjustLevel > 0) {
2256 aLVC.m_zPartitions.push_back(-7030.);
2257 aLVC.m_zPartitionsType.push_back(0);
2258 } // TGC
2259 if (m_activeAdjustLevel > 2) {
2260 aLVC.m_zPartitions.push_back(-6978.);
2261 aLVC.m_zPartitionsType.push_back(0);
2262 } // TGC
2263
2264 // barrel
2265 aLVC.m_zPartitions.push_back(-m_diskShieldZ);
2266 aLVC.m_zPartitionsType.push_back(0); // disk
2267 if (m_inertAdjustLevel > 0) {
2268 aLVC.m_zPartitions.push_back(-6829.);
2269 aLVC.m_zPartitionsType.push_back(0);
2270 } // back disk
2271 // if (m_inertAdjustLevel>1) { (*m_zPartitions).push_back(-6600.);
2272 // m_zPartitionsType.push_back(0); } //
2273 aLVC.m_zPartitions.push_back(-6550.);
2274 aLVC.m_zPartitionsType.push_back(0); // outer envelope change
2275 if (m_activeAdjustLevel > 0) {
2276 aLVC.m_zPartitions.push_back(-6100.);
2277 aLVC.m_zPartitionsType.push_back(0);
2278 }
2279 if (m_inertAdjustLevel > 0) {
2280 aLVC.m_zPartitions.push_back(-5503.);
2281 aLVC.m_zPartitionsType.push_back(1);
2282 } // BT
2283 if (m_inertAdjustLevel > 0) {
2284 aLVC.m_zPartitions.push_back(-4772.);
2285 aLVC.m_zPartitionsType.push_back(0);
2286 } //
2287 if (m_activeAdjustLevel > 0) {
2288 aLVC.m_zPartitions.push_back(-4300.);
2289 aLVC.m_zPartitionsType.push_back(0);
2290 } //
2291 aLVC.m_zPartitions.push_back(-4000.);
2292 aLVC.m_zPartitionsType.push_back(0); // outer envelope change
2293 if (m_inertAdjustLevel > 1) {
2294 aLVC.m_zPartitions.push_back(-3700.);
2295 aLVC.m_zPartitionsType.push_back(0);
2296 } //
2297 if (m_inertAdjustLevel > 1) {
2298 aLVC.m_zPartitions.push_back(-3300.);
2299 aLVC.m_zPartitionsType.push_back(0);
2300 } //
2301 if (m_activeAdjustLevel > 0) {
2302 aLVC.m_zPartitions.push_back(-2600.);
2303 aLVC.m_zPartitionsType.push_back(0);
2304 } //
2305 if (m_inertAdjustLevel > 0) {
2306 aLVC.m_zPartitions.push_back(-2078.);
2307 aLVC.m_zPartitionsType.push_back(1);
2308 } // BT
2309 if (m_inertAdjustLevel > 0) {
2310 aLVC.m_zPartitions.push_back(-1347.);
2311 aLVC.m_zPartitionsType.push_back(1);
2312 } // cryoring
2313 if (m_activeAdjustLevel > 0) {
2314 aLVC.m_zPartitions.push_back(-800.);
2315 aLVC.m_zPartitionsType.push_back(1);
2316 } // cryoring
2317 if (m_inertAdjustLevel > 1) {
2318 aLVC.m_zPartitions.push_back(-300.);
2319 aLVC.m_zPartitionsType.push_back(0);
2320 } //
2321 if (static_cast<int>(m_inertAdjustLevel) +
2322 static_cast<int>(m_activeAdjustLevel) <
2323 1) {
2324 aLVC.m_zPartitions.push_back(-0.7 * m_diskShieldZ);
2325 aLVC.m_zPartitionsType.push_back(0);
2326 } //
2327
2328 unsigned int zSiz = aLVC.m_zPartitions.size();
2329 for (unsigned int i = 0; i < zSiz; i++) {
2330 aLVC.m_zPartitions.push_back(-aLVC.m_zPartitions[zSiz - 1 - i]);
2331 if (i < zSiz - 1)
2332 aLVC.m_zPartitionsType.push_back(
2333 aLVC.m_zPartitionsType[zSiz - 2 - i]);
2334 }
2335}
static constexpr double m_outerWheel
minimal extend in z of the outer wheel (EO)

◆ initialize()

StatusCode Muon::MuonTrackingGeometryBuilder::initialize ( )
overridevirtual

AlgTool initailize method.

Reimplemented from Muon::MuonTrackingGeometryBuilderImpl.

Definition at line 22 of file MuonTrackingGeometryBuilder.cxx.

22 {
23 // Retrieve the station builder (if configured)
24 // -------------------------------------------
25 ATH_CHECK(m_stationBuilder.retrieve(EnableTool{m_muonActive}));
27 //
28 // Retrieve the inert material builder builder (if configured)
29 // -------------------------------------------
30 ATH_CHECK(m_inertBuilder.retrieve(EnableTool{m_muonInert || m_blendInertMaterial}));
31
32 if (!m_muonInert)
34
36}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode initialize() override
AlgTool initailize method.
ToolHandle< Trk::IDetachedTrackingVolumeBuilder > m_stationBuilder
A Tool for station type creation.
ToolHandle< Muon::MuonInertMaterialBuilder > m_inertBuilder
A Tool for inert object creation.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ processShield()

TrackingVolumePtr Muon::MuonTrackingGeometryBuilderImpl::processShield ( const Trk::Volume & vol,
int type,
const std::string & volumeName,
LocalVariablesContainer & aLVC,
bool hasStations ) const
protectedinherited

Fix me

Definition at line 1624 of file MuonTrackingGeometryBuilderImpl.cxx.

1628 {
1629 ATH_MSG_VERBOSE( "processing shield volume " << volumeName
1630 << " in mode:" << type);
1631
1632 TrackingVolumePtr tVol{};
1633
1634 unsigned int colorCode = m_colorCode;
1635
1636 std::vector<Trk::DetachedTrackingVolume*> blendVols;
1637
1638 // getPartitionFromMaterial(vol);
1639
1640 // retrieve cylinder
1641 const auto *cyl = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(vol.volumeBounds()));
1642 if (!cyl) {
1643 ATH_MSG_ERROR(" process volume: volume cylinder boundaries not retrieved, return 0 ");
1644 return nullptr;
1645 }
1646 // create vector of zSteps for this volume
1647 std::vector<float> zSteps;
1648 zSteps.clear();
1649 double zPos = vol.center().z();
1650 double hz = cyl->halflengthZ();
1651 double z1 = zPos - hz;
1652 double z2 = zPos + hz;
1653 zSteps.push_back(z1);
1654 for (double iz : aLVC.m_shieldZPart) {
1655 if (iz > z1 && iz < z2) {
1656 zSteps.push_back(iz);
1657 z1 = iz;
1658 }
1659 }
1660 zSteps.push_back(z2);
1661
1662 // phi binning trivial
1663 aLVC.m_adjustedPhi.clear();
1664 aLVC.m_adjustedPhi.push_back(0.);
1665
1666 unsigned int etaN = zSteps.size() - 1;
1667
1668 // create z,h bin utilities
1669 auto zBinUtil = Trk::BinUtility(zSteps, Trk::BinningOption::open,
1671 auto pBinUtil = Trk::BinUtility(1, -M_PI, M_PI, Trk::BinningOption::closed,
1673 std::vector<std::vector<Trk::BinUtility>> hBinUtil{};
1674 float phiRef = 0.;
1675 for (unsigned iz = 0; iz < zSteps.size() - 1; iz++) {
1676 std::vector<Trk::BinUtility> phBinUtil;
1677 phBinUtil.emplace_back(phiRef, aLVC.m_shieldHPart[type]);
1678 hBinUtil.push_back(std::move(phBinUtil));
1679 }
1680
1681
1682 // create subvolumes & BinnedArray
1683 std::vector<Trk::TrackingVolumeOrderPosition> subVolumesVect;
1684 std::vector<std::vector<std::vector<Trk::TrackingVolume*>>> subVolumes;
1685 std::vector<std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume>>>> hBins;
1686 std::vector<Trk::TrackingVolume*> sVolsInn; // for gluing
1687 std::vector<Trk::TrackingVolume*> sVolsOut; // for gluing
1688 std::vector<Trk::TrackingVolume*> sVolsNeg; // for gluing
1689 std::vector<Trk::TrackingVolume*> sVolsPos; // for gluing
1690 for (unsigned int eta = 0; eta < zSteps.size() - 1; eta++) {
1691 if (colorCode > 0)
1692 colorCode = 26 - colorCode;
1693 double posZ = 0.5 * (zSteps[eta] + zSteps[eta + 1]);
1694 double hZ = 0.5 * std::abs(zSteps[eta + 1] - zSteps[eta]);
1695 std::vector<std::vector<Trk::TrackingVolume*> > phiSubs;
1696 std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume>>> phBins{};
1697 int phi = 0;
1698 double posPhi = 0.;
1699 double phiSect = M_PI;
1700 std::vector<std::pair<int, float> > hSteps = aLVC.m_shieldHPart[type];
1701 std::vector<Trk::TrackingVolume*> hSubs;
1702 std::vector<Trk::TrackingVolumeOrderPosition> hSubsTr;
1703 unsigned int hCode = 1;
1704 for (unsigned int h = 0; h < hSteps.size() - 1; h++) {
1705 hCode = (colorCode > 0) ? 1 - hCode : 0;
1706 // define subvolume
1707 auto subBds = std::make_shared<Trk::CylinderVolumeBounds>(hSteps[h].second, hSteps[h + 1].second, phiSect, hZ);
1708 const double mediumRadius = subBds->mediumRadius();
1710 Trk::Volume subVol(makeTransform(transf), std::move(subBds));
1711
1712 // enclosed muon objects ? also adjusts material properties in case
1713 // of material blend
1714 std::string volName = volumeName + MuonGM::buildString(eta, 2) +
1716 MuonGM::buildString(h, 2);
1717 blendVols.clear();
1718 std::vector<Trk::DetachedTrackingVolume*> detVols{};
1719 if (hasStations) {
1720 detVols = getDetachedObjects(subVol, blendVols, aLVC);
1721 }
1722 auto detVolPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1723 auto sVol = std::make_unique<Trk::TrackingVolume>(subVol, aLVC.m_muonMaterial,
1724 std::move(detVolPtr), volName);
1725
1726 // statistics
1727 ++aLVC.m_frameNum;
1728 aLVC.m_frameStat += detVols.size();
1729 // prepare blending
1730 if (m_blendInertMaterial && !blendVols.empty()) {
1731 for (auto& blendVol : blendVols) {
1732 aLVC.m_blendMap[blendVol].push_back(sVol.get());
1733 }
1734 }
1735 // reference point for the check of envelope
1736 double posR = 0.5 * (hSteps[h].second + hSteps[h + 1].second);
1737 // loop over inner cutouts
1738 for (unsigned int in = 1; in < aLVC.m_msCutoutsIn.size(); in++) {
1739 if (posZ >= aLVC.m_msCutoutsIn[in].second &&
1740 posZ <= aLVC.m_msCutoutsIn[in - 1].second) {
1741 if (posR < aLVC.m_msCutoutsIn[in].first)
1742 sVol->sign(Trk::BeamPipe);
1743 break;
1744 }
1745 }
1746 //
1747 sVol->registerColorCode(colorCode + hCode);
1748 // reference position
1749 const Amg::Vector3D gp = mediumRadius * Amg::Vector3D::UnitX();
1750 hSubs.push_back(sVol.get());
1751
1752 // glue subVolume
1753 if (h == 0)
1754 sVolsInn.push_back(sVol.get());
1755 if (h == hSteps.size() - 2)
1756 sVolsOut.push_back(sVol.get());
1757 if (eta == 0)
1758 sVolsNeg.push_back(sVol.get());
1759 if (eta == etaN - 1)
1760 sVolsPos.push_back(sVol.get());
1761 // in R/H
1762 if (h > 0) { // glue 'manually'
1763 m_trackingVolumeHelper->setInsideTrackingVolume(*sVol,
1765 hSubs[h - 1]);
1766 m_trackingVolumeHelper->setOutsideTrackingVolume(*hSubs[h - 1],
1768 sVol.get());
1769 }
1770 // in eta
1771 if (etaN > 1 && eta > 0)
1772 m_trackingVolumeHelper->setOutsideTrackingVolumeArray(*sVol,
1774 hBins[eta - 1][phi]);
1775 // We need to be careful here
1776 // This will end up in subVols.
1777 // subVols will end up in the volume we create.
1778 // That volume will manage it
1779 subVolumesVect.emplace_back(std::move(sVol), transf * gp);
1780 // The following is used for glueing of volumes to volumes
1781 //Notice that we effectively have a "view" ptr.
1782 auto& back = subVolumesVect.back();
1783 //coverity[MULTIPLE_INIT_SMART_PTRS]
1784 auto ptrNoDelete = std::shared_ptr<Trk::TrackingVolume>(
1786 hSubsTr.push_back({ptrNoDelete, back.second});
1787 }
1788 phiSubs.push_back(std::move(hSubs));
1790 auto volBinArray = std::make_unique<Trk::BinnedArray1D<Trk::TrackingVolume>>(hSubsTr, hBinUtil[eta][phi]);
1791 phBins.push_back(std::move(volBinArray));
1792
1793 // finish eta gluing
1794 if (etaN > 1 && eta > 0) {
1795 for (auto& j : subVolumes[eta - 1][phi]) {
1796 m_trackingVolumeHelper->setOutsideTrackingVolumeArray(*j,
1798 phBins[phi]);
1799 }
1800 }
1801 subVolumes.push_back(std::move(phiSubs));
1802 hBins.push_back(std::move(phBins));
1803 }
1804
1805 auto hBinVecPtr = std::move(hBinUtil);
1806 auto subVols = std::make_unique<Trk::BinnedArray1D1D1D<Trk::TrackingVolume>>(subVolumesVect,
1807 zBinUtil,
1808 pBinUtil,
1809 hBinVecPtr);
1810
1811 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.m_muonMaterial, nullptr,
1812 std::move(subVols), volumeName);
1813 // register glue volumes
1814 Trk::GlueVolumesDescriptor& volGlueVolumes = tVol->glueVolumesDescriptor();
1815 volGlueVolumes.registerGlueVolumes(Trk::tubeInnerCover, sVolsInn);
1816 volGlueVolumes.registerGlueVolumes(Trk::tubeOuterCover, sVolsOut);
1817 volGlueVolumes.registerGlueVolumes(Trk::negativeFaceXY, sVolsNeg);
1818 volGlueVolumes.registerGlueVolumes(Trk::positiveFaceXY, sVolsPos);
1819
1820 return tVol;
1821}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_ERROR(x,...)
ToolHandle< Trk::ITrackingVolumeHelper > m_trackingVolumeHelper
Helper Tool to create TrackingVolumes.
std::vector< Trk::DetachedTrackingVolume * > getDetachedObjects(const Trk::Volume &trkVol, std::vector< Trk::DetachedTrackingVolume * > &, LocalVariablesContainer &aLVC, int mode=0) const
Private method to find detached volumes.
std::unique_ptr< Trk::TrackingVolume > TrackingVolumePtr
void registerGlueVolumes(BoundarySurfaceFace, std::vector< TrackingVolume * > &)
register the volumes
const Amg::Vector3D & center() const
returns the center of the volume
Definition Volume.h:90
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition Volume.h:96
Eigen::Affine3d Transform3D
Amg::Isometry3D getTranslateZ3D(const double Z)
: Returns a shift transformation along the z-axis
Amg::Isometry3D getRotateZ3D(double angle)
Rotate the coordinate system by an angle around the z-axis.
return m_collEvts back().back().max_entries
std::string buildString(int i, int ncha)
std::unique_ptr< Amg::Transform3D > makeTransform(const Amg::Transform3D &trf)
const auto do_not_delete
@ open
Definition BinningType.h:40
@ closed
Definition BinningType.h:41
@ tubeSectorInnerCover
@ tubeSectorOuterCover
@ binPhi
Definition BinningType.h:51
@ binZ
Definition BinningType.h:49

◆ processVolume() [1/2]

TrackingVolumePtr Muon::MuonTrackingGeometryBuilderImpl::processVolume ( const Trk::Volume & vol,
int mode,
const std::string & volumeName,
LocalVariablesContainer & aLVC,
bool hasStations ) const
protectedinherited

Definition at line 1106 of file MuonTrackingGeometryBuilderImpl.cxx.

1110 {
1111 ATH_MSG_VERBOSE( "processing volume in mode:" << mode);
1112
1113 // mode : -1 ( adjusted z/phi partition )
1114 // 0 ( -"- plus barrel H binning )
1115 // 0 ( -"- plus inner endcap H binning )
1116 // 0 ( -"- plus outer endcap H binning )
1117
1118 TrackingVolumePtr tVol{};
1119
1120 unsigned int colorCode = m_colorCode;
1121
1122 std::vector<Trk::DetachedTrackingVolume*> blendVols;
1123
1124 // getPartitionFromMaterial(vol);
1125
1126 // retrieve cylinder
1127 const auto *cyl = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(vol.volumeBounds()));
1128 if (!cyl) {
1129 ATH_MSG_ERROR(" process volume: volume cylinder boundaries not retrieved, return 0 ");
1130 return nullptr;
1131 }
1132 // create vector of zSteps for this volume
1133 std::vector<float> zSteps;
1134 std::vector<int> zTypes;
1135 double zPos = vol.center().z();
1136 double hz = cyl->halflengthZ();
1137 double z1 = zPos - hz;
1138 double z2 = zPos + hz;
1139 zSteps.push_back(z1);
1140 for (unsigned int iz = 0; iz < aLVC.m_zPartitions.size(); iz++) {
1141 if (aLVC.m_zPartitions[iz] == zSteps.front())
1142 zTypes.push_back(aLVC.m_zPartitionsType[iz]);
1143 if (aLVC.m_zPartitions[iz] > z1 && aLVC.m_zPartitions[iz] < z2) {
1144 zSteps.push_back(aLVC.m_zPartitions[iz]);
1145 if (zTypes.empty()) {
1146 if (iz == 0)
1147 zTypes.push_back(0);
1148 else
1149 zTypes.push_back(aLVC.m_zPartitionsType[iz - 1]);
1150 }
1151 zTypes.push_back(aLVC.m_zPartitionsType[iz]);
1152 z1 = aLVC.m_zPartitions[iz];
1153 }
1154 }
1155 zSteps.push_back(z2);
1156
1157 for (unsigned int iz = 0; iz < zSteps.size(); iz++)
1158 ATH_MSG_DEBUG("z partition in volume:" << volumeName << ":" << iz << ":"
1159 << zSteps[iz]);
1160
1161 // phi binning
1162 if (std::abs(zPos) > m_barrelZ &&
1163 cyl->outerRadius() < aLVC.m_outerBarrelRadius)
1164 getPhiParts(0, aLVC);
1165 else if (std::abs(zPos) <= m_ectZ)
1166 getPhiParts(2, aLVC);
1167 else if (std::abs(zPos) <= aLVC.m_innerEndcapZ)
1168 getPhiParts(3, aLVC);
1169 else if (std::abs(zPos) > m_outerWheel &&
1170 cyl->outerRadius() > m_outerShieldRadius)
1171 getPhiParts(1, aLVC);
1172 else if (std::abs(zPos) > aLVC.m_innerEndcapZ &&
1173 std::abs(zPos) < m_bigWheel &&
1174 cyl->outerRadius() > m_outerShieldRadius)
1175 getPhiParts(1, aLVC);
1176 else
1177 getPhiParts(0, aLVC);
1178
1179 // R/H binning ?
1180 unsigned int etaN = zSteps.size() - 1;
1181 unsigned int phiN = aLVC.m_adjustedPhi.size();
1182
1183 int phiTypeMax = 0; // count different partitions
1184
1185 if (mode > -1) {
1186 // create z,phi bin utilities
1187 auto zBinUtil = Trk::BinUtility(zSteps, Trk::open, Trk::binZ);
1188 auto pBinUtil = Trk::BinUtility(aLVC.m_adjustedPhi, Trk::closed, Trk::binPhi);
1189 std::vector<std::vector<Trk::BinUtility>> hBinUtil{};
1190 for (unsigned iz = 0; iz < zSteps.size() - 1; iz++) {
1191 std::vector<Trk::BinUtility> phBinUtil{};
1192 for (unsigned ip = 0; ip < aLVC.m_adjustedPhi.size(); ip++) {
1193 // retrieve reference phi
1194 float phiRef = 0.5 * aLVC.m_adjustedPhi[ip];
1195 if (ip < aLVC.m_adjustedPhi.size() - 1)
1196 phiRef += 0.5 * aLVC.m_adjustedPhi[ip + 1];
1197 else
1198 phiRef += 0.5 * aLVC.m_adjustedPhi[0] + M_PI;
1199
1200 if (aLVC.m_adjustedPhiType[ip] > phiTypeMax)
1201 phiTypeMax = aLVC.m_adjustedPhiType[ip];
1202 for (std::pair<int, float> i :
1203 aLVC.m_hPartitions[mode][zTypes[iz]]
1204 [aLVC.m_adjustedPhiType[ip]]) {
1205 ATH_MSG_VERBOSE(" mode " << mode << " phiRef " << phiRef
1206 << " zTypes[iz] " << zTypes[iz]
1207 << " m_adjustedPhiType[ip] "
1208 << aLVC.m_adjustedPhiType[ip]
1209 << " hPartitions " << i.second);
1210 }
1211 phBinUtil.emplace_back(phiRef,
1212 aLVC.m_hPartitions[mode][zTypes[iz]][aLVC.m_adjustedPhiType[ip]]);
1213 }
1214 hBinUtil.push_back(std::move(phBinUtil));
1215 }
1216
1217 // create subvolumes & BinnedArray
1218 std::vector<Trk::TrackingVolumeOrderPosition> subVolumesVect;
1219 std::vector<std::vector<std::vector<Trk::TrackingVolume*>>> subVolumes;
1220 std::vector<std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume> > > >
1221 hBins;
1222 std::vector<Trk::TrackingVolume*> sVolsInn; // for gluing
1223 std::vector<Trk::TrackingVolume*> sVolsOut; // for gluing
1224 std::vector<Trk::TrackingVolume*> sVolsNeg; // for gluing
1225 std::vector<Trk::TrackingVolume*> sVolsPos; // for gluing
1226 for (unsigned int eta = 0; eta < zSteps.size() - 1; eta++) {
1227 if (colorCode > 0) {
1228 colorCode = 6 - colorCode;
1229 }
1230 double posZ = 0.5 * (zSteps[eta] + zSteps[eta + 1]);
1231 double hZ = 0.5 * std::abs(zSteps[eta + 1] - zSteps[eta]);
1232 std::vector<std::vector<Trk::TrackingVolume*> > phiSubs;
1233 std::vector<std::shared_ptr<Trk::BinnedArray<Trk::TrackingVolume>>> phBins;
1234 std::vector<int> phiType(phiTypeMax + 1, -1);
1235 std::vector<std::vector<Trk::Volume*> > garbVol(phiTypeMax + 1);
1236 unsigned int pCode = 1;
1237 for (unsigned int phi = 0; phi < phiN; phi++) {
1238 pCode = (colorCode > 0) ? 3 - pCode : 0;
1239 double posPhi = 0.5 * aLVC.m_adjustedPhi[phi];
1240 double phiSect = 0.;
1241 if (phi < phiN - 1) {
1242 posPhi += 0.5 * aLVC.m_adjustedPhi[phi + 1];
1243 phiSect = 0.5 * std::abs(aLVC.m_adjustedPhi[phi + 1] -
1244 aLVC.m_adjustedPhi[phi]);
1245 } else {
1246 posPhi += 0.5 * aLVC.m_adjustedPhi[0] + M_PI;
1247 phiSect = 0.5 * std::abs(aLVC.m_adjustedPhi[0] + 2 * M_PI -
1248 aLVC.m_adjustedPhi[phi]);
1249 }
1250 std::vector<std::pair<int, float> > hSteps =
1251 aLVC.m_hPartitions[mode][zTypes[eta]]
1252 [aLVC.m_adjustedPhiType[phi]];
1253 std::vector<Trk::TrackingVolume*> hSubs;
1254 std::vector<Trk::TrackingVolumeOrderPosition> hSubsTr;
1255 int phiP = phiType[aLVC.m_adjustedPhiType[phi]];
1256
1257 unsigned int hCode = 1;
1258 for (unsigned int h = 0; h < hSteps.size() - 1; h++) {
1259 hCode = colorCode > 0 ? 1 - hCode : 0;
1260 // similar volume may exist already
1261 std::unique_ptr<Trk::Volume> subVol{};
1262 const Amg::Transform3D transf = Amg::getRotateZ3D(posPhi) * Amg::getTranslateZ3D(posZ);
1263 //
1264 int volType = 0; // cylinder
1265 if (hSteps[h].first == 1 && hSteps[h + 1].first == 0)
1266 volType = 1;
1267 if (hSteps[h].first == 0 && hSteps[h + 1].first == 1)
1268 volType = 2;
1269 if (hSteps[h].first == 1 && hSteps[h + 1].first == 1)
1270 volType = 3;
1271 // define subvolume
1272 if (phiP > -1) {
1273 subVol = std::make_unique<Trk::Volume>(*phiSubs[phiP][h],
1274 transf *phiSubs[phiP][h]->transform().inverse());
1275 } else if (phiSect < 0.5 * M_PI) {
1276 auto subBds = std::make_shared<Trk::BevelledCylinderVolumeBounds>(hSteps[h].second,
1277 hSteps[h + 1].second,
1278 phiSect,
1279 hZ, volType);
1280 subVol = std::make_unique<Trk::Volume>(makeTransform(transf), std::move(subBds));
1281 } else {
1282 auto subBds = std::make_shared<Trk::CylinderVolumeBounds>(hSteps[h].second,
1283 hSteps[h + 1].second,
1284 phiSect, hZ);
1285 subVol = std::make_unique<Trk::Volume>(makeTransform(transf), std::move(subBds));
1286 }
1287
1288 // enclosed muon objects ? also adjusts material properties
1289 // in case of material blend
1290 std::string volName = volumeName +
1293 MuonGM::buildString(h, 2);
1294 blendVols.clear();
1295 std::vector<Trk::DetachedTrackingVolume*> detVols{};
1296 if (hasStations) {
1297 detVols = getDetachedObjects(*subVol, blendVols, aLVC);
1298 }
1299 auto detVolsPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1300 auto sVol = std::make_unique<Trk::TrackingVolume>(*subVol,
1301 aLVC.m_muonMaterial,
1302 std::move(detVolsPtr),
1303 volName);
1304
1305 // statistics
1306 ++aLVC.m_frameNum;
1307 aLVC.m_frameStat += detVols.size();
1308 // prepare blending
1309 if (m_blendInertMaterial && !blendVols.empty()) {
1310 for (auto& blendVol : blendVols) {
1311 aLVC.m_blendMap[blendVol].push_back(sVol.get());
1312 }
1313 }
1314 // reference point for the check of envelope
1315 double posR = 0.5 * (hSteps[h].second + hSteps[h + 1].second);
1316 // loop over inner cutouts
1317 for (unsigned int in = 1; in < aLVC.m_msCutoutsIn.size(); ++in) {
1318 if (posZ >= aLVC.m_msCutoutsIn[in].second &&
1319 posZ <= aLVC.m_msCutoutsIn[in - 1].second) {
1320 if (posR < aLVC.m_msCutoutsIn[in].first) {
1321 sVol->sign(Trk::BeamPipe);
1322 }
1323 break;
1324 }
1325 }
1326 // loop over outer cutouts
1327 for (unsigned int io = 1; io < aLVC.m_msCutoutsOut.size(); ++io) {
1328 if (posZ >= aLVC.m_msCutoutsOut[io - 1].second &&
1329 posZ <= aLVC.m_msCutoutsOut[io].second) {
1330 if (posR > aLVC.m_msCutoutsOut[io].first){
1331 sVol->sign(Trk::Cavern);
1332 }
1333 break;
1334 }
1335 }
1336 //
1337 sVol->registerColorCode(colorCode + pCode + hCode);
1338 // reference position
1339 const Amg::Vector3D gp =
1340 0.5 * (hSteps[h].second + hSteps[h + 1].second) * Amg::Vector3D::UnitX();
1341 hSubs.push_back(sVol.get());
1342
1343 // glue subVolume
1344 if (h == 0)
1345 sVolsInn.push_back(sVol.get());
1346 if (h == hSteps.size() - 2)
1347 sVolsOut.push_back(sVol.get());
1348 if (eta == 0)
1349 sVolsNeg.push_back(sVol.get());
1350 if (eta == etaN - 1)
1351 sVolsPos.push_back(sVol.get());
1352 // in R/H
1353 if (h > 0) { // glue 'manually'
1354 if (volType == 1 || volType == 3) { // plane surface
1355 m_trackingVolumeHelper->setOutsideTrackingVolume(*sVol,
1357 hSubs[h - 1]);
1358 m_trackingVolumeHelper->setOutsideTrackingVolume(*hSubs[h - 1],
1360 sVol.get());
1361 } else { // cylinder surface
1362 m_trackingVolumeHelper->setInsideTrackingVolume(*sVol,
1364 hSubs[h - 1]);
1365 m_trackingVolumeHelper->setOutsideTrackingVolume(*hSubs[h - 1],
1367 sVol.get());
1368 }
1369 }
1370 // in phi
1371 if (phiN > 1 && phi > 0) {
1372 m_trackingVolumeHelper->setOutsideTrackingVolumeArray(*sVol,
1374 phBins[phi - 1]);
1375 if (phi == phiN - 1){
1376 m_trackingVolumeHelper->setOutsideTrackingVolumeArray(*sVol,
1378 phBins[0]);
1379 }
1380 }
1381 // in eta
1382 if (etaN > 1 && eta > 0) {
1383 m_trackingVolumeHelper->setOutsideTrackingVolumeArray(*sVol,
1385 hBins[eta - 1][phi]);
1386 }
1387 //We need to be careful here
1388 //This will end up in subVols.
1389 //subVols will end up in the volume we create.
1390 //That volume will manage it
1391 subVolumesVect.emplace_back(std::move(sVol), transf * gp);
1392 //The following is used for glueing of volumes to volumes
1393 //Notice that we effectively have a "view" ptr.
1394 auto& back = subVolumesVect.back();
1395 //coverity[MULTIPLE_INIT_SMART_PTRS]
1396 auto ptrNoDelete = std::shared_ptr<Trk::TrackingVolume>(
1397 back.first.get(),
1399 hSubsTr.push_back({ptrNoDelete,back.second});
1400 }
1401 phiSubs.push_back(std::move(hSubs));
1402 auto volBinArray = std::make_unique<Trk::BinnedArray1D<Trk::TrackingVolume>>(hSubsTr,
1403 hBinUtil[eta][phi]);
1404 phBins.emplace_back(std::move(volBinArray));
1405 // save link to current partition for cloning
1406 if (phiP < 0)
1407 phiType[aLVC.m_adjustedPhiType[phi]] = phi;
1408
1409 // finish phi gluing
1410 if (phiN > 1 && phi > 0) {
1411 for (auto& j : phiSubs[phi - 1]) {
1412 m_trackingVolumeHelper->setOutsideTrackingVolumeArray(*j,
1414 phBins[phi]);
1415 }
1416 }
1417 if (phiN > 1 && phi == phiN - 1) {
1418 for (auto& j : phiSubs[0]) {
1419 m_trackingVolumeHelper->setOutsideTrackingVolumeArray(*j,
1421 phBins[phi]);
1422 }
1423 }
1424 // finish eta gluing
1425 if (etaN > 1 && eta > 0) {
1426 for (auto& j: subVolumes[eta - 1][phi]) {
1427 m_trackingVolumeHelper->setOutsideTrackingVolumeArray(*j, Trk::positiveFaceXY,
1428 phBins[phi]);
1429 }
1430 }
1431 }
1432 subVolumes.push_back(std::move(phiSubs));
1433 hBins.push_back(std::move(phBins));
1434 }
1435
1436 auto hBinVecPtr = std::move(hBinUtil);
1437 auto subVols = std::make_unique<Trk::BinnedArray1D1D1D<Trk::TrackingVolume>>(subVolumesVect,
1438 zBinUtil,
1439 pBinUtil,
1440 hBinVecPtr);
1441
1442 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.m_muonMaterial, nullptr,
1443 std::move(subVols), volumeName);
1444 // register glue volumes
1445 Trk::GlueVolumesDescriptor& volGlueVolumes = tVol->glueVolumesDescriptor();
1446 volGlueVolumes.registerGlueVolumes(Trk::tubeInnerCover, sVolsInn);
1447 volGlueVolumes.registerGlueVolumes(Trk::tubeOuterCover, sVolsOut);
1448 volGlueVolumes.registerGlueVolumes(Trk::negativeFaceXY, sVolsNeg);
1449 volGlueVolumes.registerGlueVolumes(Trk::positiveFaceXY, sVolsPos);
1450
1451 return tVol;
1452 }
1453
1454 // proceed with 2D z/phi binning
1455 // partitions ? include protection against wrong setup
1456 if (phiN < 1) {
1457 ATH_MSG_ERROR( "wrong partition setup");
1458 phiN = 1;
1459 } else {
1460 ATH_MSG_VERBOSE("partition setup:(z,phi):" << etaN << "," << phiN);
1461 }
1462
1463 if (etaN * phiN > 1) { // partition
1464 // subvolume boundaries
1465
1466 // create subvolumes & BinnedArray
1467 std::vector<Trk::TrackingVolumeOrderPosition> subVolumes(etaN * phiN);
1468 std::vector<Trk::TrackingVolume*> sVols(etaN * phiN); // for gluing
1469 std::vector<Trk::TrackingVolume*> sVolsNeg(phiN); // for gluing
1470 std::vector<Trk::TrackingVolume*> sVolsPos(phiN); // for gluing
1471 for (unsigned int eta = 0; eta < zSteps.size() - 1; ++eta) {
1472 double posZ = 0.5 * (zSteps[eta] + zSteps[eta + 1]);
1473 double hZ = 0.5 * std::abs(zSteps[eta + 1] - zSteps[eta]);
1474 colorCode = 26 - colorCode;
1475 for (unsigned int phi = 0; phi < phiN; phi++) {
1476 colorCode = 26 - colorCode;
1477 double posPhi = 0.5 * aLVC.m_adjustedPhi[phi];
1478 double phiSect = 0.;
1479 if (phi < phiN - 1) {
1480 posPhi += 0.5 * aLVC.m_adjustedPhi[phi + 1];
1481 phiSect = 0.5 * std::abs(aLVC.m_adjustedPhi[phi + 1] -
1482 aLVC.m_adjustedPhi[phi]);
1483 } else {
1484 posPhi += 0.5 * aLVC.m_adjustedPhi[0] + M_PI;
1485 phiSect = 0.5 * std::abs(aLVC.m_adjustedPhi[0] + 2 * M_PI -
1486 aLVC.m_adjustedPhi[phi]);
1487 }
1488 // define subvolume
1489 auto subBds = std::make_shared<Trk::CylinderVolumeBounds>(cyl->innerRadius(), cyl->outerRadius(), phiSect, hZ);
1490 const Amg::Transform3D transf = Amg::getRotateZ3D(posPhi) *
1492 Trk::Volume subVol(makeTransform(transf), std::move(subBds));
1493 // enclosed muon objects ?
1494 std::string volName = volumeName + MuonGM::buildString(eta, 2) +
1496
1497 Trk::Material mat = aLVC.m_muonMaterial;
1498 blendVols.clear();
1499 std::vector<Trk::DetachedTrackingVolume*> detVols{} ;
1500 if (hasStations) {
1501 detVols = getDetachedObjects(subVol, blendVols, aLVC);
1502 }
1503 auto detVolPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1504 auto sVol = std::make_unique<Trk::TrackingVolume>(subVol, aLVC.m_muonMaterial,
1505 std::move(detVolPtr),
1506 volName);
1507 // statistics
1508 ++aLVC.m_frameNum;
1509 aLVC.m_frameStat += detVols.size();
1510 // prepare blending
1511 if (m_blendInertMaterial && !blendVols.empty()) {
1512 for (auto& blendVol : blendVols) {
1513 aLVC.m_blendMap[blendVol].push_back(sVol.get());
1514 }
1515 }
1516 // reference point for the check of envelope
1517 double posR = 0.5 * (cyl->innerRadius() + cyl->outerRadius());
1518 // loop over inner cutouts
1519 for (unsigned int in = 1; in < aLVC.m_msCutoutsIn.size(); ++in) {
1520 if (posZ >= aLVC.m_msCutoutsIn[in].second &&
1521 posZ <= aLVC.m_msCutoutsIn[in - 1].second) {
1522 if (posR < aLVC.m_msCutoutsIn[in].first)
1523 sVol->sign(Trk::BeamPipe);
1524 break;
1525 }
1526 }
1527 // loop over outer cutouts
1528 for (unsigned int io = 1; io < aLVC.m_msCutoutsOut.size(); ++io) {
1529 if (posZ >= aLVC.m_msCutoutsOut[io - 1].second &&
1530 posZ <= aLVC.m_msCutoutsOut[io].second) {
1531 if (posR > aLVC.m_msCutoutsOut[io].first)
1532 sVol->sign(Trk::Cavern);
1533 break;
1534 }
1535 }
1536 sVol->registerColorCode(colorCode);
1537 // reference position
1538 const Amg::Vector3D gp = cyl->outerRadius() * Amg::Vector3D::UnitX();
1539 // glue subVolumes
1540 // sVols[phi*etaN+eta] = sVol;
1541 sVols[phiN * eta + phi] = sVol.get();
1542 if (eta == 0){
1543 sVolsNeg[phi] = sVol.get();
1544 }
1545 if (eta == etaN - 1) {
1546 sVolsPos[phi] = sVol.get();
1547 }
1548 // in phi
1549 if (phiN > 1 && phi > 0) {
1550 m_trackingVolumeHelper->glueTrackingVolumes(*sVol,
1552 *sVols[eta * phiN + phi - 1],
1554 if (phi == phiN - 1) {
1555 m_trackingVolumeHelper->glueTrackingVolumes(*sVols[eta * phiN],
1557 *sVol,
1559 }
1560 }
1561 // in eta
1562 if (etaN > 1 && eta > 0) {
1563 m_trackingVolumeHelper->glueTrackingVolumes(*sVol,
1565 *sVols[(eta - 1) * phiN + phi],
1567 }
1568 //
1569 subVolumes[phi * etaN + eta] = std::make_pair(std::move(sVol), transf * gp);
1570
1571 }
1572 }
1573
1574 // Trk::BinUtility2DZF* volBinUtil=new
1575 // Trk::BinUtility2DZF(zSteps,m_adjustedPhi,new
1576 // Amg::Transform3D(vol->transform()));
1577 Trk::BinUtility zBinUtil(zSteps, Trk::BinningOption::open,
1579 const Trk::BinUtility pBinUtil(aLVC.m_adjustedPhi,
1582
1583 zBinUtil += pBinUtil;
1584
1585 auto volBinUtil = Trk::BinUtility(std::move(zBinUtil)); // TODO verify ordering PhiZ vs. ZPhi
1586
1587 auto subVols = std::make_unique<Trk::BinnedArray2D<Trk::TrackingVolume>>(subVolumes,
1588 volBinUtil);
1589
1590 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.m_muonMaterial, nullptr,
1591 std::move(subVols), volumeName);
1592 // register glue volumes
1593 Trk::GlueVolumesDescriptor& volGlueVolumes = tVol->glueVolumesDescriptor();
1594 volGlueVolumes.registerGlueVolumes(Trk::tubeInnerCover, sVols);
1595 volGlueVolumes.registerGlueVolumes(Trk::tubeOuterCover, sVols);
1596 volGlueVolumes.registerGlueVolumes(Trk::negativeFaceXY, sVolsNeg);
1597 volGlueVolumes.registerGlueVolumes(Trk::positiveFaceXY, sVolsPos);
1598
1599 } else {
1600 // enclosed muon objects ?
1601 blendVols.clear();
1602 std::vector<Trk::DetachedTrackingVolume*> muonObjs{};
1603 if (hasStations) {
1604 muonObjs = getDetachedObjects(vol, blendVols, aLVC);
1605 }
1606 auto muonObjPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(muonObjs);
1607 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.m_muonMaterial,
1608 std::move(muonObjPtr),
1609 volumeName);
1610 // statistics
1611 ++aLVC.m_frameNum;
1612 aLVC.m_frameStat += muonObjs.size();
1613 // prepare blending
1614 if (m_blendInertMaterial && !blendVols.empty()) {
1615 for (auto& blendVol : blendVols) {
1616 aLVC.m_blendMap[blendVol].push_back(tVol.get());
1617 }
1618 }
1619 }
1620
1621 return tVol;
1622}
Gaudi::Property< double > m_barrelZ
maximal extend in z of the inner part of muon endcap
void getPhiParts(int, LocalVariablesContainer &aLVC) const
Private method to retrieve phi partition.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
@ tubeSectorPositivePhi
@ tubeSectorNegativePhi

◆ processVolume() [2/2]

TrackingVolumePtr Muon::MuonTrackingGeometryBuilderImpl::processVolume ( const Trk::Volume & vol,
int etaN,
int phiN,
const std::string & volumeName,
LocalVariablesContainer & aLVC,
bool hasStations ) const
protectedinherited

Private methods to define subvolumes and fill them with detached volumes.

Definition at line 931 of file MuonTrackingGeometryBuilderImpl.cxx.

935 {
936 TrackingVolumePtr tVol{};
937
938 unsigned int colorCode = m_colorCode;
939
940 std::vector<Trk::DetachedTrackingVolume*> blendVols;
941
942 // partitions ? include protection against wrong setup
943 if (etaN < 1 || phiN < 1) {
944 ATH_MSG_ERROR( "wrong partition setup");
945 etaN = 1;
946 phiN = 1;
947 }
948 if (etaN * phiN > 1) { // partition
949 const auto *cyl = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(vol.volumeBounds()));
950 if (!cyl) {
951 ATH_MSG_ERROR(" process volume: volume cylinder boundaries not retrieved, return 0 ");
952 return nullptr;
953 }
954 double phiSect = M_PI / phiN;
955 double etaSect = (cyl->halflengthZ()) / etaN;
956
957 auto subBds = std::make_shared<Trk::CylinderVolumeBounds>(cyl->innerRadius(), cyl->outerRadius(), phiSect, etaSect);
958 auto protVol = std::make_unique<Trk::Volume>(nullptr, std::move(subBds));
959
960 // create subvolumes & BinnedArray
961 std::vector<Trk::TrackingVolumeOrderPosition> subVolumes;
962 std::vector<Trk::TrackingVolume*> sVols; // for gluing
963 std::vector<Trk::TrackingVolume*> sVolsNeg; // for gluing
964 std::vector<Trk::TrackingVolume*> sVolsPos; // for gluing
965 for (int eta = 0; eta < etaN; eta++) {
966 if (colorCode > 0)
967 colorCode = 26 - colorCode;
968 // reference point for the check of envelope
969 double posZ = vol.center().z() + etaSect * (2. * eta + 1. - etaN);
970 double posR = 0.5 * (cyl->innerRadius() + cyl->outerRadius());
971 int geoSignature = 4;
972 // loop over inner cutouts
973 for (unsigned int in = 1; in < aLVC.m_msCutoutsIn.size(); in++) {
974 if (posZ >= aLVC.m_msCutoutsIn[in].second &&
975 posZ <= aLVC.m_msCutoutsIn[in - 1].second) {
976 if (posR < aLVC.m_msCutoutsIn[in].first)
977 geoSignature = 2;
978 break;
979 }
980 }
981 if (geoSignature == 4) {
982 // loop over outer cutouts
983 for (unsigned int io = 1; io < aLVC.m_msCutoutsOut.size();
984 io++) {
985 if (posZ >= aLVC.m_msCutoutsOut[io - 1].second &&
986 posZ <= aLVC.m_msCutoutsOut[io].second) {
987 if (posR > aLVC.m_msCutoutsOut[io].first)
988 geoSignature = 5;
989 break;
990 }
991 }
992 }
993 for (int phi = 0; phi < phiN; phi++) {
994 if (colorCode > 0)
995 colorCode = 26 - colorCode;
996 // define subvolume
997 const Amg::Transform3D transf = Amg::getRotateZ3D(phiSect * (2 * phi + 1)) *
999 auto subVol = std::make_unique<Trk::Volume>(*protVol, transf);
1000 // enclosed muon objects ?
1001 std::string volName = volumeName + MuonGM::buildString(eta, 2) +
1003 blendVols.clear();
1004 std::vector<Trk::DetachedTrackingVolume*> detVols{};
1005 if (hasStations) {
1006 detVols = getDetachedObjects(*subVol, blendVols, aLVC);
1007 }
1008 auto detVolVecPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(detVols);
1009 auto sVol = std::make_unique<Trk::TrackingVolume>(*subVol, aLVC.m_muonMaterial,
1010 std::move(detVolVecPtr), volName);
1011 // statistics
1012 ++aLVC.m_frameNum;
1013 aLVC.m_frameStat += detVols.size();
1014 // prepare blending
1015 if (m_blendInertMaterial && !blendVols.empty()) {
1016 for (auto& blendVol : blendVols) {
1017 aLVC.m_blendMap[blendVol].push_back(sVol.get());
1018 }
1019 }
1020 //
1021 if (geoSignature == 2) {
1022 sVol->sign(Trk::BeamPipe);
1023 }
1024 if (geoSignature == 5) {
1025 sVol->sign(Trk::Cavern);
1026 }
1027 sVol->registerColorCode(colorCode);
1028 // reference position
1029 const Amg::Vector3D gp = cyl->outerRadius() *
1030 Amg::Vector3D::UnitX();;
1031 // glue subVolumes
1032 sVols.push_back(sVol.get());
1033 if (eta == 0)
1034 sVolsNeg.push_back(sVol.get());
1035 if (eta == etaN - 1)
1036 sVolsPos.push_back(sVol.get());
1037 // in phi
1038 if (phiN > 1 && phi > 0) {
1039 m_trackingVolumeHelper->glueTrackingVolumes(*sVol,
1041 *sVols[eta * phiN + phi - 1],
1043 if (phi == phiN - 1)
1044 m_trackingVolumeHelper->glueTrackingVolumes(*sVols[eta * phiN],
1046 *sVol,
1048 }
1049 // in eta
1050 if (etaN > 1 && eta > 0)
1051 m_trackingVolumeHelper->glueTrackingVolumes(*sVol,
1053 *sVols[(eta - 1) * phiN + phi],
1055 //
1056 subVolumes.emplace_back(std::move(sVol), transf * gp);
1057 }
1058 }
1059
1060 Trk::BinUtility buPhi(phiN, -M_PI, M_PI, Trk::closed, Trk::binPhi);
1061 const Amg::Vector3D volCenter{vol.transform().translation()};
1062 const Trk::BinUtility buZ(etaN,
1063 volCenter.z() - cyl->halflengthZ(),
1064 volCenter.z() + cyl->halflengthZ(),
1066 buPhi += buZ;
1067
1068 auto volBinUtil = Trk::BinUtility(std::move(buPhi));
1069 auto subVols = std::make_unique<Trk::BinnedArray2D<Trk::TrackingVolume>>(std::move(subVolumes),
1070 volBinUtil);
1071
1072 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.m_muonMaterial, nullptr,
1073 std::move(subVols), volumeName);
1074 // register glue volumes
1075 Trk::GlueVolumesDescriptor& volGlueVolumes = tVol->glueVolumesDescriptor();
1076 volGlueVolumes.registerGlueVolumes(Trk::tubeInnerCover, sVols);
1077 volGlueVolumes.registerGlueVolumes(Trk::tubeOuterCover, sVols);
1078 volGlueVolumes.registerGlueVolumes(Trk::negativeFaceXY, sVolsNeg);
1079 volGlueVolumes.registerGlueVolumes(Trk::positiveFaceXY, sVolsPos);
1080
1081 } else {
1082 // enclosed muon objects ?
1083 blendVols.clear();
1084 std::vector<Trk::DetachedTrackingVolume*> muonObjs{};
1085 if (hasStations) {
1086 muonObjs = getDetachedObjects(vol, blendVols, aLVC);
1087 }
1088 auto muonObjsPtr = std::make_unique<std::vector<Trk::DetachedTrackingVolume*>>(muonObjs);
1089
1090 tVol = std::make_unique<Trk::TrackingVolume>(vol, aLVC.m_muonMaterial, std::move(muonObjsPtr),
1091 volumeName);
1092 // statistics
1093 ++aLVC.m_frameNum;
1094 aLVC.m_frameStat += muonObjs.size();
1095 // prepare blending
1096 if (m_blendInertMaterial && !blendVols.empty()) {
1097 for (auto& blendVol : blendVols) {
1098 aLVC.m_blendMap[blendVol].push_back(tVol.get());
1099 }
1100 }
1101 }
1102
1103 return tVol;
1104}
const Amg::Transform3D & transform() const
Return methods for geometry transform.
Definition Volume.h:83

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ signature()

Trk::GeometrySignature Muon::MuonTrackingGeometryBuilderImpl::signature ( )
inlinestaticinherited

The unique signature.

Definition at line 76 of file MuonTrackingGeometryBuilderImpl.h.

76{ return Trk::MS; }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ trackingGeometry()

std::unique_ptr< Trk::TrackingGeometry > Muon::MuonTrackingGeometryBuilder::trackingGeometry ( Trk::TrackingVolume * tvol = 0) const
overridevirtual

TrackingGeometry Interface method.

Implements Trk::IGeometryBuilder.

Definition at line 39 of file MuonTrackingGeometryBuilder.cxx.

39 {
40 // process muon material objects
41 std::vector<std::unique_ptr<Trk::DetachedTrackingVolume>> stations;
43 stations = m_stationBuilder->buildDetachedTrackingVolumes();
44 }
45
46
47 std::vector<std::unique_ptr<Trk::DetachedTrackingVolume> > inertObjs;
49 inertObjs = m_inertBuilder->buildDetachedTrackingVolumes(m_blendInertMaterial);
50 }
51
52 return MuonTrackingGeometryBuilderImpl::trackingGeometryImpl(std::move(stations), std::move(inertObjs), tvol);
53}
std::unique_ptr< Trk::TrackingGeometry > trackingGeometryImpl(DetachedVolVec &&stations, DetachedVolVec &&inertObjs, Trk::TrackingVolume *tvol) const

◆ trackingGeometryImpl()

std::unique_ptr< Trk::TrackingGeometry > Muon::MuonTrackingGeometryBuilderImpl::trackingGeometryImpl ( DetachedVolVec && stations,
DetachedVolVec && inertObjs,
Trk::TrackingVolume * tvol ) const
inherited

FIX ME

Definition at line 82 of file MuonTrackingGeometryBuilderImpl.cxx.

84 {
85 ATH_MSG_DEBUG( " building tracking geometry");
86 bool hasStations = !inertObjs.empty() || !stations.empty();
87
88 // load local variables to container
91 aLVC.m_outerBarrelRadius = m_outerBarrelRadius;
92 aLVC.m_innerEndcapZ = m_innerEndcapZ;
93 aLVC.m_outerEndcapZ = m_outerEndcapZ;
94 aLVC.m_adjustStatic = m_adjustStatic;
95 aLVC.m_static3d = m_static3d;
97 // check setup
99 if (!aLVC.m_adjustStatic || !aLVC.m_static3d) {
100 ATH_MSG_INFO( " diluted inert material hardcoded for 3D "
101 "volume frame, adjusting setup");
102 aLVC.m_adjustStatic = true;
103 aLVC.m_static3d = true;
104 }
105 }
106 // find object's span with tolerance for the alignment
107
108 aLVC.m_stationSpan = findVolumesSpan(stations, 100. * m_alignTolerance,
109 m_alignTolerance * Gaudi::Units::deg, aLVC);
110
111 aLVC.m_inertSpan = findVolumesSpan(inertObjs, 0., 0., aLVC);
112
113 // 0) Preparation
114 // //////////////////////////////////////////////////////////////////////////////////////
115
116 aLVC.m_muonMaterial = Trk::Material(10e10, 10e10, 0., 0., 0.); // default material properties
117
118
119
121 // Envelope definition (cutouts)
123 RZPairVector envelopeDefs;
125 // get the dimensions from the envelope service
126 const RZPairVector& envelopeDefsIn = m_enclosingEnvelopeSvc->getMuonRZBoundary();
127
128 // find the max,max pair
129 unsigned int ii = 0;
130 for (unsigned int i = 0; i < envelopeDefsIn.size(); i++) {
131 if (envelopeDefsIn[i].second > envelopeDefsIn[ii].second)
132 ii = i;
133 else if (envelopeDefsIn[i].second == envelopeDefsIn[ii].second &&
134 envelopeDefsIn[i].first > envelopeDefsIn[ii].first)
135 ii = i;
136 }
137
138 // find the sense of rotation
139 int irot = 1;
140 unsigned int inext = ii + 1;
141 if (inext == envelopeDefsIn.size())
142 inext = 0;
143 if (envelopeDefsIn[inext].second != envelopeDefsIn[ii].second) {
144 irot = -1;
145 inext = ii > 0 ? ii - 1 : envelopeDefsIn.size() - 1;
146 }
147
148 // fill starting with upper low edge, end with upper high edge
149 if (irot > 0) {
150 for (unsigned int i = inext; i < envelopeDefsIn.size(); i++)
151 envelopeDefs.push_back(envelopeDefsIn[i]);
152 if (inext > 0)
153 for (unsigned int i = 0; i <= inext - 1; i++)
154 envelopeDefs.push_back(envelopeDefsIn[i]);
155 } else {
156 int i = inext;
157 while (i >= 0) {
158 envelopeDefs.push_back(envelopeDefsIn[i]);
159 i = i - 1;
160 };
161 inext = envelopeDefsIn.size() - 1;
162 while (inext >= ii) {
163 envelopeDefs.push_back(envelopeDefsIn[inext]);
164 inext = inext - 1;
165 };
166 }
167
168 // find maximal z,R extent
169 double maxR = 0.;
170 for (auto& envelopeDef : envelopeDefs) {
171 if (envelopeDef.first > maxR)
172 maxR = envelopeDef.first;
173 }
174
175 aLVC.m_outerBarrelRadius = maxR;
176 aLVC.m_outerEndcapZ = envelopeDefs[0].second;
177
178 ATH_MSG_VERBOSE("Muon envelope definition retrieved: outer R,Z:"
179 << aLVC.m_outerBarrelRadius << ","
180 << aLVC.m_outerEndcapZ);
181
182 // construct inner and outer envelope
183
184 for (unsigned int i = 0; i < envelopeDefs.size(); i++) {
185 ATH_MSG_VERBOSE("Rz pair:" << i << ":" << envelopeDefs[i].first
186 << "," << envelopeDefs[i].second);
187 }
188 }
189
191
192 if (m_muonSimple) {
193 auto globalBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.m_outerBarrelRadius, aLVC.m_outerEndcapZ);
194 auto topVolume = std::make_unique<Trk::TrackingVolume>(nullptr, std::move(globalBounds), aLVC.m_muonMaterial,
195 nullptr, nullptr, "GlobalVolume");
196 return std::make_unique<Trk::TrackingGeometry>(topVolume.release());
197 }
198
199 ATH_MSG_DEBUG( "building barrel+innerEndcap+outerEndcap");
200
202 // MuonSpectrometer contains:
203 // - Barrel
204 // - Endcaps inner/outer
205 std::vector<TrackingVolumePtr> volumeGarbage{};
206
207 TrackingVolumePtr muonBarrel{}, negativeMuonOuterWheel{},
208 negativeMuonBigWheel{}, negativeMuonOuterBuffer{},
209 positiveMuonOuterWheel{}, negativeMuonSmallWheel{},
210 positiveMuonSmallWheel{}, negativeECT{}, positiveECT{},
211 positiveMuonBigWheel{}, positiveMuonOuterBuffer{};
212 // volumes needed to close the geometry
213 TrackingVolumePtr negBeamPipe{}, posBeamPipe{}, negDiskShield{}, posDiskShield{},
214 negInnerShield{}, posInnerShield{}, negOuterShield{}, posOuterShield{};
215
216 std::shared_ptr<Trk::CylinderVolumeBounds> enclosedBounds{};
217
218 TrackingVolumePtr barrelZPBuffer{}, barrelZMBuffer{};
219 TrackingVolumePtr barrelZP{}, centralP{}, central{},
220 negativeMuonInnerEndcap{}, positiveMuonInnerEndcap{},
221 negNavOEndcap{}, posNavOEndcap{}, negativeMuonOuterEndcap{},
222 positiveMuonOuterEndcap{}, barrel{}, negOuterEndcap{},
223 posOuterEndcap{}, negInnerEndcap{}, posInnerEndcap{}, negNavEndcap{},
224 posNavEndcap{}, negEndcap{}, posEndcap{}, negDet{}, detector{}, enclosed{};
225
226
227 // if input, redefine dimensions to fit expected MS entry
228 if (tvol) {
229 bool msEntryDefined = false;
230 if (tvol->volumeName() == m_entryVolume)
231 msEntryDefined = true;
232 // get dimensions
233 ATH_MSG_DEBUG(" msEntryDefined " << msEntryDefined);
234 const auto *enclosedDetectorBounds =dynamic_cast<const Trk::CylinderVolumeBounds*>(&(tvol->volumeBounds()));
235 if (!enclosedDetectorBounds) {
236 ATH_MSG_ERROR(" dynamic cast of enclosed volume to the cylinder bounds failed, aborting MTG build-up ");
237 return nullptr;
238 }
239 double enclosedDetectorHalfZ = enclosedDetectorBounds->halflengthZ();
240 double enclosedDetectorOuterRadius =
241 enclosedDetectorBounds->outerRadius();
242 // get subvolumes at navigation level and check THEIR dimensions
243 Trk::GlueVolumesDescriptor& enclosedDetGlueVolumes = tvol->glueVolumesDescriptor();
244 std::vector<Trk::TrackingVolume*> enclosedCentralFaceVolumes = enclosedDetGlueVolumes.glueVolumes(Trk::cylinderCover);
245 std::vector<Trk::TrackingVolume*> enclosedNegativeFaceVolumes = enclosedDetGlueVolumes.glueVolumes(Trk::negativeFaceXY);
246 std::vector<Trk::TrackingVolume*> enclosedPositiveFaceVolumes = enclosedDetGlueVolumes.glueVolumes(Trk::positiveFaceXY);
247 if (!enclosedCentralFaceVolumes.empty()) {
248 const auto *cylR = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(enclosedCentralFaceVolumes[0]->volumeBounds()));
249 if (cylR && cylR->outerRadius() != enclosedDetectorOuterRadius) {
250 enclosedDetectorOuterRadius = cylR->outerRadius();
251 ATH_MSG_WARNING(" enclosed volume envelope outer radius does not "
252 "correspond to radius of glue volumes : adjusted ");
253 }
254 }
255 if (!enclosedNegativeFaceVolumes.empty() &&
256 !enclosedPositiveFaceVolumes.empty()) {
257 double negZ = -enclosedDetectorHalfZ;
258 double posZ = enclosedDetectorHalfZ;
259 const auto *cylN = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(enclosedNegativeFaceVolumes[0]->volumeBounds()));
260 if (cylN){
261 negZ = enclosedNegativeFaceVolumes[0]->center().z() - cylN->halflengthZ();
262 }
263 const auto *cylP =dynamic_cast<const Trk::CylinderVolumeBounds*>(&(enclosedPositiveFaceVolumes[0]->volumeBounds()));
264 if (cylP) {
265 posZ = enclosedPositiveFaceVolumes[0]->center().z() +
266 cylP->halflengthZ();
267 }
268 if (std::abs(negZ + enclosedDetectorHalfZ) > 0.001 ||
269 std::abs(posZ - enclosedDetectorHalfZ) > 0.001) {
270 ATH_MSG_WARNING(" enclosed volume envelope z dimension does not correspond to that of glue volumes ");
271 if (std::abs(negZ + posZ) < 0.001) {
272 enclosedDetectorHalfZ = posZ;
273 ATH_MSG_WARNING( " z adjusted ");
274 } else {
275 ATH_MSG_ERROR("assymetric Z dimensions - cannot recover " << negZ << "," << posZ);
276 return nullptr;
277 }
278 }
279 }
280 //
281
282 //
283 ATH_MSG_DEBUG(" dimensions of enclosed detectors (halfZ,outerR):"
284 << enclosedDetectorHalfZ << ","<< enclosedDetectorOuterRadius);
285 // check if input makes sense - gives warning if cuts into muon envelope
286 // adjust radius
287 if (enclosedDetectorOuterRadius > aLVC.m_innerBarrelRadius) {
288 ATH_MSG_WARNING( " enclosed volume too wide, cuts into "
289 "muon envelope, abandon :R:"
290 << enclosedDetectorOuterRadius);
291 return nullptr;
292 }
293 aLVC.m_innerBarrelRadius = enclosedDetectorOuterRadius;
294
295 // adjust z
296 if (enclosedDetectorHalfZ > m_barrelZ) {
297 ATH_MSG_WARNING( " enclosed volume too long, cuts into "
298 <<"muon envelope, abandon :Z:"<< enclosedDetectorHalfZ);
299 return nullptr;
300 } else {
301 if (enclosedDetectorHalfZ < m_barrelZ) {
302 auto barrelZPBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.m_innerBarrelRadius,
303 0.5 * (m_barrelZ - enclosedDetectorHalfZ));
304 auto barrelZMBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.m_innerBarrelRadius,
305 0.5 * (m_barrelZ - enclosedDetectorHalfZ));
306 double zbShift = 0.5 * (m_barrelZ + enclosedDetectorHalfZ);
307
308 barrelZPBuffer = std::make_unique<Trk::TrackingVolume>(makeTransform(Amg::getTranslateZ3D(zbShift)),
309 std::move(barrelZPBounds), aLVC.m_muonMaterial, nullptr,
310 nullptr, "BarrelRZPosBuffer");
311 barrelZMBuffer = std::make_unique<Trk::TrackingVolume>(makeTransform(Amg::getTranslateZ3D(-zbShift)),
312 std::move(barrelZMBounds), aLVC.m_muonMaterial, nullptr,
313 nullptr, "BarrelRZNegBuffer");
314
315 ATH_MSG_DEBUG( "glue barrel R + barrel Z buffer");
316 barrelZP = (m_trackingVolumeHelper->glueTrackingVolumeArrays(TrackingVolumePtr(tvol),
318 std::move(barrelZPBuffer),
319 Trk::negativeFaceXY, "All::Gaps::BarrelZP"));
320 // set name
321 std::string nameEncl = msEntryDefined ? "All::Gaps::Barrel" : m_entryVolume.value();
322 ATH_MSG_DEBUG(" nameEncl " << nameEncl);
323 enclosed = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(barrelZP),
325 std::move(barrelZMBuffer),
327 nameEncl);
328
329 } else{
331 enclosed.reset(tvol);
332 }
333 }
334
335 } else { // no input, create the enclosed volume
337 const RZPairVector& envelopeDefs = m_enclosingEnvelopeSvc->getCaloRZBoundary();
338 // to be implemented in detail - for the moment, take just maximal
339 // extent
340 ATH_MSG_DEBUG(" m_loadMSentry " << m_loadMSentry
341 << " m_enclosingEnvelopeSvc "
343 double rmax = 0.;
344 double zmax = 0.;
345 for (const auto& envelopeDef : envelopeDefs) {
346 rmax = std::max(envelopeDef.first, rmax);
347 zmax = std::max(std::abs(envelopeDef.second), zmax);
348 }
349 if (!envelopeDefs.empty()) {
350 if (rmax > 0. && rmax <= aLVC.m_innerBarrelRadius &&
351 zmax > 0. && zmax <= m_barrelZ) {
352 enclosedBounds = std::make_unique<Trk::CylinderVolumeBounds>(rmax, zmax);
353 } else {
354 ATH_MSG_DEBUG( " input MSEntrance size (R,Z:"<< rmax << "," << zmax
355 << ") clashes with MS material, switch to default values (R,Z:"
356 << aLVC.m_innerBarrelRadius << "," << m_barrelZ << ")");
357 }
358 }
359 }
360
361 if (!enclosedBounds) {
362 enclosedBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.m_innerBarrelRadius, m_barrelZ);
363 }
364 {
365 enclosed = std::make_unique<Trk::TrackingVolume>(nullptr, std::move(enclosedBounds),
366 aLVC.m_muonMaterial, nullptr,
367 nullptr, m_entryVolume);
368 enclosed->registerColorCode(0);
369 }
370 ATH_MSG_DEBUG(" register Barrel m_entryVolume " << m_entryVolume);
371 }
372
373 // construct inner and outer envelope
374
375 for (auto& envelopeDef : envelopeDefs) {
376 // ATH_MSG_VERBOSE( "Rz pair:"<< i<<":"<<
377 // envelopeDefs[i].first<<","<<envelopeDefs[i].second );
378 if (!aLVC.m_msCutoutsIn.empty() &&
379 aLVC.m_msCutoutsIn.back().second == -aLVC.m_outerEndcapZ)
380 break;
381 if (aLVC.m_msCutoutsIn.empty() ||
382 std::abs(aLVC.m_msCutoutsIn.back().second) > m_barrelZ ||
383 std::abs(envelopeDef.second) > m_barrelZ)
384 aLVC.m_msCutoutsIn.push_back(envelopeDef);
385 else if (!aLVC.m_msCutoutsIn.empty() &&
386 aLVC.m_msCutoutsIn.back().second == m_barrelZ &&
387 aLVC.m_msCutoutsIn.back().first != aLVC.m_innerBarrelRadius) {
388 aLVC.m_msCutoutsIn.emplace_back(aLVC.m_innerBarrelRadius,
389 m_barrelZ);
390 aLVC.m_msCutoutsIn.emplace_back(aLVC.m_innerBarrelRadius,
391 -m_barrelZ);
392 aLVC.m_msCutoutsIn.emplace_back(
393 aLVC.m_msCutoutsIn[aLVC.m_msCutoutsIn.size() - 3].first,
394 -m_barrelZ);
395 }
396 }
397
398 unsigned int il = 1;
399 while (envelopeDefs[il - 1].second != -aLVC.m_outerEndcapZ)
400 il++;
401 for (; il < envelopeDefs.size(); il++)
402 aLVC.m_msCutoutsOut.push_back(envelopeDefs[il]);
403
404 for (unsigned int i = 0; i < aLVC.m_msCutoutsIn.size(); i++) {
405 ATH_MSG_VERBOSE("Rz pair for inner MS envelope:"
406 << i << ":" << aLVC.m_msCutoutsIn[i].first << ","
407 << aLVC.m_msCutoutsIn[i].second);
408 }
409 for (unsigned int i = 0; i < aLVC.m_msCutoutsOut.size(); i++) {
410 ATH_MSG_VERBOSE("Rz pair for outer MS envelope:"
411 << i << ":" << aLVC.m_msCutoutsOut[i].first << ","
412 << aLVC.m_msCutoutsOut[i].second);
413 }
414
415 if (aLVC.m_msCutoutsIn[5].second != aLVC.m_innerEndcapZ) {
416 aLVC.m_innerEndcapZ = aLVC.m_msCutoutsIn[5].second;
417 }
418 ATH_MSG_VERBOSE("inner endcap Z set to:" << aLVC.m_innerEndcapZ);
419
420 // create central volume ("enclosed" + disk shields ) - this is to allow
421 // safe gluing with 3D MS binning
422 getShieldParts(aLVC);
423
424 auto negDiskShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.m_innerBarrelRadius,
425 0.5 * (m_diskShieldZ - m_barrelZ));
426 Trk::Volume negDiskVol(makeTransform(Amg::getTranslateZ3D(-0.5 * (m_diskShieldZ + m_barrelZ))),
427 std::move(negDiskShieldBounds));
428 negDiskShield = processShield(negDiskVol, 2, "Muons::Detectors::NegativeDiskShield",
429 aLVC, hasStations);
430
431 auto posDiskShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.m_innerBarrelRadius,
432 0.5 * (m_diskShieldZ - m_barrelZ));
433 Trk::Volume posDiskVol(makeTransform(Amg::getTranslateZ3D(0.5 * (m_diskShieldZ + m_barrelZ))),
434 std::move(posDiskShieldBounds));
435 posDiskShield = processShield(posDiskVol, 2, "Muons::Detectors::PositiveDiskShield",
436 aLVC, hasStations);
437
438 ATH_MSG_DEBUG( "glue enclosed + disk shields");
439 centralP = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(enclosed),
441 std::move(posDiskShield),
443 "Container::CentralP");
444 central = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(centralP),
446 std::move(negDiskShield),
448 "Container::Central");
449 // define basic volumes
450 if (aLVC.m_adjustStatic) {
451 getZParts(aLVC);
452 getHParts(aLVC);
453 }
454
455 // muon barrel
456 auto barrelBounds = std::make_shared<Trk::CylinderVolumeBounds>(aLVC.m_innerBarrelRadius,
457 aLVC.m_outerBarrelRadius,
459 Trk::Volume barrelVol(nullptr, std::move(barrelBounds));
460 // process volume
461 // barrel
462 if (aLVC.m_adjustStatic && aLVC.m_static3d)
463 muonBarrel = processVolume(barrelVol, 0, "Detectors::Barrel",
464 aLVC, hasStations);
465 else if (aLVC.m_adjustStatic)
466 muonBarrel = processVolume(barrelVol, -1, "Detectors::Barrel",
467 aLVC, hasStations);
468 else
469 muonBarrel = processVolume(barrelVol, m_barrelEtaPartition, m_phiPartition,
470 "Detectors::Barrel", aLVC, hasStations);
471 // inner Endcap
472 // build as smallWheel+ECT
473 // small wheel
474 double smallWheelZHalfSize = 0.5 * (m_ectZ - m_diskShieldZ);
475 auto negativeSmallWheelBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_innerShieldRadius,
476 aLVC.m_outerBarrelRadius,
477 smallWheelZHalfSize);
478
479 Trk::Volume negSWVol(makeTransform(Amg::getTranslateZ3D(-m_ectZ + smallWheelZHalfSize)),
480 std::move(negativeSmallWheelBounds));
481 if (aLVC.m_adjustStatic && aLVC.m_static3d) {
482 negativeMuonSmallWheel = processVolume(negSWVol, 1, "Detectors::NegativeSmallWheel",
483 aLVC, hasStations);
484 } else if (aLVC.m_adjustStatic) {
485 negativeMuonSmallWheel = processVolume(negSWVol, -1, "Detectors::NegativeSmallWheel",
486 aLVC, hasStations);
487 } else {
488 negativeMuonSmallWheel = processVolume(negSWVol,
491 "Detectors::NegativeSmallWheel",
492 aLVC, hasStations);
493 }
494 //
495 Trk::Volume posSWVol(negSWVol, Amg::getTranslateZ3D(2 * (m_ectZ - smallWheelZHalfSize)));
496 if (aLVC.m_adjustStatic && aLVC.m_static3d) {
497 positiveMuonSmallWheel = processVolume(posSWVol, 1, "Detectors::PositiveSmallWheel",
498 aLVC, hasStations);
499 } else if (aLVC.m_adjustStatic) {
500 positiveMuonSmallWheel = processVolume(posSWVol, -1, "Detectors::PositiveSmallWheel",
501 aLVC, hasStations);
502 } else {
503 positiveMuonSmallWheel = processVolume(posSWVol, m_innerEndcapEtaPartition,
504 m_phiPartition, "Detectors::PositiveSmallWheel",
505 aLVC, hasStations);
506 }
507 // checkVolume(positiveMuonSmallWheel);
508 // ECT
509 double ectZHalfSize = 0.5 * (aLVC.m_innerEndcapZ - m_ectZ);
510
511 auto negativeECTBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_innerShieldRadius,
512 aLVC.m_outerBarrelRadius,
513 ectZHalfSize);
514
515 Trk::Volume negECTVol(makeTransform(Amg::getTranslateZ3D(-m_ectZ - ectZHalfSize)),
516 std::move(negativeECTBounds));
517 if (aLVC.m_adjustStatic && aLVC.m_static3d) {
518 negativeECT = processVolume(negECTVol, 2, "Detectors::NegativeECT",
519 aLVC, hasStations);
520 } else if (aLVC.m_adjustStatic) {
521 negativeECT = processVolume(negECTVol, -1, "Detectors::NegativeECT",
522 aLVC, hasStations);
523 } else {
525 "Detectors::NegativeECT", aLVC, hasStations);
526 }
527 // checkVolume(negativeECT);
528 //
529 Trk::Volume posECTVol(negECTVol,
530 Amg::getTranslateZ3D(2 * (m_ectZ + ectZHalfSize)));
531 if (aLVC.m_adjustStatic && m_static3d) {
532 positiveECT = processVolume(posECTVol, 2, "Detectors::PositiveECT",
533 aLVC, hasStations);
534 } else if (aLVC.m_adjustStatic) {
535 positiveECT = processVolume(posECTVol, -1, "Detectors::PositiveECT",
536 aLVC, hasStations);
537 } else {
538 positiveECT = processVolume(posECTVol, m_innerEndcapEtaPartition,
539 m_phiPartition, "Detectors::PositiveECT",
540 aLVC, hasStations);
541 }
542 // checkVolume(positiveECT);
543 // glue
544 negativeMuonInnerEndcap = (m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(negativeECT),
546 std::move(negativeMuonSmallWheel),
548 "Container::NegInnerEndcap"));
549 positiveMuonInnerEndcap = (m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(positiveMuonSmallWheel),
551 std::move(positiveECT),
553 "Container::PosInnerEndcap"));
554
555 // inner shields
556 double innerEndcapZHalfSize = 0.5 * (aLVC.m_innerEndcapZ - m_diskShieldZ);
557 auto negInnerShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_beamPipeRadius,
559 innerEndcapZHalfSize);
560 Trk::Volume negisVol{makeTransform(Amg::getTranslateZ3D(-m_diskShieldZ - innerEndcapZHalfSize)),
561 std::move(negInnerShieldBounds)};
562 negInnerShield = processShield(negisVol, 1, "Muons::Detectors::NegativeInnerShield",
563 aLVC, hasStations);
564
565 auto posInnerShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_beamPipeRadius,
567 innerEndcapZHalfSize);
568 Trk::Volume posisVol(makeTransform(Amg::getTranslateZ3D(m_diskShieldZ + innerEndcapZHalfSize)),
569 std::move(posInnerShieldBounds));
570 posInnerShield = processShield(posisVol, 1, "Muons::Detectors::PositiveInnerShield",
571 aLVC, hasStations);
572
573 // outer Endcap
574 // build as bigWheel+buffer+outerWheel
575 // outer wheel
576 double outerWheelZHalfSize = 0.5 * (aLVC.m_outerEndcapZ - m_outerWheel);
577 auto negativeOuterWheelBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_outerShieldRadius,
578 aLVC.m_outerBarrelRadius,
579 outerWheelZHalfSize);
580 Trk::Volume negOWVol(makeTransform(Amg::getTranslateZ3D(-aLVC.m_outerEndcapZ +
581 outerWheelZHalfSize)),
582 std::move(negativeOuterWheelBounds));
583 if (aLVC.m_adjustStatic && aLVC.m_static3d) {
584 negativeMuonOuterWheel = processVolume(negOWVol, 3, "Detectors::NegativeOuterWheel",
585 aLVC, hasStations);
586 } else if (aLVC.m_adjustStatic) {
587 negativeMuonOuterWheel = processVolume(negOWVol, -1, "Detectors::NegativeOuterWheel",
588 aLVC, hasStations);
589 } else {
590 negativeMuonOuterWheel = processVolume(negOWVol, m_outerEndcapEtaPartition,
591 m_phiPartition, "Detectors::NegativeOuterWheel",
592 aLVC, hasStations);
593 }
594 //
595 Trk::Volume posOWVol(negOWVol,
596 Amg::getTranslateZ3D(2 * (aLVC.m_outerEndcapZ - outerWheelZHalfSize)));
597
598 if (aLVC.m_adjustStatic && aLVC.m_static3d) {
599 positiveMuonOuterWheel = processVolume(posOWVol, 3, "Detectors::PositiveOuterWheel",
600 aLVC, hasStations);
601 } else if (aLVC.m_adjustStatic) {
602 positiveMuonOuterWheel = processVolume(posOWVol, -1, "Detectors::PositiveOuterWheel",
603 aLVC, hasStations);
604 } else {
605 positiveMuonOuterWheel = processVolume(posOWVol, m_outerEndcapEtaPartition,
606 m_phiPartition, "Detectors::PositiveOuterWheel",
607 aLVC, hasStations);
608 }
609 // outer buffer
610 double outerBufferZHalfSize = 0.5 * (m_outerWheel - m_bigWheel);
611 auto negativeOuterBufferBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_outerShieldRadius,
612 aLVC.m_outerBarrelRadius,
613 outerBufferZHalfSize);
614
615 Trk::Volume negBuffVol(makeTransform(Amg::getTranslateZ3D(-m_bigWheel -
616 outerBufferZHalfSize)),
617 std::move(negativeOuterBufferBounds));
618 if (aLVC.m_adjustStatic && aLVC.m_static3d) {
619 negativeMuonOuterBuffer = processVolume(negBuffVol, 3, "Detectors::NegativeOuterBuffer",
620 aLVC, hasStations);
621 } else if (aLVC.m_adjustStatic) {
622 negativeMuonOuterBuffer = processVolume(negBuffVol, -1, "Detectors::NegativeOuterBuffer",
623 aLVC, hasStations);
624 } else {
625 negativeMuonOuterBuffer = processVolume(negBuffVol, m_outerEndcapEtaPartition,
626 m_phiPartition, "Detectors::NegativeOuterBuffer",
627 aLVC, hasStations);
628 }
629 //
630 Trk::Volume posBuffVol(negBuffVol, Amg::getTranslateZ3D(2 *(m_bigWheel + outerBufferZHalfSize)));
631 if (aLVC.m_adjustStatic && aLVC.m_static3d) {
632 positiveMuonOuterBuffer = processVolume(posBuffVol, 3, "Detectors::PositiveOuterBuffer",
633 aLVC, hasStations);
634 } else if (aLVC.m_adjustStatic) {
635 positiveMuonOuterBuffer = processVolume(posBuffVol, -1, "Detectors::PositiveOuterBuffer",
636 aLVC, hasStations);
637 } else {
638 positiveMuonOuterBuffer = processVolume(posBuffVol, m_outerEndcapEtaPartition,
639 m_phiPartition, "Detectors::PositiveOuterBuffer",
640 aLVC, hasStations);
641 }
642 // big wheel
643 double bigWheelZHalfSize = 0.5 * (m_bigWheel - aLVC.m_innerEndcapZ);
644 auto negativeBigWheelBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_outerShieldRadius,
645 aLVC.m_outerBarrelRadius,
646 bigWheelZHalfSize);
647
648 Trk::Volume negBWVol(makeTransform(Amg::getTranslateZ3D(-aLVC.m_innerEndcapZ -
649 bigWheelZHalfSize)),
650 std::move(negativeBigWheelBounds));
651 if (aLVC.m_adjustStatic && aLVC.m_static3d) {
652 negativeMuonBigWheel = processVolume(negBWVol, 3, "Detectors::NegativeBigWheel",
653 aLVC, hasStations);
654 } else if (aLVC.m_adjustStatic) {
655 negativeMuonBigWheel = processVolume(negBWVol, -1, "Detectors::NegativeBigWheel",
656 aLVC, hasStations);
657 } else {
658 negativeMuonBigWheel = processVolume(negBWVol, m_outerEndcapEtaPartition,
659 m_phiPartition, "Detectors::NegativeBigWheel",
660 aLVC, hasStations);
661 }
662 //
663 Trk::Volume posBWVol(negBWVol,
664 Amg::getTranslateZ3D(2 * (aLVC.m_innerEndcapZ + bigWheelZHalfSize)));
665 if (aLVC.m_adjustStatic && aLVC.m_static3d) {
666 positiveMuonBigWheel = processVolume(posBWVol, 3, "Detectors::PositiveBigWheel",
667 aLVC, hasStations);
668 } else if (aLVC.m_adjustStatic) {
669 positiveMuonBigWheel = processVolume(posBWVol, -1, "Detectors::PositiveBigWheel",
670 aLVC, hasStations);
671 } else {
672 positiveMuonBigWheel = processVolume(posBWVol, m_outerEndcapEtaPartition,
673 m_phiPartition, "Detectors::PositiveBigWheel",
674 aLVC, hasStations);
675 }
676 // glue
677 negNavOEndcap = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(negativeMuonOuterWheel),
679 std::move(negativeMuonOuterBuffer),
681 "Container::NegOEndcap");
682
683 posNavOEndcap = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(positiveMuonOuterBuffer),
685 std::move(positiveMuonOuterWheel),
687 "Container::PosOEndcap");
688
689
690 negativeMuonOuterEndcap = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(negNavOEndcap),
692 std::move(negativeMuonBigWheel),
694 "Container::NegOuterEndcap");
695
696 positiveMuonOuterEndcap = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(positiveMuonBigWheel),
698 std::move(posNavOEndcap),
700 "Container::PosOuterEndcap");
701
702 // outer shields
703 double outerEndcapZHalfSize = 0.5 * (aLVC.m_outerEndcapZ - aLVC.m_innerEndcapZ);
704 double outerEndcapPosition = 0.5 * (aLVC.m_outerEndcapZ + aLVC.m_innerEndcapZ);
705 auto negOuterShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_beamPipeRadius,
707 outerEndcapZHalfSize);
708 Trk::Volume negosVol(makeTransform(Amg::getTranslateZ3D(-outerEndcapPosition)),
709 std::move(negOuterShieldBounds));
710 negOuterShield = processShield(negosVol, 0, "Muons::Detectors::NegativeOuterShield",
711 aLVC, hasStations);
712
713 auto posOuterShieldBounds = std::make_shared<Trk::CylinderVolumeBounds>(
714 m_beamPipeRadius, m_outerShieldRadius, outerEndcapZHalfSize);
715 Trk::Volume pososVol(makeTransform(Amg::getTranslateZ3D(outerEndcapPosition)),
716 std::move(posOuterShieldBounds));
717 posOuterShield = processShield(pososVol, 0, "Muons::Detectors::PositiveOuterShield",
718 aLVC, hasStations);
719
720 // beamPipe
721 auto negBeamPipeBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_beamPipeRadius,
722 outerEndcapZHalfSize + innerEndcapZHalfSize);
723 auto posBeamPipeBounds = std::make_shared<Trk::CylinderVolumeBounds>(m_beamPipeRadius,
724 outerEndcapZHalfSize + innerEndcapZHalfSize);
725 Trk::Volume negbpVol(makeTransform(Amg::getTranslateZ3D(-aLVC.m_outerEndcapZ + innerEndcapZHalfSize + outerEndcapZHalfSize)),
726 std::move(negBeamPipeBounds));
727 negBeamPipe = processVolume(negbpVol, 1, 1, "Muons::Gaps::NegativeBeamPipe",
728 aLVC, hasStations);
729 Trk::Volume posbpVol(makeTransform(Amg::getTranslateZ3D(aLVC.m_outerEndcapZ - innerEndcapZHalfSize - outerEndcapZHalfSize)),
730 std::move(posBeamPipeBounds));
731 posBeamPipe = processVolume(posbpVol, 1, 1, "Muons::Gaps::PositiveBeamPipe",
732 aLVC, hasStations);
733
734 negBeamPipe->registerColorCode(0);
735 posBeamPipe->registerColorCode(0);
736
737 ATH_MSG_DEBUG( " volumes defined ");
738 //
739 // glue volumes at navigation level, create enveloping volume
740 // radially
741 // central + barrel
742 ATH_MSG_DEBUG( "glue barrel+enclosed volumes");
743 barrel = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(muonBarrel),
745 std::move(central),
747 "All::Container::Barrel");
748 // shield+outerEndcap
749 ATH_MSG_DEBUG( "glue shield+outerEndcap");
750 negOuterEndcap = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(negativeMuonOuterEndcap),
752 std::move(negOuterShield),
754 "Container::NegativeOuterEndcap");
755
756 posOuterEndcap = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(positiveMuonOuterEndcap),
758 std::move(posOuterShield),
760 "Container::PositiveOuterEndcap");
761
762 // shield+innerEndcap
763 ATH_MSG_DEBUG( "glue shield+innerEndcap");
764 negInnerEndcap = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(negativeMuonInnerEndcap),
766 std::move(negInnerShield),
768 "Container::NegativeInnerEndcap");
769 // checkVolume(negInnerEndcap);
770 posInnerEndcap = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(positiveMuonInnerEndcap),
772 std::move(posInnerShield),
774 "Container::PositiveInnerEndcap");
775 // checkVolume(posInnerEndcap);
776 // inner+outerEndcap
777 ATH_MSG_DEBUG( "glue inner+outerEndcap");
778 negNavEndcap = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(negOuterEndcap),
780 std::move(negInnerEndcap),
782 "Container::NegativeEndcap");
783
784 posNavEndcap = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(posInnerEndcap),
786 std::move(posOuterEndcap),
788 "Container::PositiveEndcap");
789
790 // beam pipe + endcaps
791 ATH_MSG_DEBUG( "glue beamPipe+endcaps");
792 negEndcap = (m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(negNavEndcap),
794 std::move(negBeamPipe),
796 "All::Container::NegativeEndcap"));
797 posEndcap = (m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(posNavEndcap),
799 std::move(posBeamPipe),
801 "All::Container::PositiveEndcap"));
802 // checkVolume(negEndcap);
803 // checkVolume(posEndcap);
804 // barrel + endcaps
805 ATH_MSG_DEBUG( "glue barrel+endcaps");
806
807 negDet = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(negEndcap),
809 std::move(barrel),
811 "All::Container::NegDet");
812 detector = m_trackingVolumeHelper->glueTrackingVolumeArrays(std::move(posEndcap),
814 std::move(negDet),
817 // blend material
819 blendMaterial(aLVC);
820
821 // tracking geometry
822 auto trackingGeometry = std::make_unique<Trk::TrackingGeometry>(detector.release(), Trk::globalSearch);
823
824
825 trackingGeometry->addToGarbage(std::move(stations));
826 trackingGeometry->addToGarbage(std::move(inertObjs));
827
828 volumeGarbage.push_back(std::move(negativeMuonOuterWheel));
829 volumeGarbage.push_back(std::move(negativeMuonBigWheel));
830 volumeGarbage.push_back(std::move(negativeMuonOuterBuffer));
831 volumeGarbage.push_back(std::move(positiveMuonOuterWheel));
832
833 volumeGarbage.push_back(std::move(negativeMuonSmallWheel));
834 volumeGarbage.push_back(std::move(positiveMuonSmallWheel));
835 volumeGarbage.push_back(std::move(negativeECT));
836 volumeGarbage.push_back(std::move(positiveECT));
837 volumeGarbage.push_back(std::move(positiveMuonBigWheel));
838
839 volumeGarbage.push_back(std::move(positiveMuonOuterBuffer));
840 volumeGarbage.push_back(std::move(negDiskShield));
841 volumeGarbage.push_back(std::move(posDiskShield));
842
843 trackingGeometry->addToGarbage(std::move(volumeGarbage));
844 ATH_MSG_DEBUG( " returning tracking geometry ");
845 ATH_MSG_DEBUG( " with " << aLVC.m_frameNum << " subvolumes at navigation level");
846 ATH_MSG_DEBUG( "( mean number of enclosed detached volumes:" << float(aLVC.m_frameStat) / aLVC.m_frameNum << ")");
847 return trackingGeometry;
848}
#define ATH_MSG_INFO(x,...)
std::vector< RZPair > RZPairVector
Definition RZPair.h:18
VolumeSpanArray findVolumesSpan(const DetachedVolVec &objs, double zTol, double phiTol, const LocalVariablesContainer &aLVC) const
Private method to filter detached volumes in z span.
void getHParts(LocalVariablesContainer &aLVC) const
Private method to retrieve h partition.
static void getShieldParts(LocalVariablesContainer &aLVC)
Private method to retrieve shield partition.
TrackingVolumePtr processVolume(const Trk::Volume &, int, int, const std::string &, LocalVariablesContainer &aLVC, bool hasStations) const
Private methods to define subvolumes and fill them with detached volumes.
ServiceHandle< IEnvelopeDefSvc > m_enclosingEnvelopeSvc
service to provide input volume size
Gaudi::Property< double > m_outerBarrelRadius
maximal extend in z of the muon barrel
void blendMaterial(LocalVariablesContainer &aLVC) const
Private method to blend the inert material.
Gaudi::Property< double > m_innerEndcapZ
maximal extend in z of the outer part of muon endcap
void getZParts(LocalVariablesContainer &aLVC) const
Private method to retrieve z partition.
Gaudi::Property< double > m_innerBarrelRadius
< minimal extend in radial dimension of the muon barrel
TrackingVolumePtr processShield(const Trk::Volume &, int, const std::string &, LocalVariablesContainer &aLVC, bool hasStations) const
const std::vector< TrackingVolume * > & glueVolumes(BoundarySurfaceFace)
retrieve them again
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
GlueVolumesDescriptor & glueVolumesDescriptor()
Private struct to contain local variables we dont want to be global in this class.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_activeAdjustLevel

Gaudi::Property<int> Muon::MuonTrackingGeometryBuilderImpl::m_activeAdjustLevel {this, "ActiveAdjustLevel", 2}
protectedinherited

Definition at line 217 of file MuonTrackingGeometryBuilderImpl.h.

217{this, "ActiveAdjustLevel", 2};

◆ m_adjustStatic

Gaudi::Property<bool> Muon::MuonTrackingGeometryBuilderImpl::m_adjustStatic {this, "AdjustStatic", true}
protectedinherited

Definition at line 207 of file MuonTrackingGeometryBuilderImpl.h.

207{this, "AdjustStatic", true};

◆ m_alignTolerance

Gaudi::Property<double> Muon::MuonTrackingGeometryBuilderImpl::m_alignTolerance
protectedinherited
Initial value:
{this, "AlignmentPositionTolerance",
0.}

Definition at line 214 of file MuonTrackingGeometryBuilderImpl.h.

214 {this, "AlignmentPositionTolerance",
215 0.};

◆ m_barrelEtaPartition

Gaudi::Property<int> Muon::MuonTrackingGeometryBuilderImpl::m_barrelEtaPartition {this, "EtaBarrelPartitions", 9}
protectedinherited

Definition at line 200 of file MuonTrackingGeometryBuilderImpl.h.

200{this, "EtaBarrelPartitions", 9};

◆ m_barrelZ

Gaudi::Property<double> Muon::MuonTrackingGeometryBuilderImpl::m_barrelZ {this, "BarrelZ", 6785.}
protectedinherited

maximal extend in z of the inner part of muon endcap

Definition at line 186 of file MuonTrackingGeometryBuilderImpl.h.

186{this, "BarrelZ", 6785.};

◆ m_beamPipeRadius

double Muon::MuonTrackingGeometryBuilderImpl::m_beamPipeRadius {70.}
staticconstexprprotectedinherited

Definition at line 195 of file MuonTrackingGeometryBuilderImpl.h.

195{70.};

◆ m_bigWheel

double Muon::MuonTrackingGeometryBuilderImpl::m_bigWheel {15600.}
staticconstexprprotectedinherited

maximal extend in z of the big wheel

Definition at line 192 of file MuonTrackingGeometryBuilderImpl.h.

192{15600.};

◆ m_blendInertMaterial

Gaudi::Property<bool> Muon::MuonTrackingGeometryBuilderImpl::m_blendInertMaterial
protectedinherited
Initial value:
{this, "BlendInertMaterial",
false}

Definition at line 210 of file MuonTrackingGeometryBuilderImpl.h.

210 {this, "BlendInertMaterial",
211 false};

◆ m_colorCode

Gaudi::Property<int> Muon::MuonTrackingGeometryBuilderImpl::m_colorCode {this, "ColorCode", 0}
protectedinherited

Definition at line 216 of file MuonTrackingGeometryBuilderImpl.h.

216{this, "ColorCode", 0};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_diskShieldZ

double Muon::MuonTrackingGeometryBuilderImpl::m_diskShieldZ {6915.}
staticconstexprprotectedinherited

Definition at line 198 of file MuonTrackingGeometryBuilderImpl.h.

198{6915.};

◆ m_ectZ

double Muon::MuonTrackingGeometryBuilderImpl::m_ectZ {7920.}
staticconstexprprotectedinherited

minimal extent in z of the ECT

Definition at line 194 of file MuonTrackingGeometryBuilderImpl.h.

194{7920.};

◆ m_enclosingEnvelopeSvc

ServiceHandle<IEnvelopeDefSvc> Muon::MuonTrackingGeometryBuilderImpl::m_enclosingEnvelopeSvc
protectedinherited
Initial value:
{
this, "EnvelopeDefinitionSvc", "AtlasEnvelopeDefSvc",
"n"}

service to provide input volume size

Definition at line 169 of file MuonTrackingGeometryBuilderImpl.h.

169 {
170 this, "EnvelopeDefinitionSvc", "AtlasEnvelopeDefSvc",
171 "n"};

◆ m_entryVolume

Gaudi::Property<std::string> Muon::MuonTrackingGeometryBuilderImpl::m_entryVolume
protectedinherited
Initial value:
{this, "EntryVolumeName",
"MuonSpectrometerEntrance"}

Definition at line 220 of file MuonTrackingGeometryBuilderImpl.h.

220 {this, "EntryVolumeName",
221 "MuonSpectrometerEntrance"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_exitVolume

Gaudi::Property<std::string> Muon::MuonTrackingGeometryBuilderImpl::m_exitVolume
protectedinherited
Initial value:
{
this, "ExitVolumeName", "All::Container::CompleteDetector"}

Definition at line 222 of file MuonTrackingGeometryBuilderImpl.h.

222 {
223 this, "ExitVolumeName", "All::Container::CompleteDetector"};

◆ m_inertAdjustLevel

Gaudi::Property<int> Muon::MuonTrackingGeometryBuilderImpl::m_inertAdjustLevel {this, "InertAdjustLevel", 1}
protectedinherited

Definition at line 218 of file MuonTrackingGeometryBuilderImpl.h.

218{this, "InertAdjustLevel", 1};

◆ m_inertBuilder

ToolHandle<Muon::MuonInertMaterialBuilder> Muon::MuonTrackingGeometryBuilder::m_inertBuilder
private
Initial value:
{this, "InertMaterialBuilder",
"Muon::MuonInertMaterialBuilder/"
"MuonInertMaterialBuilder"}

A Tool for inert object creation.

Definition at line 61 of file MuonTrackingGeometryBuilder.h.

61 {this, "InertMaterialBuilder",
62 "Muon::MuonInertMaterialBuilder/"
63 "MuonInertMaterialBuilder"};

◆ m_innerBarrelRadius

Gaudi::Property<double> Muon::MuonTrackingGeometryBuilderImpl::m_innerBarrelRadius
protectedinherited
Initial value:
{this, "InnerBarrelRadius",
4255.}

< minimal extend in radial dimension of the muon barrel

maximal extend in radial dimension of the muon barrel

Definition at line 180 of file MuonTrackingGeometryBuilderImpl.h.

180 {this, "InnerBarrelRadius",
181 4255.};

◆ m_innerEndcapEtaPartition

Gaudi::Property<int> Muon::MuonTrackingGeometryBuilderImpl::m_innerEndcapEtaPartition
protectedinherited
Initial value:
{
this, "EtaInnerEndcapPartitions", 3}

Definition at line 201 of file MuonTrackingGeometryBuilderImpl.h.

201 {
202 this, "EtaInnerEndcapPartitions", 3};

◆ m_innerEndcapZ

Gaudi::Property<double> Muon::MuonTrackingGeometryBuilderImpl::m_innerEndcapZ {this, "InnerEndcapZ", 12900.}
protectedinherited

maximal extend in z of the outer part of muon endcap

Definition at line 188 of file MuonTrackingGeometryBuilderImpl.h.

188{this, "InnerEndcapZ", 12900.};

◆ m_innerShieldRadius

double Muon::MuonTrackingGeometryBuilderImpl::m_innerShieldRadius {850.}
staticconstexprprotectedinherited

Definition at line 196 of file MuonTrackingGeometryBuilderImpl.h.

196{850.};

◆ m_loadMSentry

Gaudi::Property<bool> Muon::MuonTrackingGeometryBuilderImpl::m_loadMSentry {this, "LoadMSEntry", false}
protectedinherited

Definition at line 174 of file MuonTrackingGeometryBuilderImpl.h.

174{this, "LoadMSEntry", false};

◆ m_muonActive

Gaudi::Property<bool> Muon::MuonTrackingGeometryBuilderImpl::m_muonActive {this, "BuildActiveMaterial", true}
protectedinherited

Definition at line 175 of file MuonTrackingGeometryBuilderImpl.h.

175{this, "BuildActiveMaterial", true};

◆ m_muonInert

Gaudi::Property<bool> Muon::MuonTrackingGeometryBuilderImpl::m_muonInert {this, "BuildInertMaterial", true}
protectedinherited

Definition at line 176 of file MuonTrackingGeometryBuilderImpl.h.

176{this, "BuildInertMaterial", true};

◆ m_muonSimple

Gaudi::Property<bool> Muon::MuonTrackingGeometryBuilderImpl::m_muonSimple {this, "SimpleMuonGeometry", false}
protectedinherited

Definition at line 173 of file MuonTrackingGeometryBuilderImpl.h.

173{this, "SimpleMuonGeometry", false};

◆ m_outerBarrelRadius

Gaudi::Property<double> Muon::MuonTrackingGeometryBuilderImpl::m_outerBarrelRadius
protectedinherited
Initial value:
{this, "OuterBarrelRadius",
13910.}

maximal extend in z of the muon barrel

Definition at line 183 of file MuonTrackingGeometryBuilderImpl.h.

183 {this, "OuterBarrelRadius",
184 13910.};

◆ m_outerEndcapEtaPartition

Gaudi::Property<int> Muon::MuonTrackingGeometryBuilderImpl::m_outerEndcapEtaPartition
protectedinherited
Initial value:
{
this, "EtaOuterEndcapPartitions", 3}

Definition at line 203 of file MuonTrackingGeometryBuilderImpl.h.

203 {
204 this, "EtaOuterEndcapPartitions", 3};

◆ m_outerEndcapZ

Gaudi::Property<double> Muon::MuonTrackingGeometryBuilderImpl::m_outerEndcapZ {this, "OuterEndcapZ", 26046.}
protectedinherited

Definition at line 190 of file MuonTrackingGeometryBuilderImpl.h.

190{this, "OuterEndcapZ", 26046.};

◆ m_outerShieldRadius

double Muon::MuonTrackingGeometryBuilderImpl::m_outerShieldRadius {1500.}
staticconstexprprotectedinherited

Definition at line 197 of file MuonTrackingGeometryBuilderImpl.h.

197{1500.};

◆ m_outerWheel

double Muon::MuonTrackingGeometryBuilderImpl::m_outerWheel {21000.}
staticconstexprprotectedinherited

minimal extend in z of the outer wheel (EO)

Definition at line 193 of file MuonTrackingGeometryBuilderImpl.h.

193{21000.};

◆ m_phiPartition

Gaudi::Property<int> Muon::MuonTrackingGeometryBuilderImpl::m_phiPartition {this, "PhiPartitions", 16}
protectedinherited

Definition at line 205 of file MuonTrackingGeometryBuilderImpl.h.

205{this, "PhiPartitions", 16};

◆ m_removeBlended

Gaudi::Property<bool> Muon::MuonTrackingGeometryBuilderImpl::m_removeBlended
protectedinherited
Initial value:
{this, "RemoveBlendedMaterialObjects",
false}

Definition at line 212 of file MuonTrackingGeometryBuilderImpl.h.

212 {this, "RemoveBlendedMaterialObjects",
213 false};

◆ m_static3d

Gaudi::Property<bool> Muon::MuonTrackingGeometryBuilderImpl::m_static3d {this, "StaticPartition3D", true}
protectedinherited

Definition at line 208 of file MuonTrackingGeometryBuilderImpl.h.

208{this, "StaticPartition3D", true};

◆ m_stationBuilder

ToolHandle<Trk::IDetachedTrackingVolumeBuilder> Muon::MuonTrackingGeometryBuilder::m_stationBuilder
private
Initial value:
{
this, "MuonStationBuilder",
"Muon::MuonStationBuilder/MuonStationBuilder"}

A Tool for station type creation.

Definition at line 55 of file MuonTrackingGeometryBuilder.h.

55 {
56 this, "MuonStationBuilder",
57 "Muon::MuonStationBuilder/MuonStationBuilder"};

◆ m_trackingVolumeArrayCreator

ToolHandle<Trk::ITrackingVolumeArrayCreator> Muon::MuonTrackingGeometryBuilderImpl::m_trackingVolumeArrayCreator
protectedinherited
Initial value:
{
this, "TrackingVolumeArrayCreator",
"Trk::TrackingVolumeArrayCreator/"
"TrackingVolumeArrayCreator"}

Helper Tool to create TrackingVolume Arrays.

Definition at line 154 of file MuonTrackingGeometryBuilderImpl.h.

154 {
155 this, "TrackingVolumeArrayCreator",
156 "Trk::TrackingVolumeArrayCreator/"
157 "TrackingVolumeArrayCreator"};

◆ m_trackingVolumeHelper

ToolHandle<Trk::ITrackingVolumeHelper> Muon::MuonTrackingGeometryBuilderImpl::m_trackingVolumeHelper
protectedinherited
Initial value:
{
this, "TrackingVolumeHelper",
"Trk::TrackingVolumeHelper/TrackingVolumeHelper"}

Helper Tool to create TrackingVolumes.

Definition at line 163 of file MuonTrackingGeometryBuilderImpl.h.

163 {
164 this, "TrackingVolumeHelper",
165 "Trk::TrackingVolumeHelper/TrackingVolumeHelper"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_volumeConverter

Trk::VolumeConverter Muon::MuonTrackingGeometryBuilderImpl::m_volumeConverter
protectedinherited

Volume helper to find geometrical span of enclosed volumes.

Definition at line 113 of file MuonTrackingGeometryBuilderImpl.h.


The documentation for this class was generated from the following files: