ATLAS Offline Software
MuonDetectorBuilderTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef ACTSMUONDETECTOR_MUONDETECTORBUILDERTOOL_H
5 #define ACTSMUONDETECTOR_MUONDETECTORBUILDERTOOL_H
6 
11 #include <Acts/Surfaces/PlanarBounds.hpp>
12 #include <Acts/Surfaces/Surface.hpp>
13 #include <Acts/Utilities/BoundFactory.hpp>
14 
15 
16 struct GeoChildNodeWithTrf;
17 class GeoMaterial;
18 
19 namespace ActsTrk{
20  class MuonDetectorBuilderTool: public extends<AthAlgTool,IDetectorVolumeBuilderTool> {
21 
22  public:
24  using base_class::base_class;
25 
26  virtual ~MuonDetectorBuilderTool() = default;
27 
28  StatusCode initialize() override final;
29 
30  Acts::Experimental::DetectorComponent construct(const Acts::GeometryContext& context) const override final;
31 
32  private:
33 
35  const GeoChildNodeWithTrf& node,
36  const std::string& name,
37  std::vector<std::shared_ptr<Acts::Experimental::DetectorVolume>>& passiveVolumes,
38  const GeoTrf::Transform3D& transform,
39  Acts::VolumeBoundFactory& boundFactory) const;
40 
41 
42  std::shared_ptr<Acts::Surface> getChamberMaterial(const MuonGMR4::Chamber& chamber,
43  const Amg::Transform3D& chamberTransform,
44  const int totalMaterials,
45  Acts::SurfaceBoundFactory& boundSet) const;
46 
47  const MuonGMR4::MuonDetectorManager* m_detMgr{nullptr};
48  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
49 
50  Gaudi::Property<bool> m_dumpDetector{this, "dumpDetector", false, "If set to true the entire MS system are dumped into a visualization file format, will take a long time with sensitives"};
51 
52  Gaudi::Property<bool> m_dumpPassive{this, "dumpPassive", false, "If set to true the passive volumes are dumped into a visualization file format"};
53 
54  Gaudi::Property<bool> m_dumpDetectorVolumes{this, "dumpDetectorVolumes", false, "If set to true the detector volumes are dumped into a visualization file format, will take a long time with sensitives"};
55 
56  Gaudi::Property<bool> m_dumpMaterialSurfaces{this, "dumpMaterialSurfaces", false, "If set to true the material surfaces are dumped into a visualization file format"};
57 
58  Gaudi::Property<bool> m_buildSensitives{this, "BuildSensitives", true, "If set to true all sensitive elements are built"};
59 
60  //private method for the readout element construction
61  std::pair<std::vector<std::shared_ptr<Acts::Experimental::DetectorVolume>>,
62  std::vector<std::shared_ptr<Acts::Surface>>> constructElements(const ActsGeometryContext& gctx,
63  const MuonGMR4::Chamber& mChamber, std::pair<unsigned int, unsigned int> chId) const;
64 
65  bool checkDummyMaterial(const PVConstLink& vol) const;
66 
67  using MaterialPtr = GeoIntrusivePtr<const GeoMaterial>;
68  void getMaterialContent(const PVConstLink& vol, std::vector<std::pair<MaterialPtr, double>>& materialContent) const;
69 
70  std::pair<MaterialPtr, double> getMaterial(const PVConstLink& vol) const;
71 
72 
73  };
74 }
75 #endif
ActsTrk::MuonDetectorBuilderTool::construct
Acts::Experimental::DetectorComponent construct(const Acts::GeometryContext &context) const override final
Definition: MuonDetectorBuilderTool.cxx:75
calibdata.chamber
chamber
Definition: calibdata.py:31
DetectorVolume
Acts::Experimental::DetectorVolume DetectorVolume
Definition: MuonDetectorBuilderTool.cxx:54
ActsTrk::MuonDetectorBuilderTool::getMaterialContent
void getMaterialContent(const PVConstLink &vol, std::vector< std::pair< MaterialPtr, double >> &materialContent) const
Definition: MuonDetectorBuilderTool.cxx:302
ActsTrk::MuonDetectorBuilderTool::getMaterial
std::pair< MaterialPtr, double > getMaterial(const PVConstLink &vol) const
Definition: MuonDetectorBuilderTool.cxx:281
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
ActsTrk::MuonDetectorBuilderTool::constructElements
std::pair< std::vector< std::shared_ptr< Acts::Experimental::DetectorVolume > >, std::vector< std::shared_ptr< Acts::Surface > > > constructElements(const ActsGeometryContext &gctx, const MuonGMR4::Chamber &mChamber, std::pair< unsigned int, unsigned int > chId) const
Definition: MuonDetectorBuilderTool.cxx:186
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
MuonGMR4::Chamber
Definition: Chamber.h:23
ActsTrk::MuonDetectorBuilderTool::MaterialPtr
GeoIntrusivePtr< const GeoMaterial > MaterialPtr
Definition: MuonDetectorBuilderTool.h:67
ActsTrk::MuonDetectorBuilderTool::initialize
StatusCode initialize() override final
Definition: MuonDetectorBuilderTool.cxx:67
ActsTrk::MuonDetectorBuilderTool::m_dumpPassive
Gaudi::Property< bool > m_dumpPassive
Definition: MuonDetectorBuilderTool.h:52
MuonGMR4
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Definition: MdtCalibInput.h:19
Acts
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/xAODMuonPrepData/UtilFunctions.h:17
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
ActsTrk::MuonDetectorBuilderTool::m_dumpMaterialSurfaces
Gaudi::Property< bool > m_dumpMaterialSurfaces
Definition: MuonDetectorBuilderTool.h:56
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
ActsTrk::MuonDetectorBuilderTool
Definition: MuonDetectorBuilderTool.h:20
AthAlgTool.h
ActsTrk::MuonDetectorBuilderTool::m_buildSensitives
Gaudi::Property< bool > m_buildSensitives
Definition: MuonDetectorBuilderTool.h:58
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
MuonDetectorManager.h
ActsTrk::MuonDetectorBuilderTool::getChamberMaterial
std::shared_ptr< Acts::Surface > getChamberMaterial(const MuonGMR4::Chamber &chamber, const Amg::Transform3D &chamberTransform, const int totalMaterials, Acts::SurfaceBoundFactory &boundSet) const
Definition: MuonDetectorBuilderTool.cxx:262
IDetectorVolumeBuilderTool.h
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
ActsTrk::MuonDetectorBuilderTool::~MuonDetectorBuilderTool
virtual ~MuonDetectorBuilderTool()=default
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
ActsTrk::MuonDetectorBuilderTool::m_dumpDetector
Gaudi::Property< bool > m_dumpDetector
Definition: MuonDetectorBuilderTool.h:50
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::MuonDetectorBuilderTool::processPassiveNodes
void processPassiveNodes(const ActsGeometryContext &gctx, const GeoChildNodeWithTrf &node, const std::string &name, std::vector< std::shared_ptr< Acts::Experimental::DetectorVolume >> &passiveVolumes, const GeoTrf::Transform3D &transform, Acts::VolumeBoundFactory &boundFactory) const
Definition: MuonDetectorBuilderTool.cxx:327
ActsTrk::MuonDetectorBuilderTool::checkDummyMaterial
bool checkDummyMaterial(const PVConstLink &vol) const
Definition: MuonDetectorBuilderTool.cxx:316
ActsTrk::MuonDetectorBuilderTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonDetectorBuilderTool.h:48
ActsTrk::MuonDetectorBuilderTool::m_dumpDetectorVolumes
Gaudi::Property< bool > m_dumpDetectorVolumes
Definition: MuonDetectorBuilderTool.h:54
private
#define private
Definition: xAODTruthCnvAlg.h:20
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MSTrackingVolumeBuilder.cxx:25
ActsTrk::MuonDetectorBuilderTool::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: MuonDetectorBuilderTool.h:47
IMuonIdHelperSvc.h
node
Definition: node.h:21
ServiceHandle< Muon::IMuonIdHelperSvc >