4#ifndef MUONREADOUTGEOMETRYR4_SPECTROMETERSECTOR_H
5#define MUONREADOUTGEOMETRYR4_SPECTROMETERSECTOR_H
13#include <Acts/Geometry/VolumeBounds.hpp>
50 using BoundPtr_t = std::shared_ptr<const Acts::VolumeBounds>;
73 return minY() <= pos.y() &&
maxY() >= pos.y() &&
74 minZ() <= pos.z() &&
maxZ() >= pos.z();
85 double width(
const double y0)
const {
108 std::shared_ptr<Acts::VolumeBounds>
bounds{};
110 std::shared_ptr<const Acts::PlaneSurface>
surface{};
147 const Acts::PlaneSurface&
surface()
const;
155 double halfY()
const;
157 double halfZ()
const;
164 std::shared_ptr<Acts::VolumeBounds>
bounds()
const;
176 std::unordered_map<const MuonReadoutElement*, std::vector<unsigned int>>
fillDetLayIdCache()
const;
186 const SpectrometerSector::defineArgs& args);
189 const SpectrometerSector& chamber);
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
std::vector< const MuonReadoutElement * > ReadoutSet
Define the list of read out elements of the chamber.
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
bool operator<(const SpectrometerSector &other) const
int8_t side() const
Returns the side of the MS-sector 1 -> A side ; -1 -> C side.
const std::vector< unsigned int > & logicalLayerIdx(const MuonReadoutElement *reEle) const
Returns the logic layer numbering of a given Readout Element.
double halfZ() const
Thickness of the chamber in the z-direction.
unsigned int nLayerPerReadout(const MuonReadoutElement *rele) const
Helper function giving the number of measurement layers in a given readout ele.
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the IdHelpeSvc.
bool barrel() const
Returns whether the sector is placed in the barrel.
Amg::Transform3D globalToLocalTrans(const ActsTrk::GeometryContext &gctx) const
Returns the global -> local transformation from the ATLAS global.
const Amg::Transform3D & localToGlobalTrans(const ActsTrk::GeometryContext &gctx) const
Returns the local -> global tarnsformation from the sector.
Chamber::ReadoutSet readoutEles() const
Returns the list of all associated readout elements.
SpectrometerSector(const SpectrometerSector &other)=delete
Delete the copy constructor and copy assignment.
std::unordered_map< const MuonReadoutElement *, std::vector< unsigned int > > fillDetLayIdCache() const
Function filling the map mapping the readout elements to layer numbers.
SpectrometerSector(defineArgs &&args)
Standard constructor taking the defining parameters.
Identifier computeDetLayerId(const MuonReadoutElement *rele) const
Helper function calculating the logic layer Id and the physical layer id.
std::string identString() const
Returns a string encoding the chamber index & the sector of the MS sector.
~SpectrometerSector()=default
double halfY() const
Extend of the chamber in the y-direction.
const Acts::PlaneSurface & surface() const
Returns the associated surface.
const ChamberSet & chambers() const
Returns the associated chambers with this sector.
GeoModel::TransientConstSharedPtr< Chamber > ChamberPtr
double halfXLong() const
Long-extend of the chamber in the x-direction at positive Y.
int sector() const
Returns the sector of the MS-sector.
std::shared_ptr< Acts::VolumeBounds > bounds() const
Returns the volume bounds.
std::shared_ptr< Acts::Volume > boundingVolume(const ActsTrk::GeometryContext &gctx) const
Returns the Acts::Volume representation of the sector.
const std::unordered_map< const MuonReadoutElement *, std::vector< unsigned int > > m_detLayIdCache
Map mapping each Readout Element to the layer numbering in the sector frame.
const std::vector< chamberLocation > & chamberLocations() const
returns the list of all MDT chambers in the sector for fast navigation
double halfXShort() const
Short extend of the chamber in the x-direction at negative Y.
int stationPhi() const
: Returns the station phi of the sector
const defineArgs & parameters() const
Returns the reference to the defining parameters of the sector.
Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index scheme.
std::vector< ChamberPtr > ChamberSet
SpectrometerSector & operator=(const SpectrometerSector &other)=delete
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
double halfY(const Acts::VolumeBounds &bounds)
Returns the half-Y length for the parsed volume bounds (Trapezoid/ Cuboid)
std::ostream & operator<<(std::ostream &ostr, const Chamber::defineArgs &args)
RpcReadoutElement::defineArgs defineArgs
double halfZ(const Acts::VolumeBounds &bounds)
Returns the half-Z length for the parsed volume bounds (Trapezoid/ Cuboid)
double halfXhighY(const Acts::VolumeBounds &bounds)
Returns the half-Y length @ posiive Y for the parsed volume bounds (Trapezoid/ Cuboid)
double halfXlowY(const Acts::VolumeBounds &bounds)
Returns the half-X length @ negative Y for the parsed volume bounds (Trapezoid/ Cuboid)
ChIndex
enum to classify the different chamber layers in the muon spectrometer
chamberLocation & operator=(const chamberLocation &other)=default
Copy assignment.
double minZ() const
Returns the minimum y covered by the chamber location.
double width(const double y0) const
Calculate the strip / tube length at a given position in the y-z plane.
chamberLocation(const Amg::Vector3D &origin, const MuonReadoutElement *reEle, BoundPtr_t bounds)
Standard constructor taking the position of the readout element inside the sector frame,...
BoundPtr_t m_bounds
Pointer to the associated bounds.
chamberLocation & operator=(chamberLocation &&other)=default
Move assignment.
double maxY() const
Returns the maximum u covered by the chamber location.
chamberLocation(chamberLocation &&other)=default
Move constructor.
Amg::Vector3D m_origin
Origin vector of the readout element inside the spectrometer frame.
std::shared_ptr< const Acts::VolumeBounds > BoundPtr_t
double maxZ() const
Returns the maximum u covered by the chamber location.
chamberLocation(const chamberLocation &other)=default
Copy constructor.
const MuonReadoutElement * readoutEle() const
Returns the poter to the associate readout element.
double minY() const
Returns the minimum y covered by the chamber location.
bool insideYZ(const Amg::Vector3D &pos) const
Returns whether the external position is inside the boundaries in the y-z plane.
const Amg::Vector3D & location() const
Returns the location.
const BoundPtr_t & bounds() const
Returns the pointer to the associate bounds.
const MuonReadoutElement * m_reEle
Associated readout element.
std::vector< chamberLocation > detectorLocs
2D pattern navigation structure
std::shared_ptr< const Acts::PlaneSurface > surface
Surface in the centre of the chamber plane.
std::shared_ptr< Acts::VolumeBounds > bounds
Surrouding box chamber bounds.
ChamberSet chambers
List of readout elements in the chamber.