7#include <Acts/Geometry/BlueprintNode.hpp>
8#include <Acts/Geometry/StaticBlueprintNode.hpp>
9#include <Acts/Geometry/CylinderVolumeBounds.hpp>
10#include <Acts/Geometry/ContainerBlueprintNode.hpp>
11#include <Acts/Geometry/MultiWireVolumeBuilder.hpp>
12#include <Acts/Surfaces/TrapezoidBounds.hpp>
13#include <Acts/Geometry/MaterialDesignatorBlueprintNode.hpp>
14#include <Acts/Geometry/GeometryIdentifierBlueprintNode.hpp>
15#include <Acts/Geometry/VolumeAttachmentStrategy.hpp>
16#include <Acts/Geometry/VolumeResizeStrategy.hpp>
17#include <Acts/Geometry/TrackingVolume.hpp>
18#include <Acts/Geometry/TrapezoidVolumeBounds.hpp>
19#include <Acts/Geometry/CuboidVolumeBounds.hpp>
20#include <Acts/Geometry/DiamondVolumeBounds.hpp>
21#include <Acts/Surfaces/PlaneSurface.hpp>
22#include <Acts/Surfaces/CylinderSurface.hpp>
23#include <Acts/Surfaces/DiscSurface.hpp>
24#include <Acts/Surfaces/RadialBounds.hpp>
25#include <ActsPlugins/GeoModel/GeoModelMaterialConverter.hpp>
26#include <Acts/Visualization/ObjVisualization3D.hpp>
27#include <Acts/Visualization/GeometryView3D.hpp>
28#include <Acts/Surfaces/LineBounds.hpp>
29#include <Acts/Material/HomogeneousSurfaceMaterial.hpp>
30#include <Acts/Material/ProtoSurfaceMaterial.hpp>
31#include <Acts/Surfaces/RectangleBounds.hpp>
38#include "GeoModelValidation/GeoMaterialHelper.h"
40using namespace Acts::UnitLiterals;
45 void configureMaterialFaces(
46 Acts::Experimental::MaterialDesignatorBlueprintNode&
node,
47 const Acts::VolumeBounds& bounds,
48 std::shared_ptr<const Acts::ISurfaceMaterial> material){
50 switch (bounds.type()) {
51 case Acts::VolumeBounds::BoundsType::eCuboid: {
53 Acts::CuboidVolumeBounds::Face::NegativeZFace, material);
55 Acts::CuboidVolumeBounds::Face::PositiveZFace, material);
58 case Acts::VolumeBounds::BoundsType::eTrapezoid: {
60 Acts::TrapezoidVolumeBounds::Face::NegativeZFaceXY, material);
62 Acts::TrapezoidVolumeBounds::Face::PositiveZFaceXY, material);
65 case Acts::VolumeBounds::BoundsType::eDiamond: {
67 Acts::DiamondVolumeBounds::Face::NegativeZFaceXY, material);
69 Acts::DiamondVolumeBounds::Face::PositiveZFaceXY, material);
74 "Unsupported volume bounds for material configuration");
79 template<
typename... T>
80 bool isNullVariant(std::variant<T...> variant) {
81 return std::visit([](
auto&& ptr) {
92 return StatusCode::SUCCESS;
99EnvelopeSet_t barrelStations, endcapOuterAStations, endcapOuterCStations,
100 endcapMiddleAStations, endcapMiddleCStations;
103 elements =
m_detMgr->getAllSectors();
105 elements =
m_detMgr->getAllChambers();
108std::visit([&](
auto& elems) {
109 using SetType = std::decay_t<
decltype(elems)>;
112 SetType
barrel, endcapA, endcapC, endcapMiddleA, endcapMiddleC;
114 for (
const auto& element : elems) {
116 {StIdx::BI, StIdx::BM, StIdx::BO, StIdx::BE, StIdx::EE, StIdx::EI},
118 barrel.push_back(element);
120 endcapA.push_back(element);
122 endcapC.push_back(element);
124 endcapMiddleA.push_back(element);
126 endcapMiddleC.push_back(element);
129 <<
" not assigned to any station!");
134 barrelStations = std::move(
barrel);
135 endcapOuterAStations = std::move(endcapA);
136 endcapOuterCStations = std::move(endcapC);
137 endcapMiddleAStations = std::move(endcapMiddleA);
138 endcapMiddleCStations = std::move(endcapMiddleC);
142auto muonNode = std::make_shared<Acts::Experimental::CylinderContainerBlueprintNode>(
"MuonNode", Acts::AxisDirection::AxisZ);
144Acts::VolumeBoundFactory boundsFactory{};
146auto barrelNode =
buildMuonNode(gctx, barrelStations,
"BI_BM_BO_EE_EI", Acts::GeometryIdentifier().withVolume(
s_muonBarrelId), boundsFactory, {ChIdx::BIS, ChIdx::BML, ChIdx::BOL,
147 ChIdx::EIS, ChIdx::EIL});
148auto endcapANode =
buildMuonNode(gctx, endcapOuterAStations,
"EO_A", Acts::GeometryIdentifier().withVolume(
s_muonEndcapAId), boundsFactory);
149auto endcapCNode =
buildMuonNode(gctx, endcapOuterCStations,
"EO_C", Acts::GeometryIdentifier().withVolume(
s_muonEndcapCId), boundsFactory);
150auto endcapMiddleANode =
buildMuonNode(gctx, endcapMiddleAStations,
"EM_A", Acts::GeometryIdentifier().withVolume(
s_muonEndcapMiddleAId), boundsFactory, {ChIdx::EML, ChIdx::EMS});
151auto endcapMiddleCNode =
buildMuonNode(gctx, endcapMiddleCStations,
"EM_C", Acts::GeometryIdentifier().withVolume(
s_muonEndcapMiddleCId), boundsFactory, {ChIdx::EML, ChIdx::EMS});
155 barrelNode->addChild(std::move(childNode));
157muonNode->addChild(std::move(barrelNode));
158muonNode->addChild(std::move(endcapANode));
159muonNode->addChild(std::move(endcapCNode));
160muonNode->addChild(std::move(endcapMiddleANode));
161muonNode->addChild(std::move(endcapMiddleCNode));
167std::shared_ptr<Acts::Experimental::StaticBlueprintNode>
170 const std::string& name,
171 const Acts::GeometryIdentifier&
id,
172 Acts::VolumeBoundFactory& boundsFactory,
173 const std::vector<ChIdx>& passiveStationIds)
const {
176 std::vector<std::string> stationNames;
179 std::vector<std::variant<staticNodePtr, materialNodePtr>> nodes;
181 double innerRadius{0.0};
182 double outerRadius{std::numeric_limits<double>::lowest()};
183 double maxZ{std::numeric_limits<double>::lowest()};
184 double minZ{std::numeric_limits<double>::max()};
186 std::vector<std::shared_ptr<Acts::Surface>> passiveSurfaces;
188 std::visit([&](
const auto& elems){
190 using SetType = std::decay_t<
decltype(elems)>;
191 std::unordered_map<unsigned int, SetType> elementsPerStation;
193 for(
const auto& element : elems){
194 std::unique_ptr<Acts::TrackingVolume> vol{};
196 vol = std::make_unique<Acts::TrackingVolume>(*element->boundingVolume(*context),
197 element->identString());
199 vol = std::make_unique<Acts::TrackingVolume>(element->localToGlobalTransform(*context),
201 element->identString());
204 Acts::GeometryIdentifier chId =
id.withLayer(chamberId++);
205 vol->assignGeometryId(chId);
208 std::pair<std::vector<blueprintNodePtr>,std::vector<surfacePtr>> innerStructure =
getSensitiveElements(*context, *element, chId, boundsFactory);
209 for(
auto& surface: innerStructure.second){
210 vol->addSurface(surface);
214 for(
const auto& surface: vol->volumeBounds().orientedSurfaces(vol->localToGlobalTransform(gctx))) {
215 const auto& surfaceRepr = (*surface.surface);
216 const Acts::Polyhedron& polyhedron = surfaceRepr.polyhedronRepresentation(gctx);
219 maxZ = std::max(maxZ, center.z());
220 minZ = std::min(minZ, center.z());
224 outerRadius = std::max(outerRadius, vertex.perp());
228 std::variant<staticNodePtr, materialNodePtr> chamberNode;
229 const bool isSingleMdt =
230 (element->readoutEles().
size() == 1 &&
242 innerStructure.first.clear();
244 if (isNullVariant(chamberNode)) {
247 nodes.push_back(std::move(chamberNode));
250 if(!Acts::rangeContainsValue(passiveStationIds, element->chamberIndex())){
255 elementsPerStation[regionChamberHash(detIdx, element->chamberIndex())].push_back(element);
262 double halfLengthZ = 0.5 * std::abs(maxZ - minZ);
263 ATH_MSG_DEBUG(
"Inner radius: " << innerRadius<<
", outer radius: " << outerRadius
264 <<
", max Z: " << maxZ<<
", min Z: " << minZ<<
", half length Z: " << halfLengthZ);
268 auto bounds = boundsFactory.makeBounds<Acts::CylinderVolumeBounds>(innerRadius, outerRadius, halfLengthZ);
269 auto volume = std::make_unique<Acts::TrackingVolume>(trf, bounds, name);
270 volume->assignGeometryId(
id);
273 std::ranges::for_each(passiveSurfaces, [&volume](
auto& surf){
274 volume->addSurface(surf);
277 auto muonNode = std::make_shared<Acts::Experimental::StaticBlueprintNode>(std::move(volume));
280 std::ranges::for_each(nodes, [&muonNode](
auto& nodeVariant){
281 std::visit([&](
auto&& ptr) {
282 muonNode->addChild(ptr);
289std::variant<MuonBlueprintNodeBuilder::staticNodePtr, MuonBlueprintNodeBuilder::materialNodePtr>
292 auto materialNode = std::dynamic_pointer_cast<Acts::Experimental::MaterialDesignatorBlueprintNode>(chamberVolumeNode);
295 auto staticNode = std::dynamic_pointer_cast<Acts::Experimental::StaticBlueprintNode>(chamberVolumeNode);
300std::variant<MuonBlueprintNodeBuilder::staticNodePtr, MuonBlueprintNodeBuilder::materialNodePtr>
302 std::unique_ptr<Acts::TrackingVolume>& vol,
303 const std::vector<blueprintNodePtr>& innerStructure)
const{
305 const Acts::VolumeBounds& bounds = vol->volumeBounds();
306 staticNodePtr staticNode = std::make_shared<Acts::Experimental::StaticBlueprintNode>(std::move(vol));
307 for (
auto& childNode : innerStructure) {
308 auto node = std::dynamic_pointer_cast<Acts::Experimental::StaticBlueprintNode>(childNode);
310 staticNode->addChild(std::move(
node));
316 auto materialNode = std::make_shared<Acts::Experimental::MaterialDesignatorBlueprintNode>(element->identString() +
"_MaterialNode");
318 materialNode->addChild(staticNode);
327 const Acts::GeometryIdentifier& chId,
328 Acts::VolumeBoundFactory& boundsFactory)
const
329 requires(std::is_same_v<T, MuonGMR4::Chamber> || std::is_same_v<T, MuonGMR4::SpectrometerSector>){
331 std::vector<blueprintNodePtr> readoutVolumes;
332 std::vector<surfacePtr> readoutSurfaces;
333 Acts::GeometryIdentifier::Value mdtId{1};
337 std::vector<surfacePtr> detSurfaces = readoutEle->getSurfaces();
338 switch(readoutEle->detectorType()){
343 std::unique_ptr<ActsTrk::VolumePlacement> placement{};
346 Acts::Experimental::MultiWireVolumeBuilder::Config mwCfg;
347 mwCfg.name =
m_detMgr->idHelperSvc()->toStringDetEl(mdtReadoutEle->identify());
348 mwCfg.mlSurfaces = detSurfaces;
349 mwCfg.transform = readoutEle->localToGlobalTransform(gctx);
353 std::shared_ptr<Acts::Experimental::MaterialDesignatorBlueprintNode> mdtMaterialNode;
357 if(
isBIS78(readoutEle) && mdtReadoutEle->multilayer() == 2){
361 std::vector<double> tubeLengths;
362 tubeLengths.reserve(mdtReadoutEle->numTubesInLay());
363 for(std::size_t tube = 1; tube < mdtReadoutEle->numTubesInLay(); ++tube){
365 const auto& surface = mdtReadoutEle->surface(tubeHash);
366 const auto& lBounds =
static_cast<const Acts::LineBounds&
>(surface.bounds());
367 using BoundEnum = Acts::LineBounds::BoundValues;
368 const double tubeLength = 2.*lBounds.get(BoundEnum::eHalfLengthZ);
371 auto [minX,maxX] = std::ranges::minmax_element(tubeLengths);
372 int nSmallTubes = std::count_if(tubeLengths.begin(), tubeLengths.end(), [minX](
double length){
373 return std::abs(*minX-length) < Acts::s_epsilon;
377 constexpr double extraMargin = 1._cm;
378 double y2 = (nSmallTubes+1.)*parameters.tubePitch;
379 double y1 = 2.*parameters.halfY + extraMargin - y2;
381 placement = std::make_unique<ActsTrk::VolumePlacement>(*readoutEle,
385 mwCfg.bounds = boundsFactory.makeBounds<Acts::DiamondVolumeBounds>(0.5*(*maxX), 0.5*(*maxX), 0.5*(*minX),
386 y1, y2, parameters.halfHeight);
390 placement = std::make_unique<ActsTrk::VolumePlacement>(*readoutEle);
393 if(std::abs(parameters.shortHalfX - parameters.longHalfX) < Acts::s_epsilon){
394 mwCfg.bounds = boundsFactory.makeBounds<Acts::CuboidVolumeBounds>(parameters.shortHalfX,
396 parameters.halfHeight);
398 mwCfg.bounds = boundsFactory.makeBounds<Acts::TrapezoidVolumeBounds>(parameters.shortHalfX,
399 parameters.longHalfX,
401 parameters.halfHeight);
404 mwCfg.alignablePlacement = placement.get();
406 element.addPlacement(std::move(placement));
408 mwCfg.binning = {{{Acts::AxisDirection::AxisY, Acts::AxisBoundaryType::Bound,
411 static_cast<std::size_t
>(std::lround(2 * parameters.halfY / parameters.tubePitch))}, 2u},
412 {{Acts::AxisDirection::AxisZ, Acts::AxisBoundaryType::Bound,
413 -parameters.halfHeight,
414 parameters.halfHeight,
415 static_cast<std::size_t
>(std::lround(2 * parameters.halfHeight / parameters.tubePitch))}, 1u}};
416 Acts::Experimental::MultiWireVolumeBuilder mdtBuilder{mwCfg};
417 std::unique_ptr<Acts::TrackingVolume> mdtVolume = mdtBuilder.buildVolume();
419 mdtVolume->assignGeometryId(chId.withExtra(mdtId++));
424 mdtMaterialNode = std::make_shared<Acts::Experimental::MaterialDesignatorBlueprintNode>(element.identString() +
"_MaterialNode");
425 configureMaterialFaces(*mdtMaterialNode, mdtVolume->volumeBounds(),
getActiveMaterial(element));
426 auto staticNode = std::make_shared<Acts::Experimental::StaticBlueprintNode>(std::move(mdtVolume));
427 mdtMaterialNode->addChild(std::move(staticNode));
428 readoutVolumes.push_back(std::move(mdtMaterialNode));
431 auto mdtNode = std::make_shared<Acts::Experimental::StaticBlueprintNode>(std::move(mdtVolume));
432 mdtNode->setNavigationPolicyFactory(mdtBuilder.createNavigationPolicyFactory());
433 readoutVolumes.push_back(std::move(mdtNode));
442 readoutSurfaces.insert(readoutSurfaces.end(), std::make_move_iterator(detSurfaces.begin()),
443 std::make_move_iterator(detSurfaces.end()));
448 THROW_EXCEPTION(
"Unknown detector type for readout element: " << readoutEle->detectorType());
454 return std::make_pair(std::move(readoutVolumes), std::move(readoutSurfaces));
468template<
typename ElementSet_t>
469std::vector<std::shared_ptr<Acts::Surface>>
471 const Acts::GeometryContext& gctx,
472 const std::unordered_map<unsigned int, ElementSet_t>& elementsPerStation)
const {
479 constexpr double margin{4._mm};
481 std::vector<std::shared_ptr<Acts::Surface>> surfaces;
482 surfaces.reserve(elementsPerStation.size());
483 LayIdx layIdx = LayIdx::LayerIndexMax;
484 DetIdx detIdx = DetIdx::DetectorRegionIndexMax;
492 if(readoutEle->chamberIndex() != ChIdx::BIS){
495 int stEta = readoutEle->stationEta();
497 stEta = std::abs(readoutEle->stationEta());
499 switch (readoutEle->detectorType()) {
501 const auto* techEle =
503 if (techEle->multilayer() == 2 && stEta >= 7) {
509 const auto* techEle =
511 if (techEle->doubletZ() == 2 && stEta >= 7) {
522 for(
const auto& [hash, elements] : elementsPerStation){
529 double maxZ{std::numeric_limits<double>::lowest()};
530 double minZ{std::numeric_limits<double>::max()};
531 double rMin{std::numeric_limits<double>::max()};
532 double rMax{std::numeric_limits<double>::lowest()};
534 for(
const auto& el : elements){
536 if(rejectBIS78(el->readoutEles().front())){
540 const auto& bounds = el->bounds();
541 for(
const auto& surface : bounds->orientedSurfaces(locToGlobal)){
542 const auto& surfaceRepr = (*surface.surface);
544 rMin = std::min(rMin, center.perp());
545 minZ = std::min(minZ, center.z());
546 maxZ = std::max(maxZ, center.z());
547 rMax = std::max(rMax, center.perp());
551 double halfZ = 0.5*std::abs(maxZ-minZ);
556 const auto& testCh = elements.front();
557 int8_t side = testCh->side();
558 switch (testCh->chamberIndex()) {
562 side > 0 ? zShift = minZ - margin : zShift = maxZ + margin;
564 auto surface = Acts::Surface::makeShared<Acts::DiscSurface>(trf, std::make_shared<Acts::RadialBounds>(rMin, rMax));
567 surfaces.push_back(surface);
575 if(testCh->chamberIndex() == ChIdx::EIL){
578 side > 0 ? zShift = maxZ + margin : zShift = minZ - margin;
580 auto surface = Acts::Surface::makeShared<Acts::DiscSurface>(trf,
581 std::make_shared<Acts::RadialBounds>(rMin, rMax));
584 surfaces.push_back(surface);
591 if(!
m_isRun4 && testCh->chamberIndex() == ChIdx::BIS){
595 auto surface = Acts::Surface::makeShared<Acts::CylinderSurface>(trf,
596 std::make_shared<Acts::CylinderBounds>(rMin - margin, halfZ));
599 surfaces.push_back(surface);
602 THROW_EXCEPTION(
"No implementation of passive material surface for this station!!!! - sorry :) ");
604 ATH_MSG_VERBOSE(
"Putting passive material surface for station " <<
layerName(layIdx) <<
"/ "<<
regionName(detIdx) <<
": minZ = " << minZ <<
", maxZ = " << maxZ<<
"and radius "<< rMax);
607 if(msgLvl(MSG::VERBOSE)){
608 std::stringstream stream{};
609 for(
const auto& surf : surfaces){
610 stream<<
" at position : "<<
Amg::toString(surf->center(gctx))
611 <<
"with bounds "<< surf->bounds()<<std::endl;
614 <<
" surfaces for passive material description : "<<std::endl<<stream.str());
621std::shared_ptr<const Acts::ISurfaceMaterial>
623 requires(std::is_same_v<T, MuonGMR4::Chamber> ||
624 std::is_same_v<T, MuonGMR4::SpectrometerSector>) {
626 const float thickness = element.halfZ();
627 PVConstLink parentVolume = element.readoutEles().front()->getMaterialGeom()->getParent();
628 GeoModelTools::GeoMaterialHelper geoMaterialHelper;
629 std::pair<GeoModelTools::GeoMaterialPtr, double> geoMaterials = geoMaterialHelper.collectMaterial(parentVolume);
631 const Acts::Material aMat = ActsPlugins::GeoModel::geoMaterialConverter(*geoMaterials.first);
632 Acts::MaterialSlab slab{aMat, thickness};
633 std::shared_ptr<Acts::HomogeneousSurfaceMaterial> material = std::make_shared<Acts::HomogeneousSurfaceMaterial>(slab);
634 material->scale(0.5);
642 const std::vector<StIdx>& stationIndex,
644 requires(std::is_same_v<T, MuonGMR4::Chamber> ||
645 std::is_same_v<T, MuonGMR4::SpectrometerSector>) {
649 return etaSignCorrect &&
650 Acts::rangeContainsValue(stationIndex,
toStationIndex(element.chamberIndex()));
654std::shared_ptr<Acts::ISurfaceMaterial>
656 const std::size_t nBins1,
657 const std::size_t nBins2)
const {
658 if (nBins1 == 0 || nBins2 == 0) {
660 <<
" as one of the bin dimensions is zero. nBins1: "<<nBins1<<
", nBins2: "<<nBins2);
663 if (nBins1 == 1 && nBins1 == nBins2) {
664 return std::make_shared<Acts::HomogeneousSurfaceMaterial>();
667 std::vector<Acts::DirectedProtoAxis> pmBinning = {};
669 switch (bounds.type()) {
670 using enum Acts::SurfaceBounds::BoundsType;
672 pmBinning = {{Acts::AxisDirection::AxisZ, Acts::AxisBoundaryType::Bound, nBins1},
673 {Acts::AxisDirection::AxisRPhi, Acts::AxisBoundaryType::Bound, nBins2}};
676 pmBinning = {{Acts::AxisDirection::AxisR, Acts::AxisBoundaryType::Bound, nBins1},
677 {Acts::AxisDirection::AxisPhi, Acts::AxisBoundaryType::Bound, nBins2}};
684 return std::make_shared<Acts::ProtoGridSurfaceMaterial>(pmBinning);
686std::pair<std::size_t, std::size_t>
710 return std::make_pair(0ul, 0ul);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
size_t size() const
Number of registered mappings.
virtual DetectorType detectorType() const =0
Returns the detector element type.
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.
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.
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...
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.
Gaudi::Property< bool > m_alignableVolumes
Flag to control if the volumes should be alignable or not.
Gaudi::Property< bool > m_isRun4
Flag to control if we use run4 geometry 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....
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
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.
Gaudi::Property< std::size_t > m_nRBinsEI2
Number of bins in R direction on the disc after the NSW.
This is a "hash" representation of an Identifier.
Readout element to describe the Monitored Drift Tube (Mdt) chambers Mdt chambers usually comrpise out...
static IdentifierHash measurementHash(unsigned layerNumber, unsigned tubeNumber)
Constructs a Measurement hash from layer && tube number.
MuonReadoutElement is an abstract class representing the geometry of a muon detector.
int stationEta() const
Returns the stationEta (positive A site, negative C site).
Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index of the Identifier (MMS & STS) have the same chamber Index (EIS).
Define the volume parts of the GeometryIdentifier for each ATLAS subsystem centrally.
constexpr std::size_t s_muonEndcapAId
constexpr std::size_t s_muonEndcapCId
constexpr std::size_t s_muonEndcapMiddleCId
constexpr std::size_t s_muonBarrelId
constexpr std::size_t s_muonEndcapMiddleAId
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
@ Mm
Maybe not needed in the migration.
@ Tgc
Resitive Plate Chambers.
@ Rpc
Monitored Drift Tubes.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Amg::Transform3D getTranslateZ3D(const double Z)
: Returns a shift transformation along the z-axis
Amg::Transform3D getTranslateY3D(const double Y)
: Returns a shift transformation along the y-axis
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
std::pair< DetectorRegionIndex, ChIndex > decomposeRegionChamberHash(unsigned int hash)
decompose the hash into Region and Chamber
StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
const std::string & chName(ChIndex index)
convert ChIndex into a string
const std::string & regionName(DetectorRegionIndex index)
convert DetectorRegionIndex into a string
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
DetectorRegionIndex toDetectorRegionIndex(ChIndex index, int8_t etaSign)
convert ChamberIndex + etaSign into DetectorRegionIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Set of parameters to describe a MDT chamber.
#define THROW_EXCEPTION(MESSAGE)