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
44class MuonBlueprintNodeBuilder : public extends<AthAlgTool, IBlueprintNodeBuilder> {
45public:
47 using staticNodePtr = std::shared_ptr<Acts::Experimental::StaticBlueprintNode>;
49 using surfacePtr = std::shared_ptr<Acts::Surface>;
51 using BluePrintSurfPairs_t = std::pair<std::vector<staticNodePtr>, std::vector<surfacePtr>>;
65 using DetLayIdx_t = std::pair<DetIdx, LayIdx>;
68 using EnvelopeSet_t = std::variant<MuonChamberSet, MuonSectorSet>;
69 /*** @brief Subdivide the envelopes according to their station index */
70 using EnvelopesPerStIdx_t = std::unordered_map<StIdx, EnvelopeSet_t>;
71
72 enum class EndcapSide {
76 };
77 StatusCode initialize() override;
78 using base_class::base_class;
79
83 std::shared_ptr<Acts::Experimental::BlueprintNode> buildBlueprintNode(const Acts::GeometryContext& gctx,
84 std::shared_ptr<Acts::Experimental::BlueprintNode>&& childNode) override;
85
86private:
90 Gaudi::Property<bool> m_useSectors{this, "UseSectors", false};
91
98 template<typename T>
100 const T& element,
101 const Acts::GeometryIdentifier& chId,
102 Acts::VolumeBoundFactory& boundsFactory) const
103 requires(std::is_same_v<T, MuonGMR4::Chamber> ||
104 std::is_same_v<T, MuonGMR4::SpectrometerSector>);
105
110 template <typename ElementSet_t>
111 std::vector<surfacePtr> getPassiveMaterialSurfaces(const Acts::GeometryContext& gctx,
112 const std::unordered_map<unsigned int, ElementSet_t>& elementsPerStation) const;
113
120 template<typename T>
121 bool isElementInTheStation(const T& element,
122 const std::vector<StIdx>& stationNames,
123 const EndcapSide side) const
124 requires(std::is_same_v<T, MuonGMR4::Chamber> ||
125 std::is_same_v<T, MuonGMR4::SpectrometerSector>);
126
135 staticNodePtr buildMuonNode(const Acts::GeometryContext& gctx,
136 const EnvelopeSet_t& elements,
137 const std::string& name,
138 const Acts::GeometryIdentifier& id,
139 Acts::VolumeBoundFactory& boundsFactory,
140 const std::vector<ChIdx>& passiveStationIds = {}) const;
141};
142
143} //namespace ActsTrk
144
145#endif
Helper class to build a Blueprint node of the muon system.
BluePrintSurfPairs_t getSensitiveElements(const ActsTrk::GeometryContext &gctx, const T &element, const Acts::GeometryIdentifier &chId, Acts::VolumeBoundFactory &boundsFactory) const
Get the chamber's sensitive elements.
std::pair< DetIdx, LayIdx > DetLayIdx_t
Abrivation for the stations indices.
std::shared_ptr< Acts::Experimental::BlueprintNode > buildBlueprintNode(const Acts::GeometryContext &gctx, std::shared_ptr< Acts::Experimental::BlueprintNode > &&childNode) override
Build the Muon Blueprint Node.
MuonGMR4::MuonDetectorManager::MuonChamberSet MuonChamberSet
Abrivation of the container holding all chambers.
staticNodePtr buildMuonNode(const Acts::GeometryContext &gctx, const EnvelopeSet_t &elements, const std::string &name, const Acts::GeometryIdentifier &id, Acts::VolumeBoundFactory &boundsFactory, const std::vector< ChIdx > &passiveStationIds={}) const
Build subnodes for the muon system node.
bool isElementInTheStation(const T &element, const std::vector< StIdx > &stationNames, const EndcapSide side) const
Check if the chamber is in this node.
std::vector< surfacePtr > getPassiveMaterialSurfaces(const Acts::GeometryContext &gctx, const std::unordered_map< unsigned int, ElementSet_t > &elementsPerStation) const
Construct and return the surfaces for the passive material description (e.g cylinders for barrel/ dis...
std::unordered_map< StIdx, EnvelopeSet_t > EnvelopesPerStIdx_t
Muon::MuonStationIndex::DetectorRegionIndex DetIdx
Abrivatin for the detector region index.
std::shared_ptr< Acts::Surface > surfacePtr
Abrivation of the surface pointer.
Muon::MuonStationIndex::ChIndex ChIdx
Abrivation for the chamber index.
Gaudi::Property< bool > m_useSectors
Flag to control if we want to build the muon node from sectors or chambers.
std::variant< MuonChamberSet, MuonSectorSet > EnvelopeSet_t
Hide the flexibility to build the tracking geometry from sectors or chambers behind a variant.
MuonGMR4::MuonDetectorManager::MuonSectorSet MuonSectorSet
Abrivation of the container holding all ms sectors.
const MuonGMR4::MuonDetectorManager * m_detMgr
the Detector manager
std::shared_ptr< Acts::Experimental::StaticBlueprintNode > staticNodePtr
Abrivation of the blue print node pointer.
Muon::MuonStationIndex::LayerIndex LayIdx
Abrivation for the layer index.
std::pair< std::vector< staticNodePtr >, std::vector< surfacePtr > > BluePrintSurfPairs_t
Abrivate the vector pair of blue print nodes and associated active surfaces.
Muon::MuonStationIndex::StIndex StIdx
Abrivation of the station index.
Chamber represent the volume enclosing a muon station.
Definition Chamber.h:28
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
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
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
LayerIndex
enum to classify the different layers in the muon spectrometer
ChIndex
enum to classify the different chamber layers in the muon spectrometer