ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ActsTrk::MSTrackingVolumeBuilder Class Reference

#include <MSTrackingVolumeBuilder.h>

Inheritance diagram for ActsTrk::MSTrackingVolumeBuilder:
Collaboration diagram for ActsTrk::MSTrackingVolumeBuilder:

Public Member Functions

StatusCode initialize () override
 
std::shared_ptr< Acts::TrackingVolume > trackingVolume (const Acts::GeometryContext &gctx, std::shared_ptr< const Acts::TrackingVolume > insideVolume=nullptr, std::shared_ptr< const Acts::VolumeBounds > outsideBounds=nullptr) const override
 

Private Attributes

Gaudi::Property< unsigned > m_firstLayId {this, "FirstLayId", 1}
 
const MuonGMR4::MuonDetectorManagerm_detMgr {nullptr}
 

Detailed Description

Definition at line 28 of file MSTrackingVolumeBuilder.h.

Member Function Documentation

◆ initialize()

StatusCode ActsTrk::MSTrackingVolumeBuilder::initialize ( )
override

Definition at line 26 of file MSTrackingVolumeBuilder.cxx.

26  {
28  return StatusCode::SUCCESS;
29  }

◆ trackingVolume()

std::shared_ptr< Acts::TrackingVolume > ActsTrk::MSTrackingVolumeBuilder::trackingVolume ( const Acts::GeometryContext &  gctx,
std::shared_ptr< const Acts::TrackingVolume >  insideVolume = nullptr,
std::shared_ptr< const Acts::VolumeBounds >  outsideBounds = nullptr 
) const
override

Assign surface IDs

Definition at line 32 of file MSTrackingVolumeBuilder.cxx.

34  {
35 
36  ATH_MSG_INFO("Setup MS Gen-1 tracking volume");
37  std::shared_ptr<Acts::VolumeBounds> msBounds{};
38  if (insideVolume) {
39  msBounds = std::make_unique<Acts::CutoutCylinderVolumeBounds>(0, 4000, 14500, 22500, 3200);
40  } else {
41  msBounds = std::make_unique<Acts::CylinderVolumeBounds>(0, 14500, 22500);
42  }
44  auto surfCounter = make_array<unsigned, toInt(ChIndex::ChIndexMax)>(0);
45  std::vector<std::shared_ptr<const Acts::Surface>> msSurfaces{};
46  Acts::SurfaceVector rawSurfs{};
48  const unsigned chIdx = toInt(re->chamberIndex());
49  auto reSurfaces = re->getSurfaces();
50  msSurfaces.reserve(msSurfaces.size() + reSurfaces.size());
51  for (std::shared_ptr<Acts::Surface>& surf : re->getSurfaces()) {
52  surf->assignGeometryId(Acts::GeometryIdentifier{}.withLayer(chIdx + m_firstLayId).withSensitive(++surfCounter[chIdx]));
53  msSurfaces.push_back(std::move(surf));
54  }
55  }
56 
57  std::ranges::transform(msSurfaces, std::back_inserter(rawSurfs), [](const auto& s) { return s.get(); });
58  auto surfaceArray = std::make_unique<Acts::SurfaceArray>(std::make_unique<Acts::SurfaceArray::SingleElementLookup>(rawSurfs),
59  msSurfaces);
60 
61  auto cylinder = Acts::CylinderLayer::create(Amg::Transform3D::Identity(),
62  std::make_shared<Acts::CylinderBounds>(14500, 22500),
63  std::move(surfaceArray), 10.*Gaudi::Units::m,
64  nullptr, Acts::LayerType::active);
65 
66  auto material = std::make_unique<Acts::HomogeneousVolumeMaterial>(Acts::Material::Vacuum());
67 
68  auto layerArray = std::make_unique<Acts::BinnedArrayXD<Acts::LayerPtr>>(cylinder);
69 
70  return std::make_shared<Acts::TrackingVolume>(Acts::Transform3::Identity(), std::move(msBounds),
71  std::move(material), std::move(layerArray), nullptr,
72  Acts::MutableTrackingVolumeVector{},
73  "Muon Spectrometer Envelope");
74 }

Member Data Documentation

◆ m_detMgr

const MuonGMR4::MuonDetectorManager* ActsTrk::MSTrackingVolumeBuilder::m_detMgr {nullptr}
private

Definition at line 38 of file MSTrackingVolumeBuilder.h.

◆ m_firstLayId

Gaudi::Property<unsigned> ActsTrk::MSTrackingVolumeBuilder::m_firstLayId {this, "FirstLayId", 1}
private

Definition at line 37 of file MSTrackingVolumeBuilder.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MuonGMR4::MuonReadoutElement
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:38
MuonGMR4::MuonDetectorManager::getAllReadoutElements
std::vector< const MuonReadoutElement * > getAllReadoutElements() const
Returns the list of all detector elements.
Trk::active
@ active
Definition: Layer.h:47
ActsTrk::MSTrackingVolumeBuilder::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: MSTrackingVolumeBuilder.h:38
ActsTrk::MSTrackingVolumeBuilder::m_firstLayId
Gaudi::Property< unsigned > m_firstLayId
Definition: MSTrackingVolumeBuilder.h:37
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
MuonR4::SegmentFit::toInt
constexpr int toInt(const ParamDefs p)
Definition: MuonHoughDefs.h:42
re
const boost::regex re(r_e)
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106