ATLAS Offline Software
Loading...
Searching...
No Matches
MuonGM::RpcReadoutElement Class Referencefinal

An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station contains: More...

#include <RpcReadoutElement.h>

Inheritance diagram for MuonGM::RpcReadoutElement:
Collaboration diagram for MuonGM::RpcReadoutElement:

Public Member Functions

 RpcReadoutElement (GeoVFullPhysVol *pv, const std::string &stName, int zi, int fi, bool is_mirrored, MuonDetectorManager *mgr)
 constructor
 ~RpcReadoutElement ()
 destructor
int getDoubletR () const
 return DoubletR value for the given readout element
int getDoubletZ () const
 return DoubletZ value for the given readout element
int getDoubletPhi () const
 return DoubletPhi value for the given readout element, be aware that one RE can contain two DoubletPhis!
bool hasDEDontop () const
 return whether the RPC is 'up-side-down'
virtual bool containsId (const Identifier &id) const override
 function to be used to check whether a given Identifier is contained in the readout element
bool inTheRibs () const
 returns whether the RE is in the ribs of the muon spectrometer
int nGasGapPerLay () const
 returns the number of gasgaps
int NphiStripPanels () const
 returns the number of phi strip panels (1 or 2)
int NphiStrips () const
 returns the number of phi strips
int NetaStrips () const
 returns the number of eta strips
int Nstrips (bool measphi) const
 returns the number of strips for the phi or eta plane
double StripWidth (bool measphi) const
 returns the strip width for the phi or eta plane
double StripLength (bool measphi) const
 returns the strip length for the phi or eta plane
double StripPitch (bool measphi) const
 returns the strip pitch for the phi or eta plane
double StripPanelDead (bool measphi) const
 returns strip panel dead area for the phi or eta plane
double stripPanelSsize (bool measphi) const
 returns strip panel S size for the phi or eta plane
double stripPanelZsize (bool measphi) const
 returns strip panel Z size for the phi or eta plane
double gasGapSsize () const
 returns the gas gap S size
double gasGapZsize () const
 returns the gas gap Z size
virtual double distanceToReadout (const Amg::Vector2D &pos, const Identifier &id) const override final
 distance to readout.
virtual int stripNumber (const Amg::Vector2D &pos, const Identifier &id) const override final
 strip number corresponding to local position.
virtual bool stripPosition (const Identifier &id, Amg::Vector2D &pos) const override final
 strip position If the strip number is outside the range of valid strips, the function will return false
virtual int numberOfLayers (bool measphi=true) const override final
 number of layers in phi/eta projection, same for eta/phi planes
void setNumberOfLayers (const int=2)
virtual int numberOfStrips (const Identifier &layerId) const override final
 number of strips per layer
virtual int numberOfStrips (int, bool measuresPhi) const override final
virtual bool spacePointPosition (const Identifier &phiId, const Identifier &etaId, Amg::Vector2D &pos) const override final
 space point position for a given pair of phi and eta identifiers The LocalPosition is expressed in the reference frame of the phi surface.
virtual bool spacePointPosition (const Identifier &phiId, const Identifier &etaId, Amg::Vector3D &pos) const override final
 Global space point position for a given pair of phi and eta identifiers If one of the identifiers is outside the valid range, the function will return false.
void spacePointPosition (const Amg::Vector2D &phiPos, const Amg::Vector2D &etaPos, Amg::Vector2D &pos) const
 space point position for a pair of phi and eta local positions and a layer identifier The LocalPosition is expressed in the reference frame of the phi projection.
const Amg::Vector3D REcenter () const
 center of an RPC RE is not trivially the center of the first surface, overloading MuonClusterReadoutElement
virtual void fillCache () override final
 function to fill tracking cache
virtual int surfaceHash (const Identifier &id) const override final
 returns the hash to be used to look up the surface and transform in the MuonClusterReadoutElement tracking cache
int surfaceHash (int doubletPhi, int gasGap, bool measphi) const
 returns the hash to be used to look up the surface and transform in the MuonClusterReadoutElement tracking cache
virtual int layerHash (const Identifier &id) const override final
 returns the hash to be used to look up the normal and center in the MuonClusterReadoutElement tracking cache
int layerHash (int doubletPhi, int gasGap) const
 returns the hash to be used to look up the normal and center in the MuonClusterReadoutElement tracking cache
virtual int boundaryHash (const Identifier &id) const override final
 returns the hash function to be used to look up the surface boundary for a given identifier
virtual bool measuresPhi (const Identifier &id) const override final
 returns whether the current identifier corresponds to a phi measurement
void initDesign ()
 initialize the design classes for this readout element
void setDoubletR (int doubletR)
void setDoubletZ (int dobuletZ)
void setDoubletPhi (int doubletPhi)
bool rotatedRpcModule () const
void setYTranslation (const double y)
void setZTranslation (const double z)
Amg::Vector3D localToGlobalCoords (const Amg::Vector3D &x, const Identifier &id) const
 Attention: these transformations do not represent the tracking transformations as obtained by the transform() method.
Amg::Transform3D localToGlobalTransf (const Identifier &id) const
Amg::Transform3D localToGlobalTransf (int doubletPhi, int gasGap) const
Amg::Vector3D globalToLocalCoords (const Amg::Vector3D &x, const Identifier &id) const
Amg::Transform3D globalToLocalTransf (const Identifier &id) const
Amg::Vector3D stripPos (const Identifier &id) const
Amg::Vector3D stripPos (int doubletPhi, int gasGap, bool measphi, int strip) const
Amg::Vector3D localStripPos (int doubletPhi, int gasGap, bool measphi, int strip) const
 Returns the local strip position in the AMDB frame.
Amg::Vector3D localStripPos (const Identifier &id) const
Amg::Vector3D localGasGapPos (const Identifier &id) const
 Returns the position of the gasGap w.r.t. rest frame of the chamber.
Amg::Vector3D localGasGapPos (int doubletPhi, int gasGap) const
Amg::Vector3D gasGapPos (int doubletPhi, int gasGap) const
 Returns the centre of the gasGap.
Amg::Vector3D gasGapPos (const Identifier &id) const
double distanceToPhiReadout (const Amg::Vector3D &P) const
double distanceToEtaReadout (const Amg::Vector3D &P) const
bool isMirrored () const
bool isDescrAtNegZ () const
virtual void clearCache () override final
 clear the cache of the readout elememt
virtual const Trk::PlaneSurfacesurface () const override
 access to chamber surface (phi orientation), uses the first gas gap
virtual const Trk::PlaneSurfacesurface (const Identifier &id) const override
 access to layer surfaces
const Trk::PlaneSurfacesurface (int surfHash) const
 access to layer surfaces
virtual const Trk::SurfaceBoundsbounds () const override
 Return the boundaries of the element.
virtual const Trk::SurfaceBoundsbounds (const Identifier &id) const override
 Return the boundaries of the surface associated with this identifier.
const Trk::SurfaceBoundsbounds (int boundHash) const
virtual const Amg::Vector3Dcenter () const override
 Return the center of the element.
virtual const Amg::Vector3Dcenter (const Identifier &id) const override
 Return the center of the surface associated with this identifier In the case of silicon it returns the same as center()
const Amg::Vector3Dcenter (int layHash) const
virtual const Amg::Vector3Dnormal () const override
 Return the normal of the element.
virtual const Amg::Vector3Dnormal (const Identifier &id) const override
 Return the normal of the surface associated with this identifier In the case of silicon it returns the same as normal()
const Amg::Vector3Dnormal (int layHash) const
virtual const Amg::Transform3Dtransform () const override
 Return local to global transform.
virtual const Amg::Transform3Dtransform (const Identifier &id) const override
 Return local to global transform associated with this identifier.
const Amg::Transform3Dtransform (int surfHash) const
virtual std::vector< const Trk::Surface * > surfaces () const
 returns all the surfaces contained in this detector element
Identifier identify () const override final
 Returns the ATLAS Identifier of the MuonReadOutElement.
IdentifierHash identifyHash () const override final
 Returns the IdentifierHash of the MuonStation, i.e.
IdentifierHash detectorElementHash () const
 Returns the IdentifierHash of the detector element.
void setIdentifier (const Identifier &id)
 Sets the Identifier, hashes & station names.
int getStationIndex () const
int getStationEta () const
int getStationPhi () const
const Amg::Vector3D globalPosition () const
const Amg::Transform3DabsTransform () const
const Amg::Transform3DdefTransform () const
virtual Amg::Vector3D AmdbLRSToGlobalCoords (const Amg::Vector3D &x) const
virtual Amg::Transform3D AmdbLRSToGlobalTransform () const
virtual Amg::Vector3D GlobalToAmdbLRSCoords (const Amg::Vector3D &x) const
virtual Amg::Transform3D GlobalToAmdbLRSTransform () const
std::string getTechnologyType () const
const std::string & getTechnologyName () const
void setTechnologyName (const std::string &str)
std::string getStationType () const
const std::string & getStationName () const
void setStationName (const std::string &)
double getSsize () const
double getRsize () const
double getZsize () const
double getLongSsize () const
double getLongRsize () const
double getLongZsize () const
double getStationS () const
 Seems to be exclusively used by the MDTs --> Move it to MdtReadoutElement.
void setStationS (double)
void setLongSsize (double)
void setLongRsize (double)
void setLongZsize (double)
void setSsize (double)
void setRsize (double)
void setZsize (double)
bool largeSector () const
bool smallSector () const
bool sideA () const
bool sideC () const
const MuonStationparentMuonStation () const
void setParentMuonStation (const MuonStation *)
Amg::Transform3D toParentStation () const
Amg::Vector3D parentMuonStationPos () const
bool hasCutouts () const
void setHasCutouts (bool flag)
void refreshCache ()
const Muon::IMuonIdHelperSvcidHelperSvc () const
Trk::DetectorElemType detectorType () const override final
 Return the Detector element type.
std::string detectorTypeString () const
 Returns a string of the Detector element type.
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Protected Member Functions

const MuonDetectorManagermanager () const

Protected Attributes

std::unique_ptr< SurfaceDatam_surfaceData {}
double m_Ssize {-9999.}
double m_Rsize {-9999.}
double m_Zsize {-9999.}
double m_LongSsize {-9999.}
double m_LongRsize {-9999.}
double m_LongZsize {-9999.}
 size in the specified direction
std::string m_techname {"TTT0"}
 MDT or RPC or TGC or CSC plus a two digits subtype; example RPC17.
std::string m_statname {"XXX0"}
 examples are BMS5, CSS1, EML1
int m_caching {-1}
 0 if we want to avoid caching geometry info for tracking interface
bool m_hasCutouts {false}
 true is there are cutouts in the readdout-element

Private Member Functions

double localStripSCoord (int doubletPhi, bool measphi, int strip) const
double localStripZCoord (bool measphi, int strip) const
const MuonStripDesigngetDesign (const Identifier &id) const
 returns the MuonStripDesign class for the given identifier
void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

const RpcIdHelperm_idHelper {idHelperSvc()->rpcIdHelper()}
bool m_mirrored {false}
bool m_descratzneg {false}
int m_dbR {0}
int m_dbZ {0}
int m_dbPhi {0}
bool m_hasDEDontop {false}
int m_nlayers {2}
bool m_inTheRibs {false}
int m_nphigasgaps {-1}
double m_gasgapssize {-9999.}
double m_gasgapzsize {-9999.}
int m_nphistrippanels {-1}
int m_nphistripsperpanel {-1}
int m_netastripsperpanel {-1}
double m_phistripwidth {-9999.}
double m_etastripwidth {-9999.}
double m_phistrippitch {-9999.}
double m_etastrippitch {-9999.}
double m_phistriplength {-9999.}
double m_etastriplength {-9999.}
double m_phipaneldead {-9999.}
double m_etapaneldead {-9999.}
std::array< double, s_maxphipanelsm_first_phistrip_s { make_array<double, s_maxphipanels>(-9999.)}
std::array< double, s_maxphipanelsm_etastrip_s {make_array<double, s_maxphipanels>(-9999.)}
std::array< double, s_nLayersm_gasGap_xPos {make_array<double,s_nLayers>(-9999.)}
 Array caching the distance of the gasGap center to the origin plane in global radial direction.
double m_phistrip_z {-9999.}
double m_first_etastrip_z {-9999.}
std::vector< MuonStripDesignm_phiDesigns {}
std::vector< MuonStripDesignm_etaDesigns {}
double m_y_translation {0.f}
double m_z_translation {0.f}
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {"Muon::MuonIdHelperSvc/MuonIdHelperSvc", "MuonDetectorManager"}
Trk::DetectorElemType m_type {Trk::DetectorElemType::SolidState}
Identifier m_id {}
 extended data-collection identifier
IdentifierHash m_idhash {0}
 data-collection hash identifier
IdentifierHash m_detectorElIdhash {0}
 detector element hash identifier
double m_stationS {0.}
int m_stIdx {-1}
 Identifier field of the station index.
int m_eta {-1}
 Identifier field of the station eta.
int m_phi {-1}
 Identifier field of the station phi.
const MuonStationm_parentMuonStation {nullptr}
MuonDetectorManagerm_muon_mgr {nullptr}
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging)

Static Private Attributes

static constexpr int s_maxphipanels = 2
static constexpr int s_nLayers = 3

Friends

class MuonGMR4::ReadoutGeomCnvAlg
class MuonChamber
class MuonChamberLite

Detailed Description

An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station contains:

  • 4 RpcReadoutElements in the middle layer, two adjacent to each other (in z) on the inner side (low-pt plane) and two on the outer side (pivot plane);
  • 2 RpcReadoutElements in the outer layer (inner or outer side depends on the Large or Small sector type). RpcReadoutElements are identified by StationName, StationEta, StationPhi, Technology=2, doubletR, doubletZ and doubletPhi (the latter being actually needed only in a few special cases). Therefore the granularity of the data-collections is less fine-grained than the granularity of the geometry description (1 collection -> 2 RpcReadoutElements, typically).

Pointers to all RpcReadoutElements are created in the build() method of the MuonChamber class, and are held in arrays by the MuonDetectorManager, which is responsible for storing, deleting and providing access to these objects.

An RpcReadoutElement holds properties related to its internal structure (i.e. number of strip panels) and general geometrical properties (size); it implements tracking interfaces and provide access to typical readout-geometry information: i.e. number of strips, strip positions, etc.

The globalToLocalCoords and globalToLocalTransform methods (+ their opposite) define the link between the ATLAS global reference frame and the internal (geo-model defined) local reference frame of any gas gap volume (which is the frame where local coordinates of SimHits, in output from G4, are expressed).

Definition at line 55 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h.

Constructor & Destructor Documentation

◆ RpcReadoutElement()

MuonGM::RpcReadoutElement::RpcReadoutElement ( GeoVFullPhysVol * pv,
const std::string & stName,
int zi,
int fi,
bool is_mirrored,
MuonDetectorManager * mgr )

constructor

Definition at line 40 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

◆ ~RpcReadoutElement()

MuonGM::RpcReadoutElement::~RpcReadoutElement ( )
default

destructor

Member Function Documentation

◆ absTransform()

const Amg::Transform3D & MuonGM::MuonReadoutElement::absTransform ( ) const
inlineinherited

Definition at line 199 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

199{ return getMaterialGeom()->getAbsoluteTransform(); }

◆ AmdbLRSToGlobalCoords()

Amg::Vector3D MuonGM::MuonReadoutElement::AmdbLRSToGlobalCoords ( const Amg::Vector3D & x) const
virtualinherited

◆ AmdbLRSToGlobalTransform()

Amg::Transform3D MuonGM::MuonReadoutElement::AmdbLRSToGlobalTransform ( ) const
virtualinherited

Reimplemented in MuonGM::MMReadoutElement, and MuonGM::sTgcReadoutElement.

Definition at line 90 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

90 {
92 }
const Amg::Transform3D & getNativeToAmdbLRS() const
Amg::Transform3D getTransform() const

◆ boundaryHash()

virtual int MuonGM::RpcReadoutElement::boundaryHash ( const Identifier & id) const
finaloverridevirtual

returns the hash function to be used to look up the surface boundary for a given identifier

Implements MuonGM::MuonClusterReadoutElement.

◆ bounds() [1/3]

const Trk::SurfaceBounds & MuonGM::MuonClusterReadoutElement::bounds ( ) const
inlineoverridevirtualinherited

Return the boundaries of the element.

Implements Trk::TrkDetElementBase.

Definition at line 127 of file MuonClusterReadoutElement.h.

127{ return bounds(0); }
virtual const Trk::SurfaceBounds & bounds() const override
Return the boundaries of the element.

◆ bounds() [2/3]

const Trk::SurfaceBounds & MuonGM::MuonClusterReadoutElement::bounds ( const Identifier & id) const
inlineoverridevirtualinherited

Return the boundaries of the surface associated with this identifier.

For TRT this will be a straw, while for silicon it returns the same as bounds()

Implements Trk::TrkDetElementBase.

Definition at line 133 of file MuonClusterReadoutElement.h.

133{ return bounds(boundaryHash(id)); }
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

◆ bounds() [3/3]

const Trk::SurfaceBounds & MuonGM::MuonClusterReadoutElement::bounds ( int boundHash) const
inlineinherited

Definition at line 185 of file MuonClusterReadoutElement.h.

185 {
186 if (!m_surfaceData) {
187 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" "<<__func__<<" Requesting bounds but cache is empty");
188 throw std::runtime_error("Empty bounds cache");
189 }
190 if (hash == -1 || hash >= (int)m_surfaceData->m_surfBounds.size()) {
191 ATH_MSG_WARNING("normal hash out of range: " << hash << " elements " << m_surfaceData->m_surfBounds.size());
192 return *m_surfaceData->m_surfBounds.front();
193 }
194 return *m_surfaceData->m_surfBounds[hash];
195 }
#define ATH_MSG_FATAL(x)
#define ATH_MSG_WARNING(x)
std::unique_ptr< SurfaceData > m_surfaceData

◆ center() [1/3]

const Amg::Vector3D & MuonGM::MuonClusterReadoutElement::center ( ) const
inlineoverridevirtualinherited

Return the center of the element.

Implements Trk::TrkDetElementBase.

Definition at line 125 of file MuonClusterReadoutElement.h.

125{ return center(0); }
virtual const Amg::Vector3D & center() const override
Return the center of the element.

◆ center() [2/3]

const Amg::Vector3D & MuonGM::MuonClusterReadoutElement::center ( const Identifier & id) const
inlineoverridevirtualinherited

Return the center of the surface associated with this identifier In the case of silicon it returns the same as center()

Implements Trk::TrkDetElementBase.

Definition at line 131 of file MuonClusterReadoutElement.h.

131{ return center(layerHash(id)); }
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...

◆ center() [3/3]

const Amg::Vector3D & MuonGM::MuonClusterReadoutElement::center ( int layHash) const
inlineinherited

Definition at line 161 of file MuonClusterReadoutElement.h.

161 {
162 if (!m_surfaceData) {
163 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" "<<__func__<<" Requesting center but cache is empty");
164 throw std::runtime_error("Empty center cache");
165 }
166 if (hash == -1 || hash >= (int)m_surfaceData->m_layerCenters.size()) {
167 ATH_MSG_WARNING("center hash out of range: " << hash << " elements " << m_surfaceData->m_layerCenters.size());
168 return m_surfaceData->m_layerCenters.front();
169 }
170 return m_surfaceData->m_layerCenters[hash];
171 }

◆ clearCache()

void MuonGM::MuonClusterReadoutElement::clearCache ( )
finaloverridevirtualinherited

clear the cache of the readout elememt

Implements MuonGM::MuonReadoutElement.

Definition at line 13 of file MuonClusterReadoutElement.cxx.

13{ m_surfaceData.reset(); }

◆ containsId()

bool MuonGM::RpcReadoutElement::containsId ( const Identifier & id) const
overridevirtual

function to be used to check whether a given Identifier is contained in the readout element

Implements MuonGM::MuonReadoutElement.

Definition at line 423 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

423 {
424 if (idHelperSvc()->detElementHash(id) != detectorElementHash()) {
425 return false;
426 }
427 int gasgap = m_idHelper.gasGap(id);
428 if (gasgap < 1 || gasgap > m_nlayers) return false;
429 int strip = m_idHelper.channel(id);
430 if (strip < 1 || strip > Nstrips(m_idHelper.measuresPhi(id))) return false;
431 return true;
432 }
IdentifierHash detectorElementHash() const
Returns the IdentifierHash of the detector element.
int Nstrips(bool measphi) const
returns the number of strips for the phi or eta plane

◆ defTransform()

const Amg::Transform3D & MuonGM::MuonReadoutElement::defTransform ( ) const
inlineinherited

Definition at line 201 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

201{ return getMaterialGeom()->getDefAbsoluteTransform(); }

◆ detectorElementHash()

IdentifierHash MuonGM::MuonReadoutElement::detectorElementHash ( ) const
inlineinherited

Returns the IdentifierHash of the detector element.

Unlike the identifyHash, this hash is unique for each readout element

Definition at line 175 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

175{ return m_detectorElIdhash; }

◆ detectorType()

Trk::DetectorElemType MuonGM::MuonReadoutElement::detectorType ( ) const
inlinefinaloverridevirtualinherited

◆ detectorTypeString()

std::string Trk::TrkDetElementBase::detectorTypeString ( ) const
inherited

Returns a string of the Detector element type.

Definition at line 10 of file TrkDetElementBase.cxx.

10 {
11 auto type = detectorType();
13 return "SolidState";
14 else if (type == Trk::DetectorElemType::Silicon)
15 return "Silicon";
16 else if (type == Trk::DetectorElemType::TRT)
17 return "TRT";
18 else if (type == Trk::DetectorElemType::Csc)
19 return "Csc";
20 else if (type == Trk::DetectorElemType::Mdt)
21 return "Mdt";
22 else if (type == Trk::DetectorElemType::Rpc)
23 return "Rpc";
24 else if (type == Trk::DetectorElemType::Tgc)
25 return "Tgc";
26 else if (type == Trk::DetectorElemType::sTgc)
27 return "sTgc";
28 else if (type == Trk::DetectorElemType::MM)
29 return "Mm";
30 return "Unknown";
31}
virtual DetectorElemType detectorType() const =0
Return the Detector element type.

◆ distanceToEtaReadout()

double MuonGM::RpcReadoutElement::distanceToEtaReadout ( const Amg::Vector3D & P) const

Definition at line 278 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

278 {
279
280 double dist = -999999.;
281 double pAmdbL = GlobalToAmdbLRSCoords(P).x();
282 double myCenterAmdbL = GlobalToAmdbLRSCoords(REcenter()).x();
283 double sdistToCenter = pAmdbL - myCenterAmdbL;
284 if (std::abs(sdistToCenter) > getSsize() * 0.5) {
285 ATH_MSG_DEBUG("RpcReadoutElement with id " << idHelperSvc()->toStringDetEl(identify())
286 << " ::distanceToEtaReadout --- in amdb local frame x of the point " << pAmdbL
287 << " is out of the rpc-module range ("<< myCenterAmdbL - getSsize() * 0.5 << ","
288 << myCenterAmdbL + getSsize() * 0.5 << ")");
289
290 if (sdistToCenter > 0) {
291 sdistToCenter = getSsize() * 0.5;
292 ATH_MSG_DEBUG("setting distance to " << sdistToCenter);
293 } else if (sdistToCenter < 0) {
294 sdistToCenter = -getSsize() * 0.5;
295 ATH_MSG_DEBUG("setting distance to " << sdistToCenter);
296 }
297 }
298 if (NphiStripPanels() == 2) {
299 dist = getSsize() * 0.5 - std::abs(sdistToCenter);
300 } else {
301 // assumes readout is at smallest phi
302 dist = getSsize() * 0.5 + (sdistToCenter);
303 }
304 return dist;
305 }
#define ATH_MSG_DEBUG(x)
static Double_t P(Double_t *tt, Double_t *par)
virtual Amg::Vector3D GlobalToAmdbLRSCoords(const Amg::Vector3D &x) const
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
int NphiStripPanels() const
returns the number of phi strip panels (1 or 2)
const Amg::Vector3D REcenter() const
center of an RPC RE is not trivially the center of the first surface, overloading MuonClusterReadoutE...

◆ distanceToPhiReadout()

double MuonGM::RpcReadoutElement::distanceToPhiReadout ( const Amg::Vector3D & P) const

std clamp results in differences... Interesting

std clamp results in differences... Interesting

Definition at line 223 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

223 {
224 // P is a point in the global reference frame
225 // we want to have the distance from the side of the phi readout (length travelled along a phi strip) from a signal produced at P)
226 // m_set will not be null but be initialized in "initDesign()" earlier
227 // if it is null the code should crash! - because we're time-critical here a check for null was not implemented
228 unsigned int ndbz{0};
229 for (int dbz = 1 ; dbz <= m_idHelper.doubletZMax(identify()); ++dbz) {
230 const Identifier dbzId = m_idHelper.channelID(identify(), dbz, 1, 1, 0, 1);
231 ndbz+=(manager()->getRpcReadoutElement(dbzId) != nullptr);
232 }
233
234 double dist = -999.;
235 double zPoint = P.z();
236 double Zsizehalf = getZsize() / 2.;
237 double recenter = REcenter().z();
238 double zLow = recenter - Zsizehalf;
239 double zUp = recenter + Zsizehalf;
240
241 if (ndbz == 1) {
242 if (zPoint < zLow || zPoint > zUp) {
243 ATH_MSG_DEBUG("RpcReadoutElement with id " << idHelperSvc()->toStringDetEl(identify())
244 << " ::distanceToPhiReadout --- z of the Point " << P.z() << " is out of the rpc-module range (" << zLow << ","
245 << zUp << ")");
247 zPoint = std::clamp(zPoint,zLow, zUp);
248 }
249 if (sideC())
250 dist = zUp - zPoint;
251 else
252 dist = zPoint - zLow;
253
254 } else {
255 if (zPoint < zLow || zPoint > zUp) {
256 ATH_MSG_DEBUG("RpcReadoutElement with id " << idHelperSvc()->toStringDetEl(identify())
257 << " ::distanceToPhiReadout --- z of the Point " << P.z() << " is out of the rpc-module range (" << zLow << ","
258 << zUp << ") ");
260 zPoint = std::clamp(zPoint, zLow, zUp);
261 }
262 if (m_dbZ == 1 || m_dbZ == 3) {
263 if (sideC())
264 dist = zUp - zPoint;
265 else
266 dist = zPoint - zLow;
267
268 } else if (m_dbZ == 2) {
269 if (sideC())
270 dist = zPoint - zLow;
271 else
272 dist = zUp - zPoint;
273 }
274 }
275 return dist;
276 }
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
point_t recenter(const point_t &p, const point_t &center)
Definition cyl_geom.h:226

◆ distanceToReadout()

double MuonGM::RpcReadoutElement::distanceToReadout ( const Amg::Vector2D & pos,
const Identifier & id ) const
finaloverridevirtual

distance to readout.

If the local position is outside the active volume, the function first shift the position back into the active volume

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 58 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

58 {
59 const MuonStripDesign* design = getDesign(id);
60 THROW_EXCEPTION_RE("Method is not implemented");
61 return design ? design->distanceToReadout(pos) : 0.;
62 }
const MuonStripDesign * getDesign(const Identifier &id) const
returns the MuonStripDesign class for the given identifier

◆ fillCache()

void MuonGM::RpcReadoutElement::fillCache ( )
finaloverridevirtual

function to fill tracking cache

BI-RPCs don't have phi elements.. Ensure that they're filled

Changing this line to transform().translation which is effectively the same as multipltying the same thing by the null vector triggers the FT0V check.... My train station...

Implements MuonGM::MuonReadoutElement.

Definition at line 377 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

377 {
378
379 if (m_surfaceData) {
380 ATH_MSG_WARNING("calling fillCache on an already filled cache");
381 return;
382 }
383 m_surfaceData = std::make_unique<SurfaceData>();
384 for (int dbPhi = 1; dbPhi <= NphiStripPanels(); ++dbPhi) {
385 for (int gasGap = 1; gasGap <= numberOfLayers(true); ++gasGap) {
386 Amg::Transform3D trans3D = localToGlobalTransf(dbPhi, gasGap);
387 // surface()
388 Amg::RotationMatrix3D muonTRotation(trans3D.rotation());
389 if (isMirrored()) muonTRotation = muonTRotation * Amg::AngleAxis3D(180. * CLHEP::deg, Amg::Vector3D::UnitX());
390
391 Amg::RotationMatrix3D surfaceTRotation;
392 surfaceTRotation.col(0) = muonTRotation.col(1);
393 surfaceTRotation.col(1) = muonTRotation.col(2);
394 surfaceTRotation.col(2) = muonTRotation.col(0);
395
396 for (bool measphi : { true, false}) {
397 const Identifier id = m_idHelper.channelID(identify(), getDoubletZ(), dbPhi, gasGap, measphi , 1);
398
399 Amg::Transform3D trans(surfaceTRotation);
400 if (!measphi) trans = trans * Amg::getRotateZ3D(isMirrored()? -M_PI_2 : M_PI_2);
401 trans.pretranslate(trans3D.translation());
402
403 m_surfaceData->m_layerTransforms.push_back(trans);
404 m_surfaceData->m_layerSurfaces.emplace_back(std::make_unique<Trk::PlaneSurface>(*this, id));
405
407 if (!measphi) {
410 m_surfaceData->m_layerCenters.push_back(m_surfaceData->m_layerTransforms.back().translation());
411 m_surfaceData->m_layerNormals.emplace_back(m_surfaceData->m_layerTransforms.back().linear() *
412 Amg::Vector3D::UnitZ());
413 }
414 }
415 }
416 }
417 m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RectangleBounds>(0.5* StripLength(true),
418 0.5* StripLength(false)));
419 m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RectangleBounds>(0.5* StripLength(false),
420 0.5* StripLength(true)));
421 }
double StripLength(bool measphi) const
returns the strip length for the phi or eta plane
int getDoubletZ() const
return DoubletZ value for the given readout element
Amg::Transform3D localToGlobalTransf(const Identifier &id) const
virtual int numberOfLayers(bool measphi=true) const override final
number of layers in phi/eta projection, same for eta/phi planes
Eigen::AngleAxisd AngleAxis3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Eigen::Affine3d Transform3D

◆ gasGapPos() [1/2]

Amg::Vector3D MuonGM::RpcReadoutElement::gasGapPos ( const Identifier & id) const

Definition at line 184 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

184 {
185 return gasGapPos(m_idHelper.doubletPhi(id), m_idHelper.gasGap(id));
186 }
Amg::Vector3D gasGapPos(int doubletPhi, int gasGap) const
Returns the centre of the gasGap.

◆ gasGapPos() [2/2]

Amg::Vector3D MuonGM::RpcReadoutElement::gasGapPos ( int doubletPhi,
int gasGap ) const

Returns the centre of the gasGap.

Definition at line 188 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

188 {
189 const Amg::Vector3D localP = localGasGapPos(doubletPhi, gasgap);
190 ATH_MSG_VERBOSE("RpcReadoutElement::gasGapPos got localGasGapPos" << Amg::toString(localP,3));
191 return absTransform() * localP;
192 }
#define ATH_MSG_VERBOSE(x)
Amg::Vector3D localGasGapPos(const Identifier &id) const
Returns the position of the gasGap w.r.t. rest frame of the chamber.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D

◆ gasGapSsize()

double MuonGM::RpcReadoutElement::gasGapSsize ( ) const

returns the gas gap S size

◆ gasGapZsize()

double MuonGM::RpcReadoutElement::gasGapZsize ( ) const

returns the gas gap Z size

◆ getDesign()

const MuonStripDesign * MuonGM::RpcReadoutElement::getDesign ( const Identifier & id) const
private

returns the MuonStripDesign class for the given identifier

Definition at line 460 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

460 {
461 unsigned int phipanel = std::min(NphiStripPanels(), m_idHelper.doubletPhi(id));
462 if (phipanel > m_phiDesigns.size()) {
463 ATH_MSG_WARNING(" bad identifier, no MuonStripDesign found ");
464 return nullptr;
465 }
466 return m_idHelper.measuresPhi(id) ? &m_phiDesigns[phipanel - 1] : &m_etaDesigns[phipanel - 1];
467 }

◆ getDoubletPhi()

int MuonGM::RpcReadoutElement::getDoubletPhi ( ) const

return DoubletPhi value for the given readout element, be aware that one RE can contain two DoubletPhis!

!!!

◆ getDoubletR()

int MuonGM::RpcReadoutElement::getDoubletR ( ) const

return DoubletR value for the given readout element

◆ getDoubletZ()

int MuonGM::RpcReadoutElement::getDoubletZ ( ) const

return DoubletZ value for the given readout element

◆ getLongRsize()

double MuonGM::MuonReadoutElement::getLongRsize ( ) const
inlineinherited

◆ getLongSsize()

double MuonGM::MuonReadoutElement::getLongSsize ( ) const
inlineinherited

◆ getLongZsize()

double MuonGM::MuonReadoutElement::getLongZsize ( ) const
inlineinherited

◆ getRsize()

double MuonGM::MuonReadoutElement::getRsize ( ) const
inlineinherited

◆ getSsize()

double MuonGM::MuonReadoutElement::getSsize ( ) const
inlineinherited

◆ getStationEta()

int MuonGM::MuonReadoutElement::getStationEta ( ) const
inlineinherited

◆ getStationIndex()

int MuonGM::MuonReadoutElement::getStationIndex ( ) const
inlineinherited

◆ getStationName()

const std::string & MuonGM::MuonReadoutElement::getStationName ( ) const
inlineinherited

◆ getStationPhi()

int MuonGM::MuonReadoutElement::getStationPhi ( ) const
inlineinherited

◆ getStationS()

double MuonGM::MuonReadoutElement::getStationS ( ) const
inlineinherited

◆ getStationType()

std::string MuonGM::MuonReadoutElement::getStationType ( ) const
inlineinherited

Definition at line 178 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

178{ return m_statname.substr(0,3); }

◆ getTechnologyName()

const std::string & MuonGM::MuonReadoutElement::getTechnologyName ( ) const
inlineinherited

Definition at line 177 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

177{ return m_techname; }
std::string m_techname
MDT or RPC or TGC or CSC plus a two digits subtype; example RPC17.

◆ getTechnologyType()

std::string MuonGM::MuonReadoutElement::getTechnologyType ( ) const
inlineinherited

Definition at line 176 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

176{ return m_techname.substr(0, 3); }

◆ getZsize()

double MuonGM::MuonReadoutElement::getZsize ( ) const
inlineinherited

◆ globalPosition()

const Amg::Vector3D MuonGM::MuonReadoutElement::globalPosition ( ) const
inherited

Definition at line 47 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

47{ return absTransform().translation(); }

◆ GlobalToAmdbLRSCoords()

Amg::Vector3D MuonGM::MuonReadoutElement::GlobalToAmdbLRSCoords ( const Amg::Vector3D & x) const
virtualinherited

◆ GlobalToAmdbLRSTransform()

Amg::Transform3D MuonGM::MuonReadoutElement::GlobalToAmdbLRSTransform ( ) const
virtualinherited

◆ globalToLocalCoords()

Amg::Vector3D MuonGM::RpcReadoutElement::globalToLocalCoords ( const Amg::Vector3D & x,
const Identifier & id ) const

Definition at line 219 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

219 {
220 return globalToLocalTransf(id) * x;
221 }
Amg::Transform3D globalToLocalTransf(const Identifier &id) const

◆ globalToLocalTransf()

Amg::Transform3D MuonGM::RpcReadoutElement::globalToLocalTransf ( const Identifier & id) const

Definition at line 218 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

218{ return localToGlobalTransf(id).inverse(); }

◆ hasCutouts()

bool MuonGM::MuonReadoutElement::hasCutouts ( ) const
inlineinherited

◆ hasDEDontop()

bool MuonGM::RpcReadoutElement::hasDEDontop ( ) const

return whether the RPC is 'up-side-down'

◆ identify()

Identifier MuonGM::MuonReadoutElement::identify ( ) const
inlinefinaloverridevirtualinherited

Returns the ATLAS Identifier of the MuonReadOutElement.

Usually the Identifier corresponds to the first channel covered by the Element

Implements Trk::TrkDetElementBase.

Definition at line 173 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

173{ return m_id; }

◆ identifyHash()

IdentifierHash MuonGM::MuonReadoutElement::identifyHash ( ) const
inlinefinaloverridevirtualinherited

Returns the IdentifierHash of the MuonStation, i.e.

2 readoutelements with same sationIndex, stationEta, stationPhi have the same identifiyHash

Implements Trk::TrkDetElementBase.

Definition at line 174 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

174{ return m_idhash; }

◆ idHelperSvc()

const Muon::IMuonIdHelperSvc * MuonGM::MuonReadoutElement::idHelperSvc ( ) const
inlineinherited

◆ initDesign()

void MuonGM::RpcReadoutElement::initDesign ( )

initialize the design classes for this readout element

Definition at line 307 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

307 {
308 m_phiDesigns.reserve(NphiStripPanels());
309 m_etaDesigns.reserve(NphiStripPanels());
310
311 for (int doubletPhi = 1; doubletPhi <= NphiStripPanels(); ++doubletPhi) {
312 const Amg::Transform3D gToSurf = MuonClusterReadoutElement::transform(surfaceHash(doubletPhi, 1, 1)).inverse();
313 const Amg::Vector3D locStripPos1 = gToSurf * stripPos(doubletPhi, 1, true, 1);
314 const Amg::Vector3D locStripPos2 = gToSurf * stripPos(doubletPhi, 1, true, 2);
315
316 const Amg::Transform3D gToSurfEta = MuonClusterReadoutElement::transform(surfaceHash(doubletPhi, 1, 0)).inverse();
317 const Amg::Vector3D locStripPosEta1 = gToSurfEta * stripPos(doubletPhi, 1, false, 1);
318 const Amg::Vector3D locStripPosEta2 = gToSurfEta * stripPos(doubletPhi, 1, false, 2);
319
320 MuonStripDesign phiDesign;
321 phiDesign.nstrips = NphiStrips();
322 phiDesign.stripPitch = StripPitch(1);
323 phiDesign.stripLength = StripLength(1);
324 phiDesign.stripWidth = StripWidth(1);
325
326 phiDesign.firstStripPos = locStripPos1.block<2,1>(0,0);
327 if (locStripPos2.x() - locStripPos1.x() < 0.) {
328 phiDesign.stripPitch *= -1.;
329 THROW_EXCEPTION_RE("Define a positive definite phi pitch...");
330 }
331 phiDesign.invStripPitch = 1. / phiDesign.stripPitch;
332
333 Amg::Vector2D pos1{Amg::Vector2D::Zero()}, pos2{Amg::Vector2D::Zero()};
334 phiDesign.stripPosition(1, pos1);
335 phiDesign.stripPosition(2, pos2);
336
337 if (std::abs(pos1.x() - locStripPos1.x()) > 1e-6) {
338 THROW_EXCEPTION_RE(" bad local strip pos "<<
339 std::endl<<" phi local strip positions " << Amg::toString(locStripPos1) << " "
340 <<Amg::toString(locStripPos2) << " first strip " << phiDesign.firstStripPos
341 << " pitch " << phiDesign.stripPitch << " from calc " << locStripPos2.x() - locStripPos1.x() <<
342 std::endl<<" checking strip position: phi design " << Amg::toString(pos1) << " " << Amg::toString(pos2));
343 }
344
345 m_phiDesigns.push_back(std::move(phiDesign));
346
347 MuonStripDesign etaDesign;
348 etaDesign.nstrips = NetaStrips();
349 etaDesign.stripPitch = StripPitch(0);
350 etaDesign.stripLength = StripLength(0);
351 etaDesign.stripWidth = StripWidth(0);
352
353 etaDesign.firstStripPos = locStripPosEta1.block<2,1>(0,0);
354 if (locStripPosEta2.x() - locStripPosEta1.x() < 0.) {
355 etaDesign.stripPitch *= -1.;
356 }
357 etaDesign.invStripPitch = 1. / etaDesign.stripPitch;
358
359 etaDesign.stripPosition(1, pos1);
360 etaDesign.stripPosition(2, pos2);
361
362 if (std::abs(pos1.x() - locStripPosEta1.x()) > 1e-6) {
363 THROW_EXCEPTION_RE(" bad local strip pos "<<std::endl
364 <<" eta local strip positions " << Amg::toString(locStripPosEta1)
365 << " " <<Amg::toString(locStripPosEta2)<< " first strip "
366 << etaDesign.firstStripPos << " pitch " << etaDesign.stripPitch << " from calc "
367 << locStripPosEta2.x() - locStripPosEta1.x() <<std::endl
368 <<" checking strip position: eta design " << Amg::toString(pos1)
369 << " " << Amg::toString(pos2));
370 }
371
372 m_etaDesigns.push_back(std::move(etaDesign));
373 }
374 }
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
virtual int surfaceHash(const Identifier &id) const override final
returns the hash to be used to look up the surface and transform in the MuonClusterReadoutElement tra...
int NphiStrips() const
returns the number of phi strips
int NetaStrips() const
returns the number of eta strips
double StripWidth(bool measphi) const
returns the strip width for the phi or eta plane
double StripPitch(bool measphi) const
returns the strip pitch for the phi or eta plane
Eigen::Matrix< double, 2, 1 > Vector2D

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)

◆ inTheRibs()

bool MuonGM::RpcReadoutElement::inTheRibs ( ) const

returns whether the RE is in the ribs of the muon spectrometer

Definition at line 434 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

434 {
435 return ((getStationName().substr(0, 3) == "BMS") && (getTechnologyName() == "RPC07" || getTechnologyName() == "RPC08"));
436 }

◆ isDescrAtNegZ()

bool MuonGM::RpcReadoutElement::isDescrAtNegZ ( ) const
inline

◆ isMirrored()

bool MuonGM::RpcReadoutElement::isMirrored ( ) const
inline

◆ largeSector()

bool MuonGM::MuonReadoutElement::largeSector ( ) const
inherited

Definition at line 49 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

49 {
50 // this doesn't apply to TGC
51 if(m_statname.size() >= 3){
52 char c = m_statname[2];
53 if (c == 'L')
54 return true;
55 else if (c == 'S')
56 return false;
57 else {
58 if (c == 'E' || c == 'F' || c == 'G') return false;
59 if (c == 'M' || c == 'R') return true;
60 }
61 }
62 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" largeSector() - is this station a larger sector answer is no for readout element "<<m_idHelperSvc->toStringDetEl(identify()));
63 throw std::runtime_error("Unknown sector");
64 return false;
65 }

◆ layerHash() [1/2]

virtual int MuonGM::RpcReadoutElement::layerHash ( const Identifier & id) const
finaloverridevirtual

returns the hash to be used to look up the normal and center in the MuonClusterReadoutElement tracking cache

Implements MuonGM::MuonClusterReadoutElement.

◆ layerHash() [2/2]

int MuonGM::RpcReadoutElement::layerHash ( int doubletPhi,
int gasGap ) const

returns the hash to be used to look up the normal and center in the MuonClusterReadoutElement tracking cache

Definition at line 449 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

449 {
450 if (NphiStripPanels() == 1) dbPhi = 1;
451
452 if (dbPhi > NphiStripPanels() || gasGap > numberOfLayers(true)) {
453 ATH_MSG_WARNING(" layerHash: identifier out of range dbphi " << dbPhi << " max " << NphiStripPanels() << " ch dbphi "
454 << getDoubletPhi() << " gp " << gasGap << " max " << numberOfLayers());
455 return -1;
456 }
457 return (dbPhi - 1) * (NphiStripPanels()) + (gasGap - 1);
458 }
int getDoubletPhi() const
return DoubletPhi value for the given readout element, be aware that one RE can contain two DoubletPh...

◆ localGasGapPos() [1/2]

Amg::Vector3D MuonGM::RpcReadoutElement::localGasGapPos ( const Identifier & id) const

Returns the position of the gasGap w.r.t. rest frame of the chamber.

Definition at line 193 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

193 {
194 return localGasGapPos(m_idHelper.doubletPhi(id), m_idHelper.gasGap(id));
195 }

◆ localGasGapPos() [2/2]

Amg::Vector3D MuonGM::RpcReadoutElement::localGasGapPos ( int doubletPhi,
int gasGap ) const

BI RPC, don't have centered gasGaps. Take hardcoded parameters instead

Definition at line 196 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

196 {
197 double local_s{0.}, local_z{0.};
199 if (numberOfLayers() == 3) {
200 local_s = m_y_translation;
201 local_z = m_z_translation;
202 } else {
203 local_s = NphiStripPanels() != 1 ? -m_Ssize / 4. + (doubletPhi -1) *m_Ssize / 2 : 0;
204 }
205 const Amg::Vector3D localGasGap{m_gasGap_xPos[gasgap -1], local_s, local_z};
206 return localGasGap;
207 }
std::array< double, s_nLayers > m_gasGap_xPos
Array caching the distance of the gasGap center to the origin plane in global radial direction.

◆ localStripPos() [1/2]

Amg::Vector3D MuonGM::RpcReadoutElement::localStripPos ( const Identifier & id) const

Definition at line 172 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

172 {
173 return localStripPos(m_idHelper.doubletPhi(id), m_idHelper.gasGap(id),
174 m_idHelper.measuresPhi(id), m_idHelper.strip(id));
175 }
Amg::Vector3D localStripPos(int doubletPhi, int gasGap, bool measphi, int strip) const
Returns the local strip position in the AMDB frame.

◆ localStripPos() [2/2]

Amg::Vector3D MuonGM::RpcReadoutElement::localStripPos ( int doubletPhi,
int gasGap,
bool measphi,
int strip ) const

Returns the local strip position in the AMDB frame.

Definition at line 122 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

123 {
124
125 ATH_MSG_VERBOSE("localstripPos for doubletPhi: " << doubletPhi
126 << ", gasGap: " << gasGap << ", mesuresPhi: " << measphi
127 << ", strip: " << strip );
128
129
130 // if there's a DED at the bottom, the Rpc is rotated by 180deg around its local y axis
131 // gg numbering is swapped
132 // except for BI chambers (with 3 gas gaps -> this is taken into account in localTopGasGap()
133 // -> eta strip n. 1 (offline id) is "last" eta strip (local)
134 int lstrip = strip;
135
136 if (!m_hasDEDontop && !measphi) {
137 lstrip = NetaStrips() - strip + 1;
138 }
139 int ldoubletPhi = doubletPhi;
140 // if the station is mirrored, the Rpc is rotated by 180deg around its local x axis
141 // numbering of phi strips must be reversed;
142 // numbering of eta strips is unchanged;
143 // numbering of doubletPhi must be reversed if NphiStripPanels()>1
144 // numbering of doubletZ is unchanged;
145 if (isMirrored()) {
146 if (measphi) lstrip = NphiStrips() - lstrip + 1;
147 if (NphiStripPanels() != 1) {
148 ldoubletPhi = doubletPhi + 1;
149 if (ldoubletPhi > 2) ldoubletPhi = 1;
150 }
151
152 ATH_MSG_VERBOSE( "localstrippos isMirrored =" << isMirrored() << " lstrip, ldoubletPhi "
153 << lstrip << " " << ldoubletPhi );
154 }
155
156 // the special case of chambers at Z<0 but not mirrored
157 // numbering of eta strips must be reversed;
158 // numbering of phi strips is unchanged;
159 // numbering of doubletPhi is unchanged;
160 if (m_descratzneg) {
161 if (!measphi) lstrip = NetaStrips() - lstrip + 1;
162 ATH_MSG_VERBOSE("localstrippos special not mirrored at eta<0 = lstrip, ldoublerZ " << lstrip);
163 }
164
165 Amg::Vector3D localP(m_gasGap_xPos[gasGap - 1],
166 localStripSCoord(ldoubletPhi, measphi, lstrip),
167 localStripZCoord(measphi, lstrip));
168 ATH_MSG_VERBOSE("localstrippos = " <<Amg::toString(localP));
169 return localP;
170 }
double localStripSCoord(int doubletPhi, bool measphi, int strip) const

◆ localStripSCoord()

double MuonGM::RpcReadoutElement::localStripSCoord ( int doubletPhi,
bool measphi,
int strip ) const
private

Definition at line 63 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

63 {
64 bool notintheribs = !inTheRibs();
65 if ((doubletPhi != m_dbPhi && NphiStripPanels() == 1 && notintheribs) ||
66 (NphiStripPanels() != 1 && (doubletPhi < 1 || doubletPhi > NphiStripPanels()))) {
67 THROW_EXCEPTION_RE("doublet Z"<<doubletPhi<<" outside range 1-"<<NphiStripPanels()<<" with doubletZ: "<<m_dbPhi);
68 }
69 if (strip < 1 || strip > Nstrips(measphi)) {
70 THROW_EXCEPTION_RE("strip "<<strip<<" outside range 1-"<<Nstrips(measphi)<<" for measphi="<<measphi);
71 }
72
73 double local_s = 0.;
74 const int dbphi = std::min(doubletPhi, NphiStripPanels()) - 1;
75 if (measphi)
76 local_s = m_first_phistrip_s[dbphi] + (strip - 1) * StripPitch(measphi);
77 else
78 local_s = m_etastrip_s[dbphi];
79
80
81 ATH_MSG_VERBOSE("Ssize, ndvs, nstr/pan, spitch, 1st-strp " << m_Ssize << " " << NphiStripPanels() << " "
82 << m_nphistripsperpanel << " " << m_phistrippitch << " " << m_first_phistrip_s[doubletPhi - 1] << std::endl
83 << "localStripSCoord: local_s is " << local_s << " for doubletPhi: " << doubletPhi
84 << ", measuresPhi: " << measphi << ", strip: " << strip);
85 return local_s;
86 }
bool inTheRibs() const
returns whether the RE is in the ribs of the muon spectrometer

◆ localStripZCoord()

double MuonGM::RpcReadoutElement::localStripZCoord ( bool measphi,
int strip ) const
private

Definition at line 87 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

87 {
88 if (strip < 1 || strip > Nstrips(measphi)) {
89 THROW_EXCEPTION_RE("Strip "<<strip<<" outside range 1-"<<Nstrips(measphi)<<" for measphi="<<measphi);
90 }
91
92 double local_z{0};
93 if (!measphi) {
94 local_z = m_first_etastrip_z + (strip - 1) * StripPitch(measphi);
95 } else {
96 local_z = m_phistrip_z;
97 }
98 ATH_MSG_VERBOSE(idHelperSvc()->toStringDetEl(identify())<<", strip: "<<strip<<", zpitch: "<<StripPitch(measphi)
99 <<", ndvz:" << m_netastripsperpanel<<", 1st-strp: " << m_first_etastrip_z
100 << ", localStripZCoord: local_z is " << local_z << " measuresPhi, " << measphi << ", strip: " << strip );
101 return local_z;
102 }

◆ localToGlobalCoords()

Amg::Vector3D MuonGM::RpcReadoutElement::localToGlobalCoords ( const Amg::Vector3D & x,
const Identifier & id ) const

Attention: these transformations do not represent the tracking transformations as obtained by the transform() method.

The latter follow the convention that the x-axis is always perpendicular to the respective strips and z points towars the sky These transformations follow the AMDB conventions with displaced origins

Definition at line 208 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

208 {
209 return localToGlobalTransf(id) * x;
210 }

◆ localToGlobalTransf() [1/2]

Amg::Transform3D MuonGM::RpcReadoutElement::localToGlobalTransf ( const Identifier & id) const

Definition at line 211 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

211 {
212 return localToGlobalTransf(m_idHelper.doubletPhi(id), m_idHelper.gasGap(id));
213 }

◆ localToGlobalTransf() [2/2]

Amg::Transform3D MuonGM::RpcReadoutElement::localToGlobalTransf ( int doubletPhi,
int gasGap ) const

Definition at line 214 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

214 {
215 return absTransform() * Amg::Translation3D{localGasGapPos(dbPhi, gasGap)} *
216 (rotatedRpcModule() ? Amg::getRotateY3D(180. * CLHEP::deg) : Amg::Transform3D::Identity());
217 }
Eigen::Affine3d Transform3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Eigen::Translation< double, 3 > Translation3D

◆ manager()

const MuonDetectorManager * MuonGM::MuonReadoutElement::manager ( ) const
inlineprotectedinherited

◆ measuresPhi()

virtual bool MuonGM::RpcReadoutElement::measuresPhi ( const Identifier & id) const
finaloverridevirtual

returns whether the current identifier corresponds to a phi measurement

Implements MuonGM::MuonClusterReadoutElement.

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 163 of file AthMessaging.h.

164{
165 MsgStream* ms = m_msg_tls.get();
166 if (!ms) {
167 if (!m_initialized.test_and_set()) initMessaging();
168 ms = new MsgStream(m_imsg,m_nm);
169 m_msg_tls.reset( ms );
170 }
171
172 ms->setLevel (m_lvl);
173 return *ms;
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 178 of file AthMessaging.h.

179{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152{
153 if (m_lvl <= lvl) {
154 msg() << lvl;
155 return true;
156 } else {
157 return false;
158 }
159}

◆ NetaStrips()

int MuonGM::RpcReadoutElement::NetaStrips ( ) const

returns the number of eta strips

◆ nGasGapPerLay()

int MuonGM::RpcReadoutElement::nGasGapPerLay ( ) const

returns the number of gasgaps

◆ normal() [1/3]

const Amg::Vector3D & MuonGM::MuonClusterReadoutElement::normal ( ) const
inlineoverridevirtualinherited

Return the normal of the element.

Implements Trk::TrkDetElementBase.

Definition at line 126 of file MuonClusterReadoutElement.h.

126{ return normal(0); }
virtual const Amg::Vector3D & normal() const override
Return the normal of the element.

◆ normal() [2/3]

const Amg::Vector3D & MuonGM::MuonClusterReadoutElement::normal ( const Identifier & id) const
inlineoverridevirtualinherited

Return the normal of the surface associated with this identifier In the case of silicon it returns the same as normal()

Implements Trk::TrkDetElementBase.

Definition at line 132 of file MuonClusterReadoutElement.h.

132{ return normal(layerHash(id)); }

◆ normal() [3/3]

const Amg::Vector3D & MuonGM::MuonClusterReadoutElement::normal ( int layHash) const
inlineinherited

Definition at line 173 of file MuonClusterReadoutElement.h.

173 {
174 if (!m_surfaceData) {
175 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" "<<__func__<<" Requesting normal but cache is empty");
176 throw std::runtime_error("Empty normal cache");
177 }
178 if (hash == -1 || hash >= (int)m_surfaceData->m_layerNormals.size()) {
179 ATH_MSG_WARNING("normal hash out of range: " << hash << " elements " << m_surfaceData->m_layerNormals.size());
180 return m_surfaceData->m_layerNormals.front();
181 }
182 return m_surfaceData->m_layerNormals[hash];
183 }

◆ NphiStripPanels()

int MuonGM::RpcReadoutElement::NphiStripPanels ( ) const

returns the number of phi strip panels (1 or 2)

◆ NphiStrips()

int MuonGM::RpcReadoutElement::NphiStrips ( ) const

returns the number of phi strips

◆ Nstrips()

int MuonGM::RpcReadoutElement::Nstrips ( bool measphi) const

returns the number of strips for the phi or eta plane

◆ numberOfLayers()

virtual int MuonGM::RpcReadoutElement::numberOfLayers ( bool measphi = true) const
finaloverridevirtual

number of layers in phi/eta projection, same for eta/phi planes

Implements MuonGM::MuonClusterReadoutElement.

◆ numberOfStrips() [1/2]

virtual int MuonGM::RpcReadoutElement::numberOfStrips ( const Identifier & layerId) const
finaloverridevirtual

number of strips per layer

Implements MuonGM::MuonClusterReadoutElement.

◆ numberOfStrips() [2/2]

virtual int MuonGM::RpcReadoutElement::numberOfStrips ( int ,
bool measuresPhi ) const
finaloverridevirtual

◆ parentMuonStation()

const MuonStation * MuonGM::MuonReadoutElement::parentMuonStation ( ) const
inherited

◆ parentMuonStationPos()

Amg::Vector3D MuonGM::MuonReadoutElement::parentMuonStationPos ( ) const
inherited

Definition at line 82 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

82 {
83 return parentMuonStation()->getTransform().translation();
84 }

◆ REcenter()

const Amg::Vector3D MuonGM::RpcReadoutElement::REcenter ( ) const

center of an RPC RE is not trivially the center of the first surface, overloading MuonClusterReadoutElement

◆ refreshCache()

void MuonGM::MuonReadoutElement::refreshCache ( )
inherited

Definition at line 122 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

122 {
123 clearCache();
124 fillCache();
125 }
virtual void fillCache()=0
virtual void clearCache()=0

◆ rotatedRpcModule()

bool MuonGM::RpcReadoutElement::rotatedRpcModule ( ) const

Definition at line 182 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

182{ return (!m_hasDEDontop); }

◆ setDoubletPhi()

void MuonGM::RpcReadoutElement::setDoubletPhi ( int doubletPhi)

◆ setDoubletR()

◆ setDoubletZ()

void MuonGM::RpcReadoutElement::setDoubletZ ( int dobuletZ)

Definition at line 56 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

56{ m_dbZ = doubletZ; }

◆ setHasCutouts()

void MuonGM::MuonReadoutElement::setHasCutouts ( bool flag)
inlineinherited

◆ setIdentifier()

void MuonGM::MuonReadoutElement::setIdentifier ( const Identifier & id)
inherited

Sets the Identifier, hashes & station names.

Definition at line 101 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

101 {
102 m_id = id;
103 if (!m_idHelperSvc->isMuon(id)) {
104 ATH_MSG_FATAL("The Identifier "<<m_idHelperSvc->toString(id)<<" is not a muon one.");
105 throw std::runtime_error("Invalid Identifier set");
106 }
107 m_stIdx = m_idHelperSvc->stationName(id);
108 m_eta = m_idHelperSvc->stationEta(id);
109 m_phi = m_idHelperSvc->stationPhi(id);
110 m_idhash = m_idHelperSvc->moduleHash(id);
111 m_detectorElIdhash = m_idHelperSvc->detElementHash(id);
112 }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

◆ setLongRsize()

void MuonGM::MuonReadoutElement::setLongRsize ( double v)
inherited

◆ setLongSsize()

void MuonGM::MuonReadoutElement::setLongSsize ( double v)
inherited

◆ setLongZsize()

void MuonGM::MuonReadoutElement::setLongZsize ( double v)
inherited

◆ setNumberOfLayers()

void MuonGM::RpcReadoutElement::setNumberOfLayers ( const int nlay = 2)

Definition at line 54 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

54{ m_nlayers = nlay; }

◆ setParentMuonStation()

void MuonGM::MuonReadoutElement::setParentMuonStation ( const MuonStation * mstat)
inherited

Definition at line 76 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

76 {
77 m_parentMuonStation = mstat;
78 }

◆ setRsize()

void MuonGM::MuonReadoutElement::setRsize ( double v)
inherited

◆ setSsize()

void MuonGM::MuonReadoutElement::setSsize ( double v)
inherited

◆ setStationName()

void MuonGM::MuonReadoutElement::setStationName ( const std::string & str)
inherited

◆ setStationS()

void MuonGM::MuonReadoutElement::setStationS ( double v)
inherited

◆ setTechnologyName()

void MuonGM::MuonReadoutElement::setTechnologyName ( const std::string & str)
inherited

◆ setYTranslation()

void MuonGM::RpcReadoutElement::setYTranslation ( const double y)

Definition at line 52 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

52{ m_y_translation = y; }
#define y

◆ setZsize()

void MuonGM::MuonReadoutElement::setZsize ( double v)
inherited

◆ setZTranslation()

void MuonGM::RpcReadoutElement::setZTranslation ( const double z)

Definition at line 53 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

53{ m_z_translation = z; }
#define z

◆ sideA()

bool MuonGM::MuonReadoutElement::sideA ( ) const
inlineinherited

◆ sideC()

bool MuonGM::MuonReadoutElement::sideC ( ) const
inlineinherited

◆ smallSector()

bool MuonGM::MuonReadoutElement::smallSector ( ) const
inherited

Definition at line 67 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

67 {
68 // this doesn't apply to TGC
69 return (!largeSector());
70 }

◆ spacePointPosition() [1/3]

void MuonGM::RpcReadoutElement::spacePointPosition ( const Amg::Vector2D & phiPos,
const Amg::Vector2D & etaPos,
Amg::Vector2D & pos ) const

space point position for a pair of phi and eta local positions and a layer identifier The LocalPosition is expressed in the reference frame of the phi projection.

◆ spacePointPosition() [2/3]

virtual bool MuonGM::RpcReadoutElement::spacePointPosition ( const Identifier & phiId,
const Identifier & etaId,
Amg::Vector2D & pos ) const
finaloverridevirtual

space point position for a given pair of phi and eta identifiers The LocalPosition is expressed in the reference frame of the phi surface.

If one of the identifiers is outside the valid range, the function will return false

Implements MuonGM::MuonClusterReadoutElement.

◆ spacePointPosition() [3/3]

virtual bool MuonGM::RpcReadoutElement::spacePointPosition ( const Identifier & phiId,
const Identifier & etaId,
Amg::Vector3D & pos ) const
finaloverridevirtual

Global space point position for a given pair of phi and eta identifiers If one of the identifiers is outside the valid range, the function will return false.

Implements MuonGM::MuonClusterReadoutElement.

◆ StripLength()

double MuonGM::RpcReadoutElement::StripLength ( bool measphi) const

returns the strip length for the phi or eta plane

◆ stripNumber()

virtual int MuonGM::RpcReadoutElement::stripNumber ( const Amg::Vector2D & pos,
const Identifier & id ) const
finaloverridevirtual

strip number corresponding to local position.

If the local position is outside the active volume, the function first shift the position back into the active volume

Implements MuonGM::MuonClusterReadoutElement.

◆ StripPanelDead()

double MuonGM::RpcReadoutElement::StripPanelDead ( bool measphi) const

returns strip panel dead area for the phi or eta plane

◆ stripPanelSsize()

double MuonGM::RpcReadoutElement::stripPanelSsize ( bool measphi) const

returns strip panel S size for the phi or eta plane

◆ stripPanelZsize()

double MuonGM::RpcReadoutElement::stripPanelZsize ( bool measphi) const

returns strip panel Z size for the phi or eta plane

◆ StripPitch()

double MuonGM::RpcReadoutElement::StripPitch ( bool measphi) const

returns the strip pitch for the phi or eta plane

◆ stripPos() [1/2]

Amg::Vector3D MuonGM::RpcReadoutElement::stripPos ( const Identifier & id) const

Definition at line 177 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

177 {
178 return stripPos(m_idHelper.doubletPhi(id), m_idHelper.gasGap(id),
179 m_idHelper.measuresPhi(id), m_idHelper.strip(id));
180 }

◆ stripPos() [2/2]

Amg::Vector3D MuonGM::RpcReadoutElement::stripPos ( int doubletPhi,
int gasGap,
bool measphi,
int strip ) const

Definition at line 104 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

104 {
105
106 ATH_MSG_VERBOSE("stripPos for doubletPhi: " << doubletPhi << ", gasGap:"
107 << gasGap << ", measuresPhi: " << measphi << ", strip:" << strip );
108
109 // global position of a generic strip !!!!!
110 const Amg::Vector3D localP = localStripPos(doubletPhi, gasGap, measphi, strip);
111
112 const Amg::Transform3D& rpcTrans{absTransform()};
113
114 ATH_MSG_VERBOSE("RpcReadoutElement::stripPos got localStripPos " << Amg::toString(localP) << std::endl
115 << "RpcReadoutElement::stripPos gl. transl. R, phi "
116 << rpcTrans.translation().perp() << " " << rpcTrans.translation().phi() << " R-Rsize/2 "
117 << rpcTrans.translation().perp() - m_Rsize * 0.5 );
118
119 return rpcTrans * localP;
120 }

◆ stripPosition()

virtual bool MuonGM::RpcReadoutElement::stripPosition ( const Identifier & id,
Amg::Vector2D & pos ) const
finaloverridevirtual

strip position If the strip number is outside the range of valid strips, the function will return false

Implements MuonGM::MuonClusterReadoutElement.

◆ StripWidth()

double MuonGM::RpcReadoutElement::StripWidth ( bool measphi) const

returns the strip width for the phi or eta plane

◆ surface() [1/3]

const Trk::PlaneSurface & MuonGM::MuonClusterReadoutElement::surface ( ) const
inlineoverridevirtualinherited

access to chamber surface (phi orientation), uses the first gas gap

Implements Trk::TrkDetElementBase.

Definition at line 123 of file MuonClusterReadoutElement.h.

123{ return surface(0); }
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap

◆ surface() [2/3]

const Trk::PlaneSurface & MuonGM::MuonClusterReadoutElement::surface ( const Identifier & id) const
inlineoverridevirtualinherited

access to layer surfaces

Implements Trk::TrkDetElementBase.

Definition at line 129 of file MuonClusterReadoutElement.h.

129{ return surface(surfaceHash(id)); }
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...

◆ surface() [3/3]

const Trk::PlaneSurface & MuonGM::MuonClusterReadoutElement::surface ( int surfHash) const
inlineinherited

access to layer surfaces

Definition at line 135 of file MuonClusterReadoutElement.h.

135 {
136 if (!m_surfaceData) {
137 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" "<<__func__<<" Requesting surface but cache is empty");
138 throw std::runtime_error("Empty surface cache");
139 }
140 if (hash == -1 || hash >= (int)m_surfaceData->m_layerSurfaces.size()) {
141 ATH_MSG_WARNING(" surface hash out of range: " << hash << " elements "
142 << m_surfaceData->m_layerSurfaces.size());
143 return *m_surfaceData->m_layerSurfaces.front();
144 }
145 return *m_surfaceData->m_layerSurfaces[hash];
146 }

◆ surfaceHash() [1/2]

virtual int MuonGM::RpcReadoutElement::surfaceHash ( const Identifier & id) const
finaloverridevirtual

returns the hash to be used to look up the surface and transform in the MuonClusterReadoutElement tracking cache

Implements MuonGM::MuonClusterReadoutElement.

◆ surfaceHash() [2/2]

int MuonGM::RpcReadoutElement::surfaceHash ( int doubletPhi,
int gasGap,
bool measphi ) const

returns the hash to be used to look up the surface and transform in the MuonClusterReadoutElement tracking cache

Definition at line 438 of file MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx.

438 {
439 // if there is only one doublet phi we should always use one in the hash calculation
440 if (NphiStripPanels() == 1) dbPhi = 1;
441 if (dbPhi > NphiStripPanels() || gasGap > numberOfLayers(true)) {
442 ATH_MSG_WARNING(" surfaceHash: identifier out of range dbphi " << dbPhi << " max " << NphiStripPanels() << " ch dbphi "
443 << getDoubletPhi() << " gp " << gasGap << " max " << numberOfLayers());
444 return -1;
445 }
446 return (dbPhi - 1) * (2 * NphiStripPanels()) + 2 * (gasGap - 1) + (measphi ? 0 : 1);
447 }

◆ surfaces()

std::vector< const Trk::Surface * > MuonGM::MuonClusterReadoutElement::surfaces ( ) const
inlinevirtualinherited

returns all the surfaces contained in this detector element

Definition at line 197 of file MuonClusterReadoutElement.h.

197 {
198 std::vector<const Trk::Surface*> elementSurfaces;
199
200 // create when first time requested and when possible
201 if (m_surfaceData) {
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());
205 }
206 }
207 // return the element surfaces
208 return elementSurfaces;
209 }
void * ptr(T *p)
Definition SGImplSvc.cxx:74

◆ toParentStation()

Amg::Transform3D MuonGM::MuonReadoutElement::toParentStation ( ) const
inherited

Definition at line 72 of file MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx.

72 {
73 return getMaterialGeom()->getX();
74 }

◆ transform() [1/3]

const Amg::Transform3D & MuonGM::MuonClusterReadoutElement::transform ( ) const
inlineoverridevirtualinherited

Return local to global transform.

Implements Trk::TrkDetElementBase.

Definition at line 124 of file MuonClusterReadoutElement.h.

124{ return transform(0); }

◆ transform() [2/3]

const Amg::Transform3D & MuonGM::MuonClusterReadoutElement::transform ( const Identifier & id) const
inlineoverridevirtualinherited

Return local to global transform associated with this identifier.

Implements Trk::TrkDetElementBase.

Definition at line 130 of file MuonClusterReadoutElement.h.

130{ return transform(surfaceHash(id)); }

◆ transform() [3/3]

const Amg::Transform3D & MuonGM::MuonClusterReadoutElement::transform ( int surfHash) const
inlineinherited

Definition at line 148 of file MuonClusterReadoutElement.h.

148 {
149 if (!m_surfaceData) {
150 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" "<<__func__<<" Requesting transform but cache is empty");
151 throw std::runtime_error("Empty transform cache");
152 }
153 if (hash == -1 || hash >= (int)m_surfaceData->m_layerTransforms.size()) {
154 ATH_MSG_WARNING("transform hash out of range: " << hash << " elements "
155 << m_surfaceData->m_layerTransforms.size());
156 return m_surfaceData->m_layerTransforms.front();
157 }
158 return m_surfaceData->m_layerTransforms[hash];
159 }

◆ MuonChamber

◆ MuonChamberLite

◆ MuonGMR4::ReadoutGeomCnvAlg

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_caching

int MuonGM::MuonReadoutElement::m_caching {-1}
protectedinherited

0 if we want to avoid caching geometry info for tracking interface

Definition at line 150 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

150{-1};

◆ m_dbPhi

int MuonGM::RpcReadoutElement::m_dbPhi {0}
private

◆ m_dbR

int MuonGM::RpcReadoutElement::m_dbR {0}
private

◆ m_dbZ

int MuonGM::RpcReadoutElement::m_dbZ {0}
private

◆ m_descratzneg

bool MuonGM::RpcReadoutElement::m_descratzneg {false}
private

◆ m_detectorElIdhash

IdentifierHash MuonGM::MuonReadoutElement::m_detectorElIdhash {0}
privateinherited

detector element hash identifier

Definition at line 159 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

159{0};

◆ m_eta

int MuonGM::MuonReadoutElement::m_eta {-1}
privateinherited

Identifier field of the station eta.

Definition at line 165 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

165{-1};

◆ m_etaDesigns

std::vector<MuonStripDesign> MuonGM::RpcReadoutElement::m_etaDesigns {}
private

◆ m_etapaneldead

double MuonGM::RpcReadoutElement::m_etapaneldead {-9999.}
private

◆ m_etastrip_s

std::array<double, s_maxphipanels> MuonGM::RpcReadoutElement::m_etastrip_s {make_array<double, s_maxphipanels>(-9999.)}
private

Definition at line 240 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h.

constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
Definition ArrayHelper.h:10

◆ m_etastriplength

double MuonGM::RpcReadoutElement::m_etastriplength {-9999.}
private

◆ m_etastrippitch

double MuonGM::RpcReadoutElement::m_etastrippitch {-9999.}
private

◆ m_etastripwidth

double MuonGM::RpcReadoutElement::m_etastripwidth {-9999.}
private

◆ m_first_etastrip_z

double MuonGM::RpcReadoutElement::m_first_etastrip_z {-9999.}
private

◆ m_first_phistrip_s

std::array<double, s_maxphipanels> MuonGM::RpcReadoutElement::m_first_phistrip_s { make_array<double, s_maxphipanels>(-9999.)}
private

◆ m_gasGap_xPos

std::array<double, s_nLayers> MuonGM::RpcReadoutElement::m_gasGap_xPos {make_array<double,s_nLayers>(-9999.)}
private

Array caching the distance of the gasGap center to the origin plane in global radial direction.

Definition at line 242 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h.

◆ m_gasgapssize

double MuonGM::RpcReadoutElement::m_gasgapssize {-9999.}
private

◆ m_gasgapzsize

double MuonGM::RpcReadoutElement::m_gasgapzsize {-9999.}
private

◆ m_hasCutouts

bool MuonGM::MuonReadoutElement::m_hasCutouts {false}
protectedinherited

true is there are cutouts in the readdout-element

Definition at line 152 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

152{false};

◆ m_hasDEDontop

bool MuonGM::RpcReadoutElement::m_hasDEDontop {false}
private

◆ m_id

Identifier MuonGM::MuonReadoutElement::m_id {}
privateinherited

extended data-collection identifier

Definition at line 157 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

157{};

◆ m_idhash

IdentifierHash MuonGM::MuonReadoutElement::m_idhash {0}
privateinherited

data-collection hash identifier

Definition at line 158 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

158{0};

◆ m_idHelper

const RpcIdHelper& MuonGM::RpcReadoutElement::m_idHelper {idHelperSvc()->rpcIdHelper()}
private

Definition at line 204 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h.

virtual const RpcIdHelper & rpcIdHelper() const =0
access to RpcIdHelper

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonGM::MuonReadoutElement::m_idHelperSvc {"Muon::MuonIdHelperSvc/MuonIdHelperSvc", "MuonDetectorManager"}
privateinherited

Definition at line 155 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

155{"Muon::MuonIdHelperSvc/MuonIdHelperSvc", "MuonDetectorManager"};

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_inTheRibs

bool MuonGM::RpcReadoutElement::m_inTheRibs {false}
private

◆ m_LongRsize

double MuonGM::MuonReadoutElement::m_LongRsize {-9999.}
protectedinherited

◆ m_LongSsize

double MuonGM::MuonReadoutElement::m_LongSsize {-9999.}
protectedinherited

◆ m_LongZsize

double MuonGM::MuonReadoutElement::m_LongZsize {-9999.}
protectedinherited

size in the specified direction

Definition at line 142 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

142{-9999.};

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_mirrored

bool MuonGM::RpcReadoutElement::m_mirrored {false}
private

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_muon_mgr

MuonDetectorManager* MuonGM::MuonReadoutElement::m_muon_mgr {nullptr}
privateinherited

◆ m_netastripsperpanel

int MuonGM::RpcReadoutElement::m_netastripsperpanel {-1}
private

◆ m_nlayers

int MuonGM::RpcReadoutElement::m_nlayers {2}
private

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_nphigasgaps

int MuonGM::RpcReadoutElement::m_nphigasgaps {-1}
private

◆ m_nphistrippanels

int MuonGM::RpcReadoutElement::m_nphistrippanels {-1}
private

◆ m_nphistripsperpanel

int MuonGM::RpcReadoutElement::m_nphistripsperpanel {-1}
private

◆ m_parentMuonStation

const MuonStation* MuonGM::MuonReadoutElement::m_parentMuonStation {nullptr}
privateinherited

◆ m_phi

int MuonGM::MuonReadoutElement::m_phi {-1}
privateinherited

Identifier field of the station phi.

Definition at line 167 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

167{-1};

◆ m_phiDesigns

std::vector<MuonStripDesign> MuonGM::RpcReadoutElement::m_phiDesigns {}
private

◆ m_phipaneldead

double MuonGM::RpcReadoutElement::m_phipaneldead {-9999.}
private

◆ m_phistrip_z

double MuonGM::RpcReadoutElement::m_phistrip_z {-9999.}
private

◆ m_phistriplength

double MuonGM::RpcReadoutElement::m_phistriplength {-9999.}
private

◆ m_phistrippitch

double MuonGM::RpcReadoutElement::m_phistrippitch {-9999.}
private

◆ m_phistripwidth

double MuonGM::RpcReadoutElement::m_phistripwidth {-9999.}
private

◆ m_Rsize

double MuonGM::MuonReadoutElement::m_Rsize {-9999.}
protectedinherited

◆ m_Ssize

double MuonGM::MuonReadoutElement::m_Ssize {-9999.}
protectedinherited

◆ m_stationS

double MuonGM::MuonReadoutElement::m_stationS {0.}
privateinherited

◆ m_statname

std::string MuonGM::MuonReadoutElement::m_statname {"XXX0"}
protectedinherited

examples are BMS5, CSS1, EML1

Definition at line 148 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

148{"XXX0"};

◆ m_stIdx

int MuonGM::MuonReadoutElement::m_stIdx {-1}
privateinherited

Identifier field of the station index.

Definition at line 163 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

163{-1};

◆ m_surfaceData

std::unique_ptr<SurfaceData> MuonGM::MuonClusterReadoutElement::m_surfaceData {}
protectedinherited

Definition at line 120 of file MuonClusterReadoutElement.h.

120{};

◆ m_techname

std::string MuonGM::MuonReadoutElement::m_techname {"TTT0"}
protectedinherited

MDT or RPC or TGC or CSC plus a two digits subtype; example RPC17.

Definition at line 146 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h.

146{"TTT0"};

◆ m_type

◆ m_y_translation

double MuonGM::RpcReadoutElement::m_y_translation {0.f}
private

◆ m_z_translation

double MuonGM::RpcReadoutElement::m_z_translation {0.f}
private

◆ m_Zsize

double MuonGM::MuonReadoutElement::m_Zsize {-9999.}
protectedinherited

◆ s_maxphipanels

int MuonGM::RpcReadoutElement::s_maxphipanels = 2
staticconstexprprivate

◆ s_nLayers

int MuonGM::RpcReadoutElement::s_nLayers = 3
staticconstexprprivate

The documentation for this class was generated from the following files: