5#ifndef MUONREADOUTGEOMETRY_MDTREADOUTELEMENT_H
6#define MUONREADOUTGEOMETRY_MDTREADOUTELEMENT_H
91 double tubeLength(
const int tubeLayer,
const int tube)
const;
203 const double width_narrow,
204 const double width_wide,
206 const double thickness,
248 std::unique_ptr<GeoInfo>
makeGeoInfo(
const int tubelayer,
const int tube)
const;
249 const GeoInfo&
geoInfo(
const int tubeLayer,
const int tube)
const;
252 std::vector<CxxUtils::CachedUniquePtr<GeoInfo> >
m_tubeGeo{};
258 std::vector<CxxUtils::CachedUniquePtr<Trk::StraightLineSurface> >
m_tubeSurfaces{};
259 std::vector<CxxUtils::CachedUniquePtr<Trk::CylinderBounds> >
m_tubeBounds{};
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
Cached unique_ptr with atomic update.
Cached value with atomic update.
Eigen::Affine3d Transform3D
Cached value with atomic update.
unsigned int m_nMDTinStation
Amg::Transform3D tubeToMultilayerTransf(const Identifier &id) const
double getTubeLengthForCaching(const int tubeLayer, const int tube) const
CxxUtils::CachedUniquePtr< Trk::Surface > m_associatedSurface
unsigned int nMDTinStation() const
How many MDT chambers are in the station.
int isAtReadoutSide(const Amg::Vector3D &GlobalHitPosition, const Identifier &id) const
double getActiveTubeLength(const int tubeLayer, const int tube) const
bool endcap() const
Returns whether the chamber is in the endcap.
CxxUtils::CachedUniquePtr< Trk::SurfaceBounds > m_associatedBounds
void setMultilayer(const int ml)
Sets the multilayer number.
std::vector< CxxUtils::CachedUniquePtr< Trk::StraightLineSurface > > m_tubeSurfaces
Amg::Vector3D localTubePos(const Identifier &id) const
std::atomic< bool > m_haveTubeSurfaces
Flag whether any elements have been inserted into the corresponding vectors.
std::unique_ptr< GeoInfo > makeGeoInfo(const int tubelayer, const int tube) const
double tubeLength(const Identifier &id) const
void wireEndpointsAsBuilt(Amg::Vector3D &locAMDBWireEndP, Amg::Vector3D &locAMDBWireEndN, const int tubelayer, const int tube) const
~MdtReadoutElement()=default
friend class MuonChamberLite
double signedRODistanceFromTubeCentre(const Identifier &id) const
Amg::Vector3D tubePos(const Identifier &id) const
Returns the global position of the given tube.
std::vector< CxxUtils::CachedUniquePtr< Amg::Transform3D > > m_deformTransf
Amg::Vector3D ROPos(const int tubelayer, const int tube) const
std::vector< CxxUtils::CachedUniquePtr< GeoInfo > > m_tubeGeo
Amg::Transform3D nodeform_globalToLocalTransf(const Identifier &id) const
Amg::Transform3D globalToLocalTransf(const Identifier &id) const
double getNominalTubeLengthWoCutouts(const int tubeLayer, const int tube) const
Amg::Vector3D localROPos(const Identifier &id) const
Amg::Transform3D globalTransform(const Amg::Vector3D &tubePos, const Amg::Transform3D &toDeform) const
Amg::Vector3D localNominalTubePosWoCutouts(const int tubelayer, const int tube) const
Amg::Vector3D nodeform_localTubePos(const Identifier &id) const
Amg::Transform3D nodeform_localToGlobalTransf(const Identifier &id) const
std::array< double, maxnlayers > m_firstwire_x
std::array< double, maxnsteps > m_tubelength
Amg::Vector3D ROPos(const Identifier &id) const
void setBLinePar(const BLinePar *bLine)
Amg::Vector3D tubeFrame_localROPos(const int tubelayer, const int tube) const
int getNLayers() const
Returns the number of tube layers inside the multilayer.
int getNtubesinastep() const
Returns the number of tubes in the endcap trapezoid sharing the same length.
virtual const Amg::Vector3D & normal(const Identifier &) const override final
Return the normal of the surface associated with this identifier In the case of silicon it returns th...
int getMultilayer() const
Returns the multilayer represented by the readout element.
Amg::Vector3D posOnDefChamWire(const Amg::Vector3D &locAMDBPos, const double width_narrow, const double width_wide, const double height, const double thickness, const Amg::Vector3D &fixedPoint) const
const Amg::Transform3D & fromIdealToDeformed(const int tubelayer, const int tube) const
std::atomic< bool > m_haveTubeBounds
const BLinePar * getBLinePar() const
double m_tubeWallThickness
virtual const Trk::SurfaceBounds & bounds() const override final
Return the boundaries of the element.
const BLinePar * m_BLinePar
std::atomic< bool > m_haveTubeGeo
virtual const Amg::Transform3D & transform(const Identifier &id) const override final
Return local to global transform associated with this identifier.
double distanceFromRO(const Amg::Vector3D &GlobalHitPosition, const Identifier &id) const
double RODistanceFromTubeCentre(const Identifier &id) const
std::vector< CxxUtils::CachedUniquePtr< Trk::CylinderBounds > > m_tubeBounds
const Amg::Transform3D & localToGlobalTransf(const int tubeLayer, const int tube) const
double outerTubeRadius() const
Returns the tube radius taking the thickness of the tubes into account.
const GeoInfo & geoInfo(const int tubeLayer, const int tube) const
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
std::vector< CxxUtils::CachedUniquePtr< GeoInfo > > m_backupTubeGeo
double tubePitch() const
Returns the distance between 2 tubes in a tube layer.
bool getWireFirstLocalCoordAlongR(int tubeLayer, double &coord) const
std::atomic< bool > m_haveDeformTransf
Amg::Vector3D nodeform_tubePos(const Identifier &id) const
Returns the global position of the tube excluding the B-line & As-built corrections.
bool barrel() const
Returns whether the chamber is in the barrel (Assement on first later in stationName)
void clearCache() override final
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
CxxUtils::CachedValue< int > m_zsignRO_tubeFrame
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
CxxUtils::CachedValue< Amg::Vector3D > m_elemNormal
const Amg::Transform3D & localToGlobalTransf(const Identifier &id) const
bool containsId(const Identifier &id) const override
double tubeLength(const int tubeLayer, const int tube) const
Amg::Transform3D deformedTransform(const int tubelayer, const int tube) const
Amg::Vector3D tubeFrame_localROPos(const Identifier &id) const
std::vector< const Trk::Surface * > surfaces() const
returns all the surfaces contained in this detector element
virtual const Amg::Vector3D & center(const Identifier &) const override final
Return the center of the surface associated with this identifier In the case of silicon it returns th...
bool getWireFirstLocalCoordAlongZ(int tubeLayer, double &coord) const
void fillCache() override final
double getWireLength(const int tubeLayer, const int tube) const
void setNLayers(const int nl)
Sets the number of layers.
void setNMdtInStation(unsigned int numMdt)
Amg::Transform3D globalToLocalTransf(const int tubeLayer, const int tube) const
const MdtIdHelper & m_idHelper
MdtReadoutElement(GeoVFullPhysVol *pv, const std::string &stName, MuonDetectorManager *mgr)
std::array< double, maxnlayers > m_firstwire_y
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
MuonReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)
const Muon::IMuonIdHelperSvc * idHelperSvc() const
virtual const MdtIdHelper & mdtIdHelper() const =0
access to MdtIdHelper
Bounds for a cylindrical Surface.
Abstract base class for surface bounds to be specified.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
CachedUniquePtrT< const T > CachedUniquePtr
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Ensure that the Athena extensions are properly loaded.
constexpr int maxnlayers
An MdtReadoutElement corresponds to a single MDT multilayer; therefore typicaly a MDT chamber consist...
Ensure that the ATLAS eigen extensions are properly loaded.
Amg::Transform3D m_transform
GeoInfo(const Amg::Transform3D &transform)