ATLAS Offline Software
ActsTrackingGeometrySvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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
16 
17 // ACTS
18 #include "Acts/Geometry/CylinderVolumeBuilder.hpp"
19 
20 // STL
21 #include <map>
22 
23 #include <tbb/concurrent_unordered_map.h>
24 
25 namespace InDetDD {
26  class InDetDetectorManager;
27  class SiDetectorManager;
28  class TRT_DetectorManager;
29 }
30 
31 class TRT_ID;
32 class ActsAlignmentStore;
34 class HGTD_ID;
36 
38 
39 namespace Acts {
40 
41 class TrackingGeometry;
42 class CylinderVolumeHelper;
43 class ILayerBuilder;
44 
45 class GeometryIdentifier;
46 class BinnedSurfaceMaterial;
47 
48 }
49 
50 
51 class ActsTrackingGeometrySvc : public extends<AthService, IActsTrackingGeometrySvc> {
52 public:
53 
54  StatusCode initialize() override;
55 
56  ActsTrackingGeometrySvc( const std::string& name, ISvcLocator* pSvcLocator );
57 
58  std::shared_ptr<const Acts::TrackingGeometry>
59  trackingGeometry() override;
60 
61  unsigned int populateAlignmentStore(ActsTrk::DetectorAlignStore& store) const override;
62 
63  const ActsGeometryContext& getNominalContext() const override;
64 
65 private:
68 
69  std::shared_ptr<const Acts::ILayerBuilder>
71 
72  std::shared_ptr<const Acts::ILayerBuilder>
74 
75  std::shared_ptr<Acts::TrackingVolume>
76  makeSCTTRTAssembly(const Acts::GeometryContext& gctx, const Acts::ILayerBuilder& sct_lb,
77  const Acts::ILayerBuilder& trt_lb, const Acts::CylinderVolumeHelper& cvh,
78  const std::shared_ptr<const Acts::TrackingVolume>& pixel);
79 
80  Acts::CylinderVolumeBuilder::Config makeBeamPipeConfig(
81  std::shared_ptr<const Acts::CylinderVolumeHelper> cvh) const;
82 
83  bool runConsistencyChecks() const;
84 
93 
94  std::shared_ptr<ActsElementVector> m_elementStore{nullptr};
95  std::shared_ptr<const Acts::TrackingGeometry> m_trackingGeometry{nullptr};
96 
97  const TRT_ID *m_TRT_idHelper{nullptr};
98  const HGTD_ID *m_HGTD_idHelper{nullptr};
99 
101 
102  Gaudi::Property<bool> m_useMaterialMap{this, "UseMaterialMap", false, ""};
103  Gaudi::Property<bool> m_objDebugOutput{this, "ObjDebugOutput", false, ""};
104  Gaudi::Property<std::string> m_materialMapInputFileBase{this, "MaterialMapInputFile", "", ""};
105  Gaudi::Property<std::string> m_materialMapCalibFolder{this, "MaterialMapCalibFolder", ".", ""};
106  Gaudi::Property<bool> m_buildBeamPipe{this, "BuildBeamPipe", false, ""};
107 
108  Gaudi::Property<std::vector<size_t>> m_barrelMaterialBins{this, "BarrelMaterialBins", {10, 10}};
109  Gaudi::Property<std::vector<size_t>> m_endcapMaterialBins{this, "EndcapMaterialBins", {5, 20}};
110  Gaudi::Property<std::vector<std::string>> m_buildSubdetectors{this, "BuildSubDetectors", {"Pixel", "SCT", "TRT", "Calo", "HGTD"}};
111 
112  BooleanProperty m_runConsistencyChecks{this, "RunConsistencyChecks",
113  false, "Run extra consistency checks w.r.t to Trk::. This is SLOW!"};
114 
115  StringProperty m_consistencyCheckOutput{this, "ConsistencyCheckOutput",
116  "", "Output file for geometry debugging, will not write if empty",};
117 
118  Gaudi::Property<size_t> m_consistencyCheckPoints{this, "ConsistencyCheckPoints",
119  1000, "number of random points for consistency check"};
120 
121  ToolHandle<IActsTrackingVolumeBuilder> m_caloVolumeBuilder{this,
122  "CaloVolumeBuilder", "", "CaloVolumeBuilder"};
124  Gaudi::Property<std::vector<unsigned int>> m_subDetNoAlignProp{this, "NotAlignDetectors", {}};
125  std::set<ActsTrk::DetectorType> m_subDetNoAlign{};
126 
127 
128 };
129 
130 
131 
132 #endif
ActsTrackingGeometrySvc::makeBeamPipeConfig
Acts::CylinderVolumeBuilder::Config makeBeamPipeConfig(std::shared_ptr< const Acts::CylinderVolumeHelper > cvh) const
Definition: ActsTrackingGeometrySvc.cxx:1027
SGTest::store
TestStore store
Definition: TestStore.cxx:23
ActsTrackingGeometrySvc::m_runConsistencyChecks
BooleanProperty m_runConsistencyChecks
Definition: ActsTrackingGeometrySvc.h:112
ActsTrackingGeometrySvc::m_consistencyCheckOutput
StringProperty m_consistencyCheckOutput
Definition: ActsTrackingGeometrySvc.h:115
ActsTrk::DetectorAlignStore
Definition: DetectorAlignStore.h:20
ActsTrackingGeometrySvc::m_barrelMaterialBins
Gaudi::Property< std::vector< size_t > > m_barrelMaterialBins
Definition: ActsTrackingGeometrySvc.h:108
ActsTrackingGeometrySvc::populateAlignmentStore
unsigned int populateAlignmentStore(ActsTrk::DetectorAlignStore &store) const override
Definition: ActsTrackingGeometrySvc.cxx:1013
ActsTrackingGeometrySvc::runConsistencyChecks
bool runConsistencyChecks() const
Definition: ActsTrackingGeometrySvc.cxx:417
ActsTrackingGeometrySvc::m_consistencyCheckPoints
Gaudi::Property< size_t > m_consistencyCheckPoints
Definition: ActsTrackingGeometrySvc.h:118
ActsTrackingGeometrySvc::m_detStore
ServiceHandle< StoreGateSvc > m_detStore
Definition: ActsTrackingGeometrySvc.h:85
ActsTrackingGeometrySvc::p_ITkPixelManager
const InDetDD::SiDetectorManager * p_ITkPixelManager
Definition: ActsTrackingGeometrySvc.h:89
ActsLayerBuilder::Config
Definition: ActsLayerBuilder.h:50
ActsTrackingGeometrySvc::p_beamPipeMgr
const BeamPipeDetectorManager * p_beamPipeMgr
Definition: ActsTrackingGeometrySvc.h:91
ActsTrackingGeometrySvc::m_caloVolumeBuilder
ToolHandle< IActsTrackingVolumeBuilder > m_caloVolumeBuilder
Definition: ActsTrackingGeometrySvc.h:121
ActsTrackingGeometrySvc::getNominalContext
const ActsGeometryContext & getNominalContext() const override
Definition: ActsTrackingGeometrySvc.cxx:1024
ActsTrackingGeometrySvc::p_TRTManager
const InDetDD::TRT_DetectorManager * p_TRTManager
Definition: ActsTrackingGeometrySvc.h:88
ActsTrackingGeometrySvc::p_HGTDManager
const HGTD_DetectorManager * p_HGTDManager
Definition: ActsTrackingGeometrySvc.h:92
ActsLayerBuilder.h
Acts
Definition: ChamberAssembleTool.h:18
ActsTrackingGeometrySvc::m_elementStore
std::shared_ptr< ActsElementVector > m_elementStore
Definition: ActsTrackingGeometrySvc.h:94
ActsTrackingGeometrySvc::m_materialMapInputFileBase
Gaudi::Property< std::string > m_materialMapInputFileBase
Definition: ActsTrackingGeometrySvc.h:104
ActsTrackingGeometrySvc
Definition: ActsTrackingGeometrySvc.h:51
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IActsTrackingGeometrySvc.h
ActsTrackingGeometrySvc::p_pixelManager
const InDetDD::SiDetectorManager * p_pixelManager
Definition: ActsTrackingGeometrySvc.h:86
ActsTrackingGeometrySvc::p_SCTManager
const InDetDD::SiDetectorManager * p_SCTManager
Definition: ActsTrackingGeometrySvc.h:87
ActsTrackingGeometrySvc::m_buildBeamPipe
Gaudi::Property< bool > m_buildBeamPipe
Definition: ActsTrackingGeometrySvc.h:106
InDetDD::InDetDetectorManager
Definition: InDetDetectorManager.h:60
ActsTrackingGeometrySvc::makeLayerBuilderConfig
ActsLayerBuilder::Config makeLayerBuilderConfig(const InDetDD::InDetDetectorManager *manager)
Definition: ActsTrackingGeometrySvc.cxx:712
ActsTrackingGeometrySvc::trackingGeometry
std::shared_ptr< const Acts::TrackingGeometry > trackingGeometry() override
Definition: ActsTrackingGeometrySvc.cxx:644
HGTD_ID
Definition: HGTD_ID.h:47
IActsTrackingVolumeBuilder.h
ActsDetectorElement
Definition: ActsDetectorElement.h:42
ActsTrackingGeometrySvc::m_endcapMaterialBins
Gaudi::Property< std::vector< size_t > > m_endcapMaterialBins
Definition: ActsTrackingGeometrySvc.h:109
ActsTrackingGeometrySvc::m_materialMapCalibFolder
Gaudi::Property< std::string > m_materialMapCalibFolder
Definition: ActsTrackingGeometrySvc.h:105
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrackingGeometrySvc::makeSCTTRTAssembly
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)
Definition: ActsTrackingGeometrySvc.cxx:798
ActsTrackingGeometrySvc::p_ITkStripManager
const InDetDD::SiDetectorManager * p_ITkStripManager
Definition: ActsTrackingGeometrySvc.h:90
TRT_ID
Definition: TRT_ID.h:84
InDetDD::TRT_DetectorManager
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Definition: TRT_DetectorManager.h:69
ActsTrackingGeometrySvc::m_subDetNoAlign
std::set< ActsTrk::DetectorType > m_subDetNoAlign
Definition: ActsTrackingGeometrySvc.h:125
ActsTrackingGeometrySvc::initialize
StatusCode initialize() override
Definition: ActsTrackingGeometrySvc.cxx:68
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDetDD::SiDetectorManager
Definition: SiDetectorManager.h:60
HGTD_DetectorManager
Definition: HGTD_DetectorManager.h:33
ActsTrackingGeometrySvc::ActsTrackingGeometrySvc
ActsTrackingGeometrySvc(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ActsTrackingGeometrySvc.cxx:60
AthService.h
ActsTrackingGeometrySvc::makeStrawLayerBuilder
std::shared_ptr< const Acts::ILayerBuilder > makeStrawLayerBuilder(const InDetDD::InDetDetectorManager *manager)
Definition: ActsTrackingGeometrySvc.cxx:651
python.Logging.manager
manager
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/Logging.py:92
ActsTrackingGeometrySvc::m_useMaterialMap
Gaudi::Property< bool > m_useMaterialMap
Definition: ActsTrackingGeometrySvc.h:102
ActsTrackingGeometrySvc::m_trackingGeometry
std::shared_ptr< const Acts::TrackingGeometry > m_trackingGeometry
Definition: ActsTrackingGeometrySvc.h:95
ActsTrackingGeometrySvc::makeHGTDLayerBuilder
std::shared_ptr< const Acts::ILayerBuilder > makeHGTDLayerBuilder(const HGTD_DetectorManager *manager)
Definition: ActsTrackingGeometrySvc.cxx:682
ActsTrackingGeometrySvc::m_buildSubdetectors
Gaudi::Property< std::vector< std::string > > m_buildSubdetectors
Definition: ActsTrackingGeometrySvc.h:110
ActsTrackingGeometrySvc::m_nominalContext
ActsGeometryContext m_nominalContext
Definition: ActsTrackingGeometrySvc.h:100
ActsElementVector.h
Helper to hold elements for deletion.
ActsTrackingGeometrySvc::m_TRT_idHelper
const TRT_ID * m_TRT_idHelper
Definition: ActsTrackingGeometrySvc.h:97
ActsTrackingGeometrySvc::m_HGTD_idHelper
const HGTD_ID * m_HGTD_idHelper
Definition: ActsTrackingGeometrySvc.h:98
ActsTrackingGeometrySvc::m_subDetNoAlignProp
Gaudi::Property< std::vector< unsigned int > > m_subDetNoAlignProp
Define the subdetectors for which the tracking geometry does not expect a valid alignment store.
Definition: ActsTrackingGeometrySvc.h:124
ActsTrackingGeometrySvc::m_objDebugOutput
Gaudi::Property< bool > m_objDebugOutput
Definition: ActsTrackingGeometrySvc.h:103
SiliconTech::pixel
@ pixel
BeamPipeDetectorManager
Definition: BeamPipeDetectorManager.h:14
ServiceHandle< StoreGateSvc >