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

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

#include <MMReadoutElement.h>

Inheritance diagram for MuonGM::MMReadoutElement:
Collaboration diagram for MuonGM::MMReadoutElement:

Public Member Functions

 MMReadoutElement (GeoVFullPhysVol *pv, const std::string &stName, int zi, int fi, int mL, MuonDetectorManager *mgr)
 constructor
 ~MMReadoutElement ()
 destructor
virtual bool containsId (const Identifier &id) const override final
 function to be used to check whether a given Identifier is contained in the readout element
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 – local or global If the strip number is outside the range of valid strips, the function will return false
bool stripGlobalPosition (const Identifier &id, Amg::Vector3D &gpos) const
double stereoAngle (const Identifier &id) const
 Wrapper to MuonChannelDesign::stereoAngle()
double stripLength (const Identifier &id) const
 strip length Wrappers to MuonChannelDesign::channelLength() taking into account the passivated width
double stripActiveLength (const Identifier &id) const
double stripActiveLengthLeft (const Identifier &id) const
double stripActiveLengthRight (const Identifier &id) const
bool insideActiveBounds (const Identifier &id, const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const
 boundary check Wrapper Trk::PlaneSurface::insideBounds() taking into account the passivated width
virtual int numberOfLayers (bool) const override
 number of layers in phi/eta projection
virtual int numberOfStrips (const Identifier &layerId) const override final
 number of strips per layer
virtual int numberOfStrips (int, bool measuresPhi) const override final
int numberOfMissingTopStrips (const Identifier &layerId) const
 Number of missing bottom and top strips (not read out)
int numberOfMissingBottomStrips (const Identifier &layerId) const
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.
Amg::Vector3D localToGlobalCoords (const Amg::Vector3D &locPos, const Identifier &id) const
 simHit local (SD) To Global position - to be used by MuonGeoAdaprors only
bool spacePointPosition (const Identifier &layerId, const Amg::Vector2D &localPos, Amg::Vector3D &pos) const
 Method calculating the global position of the hit on surface taking the as-built corrections into account.
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 gasGap, int 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 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
const MuonChannelDesigngetDesign (const Identifier &id) const
 returns the MuonChannelDesign class for the given identifier
void setChamberLayer (int ml)
 set methods only to be used by MuonGeoModel
const Amg::Transform3DgetDelta () const
 read A-line parameters and include the chamber rotation/translation in the local-to-global (ATLAS) reference frame transformaton
void setDelta (const ALinePar &aline)
void setBLinePar (const BLinePar &bLine)
 read B-line (chamber-deformation) parameters
void posOnDefChamber (Amg::Vector3D &locPosML) const
 transform a position (in chamber-frame coordinates) to the deformed-chamber geometry
bool has_ALines () const
bool has_BLines () const
const ALinePargetALinePar () const
const BLinePargetBLinePar () const
void clearALinePar ()
void clearBLinePar ()
const std::array< int, 4 > & getReadoutSide () const
virtual Amg::Vector3D AmdbLRSToGlobalCoords (const Amg::Vector3D &x) const override final
virtual Amg::Transform3D AmdbLRSToGlobalTransform () const override final
virtual Amg::Vector3D GlobalToAmdbLRSCoords (const Amg::Vector3D &x) const override final
virtual Amg::Transform3D GlobalToAmdbLRSTransform () const override final
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
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 Types

using PCBPassivation = NswPassivationDbData::PCBPassivation

Private Member Functions

void initDesignSqLite ()
void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

const MmIdHelperm_idHelper {idHelperSvc()->mmIdHelper()}
std::array< MuonChannelDesign, 4 > m_etaDesign {}
int m_nlayers {0}
int m_ml {0}
double m_halfX {100.}
double m_minHalfY {1900.}
double m_maxHalfY {2000.}
double m_offset {0.}
Amg::Transform3D m_delta {Amg::Transform3D::Identity()}
const ALineParm_ALinePar {nullptr}
const BLineParm_BLinePar {nullptr}
std::array< int, 4 > m_readoutSide {}
std::array< Amg::Transform3D, 4 > m_Xlg {make_array<Amg::Transform3D,4>(Amg::Transform3D::Identity())}
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 PCBPassivation s_dummy_passiv {}

Friends

class MuonGMR4::ReadoutGeomCnvAlg

Detailed Description

An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station contains:

Definition at line 25 of file MMReadoutElement.h.

Member Typedef Documentation

◆ PCBPassivation

Constructor & Destructor Documentation

◆ MMReadoutElement()

MuonGM::MMReadoutElement::MMReadoutElement ( GeoVFullPhysVol * pv,
const std::string & stName,
int zi,
int fi,
int mL,
MuonDetectorManager * mgr )

constructor

Active gas volume in the R4 like description

Definition at line 70 of file MMReadoutElement.cxx.

72 m_ml(mL) {
73
74 std::string fixName = (stName[2] == 'L') ? "MML" : "MMS";
75 setStationName(fixName);
77 Identifier id = mgr->mmIdHelper()->channelID(fixName, zi, fi, mL, 1, 1);
78 setIdentifier(id);
79
80
81 if (mgr->MinimalGeoFlag()) {
82 return;
83 }
84 bool foundShape = false;
85 const PVConstLink pvc {getMaterialGeom()};
86 const GeoTrd* trd=dynamic_cast<const GeoTrd *> (pvc->getLogVol()->getShape());
87 if (trd) {
88 setSsize(2*trd->getYHalfLength1());
89 setLongSsize( 2*trd->getYHalfLength2());
90 setRsize(2*trd->getZHalfLength());
91 setZsize(trd->getXHalfLength1());
92
93 } else {
94 ATH_MSG_DEBUG("Expected a GeoTrd but got "<<printGeoShape(pvc->getLogVol()->getShape()));
95 }
96
97 std::vector<GeoChildNodeWithTrf> children{getAllSubVolumes(pvc)};
98 for (const GeoChildNodeWithTrf& child : children) {
99 ATH_MSG_VERBOSE("Child node "<<child.nodeName<<" "<<child.volume->getLogVol()->getName());
100 if (child.volume->getLogVol()->getName().find("Sensitive") == std::string::npos &&
102 child.volume->getLogVol()->getName() != "actMicroMegaGas") {
103 continue;
104 }
105 ++m_nlayers;
106 if (m_nlayers > 4) {
107 THROW_EXCEPTION_MM("number of MM layers > 4: increase transform array size" );
108 }
109 m_Xlg[m_nlayers - 1] = child.transform;
110 // save layer dimensions
111 if (foundShape) {
112 continue;
113 }
114 const GeoShape* childShape = child.volume->getLogVol()->getShape();
115 while (childShape->typeID() != GeoTrd::getClassTypeID()){
116 auto [opA, opB] = getOps(childShape);
117 ATH_MSG_VERBOSE("Operands are "<<printGeoShape(opA)<<", "<<printGeoShape(opB));
118 childShape = opA;
119 }
120 const GeoTrd* trd = dynamic_cast<const GeoTrd*>(childShape);
121 m_halfX = trd->getZHalfLength();
122 // adjust phi dimensions according to the active area
123 m_minHalfY = trd->getYHalfLength1();
124 m_maxHalfY = trd->getYHalfLength2();
125 foundShape = true;
126 }
127
128 if (!foundShape) {
129 THROW_EXCEPTION_MM(" failed to initialize dimensions of this chamber " );
130 }
131 }
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
#define THROW_EXCEPTION_MM(MSG)
std::array< Amg::Transform3D, 4 > m_Xlg
void setChamberLayer(int ml)
set methods only to be used by MuonGeoModel
MuonClusterReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)
void setIdentifier(const Identifier &id)
Sets the Identifier, hashes & station names.
const std::string & stName(StIndex index)
convert StIndex into a string

◆ ~MMReadoutElement()

MuonGM::MMReadoutElement::~MMReadoutElement ( )
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()

virtual Amg::Vector3D MuonGM::MMReadoutElement::AmdbLRSToGlobalCoords ( const Amg::Vector3D & x) const
inlinefinaloverridevirtual

Reimplemented from MuonGM::MuonReadoutElement.

Definition at line 142 of file MMReadoutElement.h.

142{ return AmdbLRSToGlobalTransform()*x; }
#define x
virtual Amg::Transform3D AmdbLRSToGlobalTransform() const override final

◆ AmdbLRSToGlobalTransform()

virtual Amg::Transform3D MuonGM::MMReadoutElement::AmdbLRSToGlobalTransform ( ) const
inlinefinaloverridevirtual

Reimplemented from MuonGM::MuonReadoutElement.

Definition at line 143 of file MMReadoutElement.h.

const Amg::Transform3D & getDelta() const
read A-line parameters and include the chamber rotation/translation in the local-to-global (ATLAS) re...
Amg::Transform3D getTranslateZ3D(const double Z)
: Returns a shift transformation along the z-axis

◆ boundaryHash()

int MuonGM::MMReadoutElement::boundaryHash ( const Identifier & id) const
inlinefinaloverridevirtual

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

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 186 of file MMReadoutElement.h.

186{ return layerHash(m_idHelper.gasGap(id)); }
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 trackin...
const MmIdHelper & m_idHelper

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

◆ clearALinePar()

void MuonGM::MMReadoutElement::clearALinePar ( )

Definition at line 388 of file MMReadoutElement.cxx.

388 {
389 if (has_ALines()) {
390 m_ALinePar = nullptr;
391 m_delta = Amg::Transform3D::Identity();
392 refreshCache();
393 }
394 }

◆ clearBLinePar()

void MuonGM::MMReadoutElement::clearBLinePar ( )
inline

Definition at line 138 of file MMReadoutElement.h.

138{ m_BLinePar = nullptr; }

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

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

Implements MuonGM::MuonReadoutElement.

Definition at line 340 of file MMReadoutElement.cxx.

340 {
341 if (m_idHelper.stationEta(id) != getStationEta()) return false;
342 if (m_idHelper.stationPhi(id) != getStationPhi()) return false;
343
344 if (m_idHelper.multilayer(id) != m_ml) return false;
345
346 int gasgap = m_idHelper.gasGap(id);
347 if (gasgap < 1 || gasgap > m_nlayers) return false;
348
349 int strip = m_idHelper.channel(id);
350 return strip >= 1 && strip <= m_etaDesign[gasgap - 1].totalStrips;
351 }
std::array< MuonChannelDesign, 4 > m_etaDesign

◆ 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::MMReadoutElement::distanceToReadout ( const Amg::Vector2D & pos,
const Identifier & id ) const
inlinefinaloverridevirtual

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 193 of file MMReadoutElement.h.

193 {
194 const MuonChannelDesign* design = getDesign(id);
195 if (!design) return -1.;
196 return design->distanceToReadout(pos);
197 }
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier

◆ fillCache()

void MuonGM::MMReadoutElement::fillCache ( )
finaloverridevirtual

function to fill tracking cache

Implements MuonGM::MuonReadoutElement.

Definition at line 305 of file MMReadoutElement.cxx.

305 {
306
307 if (m_surfaceData) {
308 ATH_MSG_WARNING("calling fillCache on an already filled cache" );
309 return;
310 }
311 m_surfaceData = std::make_unique<SurfaceData>();
312
313
314 for (int layer = 0; layer < m_nlayers; ++layer) {
315 // identifier of the first channel
316 Identifier id = m_idHelper.channelID(identify(), m_ml, layer + 1, 1);
317 const double sAngle = m_etaDesign[layer].stereoAngle();
318 m_surfaceData->m_layerSurfaces.emplace_back(std::make_unique<Trk::PlaneSurface>(*this,id));
319 m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RotatedTrapezoidBounds>(m_halfX, m_minHalfY, m_maxHalfY, sAngle));
320
321 m_surfaceData->m_layerTransforms.push_back(
322 absTransform() // transformation from chamber to ATLAS frame
323 * m_delta // rotations (a-lines) from the alignment group
324 * m_Xlg[layer] // x-shift of the gas-gap center w.r.t. quadruplet center
325 * Amg::getTranslateZ3D(m_offset) // z-shift to volume center
326 * Amg::getRotateY3D(-90. * CLHEP::deg) // x<->z because of GeoTrd definition
327 * Amg::getRotateZ3D(sAngle));
328
329 // surface info (center, normal)
330 m_surfaceData->m_layerCenters.emplace_back(m_surfaceData->m_layerTransforms.back().translation());
331 m_surfaceData->m_layerNormals.emplace_back(m_surfaceData->m_layerTransforms.back().linear() * (-Amg::Vector3D::UnitZ()));
332
333 ATH_MSG_DEBUG("MMReadoutElement layer " << layer << " sAngle " << sAngle << " phi direction MM eta strip "
334 << (m_surfaceData->m_layerTransforms.back().linear() * Amg::Vector3D::UnitY()).phi() );
335 }
336 }
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
@ layer
Definition HitInfo.h:79

◆ getALinePar()

const ALinePar * MuonGM::MMReadoutElement::getALinePar ( ) const
inline

Definition at line 135 of file MMReadoutElement.h.

135{ return m_ALinePar; }

◆ getBLinePar()

const BLinePar * MuonGM::MMReadoutElement::getBLinePar ( ) const
inline

Definition at line 136 of file MMReadoutElement.h.

136{ return m_BLinePar; }

◆ getDelta()

const Amg::Transform3D & MuonGM::MMReadoutElement::getDelta ( ) const
inline

read A-line parameters and include the chamber rotation/translation in the local-to-global (ATLAS) reference frame transformaton

Definition at line 124 of file MMReadoutElement.h.

124{ return m_delta; }

◆ getDesign()

const MuonChannelDesign * MuonGM::MMReadoutElement::getDesign ( const Identifier & id) const
inline

returns the MuonChannelDesign class for the given identifier

Definition at line 190 of file MMReadoutElement.h.

190 {
191 return &(m_etaDesign[layerHash(id)]);
192 }

◆ getLongRsize()

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

◆ getLongSsize()

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

◆ getLongZsize()

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

◆ getReadoutSide()

const std::array< int, 4 > & MuonGM::MMReadoutElement::getReadoutSide ( ) const
inline

Definition at line 139 of file MMReadoutElement.h.

139{ return m_readoutSide; }
std::array< int, 4 > m_readoutSide

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

virtual Amg::Vector3D MuonGM::MMReadoutElement::GlobalToAmdbLRSCoords ( const Amg::Vector3D & x) const
inlinefinaloverridevirtual

Reimplemented from MuonGM::MuonReadoutElement.

Definition at line 145 of file MMReadoutElement.h.

145{ return GlobalToAmdbLRSTransform()*x; }
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const override final

◆ GlobalToAmdbLRSTransform()

virtual Amg::Transform3D MuonGM::MMReadoutElement::GlobalToAmdbLRSTransform ( ) const
inlinefinaloverridevirtual

Reimplemented from MuonGM::MuonReadoutElement.

Definition at line 146 of file MMReadoutElement.h.

146{ return AmdbLRSToGlobalTransform().inverse(); }

◆ has_ALines()

bool MuonGM::MMReadoutElement::has_ALines ( ) const
inline

Definition at line 133 of file MMReadoutElement.h.

133{ return (m_ALinePar != nullptr); }

◆ has_BLines()

bool MuonGM::MMReadoutElement::has_BLines ( ) const
inline

Definition at line 134 of file MMReadoutElement.h.

134{ return (m_BLinePar != nullptr); }

◆ 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

◆ initDesign()

void MuonGM::MMReadoutElement::initDesign ( )

initialize the design classes for this readout element

The stereo angle is defined clock-wise from the y-axis

Input width is defined as the distance between two channels

Definition at line 224 of file MMReadoutElement.cxx.

224 {
225 if (m_ml < 1 || m_ml > 2) {
226 THROW_EXCEPTION_MM("MMReadoutElement -- Unexpected Multilayer: m_ml= " << m_ml );
227 return;
228 }
229 // Get the detector configuration.
230 SmartIF<IGeoDbTagSvc> geoDbTag{Gaudi::svcLocator()->service("GeoDbTagSvc")};
231 if (!geoDbTag) {
232 THROW_EXCEPTION_MM("Could not locate GeoDbTagSvc");
233 }
234 if (geoDbTag->getSqliteReader()) {
236 return;
237 }
238 char side = getStationEta() < 0 ? 'C' : 'A';
239 char sector_l = getStationName().substr(2, 1) == "L" ? 'L' : 'S';
240 // Initialize from database:
241
242 MMDetectorHelper aHelper;
243 MMDetectorDescription* mm = aHelper.Get_MMDetector(sector_l, std::abs(getStationEta()), getStationPhi(), m_ml, side);
244 MMReadoutParameters roParam = mm->GetReadoutParameters();
245
246 double ylFrame = mm->ylFrame();
247 double ysFrame = mm->ysFrame();
248 double pitch = roParam.stripPitch;
249
250
251
252
253 setSsize(mm->sWidth()); // bottom base length (full chamber)
254 setLongSsize(mm->lWidth()); // top base length (full chamber)
255 setRsize(mm->Length()); // height of the trapezoid (full chamber)
256 setZsize(mm->Tck()); // thickness (full chamber)
257 m_halfX = roParam.activeH / 2; // 0.5*radial_size (active area)
258 m_minHalfY = roParam.activeBottomLength / 2; // 0.5*bottom length (active area)
259 m_maxHalfY = roParam.activeTopLength / 2; // 0.5*top length (active area)
260 m_offset = -0.5*(ylFrame - ysFrame); // radial dist. of active area center w.r.t. chamber center
261 ATH_MSG_DEBUG(idHelperSvc()->toStringDetEl(identify())<<", ylFrame: "<<ylFrame<<", ysFrame: "<<ysFrame<<", offset: "<<m_offset);
262 assign(roParam.readoutSide, m_readoutSide);
263
264 for (int il = 0; il < m_nlayers; il++) {
265 // identifier of the first channel to retrieve max number of strips
266 Identifier id = m_idHelper.channelID(identify(), m_ml, il + 1, 1);
267 int chMax = m_idHelper.channelMax(id);
268 if (chMax < 0) {
269 THROW_EXCEPTION_MM("MMReadoutElement -- Max number of strips not a valid value" );
270 }
271 MuonChannelDesign& design = m_etaDesign[il];
272
274 design.detType = MuonChannelDesign::DetType::MM;
275 design.inputPitch = pitch;
276 design.thickness = roParam.gasThickness;
277 design.nMissedTopEta = roParam.nMissedTopEta; // #of eta strips that are not connected to any FE board
278 design.nMissedBottomEta = roParam.nMissedBottomEta;
279 design.nMissedTopStereo = roParam.nMissedTopStereo; // #of stereo strips that are not connected to any FE board
280 design.nMissedBottomStereo = roParam.nMissedBottomStereo;
281 design.totalStrips = roParam.tStrips;
283 design.defineTrapezoid(m_minHalfY, m_maxHalfY,m_halfX, - roParam.stereoAngle.at(il));
285 design.inputWidth = pitch * std::cos(design.stereoAngle());
286
287 if (!design.hasStereoAngle()) { // eta layers
288 design.nch = design.totalStrips - design.nMissedBottomEta - design.nMissedTopEta;
289 design.setFirstPos(-0.5 * design.xSize() + pitch);
290 } else { // stereo layers
291 design.nch = design.totalStrips - design.nMissedBottomStereo - design.nMissedTopStereo;
292 design.setFirstPos( -0.5 * design.xSize() +
293 (1 + design.nMissedBottomStereo - design.nMissedBottomEta) * pitch);
294 }
295 ATH_MSG_DEBUG("initDesign:" <<idHelperSvc()->toStringDetEl(identify())<< " layer " << il
296 << ", strip pitch " << design.inputPitch << ", nstrips " << design.nch
297 << " stereo " << design.stereoAngle() / Gaudi::Units::degree
298 <<", "<<design.xSize()<<", "<<design.maxYSize()<<" "<<design.minYSize()
299 <<", firstPos: "<<design.firstPos()<<", first pitch: "<<design.firstPitch);
300 }
301 }
MMDetectorDescription * Get_MMDetector(char type, int ieta, int iphi, int layer=1, char side='A')
std::vector< double > stereoAngle
std::vector< int > readoutSide

◆ initDesignSqLite()

void MuonGM::MMReadoutElement::initDesignSqLite ( )
private

The stereo angle is defined clock-wise from the y-axis

Input width is defined as the distance between two channels

Definition at line 138 of file MMReadoutElement.cxx.

138 {
139
140 SmartIF<IGeoDbTagSvc> geoDbTag{Gaudi::svcLocator()->service("GeoDbTagSvc")};
141 if (!geoDbTag) {
142 THROW_EXCEPTION_MM("Could not locate GeoDbTagSvc");
143 }
144 SmartIF<IRDBAccessSvc> accessSvc{Gaudi::svcLocator()->service(geoDbTag->getParamSvcName())};
145 if (!accessSvc) {
146 THROW_EXCEPTION_MM("Could not locate " << geoDbTag->getParamSvcName() );
147 }
148 const char sector_l = getStationName()[2];
149 IRDBRecordset_ptr wmmRec = accessSvc->getRecordsetPtr("WMM","","");
150 for (unsigned int ind = 0; ind < wmmRec->size(); ind++) {
151 std::string WMM_TYPE = (*wmmRec)[ind]->getString("WMM_TYPE");
152 if (sector_l != WMM_TYPE[4]){
153 continue;
154 }
155 if (std::abs(getStationEta())!=(int) (WMM_TYPE[6]-'0')) {
156 continue;
157 }
158 if (m_ml != (int) (WMM_TYPE[12]-'0')){
159 continue;
160 }
161 const double Tck = (*wmmRec)[ind]->getDouble("Tck");
162 const double activeBottomLength = (*wmmRec)[ind]->getDouble("activeBottomLength");
163 const double activeH = (*wmmRec)[ind]->getDouble("activeH");
164 const double activeTopLength = (*wmmRec)[ind]->getDouble("activeTopLength");
165 const double gasTck = (*wmmRec)[ind]->getDouble("gasTck");
166 const int nMissedBottomEta = (*wmmRec)[ind]->getInt("nMissedBottomEta");
167 const int nMissedBottomStereo = (*wmmRec)[ind]->getInt("nMissedBottomStereo");
168 const int nMissedTopEta = (*wmmRec)[ind]->getInt("nMissedTopEta");
169 const int nMissedTopStereo = (*wmmRec)[ind]->getInt("nMissedTopStereo");
170
171 assign(tokenizeInt((*wmmRec)[ind]->getString("readoutSide"), ";"), m_readoutSide);
172 const std::vector<double> stereoAngle{tokenizeDouble((*wmmRec)[ind]->getString("stereoAngle"), ";")};
173 const double stripPitch = (*wmmRec)[ind]->getDouble("stripPitch");
174 const int totalStrips = (*wmmRec)[ind]->getInt ("totalStrips");
175 const double ylFrame = (*wmmRec)[ind]->getDouble("ylFrame");
176 const double ysFrame = (*wmmRec)[ind]->getDouble("ysFrame");
177
178 setZsize(Tck); // thickness (full chamber)
179 m_halfX = activeH / 2; // 0.5*radial_size (active area)
180 m_minHalfY = activeBottomLength / 2; // 0.5*bottom length (active area)
181 m_maxHalfY = activeTopLength / 2; // 0.5*top length (active area)
182 m_offset = -0.5*(ylFrame - ysFrame); // radial dist. of active area center w.r.t. chamber center
183 ATH_MSG_DEBUG(idHelperSvc()->toStringDetEl(identify())<<", ylFrame: "<<ylFrame<<", ysFrame: "<<ysFrame<<", offset: "<<m_offset);
184 for (int il = 0; il < m_nlayers; il++) {
185 // identifier of the first channel to retrieve max number of strips
186 Identifier id = m_idHelper.channelID(identify(), m_ml, il + 1, 1);
187 int chMax = m_idHelper.channelMax(id);
188 if (chMax < 0) {
189 THROW_EXCEPTION_MM("MMReadoutElement -- Max number of strips not a valid value" );
190 }
191 MuonChannelDesign& design = m_etaDesign[il];
192
194 design.detType = MuonChannelDesign::DetType::MM;
195 design.inputPitch = stripPitch;
196 design.thickness = gasTck;
197 design.nMissedTopEta = nMissedTopEta; // #of eta strips that are not connected to any FE board
198 design.nMissedBottomEta = nMissedBottomEta;
199 design.nMissedTopStereo = nMissedTopStereo; // #of stereo strips that are not connected to any FE board
200 design.nMissedBottomStereo = nMissedBottomStereo;
201 design.totalStrips = totalStrips;
203 design.defineTrapezoid(m_minHalfY, m_maxHalfY,m_halfX, stereoAngle[il]);
205 design.inputWidth = stripPitch * std::cos(design.stereoAngle());
206
207 if (!design.hasStereoAngle()) { // eta layers
208 design.nch = design.totalStrips - design.nMissedBottomEta - design.nMissedTopEta;
209 design.setFirstPos(-0.5 * design.xSize() + stripPitch);
210 } else { // stereo layers
211 design.nch = design.totalStrips - design.nMissedBottomStereo - design.nMissedTopStereo;
212 design.setFirstPos( -0.5 * design.xSize() + (1 + design.nMissedBottomStereo - design.nMissedBottomEta) * stripPitch);
213 }
214 ATH_MSG_DEBUG("initDesign:" <<idHelperSvc()->toStringDetEl(identify())<< " layer " << il
215 << ", strip pitch " << design.inputPitch << ", nstrips " << design.nch
216 << " stereo " << design.stereoAngle() / Gaudi::Units::degree
217 <<", "<<design.xSize()<<", "<<design.maxYSize()<<" "<<design.minYSize()
218 <<", firstPos: "<<design.firstPos()<<", first pitch: "<<design.firstPitch);
219 }
220 }
221 }
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
virtual unsigned int size() const =0
double stereoAngle(const Identifier &id) const
Wrapper to MuonChannelDesign::stereoAngle()
std::vector< int > tokenizeInt(const std::string &the_str, std::string_view delimiter)
std::vector< double > tokenizeDouble(const std::string &the_str, std::string_view delimiter)

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

◆ insideActiveBounds()

bool MuonGM::MMReadoutElement::insideActiveBounds ( const Identifier & id,
const Amg::Vector2D & locpos,
double tol1 = 0.,
double tol2 = 0. ) const
inline

boundary check Wrapper Trk::PlaneSurface::insideBounds() taking into account the passivated width

Definition at line 252 of file MMReadoutElement.h.

252 {
253 const MuonChannelDesign* design = getDesign(id);
254 if(!design) return false;
255 // Get the nearest strip number; not the time yet to check boundaries (in case of tolerance)
256 int stripNo = stripNumber(locpos, id);
257 if (stripNo < 0) stripNo = (locpos.x()<0) ? 1 : design->totalStrips;
258 Identifier channelId = m_idHelper.channelID(id, m_ml, m_idHelper.gasGap(id), stripNo);
259
260 // ** Horizontal passivation: mask entire strips
261 //==============================================
262 int pcb = (stripNo-1)/1024 + 1; // starts from 1
263 int pcbStrip = stripNo % 1024;// - 1024*(pcb - 1);
264 const PCBPassivation& pcbPassiv = manager()->getMMPassivation() ?
266 // the passivated width is constant along the PCB edge (not along y for stereo strips)
267 bool topPcb{pcb == 5 || (std::abs(getStationEta()) == 2 && pcb == 3)};
268 int pcbStripMin = 1 + (int)std::floor((design->passivatedHeight(pcbPassiv.bottom, pcb ==1) + 0.5*design->inputPitch - tol1)/design->inputPitch); // first pcb strip surviving passivation
269 int pcbStripMax = 1024 - (int)std::floor((design->passivatedHeight(pcbPassiv.top, topPcb) + 0.5*design->inputPitch - tol1)/design->inputPitch); // last pcb strip surviving passivation
270 if(pcbStrip < pcbStripMin || pcbStrip > pcbStripMax) return false;
271
272 // ** Vertical passivation: cut strips from left and right
273 //=======================================
274 return bounds(id).inside(locpos, tol1, tol2 - design->passivatedLength(locpos[1]<0 ? pcbPassiv.left : pcbPassiv.right , locpos[1] < 0));
275 }
virtual int stripNumber(const Amg::Vector2D &pos, const Identifier &id) const override final
strip number corresponding to local position.
static constexpr PCBPassivation s_dummy_passiv
NswPassivationDbData::PCBPassivation PCBPassivation
const PCBPassivation & getPassivation(const Identifier &id) const
virtual bool inside(const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const =0
Each Bounds has a method inside, which checks if a LocalPosition is inside the bounds.

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

int MuonGM::MMReadoutElement::layerHash ( const Identifier & id) const
inlinefinaloverridevirtual

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

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 182 of file MMReadoutElement.h.

182{ return layerHash(m_idHelper.gasGap(id)); }

◆ layerHash() [2/2]

int MuonGM::MMReadoutElement::layerHash ( int gasGap) const
inline

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

Definition at line 184 of file MMReadoutElement.h.

184{ return gasGap - 1; }

◆ localToGlobalCoords()

Amg::Vector3D MuonGM::MMReadoutElement::localToGlobalCoords ( const Amg::Vector3D & locPos,
const Identifier & id ) const

simHit local (SD) To Global position - to be used by MuonGeoAdaprors only

Definition at line 355 of file MMReadoutElement.cxx.

355 {
356 int gg = m_idHelper.gasGap(id);
357 //const MuonChannelDesign* design = getDesign(id);
358 Amg::Vector3D locPos_ML = (m_Xlg[gg - 1]) * Amg::getTranslateZ3D(m_offset) *
359 // (design->hasStereoAngle() ?
360 // Amg::AngleAxis3D(90. * CLHEP::deg, Amg::Vector3D::UnitY()) * Amg::AngleAxis3D(design->stereoAngle(), Amg::Vector3D::UnitZ()) *
361 // Amg::AngleAxis3D(-90. * CLHEP::deg, Amg::Vector3D::UnitY()) : AmgSymMatrix(3)::Identity())*
362 locPos;
363
364 ATH_MSG_DEBUG("position coordinates in the gas-gap r.f.: " << Amg::toString(locPos) );
365 ATH_MSG_DEBUG("position coordinates in the multilayer r.f.: " << Amg::toString(locPos_ML) );
366 return absTransform() * m_delta * locPos_ML;
367 }
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D

◆ manager()

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

◆ measuresPhi()

bool MuonGM::MMReadoutElement::measuresPhi ( const Identifier & id) const
inlinefinaloverridevirtual

returns whether the current identifier corresponds to a phi measurement

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 188 of file MMReadoutElement.h.

188{ return false; }

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

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

◆ numberOfLayers()

int MuonGM::MMReadoutElement::numberOfLayers ( bool ) const
inlineoverridevirtual

number of layers in phi/eta projection

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 284 of file MMReadoutElement.h.

284{ return m_nlayers; }

◆ numberOfMissingBottomStrips()

int MuonGM::MMReadoutElement::numberOfMissingBottomStrips ( const Identifier & layerId) const
inline

Definition at line 301 of file MMReadoutElement.h.

301 {
302 const MuonChannelDesign* design = getDesign(id);
303 if (!design) return -1;
304 return design->numberOfMissingBottomStrips();
305 }

◆ numberOfMissingTopStrips()

int MuonGM::MMReadoutElement::numberOfMissingTopStrips ( const Identifier & layerId) const
inline

Number of missing bottom and top strips (not read out)

Definition at line 295 of file MMReadoutElement.h.

295 {
296 const MuonChannelDesign* design = getDesign(id);
297 if (!design) return -1;
298 return design->numberOfMissingTopStrips();
299 }

◆ numberOfStrips() [1/2]

int MuonGM::MMReadoutElement::numberOfStrips ( const Identifier & layerId) const
inlinefinaloverridevirtual

number of strips per layer

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 286 of file MMReadoutElement.h.

286{ return m_etaDesign[layerHash(layerId)].totalStrips; }

◆ numberOfStrips() [2/2]

int MuonGM::MMReadoutElement::numberOfStrips ( int lay,
bool measuresPhi ) const
inlinefinaloverridevirtual

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 288 of file MMReadoutElement.h.

288 {
289 if (lay > -1 && lay < static_cast<int>(m_etaDesign.size()))
290 return m_etaDesign[lay].totalStrips;
291 else
292 return -1;
293 }

◆ 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 }
Amg::Transform3D getTransform() const

◆ posOnDefChamber()

void MuonGM::MMReadoutElement::posOnDefChamber ( Amg::Vector3D & locPosML) const

transform a position (in chamber-frame coordinates) to the deformed-chamber geometry

Definition at line 402 of file MMReadoutElement.cxx.

402 {
403
404 // note: amdb frame (s, z, t) = chamber frame (y, z, x)
405 if (!has_BLines()) return;
406
407 double t0 = locPosML.x();
408 double s0 = locPosML.y();
409 double z0 = locPosML.z();
410 double width = getSsize() + (getLongSsize() - getSsize())*(z0/getRsize() + 0.5); // because z0 is in [-length/2, length/2]
411
412 double s_rel = s0/(width/2.); // in [-1, 1]
413 double z_rel = z0/(getRsize()/2.); // in [-1, 1]
414 double t_rel = t0/(getZsize()/2.); // in [-1, 1]
415
416 // b-line parameters
417 using Parameter = BLinePar::Parameter;
418 double bp = m_BLinePar->getParameter(Parameter::bp);
419 double bn = m_BLinePar->getParameter(Parameter::bn);
420 double sp = m_BLinePar->getParameter(Parameter::sp);
421 double sn = m_BLinePar->getParameter(Parameter::sn);
422 double tw = m_BLinePar->getParameter(Parameter::tw);
423 double eg = m_BLinePar->getParameter(Parameter::eg)*1.e-3;
424 double ep = m_BLinePar->getParameter(Parameter::ep)*1.e-3;
425 double en = m_BLinePar->getParameter(Parameter::en)*1.e-3;
426
427 double ds{0.}, dz{0.}, dt{0.};
428
429 if (bp != 0 || bn != 0)
430 dt += 0.5*(s_rel*s_rel - 1)*((bp + bn) + (bp - bn)*z_rel);
431
432 if (sp != 0 || sn != 0)
433 dt += 0.5*(z_rel*z_rel - 1)*((sp + sn) + (sp - sn)*s_rel);
434
435 if (tw != 0) {
436 dt -= tw*s_rel*z_rel;
437 dz += tw*s_rel*t_rel*getZsize()/getRsize();
438 }
439
440 if (eg != 0) {
441 dt += t0*eg;
442 ds += s0*eg;
443 dz += z0*eg;
444 }
445
446 if (ep != 0 || en != 0) {
447 // the formulas below differ from those in Christoph's talk
448 // because are origin for NSW is at the center of the chamber,
449 // whereas in the talk (i.e. MDTs), it is at the bottom!
450 double delta = s_rel*s_rel * ((ep + en)*s_rel/6 + (ep - en)/4);
451 double phi = s_rel * ((ep + en)*s_rel + (ep - en)) / 2;
452 dt += phi*t0;
453 ds += delta*width/2;
454 dz += phi*z0;
455 }
456
457 locPosML[0] += dt;
458 locPosML[1] += ds;
459 locPosML[2] += dz;
460 }
Scalar phi() const
phi method
static Double_t sp
static Double_t s0
static Double_t t0
const double width

◆ 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

◆ setBLinePar()

void MuonGM::MMReadoutElement::setBLinePar ( const BLinePar & bLine)

read B-line (chamber-deformation) parameters

Definition at line 397 of file MMReadoutElement.cxx.

397 {
398 ATH_MSG_VERBOSE("Setting B-line for " << idHelperSvc()->toStringDetEl(identify())<<" "<<bLine);
399 m_BLinePar = &bLine;
400 }

◆ setChamberLayer()

void MuonGM::MMReadoutElement::setChamberLayer ( int ml)
inline

set methods only to be used by MuonGeoModel

Definition at line 120 of file MMReadoutElement.h.

120{ m_ml = ml; }

◆ setDelta()

void MuonGM::MMReadoutElement::setDelta ( const ALinePar & aline)

Definition at line 371 of file MMReadoutElement.cxx.

371 {
372 // amdb frame (s, z, t) = chamber frame (y, z, x)
373 if (aline) {
374 const Amg::Transform3D permute{GeoTrf::GeoRotation{90.*Gaudi::Units::deg,90.*Gaudi::Units::deg, 0.}};
375 // The origin of the rotation axes is at the center of the active area
376 // in the z (radial) direction. Account for this shift in the definition
377 // of m_delta so that it can be applied on chamber frame coordinates.
378 m_ALinePar = &aline;
379 m_delta = Amg::getTranslateZ3D(m_offset)* permute*aline.delta()*
380 permute.inverse()*Amg::getTranslateZ3D(-m_offset);
381 ATH_MSG_DEBUG(idHelperSvc()->toStringDetEl(identify())<<" setup new alignment: "<<GeoTrf::toString(m_delta,true));
382 refreshCache();
383 } else {
385 }
386 }
Amg::Transform3D delta() const
Returns the final transformations of the A lines.
Definition ALinePar.cxx:35
Eigen::Affine3d Transform3D

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

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

bool MuonGM::MMReadoutElement::spacePointPosition ( const Identifier & layerId,
const Amg::Vector2D & localPos,
Amg::Vector3D & pos ) const

Method calculating the global position of the hit on surface taking the as-built corrections into account.

The local position is expressed in the reference frame of each individual layer

Definition at line 464 of file MMReadoutElement.cxx.

464 {
465
466 pos = Amg::Vector3D(lpos.x(), lpos.y(), 0.);
467
468 const MuonChannelDesign* design = getDesign(layerId);
469 if (!design) {
470 ATH_MSG_WARNING("Unable to get MuonChannelDesign, therefore cannot provide position corrections. Returning." );
471 return false;
472 }
473
474 bool conditionsApplied{false};
475 Amg::Transform3D trfToML{Amg::Transform3D::Identity()};
476
477#ifndef SIMULATIONBASE
478 //*********************
479 // As-Built (MuonNswAsBuilt is not included in AthSimulation)
480 //*********************
481 const NswAsBuilt::StripCalculator* sc = manager()->getMMAsBuiltCalculator();
482 if (sc) {
483
484 // express the local position w.r.t. the nearest active strip
485 Amg::Vector2D rel_pos;
486 int istrip = design->positionRelativeToStrip(lpos, rel_pos);
487 if (istrip < 0) {
488 ATH_MSG_WARNING("As-built corrections are provided only within the active area. Returning." );
489 return false;
490 }
491
492 // setup strip calculator
493 NswAsBuilt::stripIdentifier_t strip_id;
495 strip_id.ilayer = m_idHelper.gasGap(layerId);
496 strip_id.istrip = istrip;
497
498 // get the position coordinates, in the chamber frame, from NswAsBuilt.
499 // Applying a 2.75mm correction along the layer normal, since NswAsBuilt considers the layer
500 // on the readout strips, whereas Athena wants it at the middle of the drift gap.
501 NswAsBuilt::StripCalculator::position_t calcPos = sc->getPositionAlongStrip(NswAsBuilt::Element::ParameterClass::CORRECTION, strip_id, rel_pos.y(), rel_pos.x());
502
504 pos = calcPos.pos;
505 pos[0] += strip_id.ilayer%2 ? -2.75 : 2.75;
506
507 // signal that pos is now in the chamber reference frame
508 // (don't go back to the layer frame yet, since we may apply b-lines later on)
509 trfToML = m_delta.inverse()*absTransform().inverse()*transform(layerId);
510 conditionsApplied = true;
511 } else {
512 ATH_MSG_DEBUG( "No as-built corrections provided for "<<idHelperSvc()->toStringDetEl(identify())<<" layer: "<<strip_id.ilayer);
513 }
514 }
515#endif
516
517 //*********************
518 // B-Lines
519 //*********************
520 if (has_BLines()) {
521 // go to the multilayer reference frame if we are not already there
522 if (!conditionsApplied) {
523 trfToML = m_delta.inverse()*absTransform().inverse()*transform(layerId);
524 pos = trfToML*pos;
525
526 // signal that pos is now in the multilayer reference frame
527 conditionsApplied = true;
528 }
529 posOnDefChamber(pos);
530 }
531
532 // back to the layer reference frame from where we started
533 if (conditionsApplied) pos = trfToML.inverse()*pos;
534
535 return true;
536 }
static Double_t sc
void posOnDefChamber(Amg::Vector3D &locPosML) const
transform a position (in chamber-frame coordinates) to the deformed-chamber geometry
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Eigen::Matrix< double, 2, 1 > Vector2D

◆ spacePointPosition() [2/3]

bool MuonGM::MMReadoutElement::spacePointPosition ( const Identifier & phiId,
const Identifier & etaId,
Amg::Vector2D & pos ) const
inlinefinaloverridevirtual

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.

Definition at line 307 of file MMReadoutElement.h.

307 {
308 if (!stripPosition(etaId, pos)) return false;
309 const MuonChannelDesign* phi_design = getDesign(phiId);
310 const MuonChannelDesign* eta_design = getDesign(etaId);
311 if (!phi_design || !eta_design) return false;
312 pos = phi_design->rotation() * eta_design->rotation().inverse()*pos;
313 return true;
314 }
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const override final
strip position – local or global If the strip number is outside the range of valid strips,...

◆ spacePointPosition() [3/3]

bool MuonGM::MMReadoutElement::spacePointPosition ( const Identifier & phiId,
const Identifier & etaId,
Amg::Vector3D & pos ) const
inlinefinaloverridevirtual

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 316 of file MMReadoutElement.h.

316 {
317 Amg::Vector2D lpos{Amg::Vector2D::Zero()};
318 spacePointPosition(phiId, etaId, lpos);
319 surface(phiId).localToGlobal(lpos, pos, pos);
320 return true;
321 }
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 th...
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.

◆ stereoAngle()

double MuonGM::MMReadoutElement::stereoAngle ( const Identifier & id) const
inline

Wrapper to MuonChannelDesign::stereoAngle()

Definition at line 212 of file MMReadoutElement.h.

212 {
213 const MuonChannelDesign* design = getDesign(id);
214 if (!design) return 0;
215 return design->stereoAngle();
216 }

◆ stripActiveLength()

double MuonGM::MMReadoutElement::stripActiveLength ( const Identifier & id) const
inline

Definition at line 224 of file MMReadoutElement.h.

224 {
226 }
double stripActiveLengthRight(const Identifier &id) const
double stripActiveLengthLeft(const Identifier &id) const

◆ stripActiveLengthLeft()

double MuonGM::MMReadoutElement::stripActiveLengthLeft ( const Identifier & id) const
inline

Definition at line 228 of file MMReadoutElement.h.

228 {
229 const MuonChannelDesign* design = getDesign(id);
230 if (!design) return -1;
231
232 const PCBPassivation& passiv = manager()->getMMPassivation() ?
234
235 double l = design->channelHalfLength(m_idHelper.channel(id), true);
236 if (l < 0) return -1;
237 return std::max(0., l - design->passivatedLength(passiv.left, true));
238 }
l
Printing final latex table to .tex output file.

◆ stripActiveLengthRight()

double MuonGM::MMReadoutElement::stripActiveLengthRight ( const Identifier & id) const
inline

Definition at line 240 of file MMReadoutElement.h.

240 {
241 const MuonChannelDesign* design = getDesign(id);
242 if (!design) return -1;
243
244 const PCBPassivation& passiv = manager()->getMMPassivation() ?
246
247 double l = design->channelHalfLength(m_idHelper.channel(id), false);
248 if (l < 0) return -1;
249 return std::max(0., l - design->passivatedLength(passiv.right, false));
250 }

◆ stripGlobalPosition()

bool MuonGM::MMReadoutElement::stripGlobalPosition ( const Identifier & id,
Amg::Vector3D & gpos ) const
inline

Definition at line 277 of file MMReadoutElement.h.

277 {
278 Amg::Vector2D lpos{Amg::Vector2D::Zero()};
279 if (!stripPosition(id, lpos)) return false;
280 surface(id).localToGlobal(lpos, Amg::Vector3D::Zero(), gpos);
281 return true;
282 }

◆ stripLength()

double MuonGM::MMReadoutElement::stripLength ( const Identifier & id) const
inline

strip length Wrappers to MuonChannelDesign::channelLength() taking into account the passivated width

Definition at line 218 of file MMReadoutElement.h.

218 {
219 const MuonChannelDesign* design = getDesign(id);
220 if (!design) return -1;
221 return design->channelLength(m_idHelper.channel(id));
222 }

◆ stripNumber()

int MuonGM::MMReadoutElement::stripNumber ( const Amg::Vector2D & pos,
const Identifier & id ) const
inlinefinaloverridevirtual

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 199 of file MMReadoutElement.h.

199 {
200 // returns the position of the strip at pos, assuming the nominal geometry (no as-built conditions)
201 const MuonChannelDesign* design = getDesign(id);
202 if (!design) return -1;
203 return design->channelNumber(pos);
204 }

◆ stripPosition()

bool MuonGM::MMReadoutElement::stripPosition ( const Identifier & id,
Amg::Vector2D & pos ) const
inlinefinaloverridevirtual

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

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 206 of file MMReadoutElement.h.

206 {
207 const MuonChannelDesign* design = getDesign(id);
208 if (!design) return false;
209 return design->center(m_idHelper.channel(id), pos);
210 }

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

int MuonGM::MMReadoutElement::surfaceHash ( const Identifier & id) const
inlinefinaloverridevirtual

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

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 178 of file MMReadoutElement.h.

178{ return surfaceHash(m_idHelper.gasGap(id), 0); }
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...

◆ surfaceHash() [2/2]

int MuonGM::MMReadoutElement::surfaceHash ( int gasGap,
int measPhi ) const
inline

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

Definition at line 180 of file MMReadoutElement.h.

180{ return gasGap - 1; } // measPhi not used

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

◆ MuonGMR4::ReadoutGeomCnvAlg

friend class MuonGMR4::ReadoutGeomCnvAlg
friend

Definition at line 27 of file MMReadoutElement.h.

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_ALinePar

const ALinePar* MuonGM::MMReadoutElement::m_ALinePar {nullptr}
private

Definition at line 171 of file MMReadoutElement.h.

171{nullptr};

◆ m_BLinePar

const BLinePar* MuonGM::MMReadoutElement::m_BLinePar {nullptr}
private

Definition at line 172 of file MMReadoutElement.h.

172{nullptr};

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

Amg::Transform3D MuonGM::MMReadoutElement::m_delta {Amg::Transform3D::Identity()}
private

Definition at line 170 of file MMReadoutElement.h.

170{Amg::Transform3D::Identity()};

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

std::array<MuonChannelDesign, 4> MuonGM::MMReadoutElement::m_etaDesign {}
private

Definition at line 157 of file MMReadoutElement.h.

157{};

◆ m_halfX

double MuonGM::MMReadoutElement::m_halfX {100.}
private

Definition at line 165 of file MMReadoutElement.h.

165{100.}; // 0.5*radial_size (active area)

◆ 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 MmIdHelper& MuonGM::MMReadoutElement::m_idHelper {idHelperSvc()->mmIdHelper()}
private

Definition at line 152 of file MMReadoutElement.h.

virtual const MmIdHelper & mmIdHelper() const =0
access to CscIdHelper

◆ 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_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_maxHalfY

double MuonGM::MMReadoutElement::m_maxHalfY {2000.}
private

Definition at line 167 of file MMReadoutElement.h.

167{2000.}; // 0.5*top length (active area)

◆ m_minHalfY

double MuonGM::MMReadoutElement::m_minHalfY {1900.}
private

Definition at line 166 of file MMReadoutElement.h.

166{1900.}; // 0.5*bottom length (active area)

◆ m_ml

int MuonGM::MMReadoutElement::m_ml {0}
private

Definition at line 162 of file MMReadoutElement.h.

162{0}; // multilayer (values: 1,2)

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

int MuonGM::MMReadoutElement::m_nlayers {0}
private

Definition at line 159 of file MMReadoutElement.h.

159{0}; // #of gas gaps

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_offset

double MuonGM::MMReadoutElement::m_offset {0.}
private

Definition at line 168 of file MMReadoutElement.h.

168{0.}; // radial dist. of active area center w.r.t. chamber center

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

std::array<int, 4> MuonGM::MMReadoutElement::m_readoutSide {}
private

Definition at line 173 of file MMReadoutElement.h.

173{};

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

std::array<Amg::Transform3D, 4> MuonGM::MMReadoutElement::m_Xlg {make_array<Amg::Transform3D,4>(Amg::Transform3D::Identity())}
private

Definition at line 175 of file MMReadoutElement.h.

175{make_array<Amg::Transform3D,4>(Amg::Transform3D::Identity())};
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_Zsize

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

◆ s_dummy_passiv

PCBPassivation MuonGM::MMReadoutElement::s_dummy_passiv {}
staticconstexprprivate

Definition at line 155 of file MMReadoutElement.h.

155{};

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