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

A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains several TgcReadoutElements. More...

#include <TgcReadoutElement.h>

Inheritance diagram for MuonGM::TgcReadoutElement:
Collaboration diagram for MuonGM::TgcReadoutElement:

Public Member Functions

 TgcReadoutElement (GeoVFullPhysVol *pv, const std::string &stName, MuonDetectorManager *mgr)
virtual ~TgcReadoutElement ()=default
virtual double distanceToReadout (const Amg::Vector2D &pos, const Identifier &id) const override
 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
 strip position If the strip number is outside the range of valid strips, the function will return false
virtual int layerHash (const Identifier &id) const override
 returns the hash function to be used to look up the center and the normal of the tracking surface for a given identifier
virtual int surfaceHash (const Identifier &id) const override
 returns the hash function to be used to look up the surface and surface transform for a given identifier
virtual int boundaryHash (const Identifier &id) const override
 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
 returns whether the given identifier measures phi or not
virtual int numberOfLayers (bool isStrip) const override
 number of layers in phi/eta projection
virtual int numberOfStrips (const Identifier &layerId) const override
 number of strips per layer
virtual int numberOfStrips (int layer, bool isStrip) const override
virtual bool spacePointPosition (const Identifier &phiId, const Identifier &etaId, Amg::Vector2D &pos) const override
 space point position for a given pair of phi and eta identifiers The LocalPosition is expressed in the reference frame of the phi projection.
virtual bool spacePointPosition (const Identifier &phiId, const Identifier &etaId, Amg::Vector3D &pos) const override
 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.
Amg::Vector3D localSpacePoint (const Identifier &stripId, const Amg::Vector3D &etaHitPos, const Amg::Vector3D &phiHitPos) const
virtual bool containsId (const Identifier &id) const override
int chamberType () const
int nGasGaps () const
 Returns the number of gas gaps associated with the readout element (2 or 3)
bool validGap (int gasGap) const
 Returns whether the gasGap is within the allowed range [1-nGasGaps()].
int nStrips (int gasGap) const
 Returns the number of strips in a given gas gap.
bool validStrip (int gasGap, int strip) const
 Returns whether the strip in the given gasgap is within the allowed range.
double stripWidth (int gasGap, int strip) const
 Returns the width of a given strip in the gasGap i.
double stripLength () const
 Returns the length of each strip which is equal to the height of the chamber.
double stripPitch (int gasGap, int strip) const
 Returns the pitch of the given strip in gasGap i.
double stripPitch (int gasGap, int strip, double radialPos) const
 Returns the pitch of the given strip in gasGap i evaluated at a local positiion along the strip.
double stripLowEdgeLocX (int gasGap, int strip, double radialPos) const
 Returns the local X of the left edge of the strip at a given local radial position.
double stripHighEdgeLocX (int gasGap, int strip, double radialPos) const
 Returns the local X of the right edge of the strip at a given local radial position.
double stripCenterLocX (int gasGap, int strip, double radialPos) const
 Returns the local X of the strip center at a given local radial position.
double physicalDistanceFromBase () const
double stripPosOnLargeBase (int strip, int gasGap) const
double stripPosOnShortBase (int strip, int gasGap) const
double stripDeltaPhi () const
double stripDeltaPhi (int gasGap, int strip) const
bool validGang (int gasGap, int wireGang) const
 Returns whether the wire gang in the given gasgap is within the allowed range.
int nWires (int gasGap) const
 Returns the total number of wires in a given gas gap.
int nWires (int gasGap, int gang) const
 Returns the number of wires in a given gang in gas gap i.
int nWireGangs (int gasGap) const
 Returns the number of wire gangs (Random grouping of wires) in a given gas gap.
double nPitchesToGang (int gasGap, int gang) const
 Returns the number of wire pitches that have to be travelled to reach gang i.
double gangRadialLength (int gasGap, int gang) const
 Returns the length of the wire gang along the radial direction [pitch x N_{wire}^{gang}].
double gangShortWidth (int gasGap, int gang) const
 Returns the length of the most bottom wire in the gang.
double gangCentralWidth (int gasGap, int gang) const
 Returns the length of the central wire in the gang.
double gangLongWidth (int gasGap, int gang) const
 Returns the length of the most top wire in the gang.
double gangThickness () const
 Returns the spatial thickness of the wire gang.
double wireLength (int wire) const
 Returns the length of a wire.
double wirePitch () const
 Returns the pitch of the wires.
double stripShortWidth (int, int) const
double stripLongWidth (int, int) const
const Amg::Transform3DlocalToGlobalTransf (const Identifier &id) const
 Returns the local -> global transformation x-axis: Parallel to the wires (strips) if the Identifier belongs to a wire (strip) y-axis: Perpendicular axis in the transverse plane z-axis: Along the beam-axis.
Amg::Transform3D globalToLocalTransf (const Identifier &id) const
 Returns the global -> local transformation.
Amg::Vector3D channelPos (const Identifier &id) const
 Returns the position of the active channel (wireGang or strip)
Amg::Vector3D channelPos (int gasGap, bool isStrip, int channel) const
Amg::Vector3D wireGangPos (const Identifier &id) const
 Returns the global position of a wireGang.
Amg::Vector3D wireGangPos (int gasGap, int gang) const
Amg::Vector3D stripPos (int gasGap, int strip) const
 Returns the global position of a strip.
Amg::Vector3D stripPos (const Identifier &id) const
Amg::Vector3D stripDir (int gasGap, int strip) const
 Returns the direction of a strip.
Amg::Vector3D stripDir (const Identifier &id) const
bool isEndcap () const
 Returns true if the chamber is belonging to the 48-fold TxE chambers.
bool isForward () const
 Returns true if the chamber is mounted on the most inner ring, i.e. a TxF chamber.
bool isDoublet () const
 Returns true if the chamber has 2 gasgaps.
bool isTriplet () const
 Returns true if the chamber has 3 gasgaps.
double chamberLocPhiMin () const
 Returns the minimum angle measured from the center that's covered by the chamber.
double chamberLocPhiMax () const
 Returns the maximum angle measured from the center that's covered by the chamber.
double length () const
double frameZwidth () const
double frameXwidth () const
double chamberWidth (double z) const
int nPhiChambers () const
int nPhiSectors () const
void setPlaneZ (double value, int gasGap)
 Set the local Z coordinate of the i-th gasGap [1-3].
int findGang (int gasGap, const Amg::Vector3D &extPos) const
 Returns the gang number that's closest to the given external position.
int findStrip (int gasGap, const Amg::Vector3D &extPos) const
 Returns the strip number that's closest to the given external position.
void setReadOutName (const std::string &rName)
void setReadOutParams (GeoModel::TransientConstSharedPtr< TgcReadoutParams > pars)
void setFrameThickness (const double frameH, const double frameAB)
const std::string & readOutName () const
const TgcReadoutParamsgetReadoutParams () const
virtual void fillCache () override
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

Amg::Vector3D localChannelPos (const Identifier &id) const
 Returns the local position of the active channel (wireGang or strip)
Amg::Vector3D localChannelPos (int gasGap, bool isStrip, int channel) const
Amg::Vector3D localStripPos (int gasGap, int strip) const
Amg::Vector3D localStripPos (const Identifier &id) const
Amg::Vector3D localStripDir (int gasGap, int strip) const
 Returns the local strip direction of a strip.
Amg::Vector3D localStripDir (const Identifier &id) const
Amg::Vector3D localWireGangPos (int gasGap, int gang) const
 Returns the local position fo a wireGang.
Amg::Vector3D localWireGangPos (const Identifier &id) const
Amg::Vector3D localGasGapPos (int gg) const
 Returns the local position of the gasGap in the AMDB coordinate system.
double stripLocalX (const int gasGap, const int stripNum, const double locY, const double refPoint) const
 Returns the local X given the reference point E.g.
double wireGangLocalX (const int gasGap, const int gangNum) const
 Returns the local X of the wire gang in gasGap i.
double wireGangBottomX (int gasGap, int gangNum) const
 Returns the local X of the bottom wire in the wireGang i in gasGap j.
double wireGangTopX (int gasGap, int gangNum) const
 Returns the local X of the top wire in the wireGang i in gasGap j.
std::pair< double, int > stripNumberToFetch (int gasGap, int inStrip) const
 Returns whether a strip needs to be flipped and the final strip number parsed to the TgcReadoutParams to fetch its absolute position.
void initMessaging () const
 Initialize our message level and MessageSvc.

Static Private Member Functions

static int surfaceHash (int GasGap, bool isStrip)

Private Attributes

const TgcIdHelperm_idHelper {idHelperSvc()->tgcIdHelper()}
std::array< double, s_maxGasGapm_gasPlaneZ {make_array<double, s_maxGasGap>(-9999.)}
std::string m_readout_name {}
GeoModel::TransientConstSharedPtr< TgcReadoutParamsm_readoutParams {nullptr}
double m_stripSlope {0.}
 Cache of the function call 1.
double m_locMinPhi {0.}
double m_locMaxPhi {0.}
int m_stIdxT4E {m_idHelper.stationNameIndex("T4E")}
double m_frameH {0.}
double m_frameAB {0.}
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_maxGasGap {3}

Detailed Description

A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains several TgcReadoutElements.

TgcReadoutElements are identified by StationName, StationEta, StationPhi, Technology=3. Therefore the granularity of the data-collections is equal to the granularity of the geometry description (1 collection -> 1 TgcReadoutElement).

Pointers to all TgcReadoutElements 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 provide access to these objects.

A TgcReadoutElement 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 and wire-gang 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 42 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h.

Constructor & Destructor Documentation

◆ TgcReadoutElement()

MuonGM::TgcReadoutElement::TgcReadoutElement ( GeoVFullPhysVol * pv,
const std::string & stName,
MuonDetectorManager * mgr )

Definition at line 35 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

35 :
37 setStationName(stName);
38 // get the setting of the caching flag from the manager
39 }
MuonClusterReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)

◆ ~TgcReadoutElement()

virtual MuonGM::TgcReadoutElement::~TgcReadoutElement ( )
virtualdefault

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::TgcReadoutElement::boundaryHash ( const Identifier & id) const
overridevirtual

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 }

◆ chamberLocPhiMax()

double MuonGM::TgcReadoutElement::chamberLocPhiMax ( ) const

Returns the maximum angle measured from the center that's covered by the chamber.

◆ chamberLocPhiMin()

double MuonGM::TgcReadoutElement::chamberLocPhiMin ( ) const

Returns the minimum angle measured from the center that's covered by the chamber.

◆ chamberType()

int MuonGM::TgcReadoutElement::chamberType ( ) const

◆ chamberWidth()

double MuonGM::TgcReadoutElement::chamberWidth ( double z) const

◆ channelPos() [1/2]

Amg::Vector3D MuonGM::TgcReadoutElement::channelPos ( const Identifier & id) const

Returns the position of the active channel (wireGang or strip)

◆ channelPos() [2/2]

Amg::Vector3D MuonGM::TgcReadoutElement::channelPos ( int gasGap,
bool isStrip,
int channel ) const

◆ 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::TgcReadoutElement::containsId ( const Identifier & id) const
overridevirtual

Implements MuonGM::MuonReadoutElement.

Definition at line 288 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

288 {
289 int gasGap = m_idHelper.gasGap(id);
290 if (gasGap < 1 || gasGap > nGasGaps()) return false;
291
292 int isStrip = m_idHelper.isStrip(id);
293 int ch = m_idHelper.channel(id);
294 if (isStrip == 0) {
295 if (ch < 1 || ch > nWireGangs(gasGap)) return false;
296 } else if (isStrip == 1) {
297 if (ch < 1 || ch > nStrips(gasGap)) return false;
298 } else
299 return false;
300
301 return true;
302 }
int nWireGangs(int gasGap) const
Returns the number of wire gangs (Random grouping of wires) in a given gas gap.
int nGasGaps() const
Returns the number of gas gaps associated with the readout element (2 or 3)
int nStrips(int gasGap) const
Returns the number of strips in a given gas gap.

◆ 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.

◆ distanceToReadout()

double MuonGM::TgcReadoutElement::distanceToReadout ( const Amg::Vector2D & pos,
const Identifier & id ) const
overridevirtual

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 304 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

304 {
305 THROW_EXCEPT("distanceToReadout() -- method not implemented");
306 return 0.;
307 }

◆ fillCache()

void MuonGM::TgcReadoutElement::fillCache ( )
overridevirtual

Implements MuonGM::MuonReadoutElement.

Definition at line 244 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

244 {
245 if (m_surfaceData) {
246 ATH_MSG_WARNING( "calling fillCache on an already filled cache" );
247 return;
248 }
249 m_surfaceData = std::make_unique<SurfaceData>();
251 m_locMinPhi = -std::atan2((getLongSsize() - getSsize()) / 2, length());
252 m_locMaxPhi = std::atan2((getLongSsize() - getSsize()) / 2, length());
253
254 // loop over all gas gaps
255 for (int gp = 1; gp <= nGasGaps(); ++gp) {
256 // loop over phi/eta projections
257 for (bool isStrip : {false, true}) {
258 Identifier id = m_idHelper.channelID(identify(), gp, isStrip, 1);
259 const Amg::Translation3D xfp{localGasGapPos(gp)};
260 Amg::Transform3D trans3D = absTransform() * xfp;
261 Amg::RotationMatrix3D muonTRotation(trans3D.rotation());
262 Amg::RotationMatrix3D surfaceTRotation{Amg::RotationMatrix3D::Identity()};
263 surfaceTRotation.col(0) = muonTRotation.col(1);
264 surfaceTRotation.col(1) = muonTRotation.col(2);
265 surfaceTRotation.col(2) = muonTRotation.col(0);
266 Amg::Transform3D trans(surfaceTRotation);
267 if (!isStrip) trans = trans * Amg::getRotateZ3D(M_PI / 2);
268 Amg::Translation3D t(trans3D.translation());
269 trans.pretranslate(trans3D.translation());
270 m_surfaceData->m_layerTransforms.push_back(std::move(trans));
271 m_surfaceData->m_layerSurfaces.emplace_back(std::make_unique<Trk::PlaneSurface>(*this, id));
272
273 if (isStrip) {
274 m_surfaceData->m_layerCenters.push_back(m_surfaceData->m_layerTransforms.back().translation());
275 m_surfaceData->m_layerNormals.push_back(m_surfaceData->m_layerTransforms.back().linear() * Amg::Vector3D::UnitZ());
276 }
277 }
278 }
279
280 m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::TrapezoidBounds>(getSsize() / 2.,
281 getLongSsize() / 2.,
282 getRsize() / 2.)); // phi measurement
283 m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RotatedTrapezoidBounds>(getRsize() / 2.,
284 getSsize() / 2.,
285 getLongSsize() / 2.)); // eta measurement
286 }
#define M_PI
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Amg::Vector3D localGasGapPos(int gg) const
Returns the local position of the gasGap in the AMDB coordinate system.
double physicalDistanceFromBase() const
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Eigen::Affine3d Transform3D
Eigen::Translation< double, 3 > Translation3D

◆ findGang()

int MuonGM::TgcReadoutElement::findGang ( int gasGap,
const Amg::Vector3D & extPos ) const

Returns the gang number that's closest to the given external position.

Definition at line 205 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

205 {
206#ifndef NDEBUG
207 if (!validGap(gasGap)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" given.");
208#endif
209 double z = localPos.z();
210 for (int gang = 1; gang <= nWireGangs(gasGap); ++gang) {
211 if (z < wireGangTopX(gasGap, gang)) return gang;
212 }
213 return nWireGangs(gasGap);
214 }
#define z
double wireGangTopX(int gasGap, int gangNum) const
Returns the local X of the top wire in the wireGang i in gasGap j.
bool validGap(int gasGap) const
Returns whether the gasGap is within the allowed range [1-nGasGaps()].

◆ findStrip()

int MuonGM::TgcReadoutElement::findStrip ( int gasGap,
const Amg::Vector3D & extPos ) const

Returns the strip number that's closest to the given external position.

Definition at line 216 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

216 {
217#ifndef NDEBUG
218 if (!validGap(gasGap)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" given.");
219#endif
220 double x = localPos.x();
221 double z = localPos.z();
222 for (int strip = 1; strip <= nStrips(gasGap); ++strip) {
223 if (stripLowEdgeLocX(gasGap, strip, z) < x && x < stripHighEdgeLocX(gasGap, strip, z)) return strip;
224 }
225 return nStrips(gasGap);
226 }
double stripHighEdgeLocX(int gasGap, int strip, double radialPos) const
Returns the local X of the right edge of the strip at a given local radial position.
double stripLowEdgeLocX(int gasGap, int strip, double radialPos) const
Returns the local X of the left edge of the strip at a given local radial position.

◆ frameXwidth()

double MuonGM::TgcReadoutElement::frameXwidth ( ) const

◆ frameZwidth()

double MuonGM::TgcReadoutElement::frameZwidth ( ) const

◆ gangCentralWidth()

double MuonGM::TgcReadoutElement::gangCentralWidth ( int gasGap,
int gang ) const

Returns the length of the central wire in the gang.

Definition at line 92 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

92 {
93#ifndef NDEBUG
94 if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
95#endif
96 return chamberWidth(wireGangLocalX(gasGap, gang)) - frameXwidth() * 2.;
97 }
double chamberWidth(double z) const
double wireGangLocalX(const int gasGap, const int gangNum) const
Returns the local X of the wire gang in gasGap i.
bool validGang(int gasGap, int wireGang) const
Returns whether the wire gang in the given gasgap is within the allowed range.

◆ gangLongWidth()

double MuonGM::TgcReadoutElement::gangLongWidth ( int gasGap,
int gang ) const

Returns the length of the most top wire in the gang.

Definition at line 86 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

86 {
87#ifndef NDEBUG
88 if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
89#endif
90 return chamberWidth(wireGangTopX(gasGap, gang)) - frameXwidth() * 2.;
91 }

◆ gangRadialLength()

double MuonGM::TgcReadoutElement::gangRadialLength ( int gasGap,
int gang ) const

Returns the length of the wire gang along the radial direction [pitch x N_{wire}^{gang}].

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

72 {
73#ifndef NDEBUG
74 if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
75#endif
76 return wirePitch() * nWires(gasGap, gang);
77 }
int nWires(int gasGap) const
Returns the total number of wires in a given gas gap.
double wirePitch() const
Returns the pitch of the wires.

◆ gangShortWidth()

double MuonGM::TgcReadoutElement::gangShortWidth ( int gasGap,
int gang ) const

Returns the length of the most bottom wire in the gang.

Definition at line 79 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

79 {
80#ifndef NDEBUG
81 if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
82#endif
83 return chamberWidth(wireGangBottomX(gasGap, gang)) - frameXwidth() * 2.;
84 }
double wireGangBottomX(int gasGap, int gangNum) const
Returns the local X of the bottom wire in the wireGang i in gasGap j.

◆ gangThickness()

double MuonGM::TgcReadoutElement::gangThickness ( ) const

Returns the spatial thickness of the wire gang.

◆ getLongRsize()

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

◆ getLongSsize()

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

◆ getLongZsize()

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

◆ getReadoutParams()

const TgcReadoutParams * MuonGM::TgcReadoutElement::getReadoutParams ( ) const

◆ 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

◆ globalToLocalTransf()

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

Returns the global -> local transformation.

◆ hasCutouts()

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

◆ 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

◆ 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)

◆ isDoublet()

bool MuonGM::TgcReadoutElement::isDoublet ( ) const

Returns true if the chamber has 2 gasgaps.

◆ isEndcap()

bool MuonGM::TgcReadoutElement::isEndcap ( ) const

Returns true if the chamber is belonging to the 48-fold TxE chambers.

◆ isForward()

bool MuonGM::TgcReadoutElement::isForward ( ) const

Returns true if the chamber is mounted on the most inner ring, i.e. a TxF chamber.

◆ isTriplet()

bool MuonGM::TgcReadoutElement::isTriplet ( ) const

Returns true if the chamber has 3 gasgaps.

◆ 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()

virtual int MuonGM::TgcReadoutElement::layerHash ( const Identifier & id) const
overridevirtual

returns the hash function to be used to look up the center and the normal of the tracking surface for a given identifier

Implements MuonGM::MuonClusterReadoutElement.

◆ length()

double MuonGM::TgcReadoutElement::length ( ) const

◆ localChannelPos() [1/2]

Amg::Vector3D MuonGM::TgcReadoutElement::localChannelPos ( const Identifier & id) const
private

Returns the local position of the active channel (wireGang or strip)

◆ localChannelPos() [2/2]

Amg::Vector3D MuonGM::TgcReadoutElement::localChannelPos ( int gasGap,
bool isStrip,
int channel ) const
private

◆ localGasGapPos()

Amg::Vector3D MuonGM::TgcReadoutElement::localGasGapPos ( int gg) const
private

Returns the local position of the gasGap in the AMDB coordinate system.

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

49 {
50 return m_gasPlaneZ[gg - 1] * Amg::Vector3D::UnitX();
51 }

◆ localSpacePoint()

Amg::Vector3D MuonGM::TgcReadoutElement::localSpacePoint ( const Identifier & stripId,
const Amg::Vector3D & etaHitPos,
const Amg::Vector3D & phiHitPos ) const

Definition at line 321 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

323 {
324
325
326 const Amg::Transform3D globToLoc{transform(stripId).inverse()};
327 const Amg::Vector3D lEtaHitPos = globToLoc * etaHitPos;
328 const Amg::Vector3D lPhiHitPos = globToLoc * phiHitPos;
329 const Amg::Vector3D phiHitDir = localStripDir(stripId);
330
331 ATH_MSG_VERBOSE("local space piont 2D "<<idHelperSvc()->toString(stripId)
332 <<"eta hit: "<<Amg::toString(lEtaHitPos)<<" phi hit:"<<Amg::toString(lPhiHitPos)
333 <<"phi dir: "<<Amg::toString(phiHitDir));
334 return lPhiHitPos +
335 Amg::intersect<3>(lEtaHitPos, Amg::Vector3D::UnitX(), lPhiHitPos, phiHitDir).value_or(0) * phiHitDir;
336
337 }
#define ATH_MSG_VERBOSE(x)
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Amg::Vector3D localStripDir(int gasGap, int strip) const
Returns the local strip direction of a strip.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D

◆ localStripDir() [1/2]

Amg::Vector3D MuonGM::TgcReadoutElement::localStripDir ( const Identifier & id) const
private

◆ localStripDir() [2/2]

Amg::Vector3D MuonGM::TgcReadoutElement::localStripDir ( int gasGap,
int strip ) const
private

Returns the local strip direction of a strip.

◆ localStripPos() [1/2]

Amg::Vector3D MuonGM::TgcReadoutElement::localStripPos ( const Identifier & id) const
private

◆ localStripPos() [2/2]

Amg::Vector3D MuonGM::TgcReadoutElement::localStripPos ( int gasGap,
int strip ) const
private

◆ localToGlobalTransf()

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

Returns the local -> global transformation x-axis: Parallel to the wires (strips) if the Identifier belongs to a wire (strip) y-axis: Perpendicular axis in the transverse plane z-axis: Along the beam-axis.

◆ localWireGangPos() [1/2]

Amg::Vector3D MuonGM::TgcReadoutElement::localWireGangPos ( const Identifier & id) const
private

◆ localWireGangPos() [2/2]

Amg::Vector3D MuonGM::TgcReadoutElement::localWireGangPos ( int gasGap,
int gang ) const
private

Returns the local position fo a wireGang.

◆ manager()

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

◆ measuresPhi()

virtual bool MuonGM::TgcReadoutElement::measuresPhi ( const Identifier & id) const
overridevirtual

returns whether the given identifier measures phi or not

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}

◆ nGasGaps()

int MuonGM::TgcReadoutElement::nGasGaps ( ) const

Returns the number of gas gaps associated with the readout element (2 or 3)

◆ 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 }

◆ nPhiChambers()

int MuonGM::TgcReadoutElement::nPhiChambers ( ) const

◆ nPhiSectors()

int MuonGM::TgcReadoutElement::nPhiSectors ( ) const

◆ nPitchesToGang()

double MuonGM::TgcReadoutElement::nPitchesToGang ( int gasGap,
int gang ) const

Returns the number of wire pitches that have to be travelled to reach gang i.

◆ nStrips()

int MuonGM::TgcReadoutElement::nStrips ( int gasGap) const

Returns the number of strips in a given gas gap.

◆ numberOfLayers()

virtual int MuonGM::TgcReadoutElement::numberOfLayers ( bool isStrip) const
overridevirtual

number of layers in phi/eta projection

Implements MuonGM::MuonClusterReadoutElement.

◆ numberOfStrips() [1/2]

virtual int MuonGM::TgcReadoutElement::numberOfStrips ( const Identifier & layerId) const
overridevirtual

number of strips per layer

Implements MuonGM::MuonClusterReadoutElement.

◆ numberOfStrips() [2/2]

virtual int MuonGM::TgcReadoutElement::numberOfStrips ( int layer,
bool isStrip ) const
overridevirtual

◆ nWireGangs()

int MuonGM::TgcReadoutElement::nWireGangs ( int gasGap) const

Returns the number of wire gangs (Random grouping of wires) in a given gas gap.

◆ nWires() [1/2]

int MuonGM::TgcReadoutElement::nWires ( int gasGap) const

Returns the total number of wires in a given gas gap.

◆ nWires() [2/2]

int MuonGM::TgcReadoutElement::nWires ( int gasGap,
int gang ) const

Returns the number of wires in a given gang in gas gap i.

◆ 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 }

◆ physicalDistanceFromBase()

double MuonGM::TgcReadoutElement::physicalDistanceFromBase ( ) const

◆ readOutName()

const std::string & MuonGM::TgcReadoutElement::readOutName ( ) const

◆ 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

◆ setFrameThickness()

void MuonGM::TgcReadoutElement::setFrameThickness ( const double frameH,
const double frameAB )

Definition at line 45 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

45 {
46 m_frameH = frameH;
47 m_frameAB = frameAB;
48 }

◆ 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

◆ 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 }

◆ setPlaneZ()

void MuonGM::TgcReadoutElement::setPlaneZ ( double value,
int gasGap )

Set the local Z coordinate of the i-th gasGap [1-3].

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

40{ m_gasPlaneZ[gasGap - 1] = value; }

◆ setReadOutName()

void MuonGM::TgcReadoutElement::setReadOutName ( const std::string & rName)

◆ setReadOutParams()

void MuonGM::TgcReadoutElement::setReadOutParams ( GeoModel::TransientConstSharedPtr< TgcReadoutParams > pars)

Definition at line 42 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

42 {
43 m_readoutParams = std::move(pars);
44 }
GeoModel::TransientConstSharedPtr< TgcReadoutParams > m_readoutParams

◆ 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

◆ setZsize()

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

◆ 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/2]

bool MuonGM::TgcReadoutElement::spacePointPosition ( const Identifier & phiId,
const Identifier & etaId,
Amg::Vector2D & pos ) const
overridevirtual

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

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

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 338 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

338 {
339 Amg::Vector3D gpos{Amg::Vector3D::Zero()};
340 if (!spacePointPosition(phiId, etaId, gpos) ||
341 !surface(phiId).globalToLocal(gpos, gpos, pos)) {
342 ATH_MSG_WARNING( " stripPosition:: globalToLocal failed " << Amg::toString(surface(phiId).transform().inverse() * gpos,2));
343 return false;
344 }
345 return true;
346 }
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
virtual bool spacePointPosition(const Identifier &phiId, const Identifier &etaId, Amg::Vector2D &pos) const override
space point position for a given pair of phi and eta identifiers The LocalPosition is expressed in th...

◆ spacePointPosition() [2/2]

bool MuonGM::TgcReadoutElement::spacePointPosition ( const Identifier & phiId,
const Identifier & etaId,
Amg::Vector3D & pos ) const
overridevirtual

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.

Definition at line 347 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

347 {
348 // get orientation angle of strip to rotate back from local frame to strip
349 if (nStrips(m_idHelper.gasGap(phiId)) <= 1) {
350 ATH_MSG_VERBOSE("No strips defined for plane "<<idHelperSvc()->toString(phiId));
351 pos = Amg::Vector3D::Zero();
352 return false;
353 }
354 pos = transform(phiId) * localSpacePoint(phiId, channelPos(etaId), channelPos(phiId));
355 return true;
356 }
Amg::Vector3D channelPos(const Identifier &id) const
Returns the position of the active channel (wireGang or strip)
Amg::Vector3D localSpacePoint(const Identifier &stripId, const Amg::Vector3D &etaHitPos, const Amg::Vector3D &phiHitPos) const

◆ stripCenterLocX()

double MuonGM::TgcReadoutElement::stripCenterLocX ( int gasGap,
int strip,
double radialPos ) const

Returns the local X of the strip center at a given local radial position.

Definition at line 123 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

123 {
124#ifndef NDEBUG
125 if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & strip "<<strip<<" given.");
126#endif
127 const auto [flip, pickStrip] = stripNumberToFetch(gasGap, strip);
128 return flip * stripLocalX(gasGap, pickStrip, z, m_readoutParams->stripCenter(pickStrip, gasGap));
129 }
std::pair< double, int > stripNumberToFetch(int gasGap, int inStrip) const
Returns whether a strip needs to be flipped and the final strip number parsed to the TgcReadoutParams...
double stripLocalX(const int gasGap, const int stripNum, const double locY, const double refPoint) const
Returns the local X given the reference point E.g.
bool validStrip(int gasGap, int strip) const
Returns whether the strip in the given gasgap is within the allowed range.

◆ stripDeltaPhi() [1/2]

double MuonGM::TgcReadoutElement::stripDeltaPhi ( ) const

Definition at line 99 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

99 {
100 // number of strips in exclusive phi coverage of a chamber in T[1-3] and T4
101 constexpr std::array<double, 4> nDivInChamberPhi{29.5, 29.5, 29.5, 31.5};
102 double dphi{0.};
103
104 int iStation = CxxUtils::atoi(&getStationType()[1]);
105 if (iStation != 4 || getStationType()[2] != 'E') { // except for station T4E
106 dphi = 360. * CLHEP::degree / (nPhiChambers()) / nDivInChamberPhi[iStation - 1];
107 } else { // T4E
108 dphi = 360. * CLHEP::degree / 36. / nDivInChamberPhi[iStation - 1];
109 }
110 return dphi;
111 }
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...

◆ stripDeltaPhi() [2/2]

double MuonGM::TgcReadoutElement::stripDeltaPhi ( int gasGap,
int strip ) const

Definition at line 113 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

113 {
114 double dphi = stripDeltaPhi();
115 // half strip
116 if ((strip >= 31 && ((getStationEta() > 0 && gasGap == 1) || (getStationEta() < 0 && gasGap != 1))) ||
117 (strip <= 2 && ((getStationEta() > 0 && gasGap != 1) || (getStationEta() < 0 && gasGap == 1))))
118 dphi = dphi / 2.;
119
120 return dphi;
121 }

◆ stripDir() [1/2]

Amg::Vector3D MuonGM::TgcReadoutElement::stripDir ( const Identifier & id) const

◆ stripDir() [2/2]

Amg::Vector3D MuonGM::TgcReadoutElement::stripDir ( int gasGap,
int strip ) const

Returns the direction of a strip.

◆ stripHighEdgeLocX()

double MuonGM::TgcReadoutElement::stripHighEdgeLocX ( int gasGap,
int strip,
double radialPos ) const

Returns the local X of the right edge of the strip at a given local radial position.

Parameters
gasGapTgc gas gap of interest [1-3]
stripTgc readout strip of interest [1-32]
radialPosRadial position along the strip (origin at trapezoid centre)

Definition at line 140 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

140 {
141#ifndef NDEBUG
142 if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & strip "<<strip<<" given.");
143#endif
144 const int nextStrip = strip +1;
145 auto [flip, pickStrip] = stripNumberToFetch(gasGap, nextStrip);
146 pickStrip += (nextStrip != pickStrip);
147 ATH_MSG_VERBOSE(__func__<<"() "<<idHelperSvc()->toStringDetEl(identify())
148 <<", gasGap: "<<gasGap<<", strip: "<<strip<<", pickStrip: "<<pickStrip);
149 return flip * stripLocalX(gasGap, pickStrip, z, 0.5*(stripPosOnLargeBase(pickStrip, gasGap) + stripPosOnShortBase(pickStrip, gasGap)));
150 }
double stripPosOnShortBase(int strip, int gasGap) const
double stripPosOnLargeBase(int strip, int gasGap) const

◆ stripLength()

double MuonGM::TgcReadoutElement::stripLength ( ) const

Returns the length of each strip which is equal to the height of the chamber.

◆ stripLocalX()

double MuonGM::TgcReadoutElement::stripLocalX ( const int gasGap,
const int stripNum,
const double locY,
const double refPoint ) const
private

Returns the local X given the reference point E.g.

left edge, center, an external position along the radial coordinate [-R/2; R/2], and the strip number

◆ stripLongWidth()

double MuonGM::TgcReadoutElement::stripLongWidth ( int gasGap,
int strip ) const

Definition at line 168 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

168 {
169 // projection of strip on local X axis at max(Z)
170#ifndef NDEBUG
171 if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & strip "<<strip<<" given.");
172#endif
173
174 if ((getStationEta() > 0 && gasGap == 1) || (getStationEta() < 0 && gasGap != 1) || m_readoutParams->nStripLayers() > 1) {
175 return stripPosOnLargeBase(strip + 1, gasGap) - stripPosOnLargeBase(strip, gasGap);
176 } else {
177 return -(stripPosOnLargeBase(33 - strip, gasGap) - stripPosOnLargeBase(33 - (strip - 1), gasGap));
178 }
179 }

◆ stripLowEdgeLocX()

double MuonGM::TgcReadoutElement::stripLowEdgeLocX ( int gasGap,
int strip,
double radialPos ) const

Returns the local X of the left edge of the strip at a given local radial position.

Parameters
gasGapTgc gas gap of interest [1-3]
stripTgc readout strip of interest [1-32]
radialPosRadial position along the strip (origin at trapezoid centre)

Definition at line 130 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

130 {
131#ifndef NDEBUG
132 if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire strip "<<strip<<" given.");
133#endif
134 const auto [flip, pickStrip] = stripNumberToFetch(gasGap, strip);
135 ATH_MSG_VERBOSE(__func__<<"() "<<idHelperSvc()->toStringDetEl(identify())
136 <<", gasGap: "<<gasGap<<", strip: "<<strip<<", pickStrip: "<<pickStrip);
137 return flip * stripLocalX(gasGap, pickStrip, z, 0.5*(stripPosOnLargeBase(pickStrip, gasGap) + stripPosOnShortBase(pickStrip, gasGap)));
138 }

◆ stripNumber()

int MuonGM::TgcReadoutElement::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.

Definition at line 308 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

308 {
309 THROW_EXCEPT("stripNumber() -- method not implemented");
310 return 0. ;
311 }

◆ stripNumberToFetch()

std::pair< double, int > MuonGM::TgcReadoutElement::stripNumberToFetch ( int gasGap,
int inStrip ) const
private

Returns whether a strip needs to be flipped and the final strip number parsed to the TgcReadoutParams to fetch its absolute position.

◆ stripPitch() [1/2]

double MuonGM::TgcReadoutElement::stripPitch ( int gasGap,
int strip ) const

Returns the pitch of the given strip in gasGap i.

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

182 {
183 return stripPitch(gasGap, strip, 0.);
184 }
double stripPitch(int gasGap, int strip) const
Returns the pitch of the given strip in gasGap i.

◆ stripPitch() [2/2]

double MuonGM::TgcReadoutElement::stripPitch ( int gasGap,
int strip,
double radialPos ) const

Returns the pitch of the given strip in gasGap i evaluated at a local positiion along the strip.

< strip pitch depending on local z position (R in global coordinate)

Definition at line 186 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

186 {
188 #ifndef NDEBUG
189 if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & strip "<<strip<<" given.");
190 #endif
191 if (1 < strip && strip < 32) {
192 double stripCurrCen = stripCenterLocX(gasGap, strip, z);
193 double stripNextCen = stripCenterLocX(gasGap, strip + 1, z);
194 double stripPrevCen = stripCenterLocX(gasGap, strip - 1, z);
195 return std::max(stripNextCen - stripCurrCen , stripCurrCen - stripPrevCen);
196 } else if (strip == 1) {
197 return stripCenterLocX(gasGap, strip + 1, z) - stripCenterLocX(gasGap, strip, z);
198 } else if (strip == 32) {
199 return stripCenterLocX(gasGap, strip, z) - stripCenterLocX(gasGap, strip - 1, z);
200 }
201 return 0.;
202 }
double stripCenterLocX(int gasGap, int strip, double radialPos) const
Returns the local X of the strip center at a given local radial position.

◆ stripPos() [1/2]

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

◆ stripPos() [2/2]

Amg::Vector3D MuonGM::TgcReadoutElement::stripPos ( int gasGap,
int strip ) const

Returns the global position of a strip.

◆ stripPosition()

bool MuonGM::TgcReadoutElement::stripPosition ( const Identifier & id,
Amg::Vector2D & pos ) const
overridevirtual

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

please don't copy the inefficient code below!! Look at the RpcReadoutElement for a proper implementation

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 312 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

312 {
314 Amg::Vector3D gpos = channelPos(id);
315 if (!surface(id).globalToLocal(gpos, gpos, pos)) {
316 ATH_MSG_WARNING( " stripPosition:: globalToLocal failed " <<Amg::toString(surface(id).transform().inverse() * gpos,2));
317 return false;
318 }
319 return true;
320 }

◆ stripPosOnLargeBase()

double MuonGM::TgcReadoutElement::stripPosOnLargeBase ( int strip,
int gasGap ) const

◆ stripPosOnShortBase()

double MuonGM::TgcReadoutElement::stripPosOnShortBase ( int strip,
int gasGap ) const

◆ stripShortWidth()

double MuonGM::TgcReadoutElement::stripShortWidth ( int gasGap,
int strip ) const

Definition at line 156 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

156 {
157 // projection of strip on local X axis at min(Z)
158#ifndef NDEBUG
159 if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & strip "<<strip<<" given.");
160#endif
161 if ((getStationEta() > 0 && gasGap == 1) || (getStationEta() < 0 && gasGap != 1) || m_readoutParams->nStripLayers() > 1) {
162 return stripPosOnShortBase(strip + 1, gasGap) - stripPosOnShortBase(strip, gasGap);
163 } else {
164 return -(stripPosOnShortBase(33 - strip, gasGap) - stripPosOnShortBase(33 - (strip - 1), gasGap));
165 }
166 }

◆ stripWidth()

double MuonGM::TgcReadoutElement::stripWidth ( int gasGap,
int strip ) const

Returns the width of a given strip in the gasGap i.

< stripWidth depends on global R (almost pointing geometry+trapezoidal strips); returns the width at the center of the plane

Definition at line 152 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

◆ 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); }

◆ 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::TgcReadoutElement::surfaceHash ( const Identifier & id) const
overridevirtual

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

Implements MuonGM::MuonClusterReadoutElement.

◆ surfaceHash() [2/2]

int MuonGM::TgcReadoutElement::surfaceHash ( int GasGap,
bool isStrip )
staticprivate

◆ 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 }

◆ validGang()

bool MuonGM::TgcReadoutElement::validGang ( int gasGap,
int wireGang ) const

Returns whether the wire gang in the given gasgap is within the allowed range.

Definition at line 236 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

236 {
237 return validGap(gasGap) && (1 <= gang && gang <= (nWireGangs(gasGap) + 1));
238 }

◆ validGap()

bool MuonGM::TgcReadoutElement::validGap ( int gasGap) const

Returns whether the gasGap is within the allowed range [1-nGasGaps()].

Definition at line 228 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

228 {
229 bool isValid = (1 <= gasGap && gasGap <= nGasGaps());
230 if (!isValid) {
231 ATH_MSG_WARNING( " gas gap is out of range; limits are 1-" << nGasGaps() );
232 }
233 return isValid;
234 }
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878

◆ validStrip()

bool MuonGM::TgcReadoutElement::validStrip ( int gasGap,
int strip ) const

Returns whether the strip in the given gasgap is within the allowed range.

Definition at line 240 of file MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx.

240 {
241 return validGap(gasGap) && (1 <= strip && strip <= nStrips(gasGap));
242 }

◆ wireGangBottomX()

double MuonGM::TgcReadoutElement::wireGangBottomX ( int gasGap,
int gangNum ) const
private

Returns the local X of the bottom wire in the wireGang i in gasGap j.

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

56 {
57#ifndef NDEBUG
58 if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
59#endif
60 return wireGangLocalX(gasGap, gang) - 0.5* gangRadialLength(gasGap, gang);
61 }
double gangRadialLength(int gasGap, int gang) const
Returns the length of the wire gang along the radial direction [pitch x N_{wire}^{gang}...

◆ wireGangLocalX()

double MuonGM::TgcReadoutElement::wireGangLocalX ( const int gasGap,
const int gangNum ) const
private

Returns the local X of the wire gang in gasGap i.

◆ wireGangPos() [1/2]

Amg::Vector3D MuonGM::TgcReadoutElement::wireGangPos ( const Identifier & id) const

Returns the global position of a wireGang.

◆ wireGangPos() [2/2]

Amg::Vector3D MuonGM::TgcReadoutElement::wireGangPos ( int gasGap,
int gang ) const

◆ wireGangTopX()

double MuonGM::TgcReadoutElement::wireGangTopX ( int gasGap,
int gangNum ) const
private

Returns the local X of the top wire in the wireGang i in gasGap j.

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

63 {
64#ifndef NDEBUG
65 if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
66#endif
67 return wireGangLocalX(gasGap, gang) + 0.5 * gangRadialLength(gasGap, gang);
68 }

◆ wireLength()

double MuonGM::TgcReadoutElement::wireLength ( int wire) const

Returns the length of a wire.

The wire numbering is following scheme where the 1st wire coincides with the bottom edge of the readout element

◆ wirePitch()

double MuonGM::TgcReadoutElement::wirePitch ( ) const

Returns the pitch of the wires.

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_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_frameAB

double MuonGM::TgcReadoutElement::m_frameAB {0.}
private

◆ m_frameH

double MuonGM::TgcReadoutElement::m_frameH {0.}
private

◆ m_gasPlaneZ

std::array<double, s_maxGasGap> MuonGM::TgcReadoutElement::m_gasPlaneZ {make_array<double, s_maxGasGap>(-9999.)}
private

Definition at line 283 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.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_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_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 TgcIdHelper& MuonGM::TgcReadoutElement::m_idHelper {idHelperSvc()->tgcIdHelper()}
private

Definition at line 280 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h.

virtual const TgcIdHelper & tgcIdHelper() const =0
access to TgcIdHelper

◆ 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_locMaxPhi

double MuonGM::TgcReadoutElement::m_locMaxPhi {0.}
private

◆ m_locMinPhi

double MuonGM::TgcReadoutElement::m_locMinPhi {0.}
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_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_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ 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_readout_name

std::string MuonGM::TgcReadoutElement::m_readout_name {}
private

◆ m_readoutParams

GeoModel::TransientConstSharedPtr<TgcReadoutParams> MuonGM::TgcReadoutElement::m_readoutParams {nullptr}
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_stIdxT4E

int MuonGM::TgcReadoutElement::m_stIdxT4E {m_idHelper.stationNameIndex("T4E")}
private

Definition at line 293 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h.

293{m_idHelper.stationNameIndex("T4E")};

◆ m_stripSlope

double MuonGM::TgcReadoutElement::m_stripSlope {0.}
private

Cache of the function call 1.

/ (getRsize() - 2. * physicalDistanceFromBase()) which is the active height of the readout element

Definition at line 289 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h.

289{0.};

◆ 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_Zsize

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

◆ s_maxGasGap

int MuonGM::TgcReadoutElement::s_maxGasGap {3}
staticconstexprprivate

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