4#ifndef MUONGEOMODELR4_MUONREADOUTELEMENT_H
5#define MUONGEOMODELR4_MUONREADOUTELEMENT_H
10#include <GaudiKernel/ServiceHandle.h>
11#include <GeoModelKernel/GeoVDetectorElement.h>
12#include <GeoModelKernel/GeoAlignableTransform.h>
45 GeoIntrusivePtr<GeoVFullPhysVol>
physVol{
nullptr};
142#ifndef SIMULATIONBASE
169 virtual double thickness()
const = 0;
185#ifndef SIMULATIONBASE
187 StatusCode
strawSurfaceFactory(const IdentifierHash& hash, std::shared_ptr<const Acts::LineBounds> lBounds);
190 StatusCode
planeSurfaceFactory(const IdentifierHash& hash, std::shared_ptr<const Acts::PlanarBounds> pBounds);
210 using TransformCacheMap = std::unordered_map<IdentifierHash, std::unique_ptr<ActsTrk::TransformCache>>;
212#ifndef SIMULATIONBASE
Eigen::Affine3d Transform3D
Base class interface for the actual readout elements.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
This is a "hash" representation of an Identifier.
std::vector< std::shared_ptr< Acts::Surface > > getSurfaces() const
Returns all surfaces that are associated with the active readout planes.
MuonReadoutElement()=delete
int stationEta() const
Returns the stationEta (positive A site, negative O site)
int m_stPhi
Cache the station phi of the identifier.
const SpectrometerSector * msSector() const
Returns the pointer to the envelope volume enclosing all chambers in the sector.
Amg::Vector3D center(const ActsTrk::GeometryContext &ctx) const
Returns the detector center (Which is the same as the detector center of the first measurement layer)
const Amg::Transform3D & localToGlobalTrans(const ActsTrk::GeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
const Amg::Transform3D & toStation(const ActsTrk::DetectorAlignStore *alignStore) const
Returns the local -> global transformation to go from the volume center origin.
const Amg::Transform3D & transform(const Acts::GeometryContext &gctx) const override final
Returns the transformation to the origin of the chamber coordinate system.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
const std::string & chamberDesign() const
The chamber design refers to the construction parameters of a readout element.
StatusCode strawSurfaceFactory(const IdentifierHash &hash, std::shared_ptr< const Acts::LineBounds > lBounds)
TransformCacheMap m_localToGlobalCaches
IdentifierHash identHash() const
Returns the Identifier has of the Element that is Identical to the detElHash from the id_helper class...
void setChamberLink(const Chamber *chamber)
Sets the link to the enclosing chamber.
virtual ~MuonReadoutElement()
void setSectorLink(const SpectrometerSector *envelope)
Set the link to the enclosing sector envelope.
std::shared_ptr< Acts::Surface > surfacePtr(const IdentifierHash &hash) const
Returns the pointer associated to a certain wire / plane.
MuonReadoutElement(const MuonReadoutElement &)=delete
StatusCode planeSurfaceFactory(const IdentifierHash &hash, std::shared_ptr< const Acts::PlanarBounds > pBounds)
ActsTrk::SurfaceCacheSet m_surfaces
Cache of all associated surfaces.
Identifier identify() const override final
Return the athena identifier.
const Acts::Surface & surface() const override final
Returns the surface associated to the readout element plane.
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the pointer to the muonIdHelperSvc.
Muon::MuonStationIndex::ChIndex m_chIdx
Cache the chamber index of the Identifier.
Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index of the Identifier (MMS & STS) have the same chamber Index (EIS)
virtual StatusCode initElement()=0
Element initialization.
StatusCode createGeoTransform()
const Chamber * chamber() const
Returns the pointer to the chamber enclosing this readout element.
int m_stName
Cache the station name of the identifier.
StatusCode insertTransform(const IdentifierHash &hash)
Inserts a transfomration for caching.
MuonReadoutElement(const defineArgs &args)
void releaseUnAlignedTrfs() const
Releases all cached transforms that are not connected with alignment.
const SpectrometerSector * m_msSectorLink
Pointer to the associated MS-sector & MuonChamber.
unsigned int storeAlignedTransforms(const ActsTrk::DetectorAlignStore &store) const override final
Caches the aligned transformation in the provided store. Returns the number of cached elements.
int stationName() const
Returns the stationName (BIS, BOS, etc) encoded into the integer.
virtual IdentifierHash measurementHash(const Identifier &measId) const =0
Constructs the identifier hash from the full measurement Identifier.
virtual Identifier measurementId(const IdentifierHash &measHash) const =0
Converts the measurement hash back to the full Identifier.
int stationPhi() const
Returns the stationPhi (1-8) -> sector (2*phi - (isSmall))
static IdentifierHash geoTransformHash()
Returns the hash that is associated with the surface cache holding the transformation that is placing...
const GeoAlignableTransform * alignableTransform() const
Returnsthe alignable transform of the readout element.
virtual IdentifierHash layerHash(const Identifier &measId) const =0
Amg::Transform3D globalToLocalTrans(const ActsTrk::GeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
const Chamber * m_chambLink
IdentifierHash m_detElHash
Cache of the detector element hash.
std::unordered_map< IdentifierHash, std::unique_ptr< ActsTrk::TransformCache > > TransformCacheMap
Cache all local to global transformations.
int m_stEta
Cache the station eta of the identifier.
MuonReadoutElement & operator=(const MuonReadoutElement &)=delete
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
std::set< std::unique_ptr< SurfaceCache >, std::less<> > SurfaceCacheSet
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Affine3d Transform3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
RpcReadoutElement::defineArgs defineArgs
ChIndex
enum to classify the different chamber layers in the muon spectrometer
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Helper struct to ship the defining arguments of the detector element around.
Identifier detElId
ATLAS identifier.
GeoIntrusivePtr< GeoVFullPhysVol > physVol
Pointer to the underlying physical volume in GeoModel.
const GeoAlignableTransform * alignTransform
Pointer to the alignable transformation.
std::string chambDesign
chamber design name as it's occuring in the parameter book tables E.g. BMS5, RPC10,...