5#ifndef MUONREADOUTGEOMETRY_MUONCLUSTERREADOUTELEMENT_H
6#define MUONREADOUTGEOMETRY_MUONCLUSTERREADOUTELEMENT_H
137 ATH_MSG_FATAL(__FILE__<<
":"<<__LINE__<<
" "<<__func__<<
" Requesting surface but cache is empty");
138 throw std::runtime_error(
"Empty surface cache");
140 if (hash == -1 || hash >= (
int)
m_surfaceData->m_layerSurfaces.size()) {
150 ATH_MSG_FATAL(__FILE__<<
":"<<__LINE__<<
" "<<__func__<<
" Requesting transform but cache is empty");
151 throw std::runtime_error(
"Empty transform cache");
153 if (hash == -1 || hash >= (
int)
m_surfaceData->m_layerTransforms.size()) {
154 ATH_MSG_WARNING(
"transform hash out of range: " << hash <<
" elements "
163 ATH_MSG_FATAL(__FILE__<<
":"<<__LINE__<<
" "<<__func__<<
" Requesting center but cache is empty");
164 throw std::runtime_error(
"Empty center cache");
166 if (hash == -1 || hash >= (
int)
m_surfaceData->m_layerCenters.size()) {
175 ATH_MSG_FATAL(__FILE__<<
":"<<__LINE__<<
" "<<__func__<<
" Requesting normal but cache is empty");
176 throw std::runtime_error(
"Empty normal cache");
178 if (hash == -1 || hash >= (
int)
m_surfaceData->m_layerNormals.size()) {
187 ATH_MSG_FATAL(__FILE__<<
":"<<__LINE__<<
" "<<__func__<<
" Requesting bounds but cache is empty");
188 throw std::runtime_error(
"Empty bounds cache");
190 if (hash == -1 || hash >= (
int)
m_surfaceData->m_surfBounds.size()) {
198 std::vector<const Trk::Surface*> elementSurfaces;
202 elementSurfaces.reserve(
m_surfaceData->m_layerSurfaces.size());
203 for (
const std::unique_ptr<Trk::PlaneSurface>& ptr :
m_surfaceData->m_layerSurfaces) {
204 elementSurfaces.emplace_back(ptr.get());
208 return elementSurfaces;
#define ATH_MSG_WARNING(x)
Eigen::Affine3d Transform3D
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
virtual int stripNumber(const Amg::Vector2D &pos, const Identifier &id) const =0
strip number corresponding to local position.
virtual std::vector< const Trk::Surface * > surfaces() const
returns all the surfaces contained in this detector element
virtual bool spacePointPosition(const Identifier &phiId, const Identifier &etaId, Amg::Vector3D &pos) const =0
Global space point position for a given pair of phi and eta identifiers If one of the identifiers is ...
virtual bool spacePointPosition(const Identifier &phiId, const Identifier &etaId, Amg::Vector2D &pos) const =0
space point position for a given pair of phi and eta identifiers The LocalPosition is expressed in th...
virtual void clearCache() override final
clear the cache of the readout elememt
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const =0
strip position If the strip number is outside the range of valid strips, the function will return fal...
virtual int numberOfLayers(bool measuresPhi) const =0
number of layers in phi/eta projection
virtual bool measuresPhi(const Identifier &id) const =0
returns whether the given identifier measures phi or not
virtual const Amg::Vector3D & center() const override
Return the center of the element.
virtual double distanceToReadout(const Amg::Vector2D &pos, const Identifier &id) const =0
distance to readout.
virtual int surfaceHash(const Identifier &id) const =0
returns the hash function to be used to look up the surface and surface transform for a given identif...
virtual int layerHash(const Identifier &id) const =0
returns the hash function to be used to look up the center and the normal of the tracking surface for...
std::unique_ptr< SurfaceData > m_surfaceData
virtual int boundaryHash(const Identifier &id) const =0
returns the hash function to be used to look up the surface boundary for a given identifier
MuonClusterReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)
virtual const Amg::Vector3D & normal() const override
Return the normal of the element.
~MuonClusterReadoutElement()
virtual const Trk::SurfaceBounds & bounds() const override
Return the boundaries of the element.
virtual int numberOfStrips(int layer, bool measuresPhi) const =0
virtual int numberOfStrips(const Identifier &layerId) const =0
number of strips per layer
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
MuonReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
Abstract base class for surface bounds to be specified.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the Athena extensions are properly loaded.
Ensure that the ATLAS eigen extensions are properly loaded.
struct to hold information needed for TrkDetElementBase, takes owership of all pointers
std::vector< std::unique_ptr< Trk::PlaneSurface > > m_layerSurfaces
there are two surfaces per layer as the eta/phi surfaces are rotated by 90 degrees wrt eachother: Tot...
std::vector< Amg::Vector3D > m_layerNormals
all surfaces on the muon strip detectors have the same normal vector
std::vector< std::unique_ptr< Trk::SurfaceBounds > > m_surfBounds
the eta and phi bounds of the individual layers are not all identical in the muon system (sTGC stairc...
std::vector< Amg::Transform3D > m_layerTransforms
there are two transformation per layer as the eta/phi surfaces are rotated by 90 degrees wrt eachothe...
std::vector< Amg::Vector3D > m_layerCenters
the eta and phi surfaces for a given layer share the same center: Total number = number of layers