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/Utilities/AxisSpec.hpp>
32#include <Acts/Utilities/MultiAxisSpec.hpp>
33#include <Acts/Surfaces/RectangleBounds.hpp>
34#include <Acts/Navigation/FrustumNavigationPolicy.hpp>
42#include "GeoModelValidation/GeoMaterialHelper.h"
44using namespace Acts::UnitLiterals;
49 void configureMaterialFaces(
50 Acts::MaterialDesignatorBlueprintNode&
node,
51 const Acts::VolumeBounds& bounds,
52 std::shared_ptr<const Acts::ISurfaceMaterial> material){
54 switch (bounds.type()) {
55 case Acts::VolumeBounds::BoundsType::eCuboid: {
57 Acts::CuboidVolumeBounds::Face::NegativeZFace, material);
59 Acts::CuboidVolumeBounds::Face::PositiveZFace, material);
62 case Acts::VolumeBounds::BoundsType::eTrapezoid: {
64 Acts::TrapezoidVolumeBounds::Face::NegativeZFaceXY, material);
66 Acts::TrapezoidVolumeBounds::Face::PositiveZFaceXY, material);
69 case Acts::VolumeBounds::BoundsType::eDiamond: {
71 Acts::DiamondVolumeBounds::Face::NegativeZFaceXY, material);
73 Acts::DiamondVolumeBounds::Face::PositiveZFaceXY, material);
78 "Unsupported volume bounds for material configuration");
83 template<
typename... T>
84 bool isNullVariant(std::variant<T...> variant) {
85 return std::visit([](
auto&& ptr) {
96 return StatusCode::SUCCESS;
103EnvelopeSet_t barrelStations, endcapOuterAStations, endcapOuterCStations,
104 endcapMiddleAStations, endcapMiddleCStations;
107 elements =
m_detMgr->getAllSectors();
109 elements =
m_detMgr->getAllChambers();
112std::visit([&](
auto& elems) {
113 using SetType = std::decay_t<
decltype(elems)>;
116 SetType
barrel, endcapA, endcapC, endcapMiddleA, endcapMiddleC;
118 for (
const auto& element : elems) {
120 {StIdx::BI, StIdx::BM, StIdx::BO, StIdx::BE, StIdx::EE, StIdx::EI},
122 barrel.push_back(element);
124 endcapA.push_back(element);
126 endcapC.push_back(element);
128 endcapMiddleA.push_back(element);
130 endcapMiddleC.push_back(element);
133 <<
" not assigned to any station!");
138 barrelStations = std::move(
barrel);
139 endcapOuterAStations = std::move(endcapA);
140 endcapOuterCStations = std::move(endcapC);
141 endcapMiddleAStations = std::move(endcapMiddleA);
142 endcapMiddleCStations = std::move(endcapMiddleC);
146auto muonNode = std::make_shared<Acts::CylinderContainerBlueprintNode>(
"MuonNode", Acts::AxisDirection::AxisZ);
148Acts::VolumeBoundFactory boundsFactory{};
150auto barrelNode =
buildMuonNode(gctx, barrelStations,
"BI_BM_BO_EE_EI", Acts::GeometryIdentifier().withVolume(
s_muonBarrelId), boundsFactory, {ChIdx::BIS, ChIdx::BML, ChIdx::BOL,
151 ChIdx::EIS, ChIdx::EIL});
152auto endcapANode =
buildMuonNode(gctx, endcapOuterAStations,
"EO_A", Acts::GeometryIdentifier().withVolume(
s_muonEndcapAId), boundsFactory);
153auto endcapCNode =
buildMuonNode(gctx, endcapOuterCStations,
"EO_C", Acts::GeometryIdentifier().withVolume(
s_muonEndcapCId), boundsFactory);
154auto endcapMiddleANode =
buildMuonNode(gctx, endcapMiddleAStations,
"EM_A", Acts::GeometryIdentifier().withVolume(
s_muonEndcapMiddleAId), boundsFactory, {ChIdx::EML, ChIdx::EMS});
155auto endcapMiddleCNode =
buildMuonNode(gctx, endcapMiddleCStations,
"EM_C", Acts::GeometryIdentifier().withVolume(
s_muonEndcapMiddleCId), boundsFactory, {ChIdx::EML, ChIdx::EMS});
158 Acts::Experimental::FrustumNavigationPolicy::Config frustumConfig;
159 auto factory = std::make_shared<Acts::NavigationPolicyFactory>(Acts::NavigationPolicyFactory{}.add<Acts::Experimental::FrustumNavigationPolicy>(frustumConfig));
160 for (
auto&
node: {barrelNode, endcapANode, endcapCNode, endcapMiddleANode, endcapMiddleCNode}){
161 node->setNavigationPolicyFactory(factory);
166 barrelNode->addChild(std::move(childNode));
168muonNode->addChild(std::move(barrelNode));
169muonNode->addChild(std::move(endcapANode));
170muonNode->addChild(std::move(endcapCNode));
171muonNode->addChild(std::move(endcapMiddleANode));
172muonNode->addChild(std::move(endcapMiddleCNode));
178std::shared_ptr<Acts::StaticBlueprintNode>
181 const std::string& name,
182 const Acts::GeometryIdentifier&
id,
183 Acts::VolumeBoundFactory& boundsFactory,
184 const std::vector<ChIdx>& passiveStationIds)
const {
187 std::vector<std::string> stationNames;
190 std::vector<std::variant<staticNodePtr, materialNodePtr>> nodes;
192 double innerRadius{0.0};
193 double outerRadius{std::numeric_limits<double>::lowest()};
194 double maxZ{std::numeric_limits<double>::lowest()};
195 double minZ{std::numeric_limits<double>::max()};
197 std::vector<std::shared_ptr<Acts::Surface>> passiveSurfaces;
199 std::visit([&](
const auto& elems){
201 using SetType = std::decay_t<
decltype(elems)>;
202 std::unordered_map<unsigned int, SetType> elementsPerStation;
204 for(
const auto& element : elems){
205 std::unique_ptr<Acts::TrackingVolume> vol{};
207 vol = std::make_unique<Acts::TrackingVolume>(*element->boundingVolume(),
208 element->identString());
210 vol = std::make_unique<Acts::TrackingVolume>(element->localToGlobalTransform(*context),
212 element->identString());
215 Acts::GeometryIdentifier chId =
id.withLayer(chamberId++);
216 vol->assignGeometryId(chId);
219 std::pair<std::vector<blueprintNodePtr>,std::vector<surfacePtr>> innerStructure =
getSensitiveElements(*context, *element, chId, boundsFactory);
220 for(
auto& surface: innerStructure.second){
221 vol->addSurface(surface);
225 for(
const auto& surface: vol->volumeBounds().orientedSurfaces(vol->localToGlobalTransform(gctx))) {
226 const auto& surfaceRepr = (*surface.surface);
227 const Acts::Polyhedron& polyhedron = surfaceRepr.polyhedronRepresentation(gctx);
230 maxZ = std::max(maxZ, center.z());
231 minZ = std::min(minZ, center.z());
235 outerRadius = std::max(outerRadius, vertex.perp());
239 std::variant<staticNodePtr, materialNodePtr> chamberNode;
240 const bool isSingleMdt =
241 (element->readoutEles().
size() == 1 &&
253 innerStructure.first.clear();
255 if (isNullVariant(chamberNode)) {
258 nodes.push_back(std::move(chamberNode));
261 if(!Acts::rangeContainsValue(passiveStationIds, element->chamberIndex())){
266 elementsPerStation[regionChamberHash(detIdx, element->chamberIndex())].push_back(element);
273 double halfLengthZ = 0.5 * std::abs(maxZ - minZ);
274 ATH_MSG_DEBUG(
"Inner radius: " << innerRadius<<
", outer radius: " << outerRadius
275 <<
", max Z: " << maxZ<<
", min Z: " << minZ<<
", half length Z: " << halfLengthZ);
279 auto bounds = boundsFactory.makeBounds<Acts::CylinderVolumeBounds>(innerRadius, outerRadius, halfLengthZ);
280 auto volume = std::make_unique<Acts::TrackingVolume>(trf, bounds, name);
281 volume->assignGeometryId(
id);
284 std::ranges::for_each(passiveSurfaces, [&volume](
auto& surf){
285 volume->addSurface(surf);
288 auto muonNode = std::make_shared<Acts::StaticBlueprintNode>(std::move(volume));
291 std::ranges::for_each(nodes, [&muonNode](
auto& nodeVariant){
292 std::visit([&](
auto&& ptr) {
293 muonNode->addChild(ptr);
300std::variant<MuonBlueprintNodeBuilder::staticNodePtr, MuonBlueprintNodeBuilder::materialNodePtr>
303 auto materialNode = std::dynamic_pointer_cast<Acts::MaterialDesignatorBlueprintNode>(chamberVolumeNode);
306 auto staticNode = std::dynamic_pointer_cast<Acts::StaticBlueprintNode>(chamberVolumeNode);
311std::variant<MuonBlueprintNodeBuilder::staticNodePtr, MuonBlueprintNodeBuilder::materialNodePtr>
313 std::unique_ptr<Acts::TrackingVolume>& vol,
314 const std::vector<blueprintNodePtr>& innerStructure)
const{
316 const Acts::VolumeBounds& bounds = vol->volumeBounds();
317 staticNodePtr staticNode = std::make_shared<Acts::StaticBlueprintNode>(std::move(vol));
318 for (
auto& childNode : innerStructure) {
319 auto node = std::dynamic_pointer_cast<Acts::StaticBlueprintNode>(childNode);
321 staticNode->addChild(std::move(
node));
327 auto materialNode = std::make_shared<Acts::MaterialDesignatorBlueprintNode>(element->identString() +
"_MaterialNode");
329 materialNode->addChild(staticNode);
338 const Acts::GeometryIdentifier& chId,
339 Acts::VolumeBoundFactory& boundsFactory)
const
340 requires(std::is_same_v<T, MuonGMR4::Chamber> || std::is_same_v<T, MuonGMR4::SpectrometerSector>){
342 std::vector<blueprintNodePtr> readoutVolumes;
343 std::vector<surfacePtr> readoutSurfaces;
344 Acts::GeometryIdentifier::Value mdtId{1};
348 std::vector<surfacePtr> detSurfaces = readoutEle->getSurfaces();
349 switch(readoutEle->detectorType()){
354 std::unique_ptr<ActsTrk::VolumePlacement> placement{};
357 Acts::MultiWireVolumeBuilder::Config mwCfg;
358 mwCfg.name =
m_detMgr->idHelperSvc()->toStringDetEl(mdtReadoutEle->identify());
359 mwCfg.mlSurfaces = detSurfaces;
360 mwCfg.transform = readoutEle->localToGlobalTransform(gctx);
364 std::shared_ptr<Acts::MaterialDesignatorBlueprintNode> mdtMaterialNode;
368 if(
isBIS78(readoutEle) && mdtReadoutEle->multilayer() == 2){
372 std::vector<double> tubeLengths;
373 tubeLengths.reserve(mdtReadoutEle->numTubesInLay());
374 for(std::size_t tube = 1; tube < mdtReadoutEle->numTubesInLay(); ++tube){
376 const auto& surface = mdtReadoutEle->surface(tubeHash);
377 const auto& lBounds =
static_cast<const Acts::LineBounds&
>(surface.bounds());
378 using BoundEnum = Acts::LineBounds::BoundValues;
379 const double tubeLength = 2.*lBounds.get(BoundEnum::eHalfLengthZ);
382 auto [minX,maxX] = std::ranges::minmax_element(tubeLengths);
383 int nSmallTubes = std::count_if(tubeLengths.begin(), tubeLengths.end(), [minX](
double length){
384 return std::abs(*minX-length) < Acts::s_epsilon;
388 constexpr double extraMargin = 1._cm;
389 double y2 = (nSmallTubes+1.)*parameters.tubePitch;
390 double y1 = 2.*parameters.halfY + extraMargin - y2;
392 placement = std::make_unique<ActsTrk::VolumePlacement>(*readoutEle,
396 mwCfg.bounds = boundsFactory.makeBounds<Acts::DiamondVolumeBounds>(0.5*(*maxX), 0.5*(*maxX), 0.5*(*minX),
397 y1, y2, parameters.halfHeight);
401 placement = std::make_unique<ActsTrk::VolumePlacement>(*readoutEle);
404 if(std::abs(parameters.shortHalfX - parameters.longHalfX) < Acts::s_epsilon){
405 mwCfg.bounds = boundsFactory.makeBounds<Acts::CuboidVolumeBounds>(parameters.shortHalfX,
407 parameters.halfHeight);
409 mwCfg.bounds = boundsFactory.makeBounds<Acts::TrapezoidVolumeBounds>(parameters.shortHalfX,
410 parameters.longHalfX,
412 parameters.halfHeight);
415 mwCfg.alignablePlacement = placement.get();
417 element.addPlacement(std::move(placement));
419 mwCfg.binning = {{Acts::AxisDirection::AxisY, 2u},
420 {Acts::AxisDirection::AxisZ, 1u}};
421 mwCfg.shiftDirection = Acts::AxisDirection::AxisY;
422 Acts::MultiWireVolumeBuilder mdtBuilder{mwCfg};
423 std::unique_ptr<Acts::TrackingVolume> mdtVolume = mdtBuilder.buildVolume();
425 mdtVolume->assignGeometryId(chId.withExtra(mdtId++));
430 mdtMaterialNode = std::make_shared<Acts::MaterialDesignatorBlueprintNode>(element.identString() +
"_MaterialNode");
431 configureMaterialFaces(*mdtMaterialNode, mdtVolume->volumeBounds(),
getActiveMaterial(element));
432 auto staticNode = std::make_shared<Acts::StaticBlueprintNode>(std::move(mdtVolume));
433 mdtMaterialNode->addChild(std::move(staticNode));
434 readoutVolumes.push_back(std::move(mdtMaterialNode));
437 auto mdtNode = std::make_shared<Acts::StaticBlueprintNode>(std::move(mdtVolume));
438 mdtNode->setNavigationPolicyFactory(mdtBuilder.createNavigationPolicyFactory(gctx.context()));
439 readoutVolumes.push_back(std::move(mdtNode));
448 readoutSurfaces.insert(readoutSurfaces.end(), std::make_move_iterator(detSurfaces.begin()),
449 std::make_move_iterator(detSurfaces.end()));
454 THROW_EXCEPTION(
"Unknown detector type for readout element: " << readoutEle->detectorType());
460 return std::make_pair(std::move(readoutVolumes), std::move(readoutSurfaces));
474template<
typename ElementSet_t>
475std::vector<std::shared_ptr<Acts::Surface>>
477 const Acts::GeometryContext& gctx,
478 const std::unordered_map<unsigned int, ElementSet_t>& elementsPerStation)
const {
485 constexpr double margin{4._mm};
487 std::vector<std::shared_ptr<Acts::Surface>> surfaces;
488 surfaces.reserve(elementsPerStation.size());
489 LayIdx layIdx = LayIdx::LayerIndexMax;
490 DetIdx detIdx = DetIdx::DetectorRegionIndexMax;
498 if(readoutEle->chamberIndex() != ChIdx::BIS){
501 int stEta = readoutEle->stationEta();
503 stEta = std::abs(readoutEle->stationEta());
505 switch (readoutEle->detectorType()) {
507 const auto* techEle =
509 if (techEle->multilayer() == 2 && stEta >= 7) {
515 const auto* techEle =
517 if (techEle->doubletZ() == 2 && stEta >= 7) {
528 for(
const auto& [hash, elements] : elementsPerStation){
535 double maxZ{std::numeric_limits<double>::lowest()};
536 double minZ{std::numeric_limits<double>::max()};
537 double rMin{std::numeric_limits<double>::max()};
538 double rMax{std::numeric_limits<double>::lowest()};
540 for(
const auto& el : elements){
542 if(rejectBIS78(el->readoutEles().front())){
545 const auto& locToGlobal = el->localToGlobalTransform(*context);
546 const auto& bounds = el->bounds();
547 for(
const auto& surface : bounds->orientedSurfaces(locToGlobal)){
548 const auto& surfaceRepr = (*surface.surface);
550 rMin = std::min(rMin, center.perp());
551 minZ = std::min(minZ, center.z());
552 maxZ = std::max(maxZ, center.z());
553 rMax = std::max(rMax, center.perp());
557 double halfZ = 0.5*std::abs(maxZ-minZ);
562 const auto& testCh = elements.front();
563 int8_t side = testCh->side();
564 switch (testCh->chamberIndex()) {
568 side > 0 ? zShift = minZ - margin : zShift = maxZ + margin;
570 auto surface = Acts::Surface::makeShared<Acts::DiscSurface>(trf, std::make_shared<Acts::RadialBounds>(rMin, rMax));
573 surfaces.push_back(surface);
581 if(testCh->chamberIndex() == ChIdx::EIL){
584 side > 0 ? zShift = maxZ + margin : zShift = minZ - margin;
586 auto surface = Acts::Surface::makeShared<Acts::DiscSurface>(trf,
587 std::make_shared<Acts::RadialBounds>(rMin, rMax));
590 surfaces.push_back(surface);
597 if(!
m_isRun4 && testCh->chamberIndex() == ChIdx::BIS){
601 auto surface = Acts::Surface::makeShared<Acts::CylinderSurface>(trf,
602 std::make_shared<Acts::CylinderBounds>(rMin - margin, halfZ));
608 surfaces.push_back(surface);
611 THROW_EXCEPTION(
"No implementation of passive material surface for this station!!!! - sorry :) ");
613 ATH_MSG_VERBOSE(
"Putting passive material surface for station " <<
layerName(layIdx) <<
"/ "<<
regionName(detIdx) <<
": minZ = " << minZ <<
", maxZ = " << maxZ<<
"and radius "<< rMax);
616 if(msgLvl(MSG::VERBOSE)){
617 std::stringstream stream{};
618 for(
const auto& surf : surfaces){
619 stream<<
" at position : "<<
Amg::toString(surf->center(gctx))
620 <<
"with bounds "<< surf->bounds()<<std::endl;
623 <<
" surfaces for passive material description : "<<std::endl<<stream.str());
630std::shared_ptr<const Acts::ISurfaceMaterial>
632 requires(std::is_same_v<T, MuonGMR4::Chamber> ||
633 std::is_same_v<T, MuonGMR4::SpectrometerSector>) {
635 const float thickness = element.halfZ();
636 PVConstLink parentVolume = element.readoutEles().front()->getMaterialGeom()->getParent();
637 GeoModelTools::GeoMaterialHelper geoMaterialHelper;
638 std::pair<GeoModelTools::GeoMaterialPtr, double> geoMaterials = geoMaterialHelper.collectMaterial(parentVolume);
640 const Acts::Material aMat = ActsPlugins::GeoModel::geoMaterialConverter(*geoMaterials.first);
641 Acts::MaterialSlab slab{aMat, thickness};
642 std::shared_ptr<Acts::HomogeneousSurfaceMaterial> material = std::make_shared<Acts::HomogeneousSurfaceMaterial>(slab);
643 material->scale(0.5);
651 const std::vector<StIdx>& stationIndex,
653 requires(std::is_same_v<T, MuonGMR4::Chamber> ||
654 std::is_same_v<T, MuonGMR4::SpectrometerSector>) {
658 return etaSignCorrect &&
659 Acts::rangeContainsValue(stationIndex,
toStationIndex(element.chamberIndex()));
663std::shared_ptr<Acts::ISurfaceMaterial>
665 const std::size_t nBins1,
666 const std::size_t nBins2)
const {
667 if (nBins1 == 0 || nBins2 == 0) {
669 <<
" as one of the bin dimensions is zero. nBins1: "<<nBins1<<
", nBins2: "<<nBins2);
672 if (nBins1 == 1 && nBins1 == nBins2) {
673 return std::make_shared<Acts::HomogeneousSurfaceMaterial>();
678 auto protoMaterial = [](Acts::AxisDirection dir1, std::size_t bins1,
679 Acts::AxisDirection dir2, std::size_t bins2) {
680 return std::make_shared<Acts::ProtoGridSurfaceMaterial>(
681 Acts::MultiAxisSpec2D({Acts::AxisSpec::DeferredEquidistant(bins1, dir1),
682 Acts::AxisSpec::DeferredEquidistant(bins2, dir2)}));
685 switch (bounds.type()) {
686 using enum Acts::SurfaceBounds::BoundsType;
688 return protoMaterial(Acts::AxisDirection::AxisZ, nBins1,
689 Acts::AxisDirection::AxisRPhi, nBins2);
691 return protoMaterial(Acts::AxisDirection::AxisR, nBins1,
692 Acts::AxisDirection::AxisPhi, nBins2);
698std::pair<std::size_t, std::size_t>
722 return std::make_pair(0ul, 0ul);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define ATH_MSG_INFO(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.
std::shared_ptr< Acts::BlueprintNode > buildBlueprintNode(const Acts::GeometryContext &gctx, std::shared_ptr< Acts::BlueprintNode > &&childNode) override
Build the Muon Blueprint Node.
Gaudi::Property< std::size_t > m_nZBinsBI
Number of bins in Z direction on the BI cylinder surface.
Gaudi::Property< bool > m_assignEmptyMaterial
Assign empty material slabs for the passive surfaces.
Gaudi::Property< std::size_t > m_nZBinsBM
Number of bins in Z direction on the BM cylinder surface.
std::shared_ptr< Acts::BlueprintNode > blueprintNodePtr
Abrivation of the blueprint node ptr base class.
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.
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.
Gaudi::Property< std::size_t > m_nRBinsEM2
Number of bins in R direction on the disc after the middle big wheel.
Gaudi::Property< bool > m_useFrustumNav
Flag to use frustum navigation.
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.
std::shared_ptr< Acts::StaticBlueprintNode > staticNodePtr
Abrivation of the blue print node pointer.
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.
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.
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::Isometry3D getTranslateY3D(const double Y)
: Returns a shift transformation along the y-axis
Eigen::Isometry3d Isometry3D
Eigen::Matrix< double, 3, 1 > Vector3D
Amg::Isometry3D getTranslateZ3D(const double Z)
: Returns a shift transformation along the z-axis
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)