ATLAS Offline Software
Loading...
Searching...
No Matches
MuonBlueprintNodeBuilder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSMUONDETECTOR_MUONBLUEPRINTNODEBUILDER_H
6#define ACTSMUONDETECTOR_MUONBLUEPRINTNODEBUILDER_H
7
8
9
10#include <GaudiKernel/MsgStream.h>
12
16
17#include "Acts/Utilities/BoundFactory.hpp"
18#include "Acts/Surfaces/PlanarBounds.hpp"
19#include "Acts/Surfaces/Surface.hpp"
20
21
22
23
24namespace MuonGMR4 {
25 class Chamber;
26}
27
28namespace Acts {
29 class GeometryContext;
30 namespace Experimental {
31 class StaticBlueprintNode;
32
33}
34
35} // namespace Acts
36
37
38namespace ActsTrk {
39
40 using staticNodePtr = std::shared_ptr<Acts::Experimental::StaticBlueprintNode>;
41 using surfacePtr = std::shared_ptr<Acts::Surface>;
45
49class MuonBlueprintNodeBuilder : public extends<AthAlgTool, IBlueprintNodeBuilder> {
50
51public:
52
53
54 enum class EndcapSide {
58 };
59
60 StatusCode initialize() override;
61 using base_class::base_class;
62
66 std::shared_ptr<Acts::Experimental::BlueprintNode> buildBlueprintNode(const Acts::GeometryContext& gctx,
67 std::shared_ptr<Acts::Experimental::BlueprintNode>&& childNode) override;
68
69
70private:
71
73
74 Gaudi::Property<bool> m_dumpVolumes{this, "dumpVolumes", false}; // Flag to control if we want to visualize each chamber volume individually
75
76 Gaudi::Property<bool> m_useSectors{this, "UseSectors", false}; // Flag to control if we want to build the muon node from sectors or chambers
77
82 template<typename T>
83 std::shared_ptr<Acts::Surface> blendMaterial(const T& element) const;
84
91 template<typename T>
92 std::pair<std::vector<staticNodePtr>, std::vector<surfacePtr>> getSensitiveElements(const ActsTrk::GeometryContext& gctx,
93 const T& element,
94 const Acts::GeometryIdentifier& chId,
95 Acts::VolumeBoundFactory& boundsFactory) const;
96
103 template<typename T>
104 bool isElementInTheStation(const T& element, const std::vector<StIdx>& stationNames, const EndcapSide& side) const;
105
113 template<typename MuonElementsSet>
114 std::shared_ptr<Acts::Experimental::StaticBlueprintNode> buildMuonNode(const Acts::GeometryContext& gctx,
115 const MuonElementsSet& elements,
116 const std::string& name,
117 const Acts::GeometryIdentifier& id,
118 Acts::VolumeBoundFactory& boundsFactory) const;
119};
120
121} //namespace ActsTrk
122
123#endif
Helper class to build a Blueprint node of the muon system.
std::shared_ptr< Acts::Experimental::BlueprintNode > buildBlueprintNode(const Acts::GeometryContext &gctx, std::shared_ptr< Acts::Experimental::BlueprintNode > &&childNode) override
Build the Muon Blueprint Node.
std::shared_ptr< Acts::Surface > blendMaterial(const T &element) const
Blend the sector's/chamber's material as plane surface.
bool isElementInTheStation(const T &element, const std::vector< StIdx > &stationNames, const EndcapSide &side) const
Check if the chamber is in this node.
std::shared_ptr< Acts::Experimental::StaticBlueprintNode > buildMuonNode(const Acts::GeometryContext &gctx, const MuonElementsSet &elements, const std::string &name, const Acts::GeometryIdentifier &id, Acts::VolumeBoundFactory &boundsFactory) const
Build subnodes for the muon system node.
std::pair< std::vector< staticNodePtr >, std::vector< surfacePtr > > getSensitiveElements(const ActsTrk::GeometryContext &gctx, const T &element, const Acts::GeometryIdentifier &chId, Acts::VolumeBoundFactory &boundsFactory) const
Get the chamber's sensitive elements.
const MuonGMR4::MuonDetectorManager * m_detMgr
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
std::shared_ptr< Acts::Experimental::StaticBlueprintNode > staticNodePtr
Muon::MuonStationIndex::StIndex StIdx
MuonGMR4::MuonDetectorManager::MuonSectorSet MuonSectorSet
MuonGMR4::MuonDetectorManager::MuonChamberSet MuonChamberSet
std::shared_ptr< Acts::Surface > surfacePtr
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
StIndex
enum to classify the different station layers in the muon spectrometer