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 29 of file MSTrackingVolumeBuilder.h.

Member Function Documentation

◆ initialize()

StatusCode ActsTrk::MSTrackingVolumeBuilder::initialize ( )
override

Definition at line 28 of file MSTrackingVolumeBuilder.cxx.

28  {
30  return StatusCode::SUCCESS;
31  }

◆ 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 34 of file MSTrackingVolumeBuilder.cxx.

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

Member Data Documentation

◆ m_detMgr

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

Definition at line 39 of file MSTrackingVolumeBuilder.h.

◆ m_firstLayId

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

Definition at line 38 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
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
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.
ActsTrk::IDetectorElementBase
base class interface providing the bare minimal interface extension.
Definition: IDetectorElement.h:32
Trk::active
@ active
Definition: Layer.h:47
ActsTrk::MSTrackingVolumeBuilder::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: MSTrackingVolumeBuilder.h:39
ActsTrk::MSTrackingVolumeBuilder::m_firstLayId
Gaudi::Property< unsigned > m_firstLayId
Definition: MSTrackingVolumeBuilder.h:38
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
Muon::IMuonIdHelperSvc::toString
virtual std::string toString(const Identifier &id) const =0
print all fields to string
re
const boost::regex re(r_e)
MuonGMR4::MuonDetectorManager::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns a pointer to the central MuonIdHelperSvc.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx:159
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106
Muon::MuonStationIndex::toInt
constexpr int toInt(const EnumType enumVal)
Definition: MuonStationIndex.h:61