ATLAS Offline Software
MuonDetectorBuilderTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef ACTSMUONDETECTOR_MUONDETECTORBUILDERTOOL_H
5 #define ACTSMUONDETECTOR_MUONDETECTORBUILDERTOOL_H
6 
12 #include <Acts/Surfaces/PlanarBounds.hpp>
13 #include <Acts/Surfaces/Surface.hpp>
14 
15 class GeoChildNodeWithTrf;
16 class GeoMaterial;
17 
18 namespace ActsTrk{
19  class MuonDetectorBuilderTool: public extends<AthAlgTool,IDetectorVolumeBuilderTool> {
20 
21  public:
23  MuonDetectorBuilderTool( const std::string& type, const std::string& name, const IInterface* parent );
24 
25  virtual ~MuonDetectorBuilderTool() = default;
26 
27  StatusCode initialize() override final;
28 
29  Acts::Experimental::DetectorComponent construct(const Acts::GeometryContext& context) const override final;
30 
31  private:
32 
34  const GeoChildNodeWithTrf& node,
35  const std::string& name,
36  std::vector<std::shared_ptr<Acts::Experimental::DetectorVolume>>& passiveVolumes,
37  const GeoTrf::Transform3D& transform) const;
38 
39 
40  using BlendedBoundSet = ActsTrk::SurfaceBoundSet<Acts::TrapezoidBounds>;
41  std::shared_ptr<Acts::Surface> getChamberMaterial(const MuonGMR4::Chamber& chamber,
42  const Amg::Transform3D& chamberTransform,
43  const int totalMaterials,
44  BlendedBoundSet& boundSet) const;
45 
46  const MuonGMR4::MuonDetectorManager* m_detMgr{nullptr};
47  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
48 
49  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"};
50 
51  Gaudi::Property<bool> m_dumpPassive{this, "dumpPassive", false, "If set to true the passive volumes are dumped into a visualization file format"};
52 
53  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"};
54 
55  Gaudi::Property<bool> m_dumpMaterialSurfaces{this, "dumpMaterialSurfaces", false, "If set to true the material surfaces are dumped into a visualization file format"};
56 
57  Gaudi::Property<bool> m_buildSensitives{this, "BuildSensitives", true, "If set to true all sensitive elements are built"};
58 
59  //private method for the readout element construction
60  std::pair<std::vector<std::shared_ptr<Acts::Experimental::DetectorVolume>>,
61  std::vector<std::shared_ptr<Acts::Surface>>> constructElements(const ActsGeometryContext& gctx,
62  const MuonGMR4::Chamber& mChamber, std::pair<unsigned int, unsigned int> chId) const;
63 
64  bool checkDummyMaterial(const PVConstLink& vol) const;
65 
66  using MaterialPtr = GeoIntrusivePtr<const GeoMaterial>;
67  void getMaterialContent(const PVConstLink& vol, std::vector<std::pair<MaterialPtr, double>>& materialContent) const;
68 
69  std::pair<MaterialPtr, double> getMaterial(const PVConstLink& vol) const;
70 
71 
72  };
73 }
74 #endif
ActsTrk::MuonDetectorBuilderTool::construct
Acts::Experimental::DetectorComponent construct(const Acts::GeometryContext &context) const override final
Definition: MuonDetectorBuilderTool.cxx:77
calibdata.chamber
chamber
Definition: calibdata.py:32
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) const
Definition: MuonDetectorBuilderTool.cxx:328
DetectorVolume
Acts::Experimental::DetectorVolume DetectorVolume
Definition: MuonDetectorBuilderTool.cxx:53
ActsTrk::MuonDetectorBuilderTool::getMaterialContent
void getMaterialContent(const PVConstLink &vol, std::vector< std::pair< MaterialPtr, double >> &materialContent) const
Definition: MuonDetectorBuilderTool.cxx:303
ActsTrk::MuonDetectorBuilderTool::getMaterial
std::pair< MaterialPtr, double > getMaterial(const PVConstLink &vol) const
Definition: MuonDetectorBuilderTool.cxx:282
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:188
SurfaceBoundSet.h
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ActsTrk::MuonDetectorBuilderTool::MuonDetectorBuilderTool
MuonDetectorBuilderTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard tool constructor.
Definition: MuonDetectorBuilderTool.cxx:66
MuonGMR4::Chamber
Definition: Chamber.h:22
ActsTrk::MuonDetectorBuilderTool::MaterialPtr
GeoIntrusivePtr< const GeoMaterial > MaterialPtr
Definition: MuonDetectorBuilderTool.h:66
ActsTrk::MuonDetectorBuilderTool::initialize
StatusCode initialize() override final
Definition: MuonDetectorBuilderTool.cxx:69
ActsTrk::MuonDetectorBuilderTool::m_dumpPassive
Gaudi::Property< bool > m_dumpPassive
Definition: MuonDetectorBuilderTool.h:51
MuonGMR4
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Definition: MdtCalibInput.h:20
Acts
Definition: ChamberAssembleTool.h:18
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:55
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
ActsTrk::MuonDetectorBuilderTool
Definition: MuonDetectorBuilderTool.h:19
AthAlgTool.h
ActsTrk::MuonDetectorBuilderTool::m_buildSensitives
Gaudi::Property< bool > m_buildSensitives
Definition: MuonDetectorBuilderTool.h:57
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
MuonDetectorManager.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IDetectorVolumeBuilderTool.h
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
ActsTrk::MuonDetectorBuilderTool::~MuonDetectorBuilderTool
virtual ~MuonDetectorBuilderTool()=default
ActsTrk::SurfaceBoundSet
Definition: Tracking/Acts/ActsGeoUtils/ActsGeoUtils/Defs.h:17
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
ActsTrk::MuonDetectorBuilderTool::m_dumpDetector
Gaudi::Property< bool > m_dumpDetector
Definition: MuonDetectorBuilderTool.h:49
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::MuonDetectorBuilderTool::checkDummyMaterial
bool checkDummyMaterial(const PVConstLink &vol) const
Definition: MuonDetectorBuilderTool.cxx:317
ActsTrk::MuonDetectorBuilderTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonDetectorBuilderTool.h:47
ActsTrk::MuonDetectorBuilderTool::m_dumpDetectorVolumes
Gaudi::Property< bool > m_dumpDetectorVolumes
Definition: MuonDetectorBuilderTool.h:53
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:54
ActsTrk::MuonDetectorBuilderTool::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: MuonDetectorBuilderTool.h:46
IMuonIdHelperSvc.h
ActsTrk::MuonDetectorBuilderTool::getChamberMaterial
std::shared_ptr< Acts::Surface > getChamberMaterial(const MuonGMR4::Chamber &chamber, const Amg::Transform3D &chamberTransform, const int totalMaterials, BlendedBoundSet &boundSet) const
Definition: MuonDetectorBuilderTool.cxx:263
node
Definition: memory_hooks-stdcmalloc.h:74
ServiceHandle< Muon::IMuonIdHelperSvc >