ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTrackingGeometryBuilderImpl.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6// MuonTrackingGeometryBuilderImpl.h, (c) ATLAS Detector software
8
9#ifndef MUONTRACKINGGEOMETRY_MUONTRACKINGGEOMETRYBUILDERIMPL_H
10#define MUONTRACKINGGEOMETRY_MUONTRACKINGGEOMETRYBUILDERIMPL_H
11// Amg
14// Trk
20// Gaudi
22#include "GaudiKernel/ToolHandle.h"
24// EnvelopeDefinitionService
27
28namespace Trk {
30class Material;
31class VolumeBounds;
33
34using TrackingVolumeOrderPosition = std::pair<std::shared_ptr<TrackingVolume>,
36
37} // namespace Trk
38
39namespace Muon {
40
53
55 public:
59 virtual StatusCode initialize() override;
61
62 using DetachedVolPtr = std::unique_ptr<Trk::DetachedTrackingVolume>;
63 using DetachedVolVec = std::vector<DetachedVolPtr>;
64 using VolumeSpanPtr = std::shared_ptr<const Trk::VolumeSpan>;
65 using DetachedVolSpanPair = std::pair<Trk::DetachedTrackingVolume*, VolumeSpanPtr>;
66 using VolumeSpanArray = std::array<std::vector<DetachedVolSpanPair>, 9>;
67 using TrackingVolumePtr = std::unique_ptr<Trk::TrackingVolume>;
68 using SharedTrackingVolume = std::shared_ptr<Trk::TrackingVolume>;
69 using TrackingVolumeVec = std::vector<TrackingVolumePtr>;
70
71 std::unique_ptr<Trk::TrackingGeometry> trackingGeometryImpl(DetachedVolVec && stations,
72 DetachedVolVec && inertObjs,
73 Trk::TrackingVolume* tvol) const;
74
77
78 protected:
79 MuonTrackingGeometryBuilderImpl(const std::string&, const std::string&,
80 const IInterface*);
81
88 double m_innerEndcapZ = 0;
89 double m_outerEndcapZ = 0;
90 bool m_adjustStatic = false;
91 bool m_static3d = false;
92 unsigned int m_frameNum = 0;
93 unsigned int m_frameStat = 0;
94 std::vector<double> m_zPartitions;
95 std::vector<int> m_zPartitionsType;
96 std::vector<float> m_adjustedPhi;
97 std::vector<int> m_adjustedPhiType;
98 std::vector<
99 std::vector<std::vector<std::vector<std::pair<int, float>>>>>
101 std::vector<double> m_shieldZPart;
102 std::vector<std::vector<std::pair<int, float>>> m_shieldHPart;
104 std::vector<Trk::TrackingVolume*>> m_blendMap;
110 };
111
116 double zTol, double phiTol,
117 const LocalVariablesContainer& aLVC) const;
121 const std::string&,
123 bool hasStations) const;
125 const std::string&,
127 bool hasStations) const;
129 const std::string&,
131 bool hasStations) const;
133
134 std::vector<Trk::DetachedTrackingVolume*>
135 getDetachedObjects(const Trk::Volume& trkVol,
136 std::vector<Trk::DetachedTrackingVolume*>&,
138 int mode = 0) const;
140 bool enclosed(const Trk::Volume& volume,
141 const Trk::VolumeSpan& span,
142 LocalVariablesContainer& aLVC) const;
144 void getZParts(LocalVariablesContainer& aLVC) const;
146 void getPhiParts(int, LocalVariablesContainer& aLVC) const;
148 void getHParts(LocalVariablesContainer& aLVC) const;
150 static void getShieldParts(LocalVariablesContainer& aLVC) ;
152 void blendMaterial(LocalVariablesContainer& aLVC) const;
153
154 ToolHandle<Trk::ITrackingVolumeArrayCreator> m_trackingVolumeArrayCreator{
155 this, "TrackingVolumeArrayCreator",
156 "Trk::TrackingVolumeArrayCreator/"
157 "TrackingVolumeArrayCreator"};
158
162
163 ToolHandle<Trk::ITrackingVolumeHelper> m_trackingVolumeHelper{
164 this, "TrackingVolumeHelper",
165 "Trk::TrackingVolumeHelper/TrackingVolumeHelper"};
166
168
170 this, "EnvelopeDefinitionSvc", "AtlasEnvelopeDefSvc",
171 "n"};
172
173 Gaudi::Property<bool> m_muonSimple{this, "SimpleMuonGeometry", false};
174 Gaudi::Property<bool> m_loadMSentry{this, "LoadMSEntry", false};
175 Gaudi::Property<bool> m_muonActive{this, "BuildActiveMaterial", true};
176 Gaudi::Property<bool> m_muonInert{this, "BuildInertMaterial", true};
177
178 // Overall Dimensions
180 Gaudi::Property<double> m_innerBarrelRadius{this, "InnerBarrelRadius",
181 4255.};
182
183 Gaudi::Property<double> m_outerBarrelRadius{this, "OuterBarrelRadius",
184 13910.};
185
186 Gaudi::Property<double> m_barrelZ{this, "BarrelZ", 6785.};
188 Gaudi::Property<double> m_innerEndcapZ{this, "InnerEndcapZ", 12900.};
190 Gaudi::Property<double> m_outerEndcapZ{this, "OuterEndcapZ", 26046.};
191
192 static constexpr double m_bigWheel{15600.};
193 static constexpr double m_outerWheel{21000.};
194 static constexpr double m_ectZ{7920.};
195 static constexpr double m_beamPipeRadius{70.};
196 static constexpr double m_innerShieldRadius{850.};
197 static constexpr double m_outerShieldRadius{1500.};
198 static constexpr double m_diskShieldZ{6915.};
199
200 Gaudi::Property<int> m_barrelEtaPartition{this, "EtaBarrelPartitions", 9};
201 Gaudi::Property<int> m_innerEndcapEtaPartition{
202 this, "EtaInnerEndcapPartitions", 3};
203 Gaudi::Property<int> m_outerEndcapEtaPartition{
204 this, "EtaOuterEndcapPartitions", 3};
205 Gaudi::Property<int> m_phiPartition{this, "PhiPartitions", 16};
206
207 Gaudi::Property<bool> m_adjustStatic{this, "AdjustStatic", true};
208 Gaudi::Property<bool> m_static3d{this, "StaticPartition3D", true};
209
210 Gaudi::Property<bool> m_blendInertMaterial{this, "BlendInertMaterial",
211 false};
212 Gaudi::Property<bool> m_removeBlended{this, "RemoveBlendedMaterialObjects",
213 false};
214 Gaudi::Property<double> m_alignTolerance{this, "AlignmentPositionTolerance",
215 0.};
216 Gaudi::Property<int> m_colorCode{this, "ColorCode", 0};
217 Gaudi::Property<int> m_activeAdjustLevel{this, "ActiveAdjustLevel", 2};
218 Gaudi::Property<int> m_inertAdjustLevel{this, "InertAdjustLevel", 1};
219
220 Gaudi::Property<std::string> m_entryVolume{this, "EntryVolumeName",
221 "MuonSpectrometerEntrance"};
222 Gaudi::Property<std::string> m_exitVolume{
223 this, "ExitVolumeName", "All::Container::CompleteDetector"};
224};
225
226} // namespace Muon
227
228#endif // MUONTRACKINGGEOMETRY_MUONTRACKINGGEOMETRYBUILDER_H
std::vector< RZPair > RZPairVector
Definition RZPair.h:18
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
static constexpr double m_ectZ
minimal extent in z of the ECT
VolumeSpanArray findVolumesSpan(const DetachedVolVec &objs, double zTol, double phiTol, const LocalVariablesContainer &aLVC) const
Private method to filter detached volumes in z span.
static constexpr double m_outerWheel
minimal extend in z of the outer wheel (EO)
virtual StatusCode initialize() override
AlgTool initailize method.
std::pair< Trk::DetachedTrackingVolume *, VolumeSpanPtr > DetachedVolSpanPair
bool enclosed(const Trk::Volume &volume, const Trk::VolumeSpan &span, LocalVariablesContainer &aLVC) const
Private method to check if constituent enclosed.
static Trk::GeometrySignature signature()
The unique signature.
void getHParts(LocalVariablesContainer &aLVC) const
Private method to retrieve h partition.
static void getShieldParts(LocalVariablesContainer &aLVC)
Private method to retrieve shield partition.
std::unique_ptr< Trk::DetachedTrackingVolume > DetachedVolPtr
TrackingGeometry Interface method.
Gaudi::Property< double > m_barrelZ
maximal extend in z of the inner part of muon endcap
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.
static constexpr double m_bigWheel
maximal extend in z of the big wheel
ServiceHandle< IEnvelopeDefSvc > m_enclosingEnvelopeSvc
service to provide input volume size
std::unique_ptr< Trk::TrackingGeometry > trackingGeometryImpl(DetachedVolVec &&stations, DetachedVolVec &&inertObjs, Trk::TrackingVolume *tvol) const
virtual ~MuonTrackingGeometryBuilderImpl()=default
Destructor.
MuonTrackingGeometryBuilderImpl(const std::string &, const std::string &, const IInterface *)
Gaudi::Property< double > m_outerBarrelRadius
maximal extend in z of the muon barrel
ToolHandle< Trk::ITrackingVolumeHelper > m_trackingVolumeHelper
Helper Tool to create TrackingVolumes.
std::array< std::vector< DetachedVolSpanPair >, 9 > VolumeSpanArray
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
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.
void getZParts(LocalVariablesContainer &aLVC) const
Private method to retrieve z partition.
std::unique_ptr< Trk::TrackingVolume > TrackingVolumePtr
Gaudi::Property< double > m_innerBarrelRadius
< minimal extend in radial dimension of the muon barrel
ToolHandle< Trk::ITrackingVolumeArrayCreator > m_trackingVolumeArrayCreator
Helper Tool to create TrackingVolume Arrays.
Trk::VolumeConverter m_volumeConverter
Volume helper to find geometrical span of enclosed volumes.
std::shared_ptr< Trk::TrackingVolume > SharedTrackingVolume
std::shared_ptr< const Trk::VolumeSpan > VolumeSpanPtr
TrackingVolumePtr processShield(const Trk::Volume &, int, const std::string &, LocalVariablesContainer &aLVC, bool hasStations) const
void getPhiParts(int, LocalVariablesContainer &aLVC) const
Private method to retrieve phi partition.
Base Class for a navigation object (active/passive) in the Tracking realm.
Interface class ITrackingVolumeBuilders It inherits from IAlgTool.
A common object to be contained by.
Definition Material.h:117
The TrackingGeometry class is the owner of the constructed TrackingVolumes.
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Pure Absract Base Class for Volume bounds.
A Simple Helper Class that collects methods for material simplification.
Base class for all volumes inside the tracking realm, it defines the interface for inherited Volume c...
Definition Volume.h:36
Eigen::Matrix< double, 3, 1 > Vector3D
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
std::pair< std::shared_ptr< TrackingVolume >, Amg::Vector3D > TrackingVolumeOrderPosition
Private struct to contain local variables we dont want to be global in this class.
std::map< Trk::DetachedTrackingVolume *, std::vector< Trk::TrackingVolume * > > m_blendMap
std::vector< std::vector< std::pair< int, float > > > m_shieldHPart
std::vector< std::vector< std::vector< std::vector< std::pair< int, float > > > > > m_hPartitions