ATLAS Offline Software
Loading...
Searching...
No Matches
Acts/ActsGeometry/src/TrackingGeometrySvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSGEOMETRY_ACTSTRACKINGGEOMETRYSVC_H
6#define ACTSGEOMETRY_ACTSTRACKINGGEOMETRYSVC_H
7
8// ATHENA
10
11// PACKAGE
19
20// ACTS
21#include "Acts/Geometry/CylinderVolumeBuilder.hpp"
22
23// STL
24#include <map>
25
26#include <tbb/concurrent_unordered_map.h>
27
28namespace InDetDD {
32}
33
34class TRT_ID;
35class ActsAlignmentStore;
37class HGTD_ID;
39
41
42namespace Acts {
43
44class TrackingGeometry;
45class CylinderVolumeHelper;
46class ILayerBuilder;
47
48class GeometryIdentifier;
49class BinnedSurfaceMaterial;
50class BlueprintNode;
51
52}
53
54
55namespace ActsTrk{
56class TrackingGeometrySvc : public extends<AthService, ActsTrk::ITrackingGeometrySvc> {
57public:
58
59 StatusCode initialize() override;
60
61 TrackingGeometrySvc( const std::string& name, ISvcLocator* pSvcLocator );
63 std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry() const override;
65 unsigned int populateAlignmentStore(ActsTrk::DetectorAlignStore& store) const override;
66
68 const ActsTrk::GeometryContext& getNominalContext() const override;
70 const Acts::TrackingVolume* getEnvelope(const ActsTrk::SystemEnvelope envType) const override;
72 virtual const ActsTrk::DetectorElementToActsGeometryIdMap* surfaceIdMap() const override;
73private:
75 std::unique_ptr<ActsTrk::DetectorElementToActsGeometryIdMap> createDetectorElementToGeoIdMap() const;
76
77
80
81 std::shared_ptr<const Acts::ILayerBuilder>
83
84 std::shared_ptr<const Acts::ILayerBuilder>
86
87 std::shared_ptr<Acts::TrackingVolume>
88 makeSCTTRTAssembly(const Acts::GeometryContext& gctx, const Acts::ILayerBuilder& sct_lb,
89 const Acts::ILayerBuilder& trt_lb, const Acts::CylinderVolumeHelper& cvh,
90 const std::shared_ptr<const Acts::TrackingVolume>& pixel);
91
92 Acts::CylinderVolumeBuilder::Config makeBeamPipeConfig(
93 std::shared_ptr<const Acts::CylinderVolumeHelper> cvh) const;
94
95 bool runConsistencyChecks() const;
96
105
106 std::shared_ptr<ActsElementVector> m_elementStore{nullptr};
107 std::shared_ptr<const Acts::TrackingGeometry> m_trackingGeometry{nullptr};
108
109 const TRT_ID *m_TRT_idHelper{nullptr};
110 const HGTD_ID *m_HGTD_idHelper{nullptr};
111
113
114 Gaudi::Property<bool> m_useMaterialMap{this, "UseMaterialMap", false, ""};
115 Gaudi::Property<bool> m_objDebugOutput{this, "ObjDebugOutput", false, ""};
116 Gaudi::Property<bool> m_keepGoingOnMaterialMergeFailure{this, "KeepGoingOnMaterialMergeFailure", false, ""};
117 Gaudi::Property<std::string> m_materialMapInputFileBase{this, "MaterialMapInputFile", "", ""};
118 Gaudi::Property<std::string> m_materialMapCalibFolder{this, "MaterialMapCalibFolder", ".", ""};
119 Gaudi::Property<bool> m_buildBeamPipe{this, "BuildBeamPipe", false, ""};
120
122 Gaudi::Property<bool> m_printGeo{this, "printGeometry", false};
123
124 Gaudi::Property<std::vector<size_t>> m_barrelMaterialBins{this, "BarrelMaterialBins", {10, 10}};
125 Gaudi::Property<std::vector<size_t>> m_endcapMaterialBins{this, "EndcapMaterialBins", {5, 20}};
126 Gaudi::Property<std::vector<std::string>> m_buildSubdetectors{this, "BuildSubDetectors", {"Pixel", "SCT", "TRT", "Calo", "HGTD", "Muon"}};
127
132 Gaudi::Property<std::vector<float>> m_passiveITkInnerPixelBarrelLayerRadii{this, "PassiveITkInnerPixelBarrelLayerRadii", {}};
133 Gaudi::Property<std::vector<float>> m_passiveITkInnerPixelBarrelLayerHalflengthZ{this, "PassiveITkInnerPixelBarrelLayerHalflengthZ", {}};
134 Gaudi::Property<std::vector<float>> m_passiveITkInnerPixelBarrelLayerThickness{this, "PassiveITkInnerPixelBarrelLayerThickness", {}};
135
136 Gaudi::Property<std::vector<float>> m_passiveITkOuterPixelBarrelLayerRadii{this, "PassiveITkOuterPixelBarrelLayerRadii", {}};
137 Gaudi::Property<std::vector<float>> m_passiveITkOuterPixelBarrelLayerHalflengthZ{this, "PassiveITkOuterPixelBarrelLayerHalflengthZ", {}};
138 Gaudi::Property<std::vector<float>> m_passiveITkOuterPixelBarrelLayerThickness{this, "PassiveITkOuterPixelBarrelLayerThickness", {}};
139
140 Gaudi::Property<std::vector<float>> m_passiveITkStripBarrelLayerRadii{this, "PassiveITkStripBarrelLayerRadii", {}};
141 Gaudi::Property<std::vector<float>> m_passiveITkStripBarrelLayerHalflengthZ{this, "PassiveITkStripBarrelLayerHalflengthZ", {}};
142 Gaudi::Property<std::vector<float>> m_passiveITkStripBarrelLayerThickness{this, "PassiveITkStripBarrelLayerThickness", {}};
143
144 BooleanProperty m_runConsistencyChecks{this, "RunConsistencyChecks",
145 false, "Run extra consistency checks w.r.t to Trk::. This is SLOW!"};
146
147 StringProperty m_consistencyCheckOutput{this, "ConsistencyCheckOutput",
148 "", "Output file for geometry debugging, will not write if empty",};
149
150 Gaudi::Property<size_t> m_consistencyCheckPoints{this, "ConsistencyCheckPoints",
151 1000, "number of random points for consistency check"};
152
153 ToolHandle<IActsTrackingVolumeBuilder> m_caloVolumeBuilder{this, "CaloVolumeBuilder", ""};
154
155 ToolHandleArray<ActsTrk::IBlueprintNodeBuilder> m_blueprintNodeBuilders{this, "BlueprintNodeBuilders", {}};
156
157 ToolHandleArray<ActsTrk::IRefineTrackingGeoTool> m_refineVisitors{this, "RefinementTools", {}};
159 Gaudi::Property<std::vector<unsigned int>> m_subDetNoAlignProp{this, "NotAlignDetectors", {}};
160 std::set<ActsTrk::DetectorType> m_subDetNoAlign{};
161
162 Gaudi::Property<bool> m_useBlueprint{this, "UseBlueprint", false, "Use the new Blueprint API for geometry construction"};
163
164 Gaudi::Property<std::string> m_blueprintGraphviz{this, "BlueprintGraphviz",
165 "", "Write the blueprint graph to a file. No file will be written if empty"};
166 Gaudi::Property<bool> m_doEndcapLayerMerging{this, "DoEndcapLayerMerging", true, "Merge overlapping endcap layers in z"};
167
171 Gaudi::Property<double> m_numberOfBinsFactor{this, "NumberOfBinsFactor", 5.0};
172
174 Gaudi::Property<double> m_numberOfInnermostLayerBinsFactor{this, "NumberOfInnermostLayerBinsFactor",2.0};
175
176 std::unique_ptr<const ActsTrk::DetectorElementToActsGeometryIdMap> m_detIdMap{};
177};
178
179}
180
181#endif
Helper to hold elements for deletion.
Gaudi::Property< std::vector< size_t > > m_endcapMaterialBins
std::shared_ptr< const Acts::TrackingGeometry > m_trackingGeometry
const InDetDD::TRT_DetectorManager * p_TRTManager
Gaudi::Property< std::vector< std::string > > m_buildSubdetectors
Gaudi::Property< std::vector< float > > m_passiveITkInnerPixelBarrelLayerThickness
ActsLayerBuilder::Config makeLayerBuilderConfig(const InDetDD::InDetDetectorManager *manager)
const InDetDD::SiDetectorManager * p_ITkStripManager
Gaudi::Property< std::vector< unsigned int > > m_subDetNoAlignProp
Define the subdetectors for which the tracking geometry does not expect a valid alignment store.
unsigned int populateAlignmentStore(ActsTrk::DetectorAlignStore &store) const override
Loops through the volumes of the tracking geometry and caches the aligned transforms in the store.
Gaudi::Property< std::vector< float > > m_passiveITkOuterPixelBarrelLayerThickness
ToolHandleArray< ActsTrk::IRefineTrackingGeoTool > m_refineVisitors
Gaudi::Property< std::vector< float > > m_passiveITkOuterPixelBarrelLayerHalflengthZ
Acts::CylinderVolumeBuilder::Config makeBeamPipeConfig(std::shared_ptr< const Acts::CylinderVolumeHelper > cvh) const
Gaudi::Property< std::vector< float > > m_passiveITkStripBarrelLayerRadii
Gaudi::Property< std::vector< float > > m_passiveITkStripBarrelLayerThickness
std::shared_ptr< const Acts::ILayerBuilder > makeHGTDLayerBuilder(const HGTD_DetectorManager *manager)
std::unique_ptr< const ActsTrk::DetectorElementToActsGeometryIdMap > m_detIdMap
Gaudi::Property< bool > m_printGeo
Print the assembled tracking geometry after building.
Gaudi::Property< std::vector< float > > m_passiveITkInnerPixelBarrelLayerRadii
the specifications for building additional passive cylinders in the barrel region: for each cylinder ...
const ActsTrk::GeometryContext & getNominalContext() const override
Returns an empty nominal context without any alignment caches.
std::shared_ptr< const Acts::ILayerBuilder > makeStrawLayerBuilder(const InDetDD::InDetDetectorManager *manager)
Gaudi::Property< std::vector< size_t > > m_barrelMaterialBins
ToolHandleArray< ActsTrk::IBlueprintNodeBuilder > m_blueprintNodeBuilders
virtual const ActsTrk::DetectorElementToActsGeometryIdMap * surfaceIdMap() const override
Returns the pointer to the identifier mapping between Acts::surface ID & IdentifierHash of the ITk su...
ToolHandle< IActsTrackingVolumeBuilder > m_caloVolumeBuilder
Gaudi::Property< double > m_numberOfInnermostLayerBinsFactor
Special treatment for the innermost pixel layer to have more control on bin size to account for shall...
std::unique_ptr< ActsTrk::DetectorElementToActsGeometryIdMap > createDetectorElementToGeoIdMap() const
Creates and popules the DetectorElement -> Acts::Surface geo identifier map from the geometry service...
std::shared_ptr< const Acts::TrackingGeometry > trackingGeometry() const override
Returns a pointer to the internal ACTS tracking geometry.
Gaudi::Property< std::vector< float > > m_passiveITkOuterPixelBarrelLayerRadii
const Acts::TrackingVolume * getEnvelope(const ActsTrk::SystemEnvelope envType) const override
Returns the envelope volume from the tracking geometry that's containing all volumes of the subsystem...
Gaudi::Property< std::vector< float > > m_passiveITkInnerPixelBarrelLayerHalflengthZ
std::shared_ptr< ActsElementVector > m_elementStore
Gaudi::Property< std::vector< float > > m_passiveITkStripBarrelLayerHalflengthZ
TrackingGeometrySvc(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< double > m_numberOfBinsFactor
controls how many bins are created for the sensitive surface grid.
const InDetDD::SiDetectorManager * p_ITkPixelManager
const InDetDD::SiDetectorManager * p_pixelManager
std::shared_ptr< Acts::TrackingVolume > makeSCTTRTAssembly(const Acts::GeometryContext &gctx, const Acts::ILayerBuilder &sct_lb, const Acts::ILayerBuilder &trt_lb, const Acts::CylinderVolumeHelper &cvh, const std::shared_ptr< const Acts::TrackingVolume > &pixel)
The Detector manager has methods to retrieve the Identifier helper and methods to retrieve the detect...
This is an Identifier helper class for the HGTD subdetector.
Definition HGTD_ID.h:47
Virtual base class for all ID detector managers.
Base class for Pixel and SCT Detector managers.
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:84
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
SystemEnvelope
Define an enumeration to retrieve the envelope tracking volume from.
Message Stream Member.
nested configuration struct for steering of the layer builder