5#ifndef ACTSMUONDETECTOR_MUONBLUEPRINTNODEBUILDER_H
6#define ACTSMUONDETECTOR_MUONBLUEPRINTNODEBUILDER_H
14#include "Acts/Utilities/BoundFactory.hpp"
15#include "Acts/Surfaces/PlanarBounds.hpp"
16#include "Acts/Surfaces/Surface.hpp"
26 class GeometryContext;
28 class StaticBlueprintNode;
29 class MaterialDesignatorBlueprintNode;
47 using staticNodePtr = std::shared_ptr<Acts::Experimental::StaticBlueprintNode>;
49 using materialNodePtr = std::shared_ptr<Acts::Experimental::MaterialDesignatorBlueprintNode>;
80 using base_class::base_class;
85 std::shared_ptr<Acts::Experimental::BlueprintNode>
buildBlueprintNode(
const Acts::GeometryContext& gctx,
86 std::shared_ptr<Acts::Experimental::BlueprintNode>&& childNode)
override;
102 Gaudi::Property<std::size_t>
m_nZBinsBI{
this,
"nZBinsBI", 12};
106 Gaudi::Property<std::size_t>
m_nZBinsBM{
this,
"nZBinsBM", 12};
110 Gaudi::Property<std::size_t>
m_nZBinsBO{
this,
"nZBinsBO", 12};
112 Gaudi::Property<std::size_t>
m_nRBinsEI1{
this,
"nRBinsEIbNSW", 4};
116 Gaudi::Property<std::size_t>
m_nRBinsEI2{
this,
"nRBinsEIaNSW", 4};
121 Gaudi::Property<std::size_t>
m_nRBinsEM1{
this,
"nRBinsEMbBW", 16};
134 const std::size_t nBins1,
135 const std::size_t nBins2)
const;
149 const Acts::GeometryIdentifier& chId,
150 Acts::VolumeBoundFactory& boundsFactory)
const
151 requires(std::is_same_v<T, MuonGMR4::Chamber> ||
152 std::is_same_v<T, MuonGMR4::SpectrometerSector>);
158 template <
typename ElementSet_t>
160 const std::unordered_map<unsigned int, ElementSet_t>& elementsPerStation)
const;
167 std::shared_ptr<const Acts::ISurfaceMaterial>
169 requires (std::is_same_v<T, MuonGMR4::Chamber> ||
170 std::is_same_v<T, MuonGMR4::SpectrometerSector>);
180 const std::vector<StIdx>& stationNames,
182 requires(std::is_same_v<T, MuonGMR4::Chamber> ||
183 std::is_same_v<T, MuonGMR4::SpectrometerSector>);
195 const std::string& name,
196 const Acts::GeometryIdentifier&
id,
197 Acts::VolumeBoundFactory& boundsFactory,
198 const std::vector<ChIdx>& passiveStationIds = {})
const;
213 std::variant<staticNodePtr, materialNodePtr>
buildChamberNode(
const T& element,
214 std::unique_ptr<Acts::TrackingVolume>& vol,
215 const std::vector<blueprintNodePtr>& innerStructure)
const;
Helper class to build a Blueprint node of the muon system.
Gaudi::Property< std::size_t > m_nPhiBinsEM1
Number of bins in phi direction on the disc before the middle big wheel.
BluePrintSurfPairs_t getSensitiveElements(const ActsTrk::GeometryContext &gctx, const T &element, const Acts::GeometryIdentifier &chId, Acts::VolumeBoundFactory &boundsFactory) const
Get the chamber's sensitive elements.
Gaudi::Property< std::size_t > m_nZBinsBI
Number of bins in Z direction on the BI cylinder surface.
std::pair< DetIdx, LayIdx > DetLayIdx_t
Abrivation for the stations indices.
Gaudi::Property< std::size_t > m_nZBinsBM
Number of bins in Z direction on the BM cylinder surface.
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.
Gaudi::Property< std::size_t > m_nPhiBinsBI
Number of bins in phi direction on the BI cylinder surface.
std::shared_ptr< Acts::ISurfaceMaterial > preparePassiveMaterial(const Acts::SurfaceBounds &bounds, const std::size_t nBins1, const std::size_t nBins2) const
Prepare a binned material which is associated to the surface.
Gaudi::Property< std::size_t > m_nPhiBinsEI1
Number of bins in phi direction on the disc before the NSW.
bool isElementInTheStation(const T &element, const std::vector< StIdx > &stationNames, const EndcapSide side) const
Check if the chamber is in this node.
Gaudi::Property< bool > m_buildPassiveVolumes
Flag to construct the passive material surfaces.
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.
Gaudi::Property< std::size_t > m_nPhiBinsEM2
Number of bins in phi direction on the disc after the NSW.
std::shared_ptr< Acts::Experimental::BlueprintNode > blueprintNodePtr
Abrivation of the blueprint node ptr base class.
std::shared_ptr< Acts::Surface > surfacePtr
Abrivation of the surface pointer.
Muon::MuonStationIndex::ChIndex ChIdx
Abrivation for the chamber index.
Gaudi::Property< bool > m_alignableVolumes
Flag to control if the volumes should be alignable or not.
Gaudi::Property< bool > m_useSectors
Flag to control if we want to build the muon node from sectors or chambers.
std::pair< std::size_t, std::size_t > getMaterialBins(const Muon::MuonStationIndex::ChIndex chIdx) const
std::pair< std::vector< blueprintNodePtr >, std::vector< surfacePtr > > BluePrintSurfPairs_t
Abrivate the vector pair of blue print nodes and associated active surfaces.
std::variant< MuonChamberSet, MuonSectorSet > EnvelopeSet_t
Hide the flexibility to build the tracking geometry from sectors or chambers behind a variant.
std::variant< staticNodePtr, materialNodePtr > buildChamberNode(const blueprintNodePtr &chamberNode) const
Build a static or a material node for a chamber that corresponds to a single blueprint node (e....
MuonGMR4::MuonDetectorManager::MuonSectorSet MuonSectorSet
Abrivation of the container holding all ms sectors.
Gaudi::Property< std::size_t > m_nPhiBinsEI2
Number of bins in phi direction on the disc after the NSW.
const MuonGMR4::MuonDetectorManager * m_detMgr
the Detector manager
Gaudi::Property< std::size_t > m_nRBinsEI1
Number of bins in R direction on the disc before the NSW.
Gaudi::Property< std::size_t > m_nRBinsEM1
Number of bins in R direction on the disc before the middle big wheel.
std::shared_ptr< Acts::Experimental::StaticBlueprintNode > staticNodePtr
Abrivation of the blue print node pointer.
Gaudi::Property< std::size_t > m_nRBinsEM2
Number of bins in R direction on the disc after the middle big wheel.
Muon::MuonStationIndex::LayerIndex LayIdx
Abrivation for the layer index.
bool isBIS78(const MuonGMR4::MuonReadoutElement *element) const
Helper function determining whether a readout element is BIS78.
Gaudi::Property< bool > m_assignActiveMaterial
Flag to assign active material on the chambers.
StatusCode initialize() override
Muon::MuonStationIndex::StIndex StIdx
Abrivation of the station index.
Gaudi::Property< std::size_t > m_nPhiBinsBM
Number of bins in phi direction on the BM cylinder surface.
std::shared_ptr< const Acts::ISurfaceMaterial > getActiveMaterial(const T &element) const
Get the active material for a given element representing the chamber/sector.
Gaudi::Property< std::size_t > m_nZBinsBO
Number of bins in Z direction on the BM cylinder surface.
Gaudi::Property< std::size_t > m_nPhiBinsBO
Number of bins in phi direction on the BM cylinder surface.
std::shared_ptr< Acts::Experimental::MaterialDesignatorBlueprintNode > materialNodePtr
Abrivation of the material node pointer.
Gaudi::Property< std::size_t > m_nRBinsEI2
Number of bins in R direction on the disc after the NSW.
Chamber represent the volume enclosing a muon station.
std::vector< const Chamber * > MuonChamberSet
std::vector< const SpectrometerSector * > MuonSectorSet
MuonReadoutElement is an abstract class representing the geometry of a muon detector.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
This class is not to needed in AthSimulation.
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
hold the test vectors and ease the comparison