ATLAS Offline Software
Loading...
Searching...
No Matches
MuonGM::CscReadoutElement Class Reference

#include <CscReadoutElement.h>

Inheritance diagram for MuonGM::CscReadoutElement:
Collaboration diagram for MuonGM::CscReadoutElement:

Public Member Functions

 CscReadoutElement (GeoVFullPhysVol *pv, const std::string &stName, MuonDetectorManager *mgr)
virtual ~CscReadoutElement ()
virtual double distanceToReadout (const Amg::Vector2D &pos, const Identifier &id) const override final
 distance to readout.
virtual int stripNumber (const Amg::Vector2D &pos, const Identifier &id) const override final
 strip number corresponding to local position.
virtual bool stripPosition (const Identifier &id, Amg::Vector2D &pos) const override final
 strip position If the strip number is outside the range of valid strips, the function will return false
virtual int layerHash (const Identifier &id) const override final
 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 final
 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 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 given identifier measures phi or not
virtual int numberOfLayers (bool) const override final
 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 layer, bool) const override final
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.
void spacePointPosition (const Amg::Vector2D &phiPos, const Amg::Vector2D &etaPos, Amg::Vector2D &pos) const
 space point position for a pair of phi and eta local positions and a layer identifier The LocalPosition is expressed in the reference frame of the phi projection.
int ChamberLayer () const
void setChamberLayer (int cl)
int Ngasgaps () const
int NphiStripLayers () const
int NetaStripLayers () const
int NphiStrips (int gasgaplayer) const
int NetaStrips (int gasgaplayer) const
double StripWidth (int chlayer, int measphi) const
double StripPitch (int chlayer, int measphi) const
double cathodeReadoutPitch (int chLayer, int measuresPhi) const
double StripWidth (int measphi) const
double StripPitch (int measphi) const
double cathodeReadoutPitch (int measuresPhi) const
double shortWidth () const
double length () const
double longWidth () const
int maxNumberOfStrips (int measuresPhi) const
int maxNumberOfStrips (int measuresPhi, double width) const
double activeWidth (int measuresPhi) const
double z0 () const
double roxacellWidth () const
double lengthUpToMaxWidth () const
double excent () const
Amg::Vector3D stripLayerPos (const Identifier &id) const
Amg::Vector3D stripLayerPos (const IdentifierHash &id) const
Amg::Vector3D stripLayerPos (int chamberLayer, int wireLayer, int measPhi, int channel) const
Amg::Vector3D localStripLayerPos (const Identifier &id) const
Amg::Vector3D localStripLayerPos (const IdentifierHash &id) const
Amg::Vector3D localStripLayerPos (int chamberLayer, int wireLayer, int measPhi, int channel) const
Amg::Vector3D localWireLayerPos (const Identifier &id) const
Amg::Vector3D localWireLayerPos (int gg) const
Amg::Vector3D wireLayerPos (const Identifier &id) const
Amg::Vector3D wireLayerPos (int gg) const
Amg::Vector3D nominalStripPos (const Identifier &id) const
 ignores internal alignment parameters, hence gives generally incorrect answer
Amg::Vector3D nominalStripPos (int eta, int chamberLayer, int wireLayer, int measPhi, int channel) const
 ignores internal alignment parameters, hence gives generally incorrect answer
Amg::Vector3D stripPos (const Identifier &id) const
 takes into account internal alignment parameters, hence gives accurate answer
Amg::Vector3D stripPos (int eta, int chamberLayer, int wireLayer, int measPhi, int channel) const
 takes into account internal alignment parameters, hence gives accurate answer
Amg::Vector3D nominalGlobalPos (const Amg::Vector3D &localP) const
 ignores internal alignment parameters, hence gives generally incorrect answer
Amg::Vector3D globalPos (const Amg::Vector3D &localP) const
 station-level method: does not depend on the strip view/layer, hence it cannot account for internal alignment parameters
Amg::Vector3D localPos (const Amg::Vector3D &globalP) const
 station-level method: does not depend on the strip view/layer, hence it cannot account for internal alignment parameters
Amg::Vector3D nominalLocalStripPos (const Identifier &id) const
 ignores internal alignment parameters, hence gives generally incorrect answer (local here is the station frame, coherent with the gas gas frames)
Amg::Vector3D nominalLocalStripPos (int eta, int chamberLayer, int wireLayer, int measPhi, int channel) const
 ignores internal alignment parameters, hence gives generally incorrect answer (local here is the station frame, coherent with the gas gas frames)
Amg::Vector3D nominalLocalClusterPos (int eta, int wireLayer, int measPhi, double x0) const
 ignores internal alignment parameters, hence gives generally incorrect answer (local here is the station frame, coherent with the gas gas frames)
Amg::Vector3D localStripPos (const Identifier &id) const
 takes into account internal alignment parameters, hence gives generally accurate answer (local here is the station frame, coherent with the gas gas frames) - digitization should use this method to emulate internal alignment parameters
Amg::Vector3D localStripPos (int eta, int chamberLayer, int wireLayer, int measPhi, int channel) const
 takes into account internal alignment parameters, hence gives generally accurate answer (local here is the station frame, coherent with the gas gas frames) - digitization should use this method to emulate internal alignment parameters
Amg::Vector3D localClusterPos (int eta, int wireLayer, int measPhi, double x0) const
 takes into account internal alignment parameters, hence gives generally answer (local here is the station frame, coherent with the gas gas frames)
Amg::Vector3D stripPosOnTrackingSurface (const Identifier &id) const
 nominal strip pos in the tracking local frame of the measurement surface
Amg::Vector3D stripPosOnTrackingSurface (int eta, int chamberLayer, int wireLayer, int measPhi, int channel) const
 nominal strip pos in the tracking local frame of the measurement surface
Amg::Transform3D nominalTransform (const Identifier &id) const
 like tracking Transform but nominal - returns a transform not a reference to it
Amg::Transform3D nominalTransform (int gasGap, int measPhi) const
 like tracking Transform but nominal - returns a transform not a reference to it
Amg::Vector3D nominalCenter (int gasGap) const
 like tracking center but nominal - returns a Amg::Vector3D not a reference to it
Amg::Vector3D originForInternalALines (int gasGap) const
 like tracking center but nominal - returns a Amg::Vector3D not a reference to it
double stripLength (int chamberLayer, int measuresPhi, int stripNumber, double &epsilon) const
double stripLength (const Identifier &id) const
double lengthCorrection (int measuresPhi, double stripPos) const
double anodeCathodeDistance () const
Amg::Vector3D localToGlobalCoords (const Amg::Vector3D &x, const Identifier &id) const
 localToGlobalCoords and Transf connect the Gas Gap Frame (defined as a Sensitive Detector) to the Global Frame; Notice that internal CSC alignment affects the strip plane orientation and position in the CSC station frame, but does not impact on the gas gap geometry within the station; therefore the following methods do not depen on internal alignment parameters.
Amg::Transform3D localToGlobalTransf (const Identifier &id) const
Amg::Transform3D localToGlobalTransf (int gasGap) const
Amg::Vector3D globalToLocalCoords (const Amg::Vector3D &x, const Identifier &id) const
Amg::Transform3D globalToLocalTransf (const Identifier &id) const
void set_ngasgaps (int)
void set_nstriplayers (int)
void set_nwirelayers (int)
void set_nstripsperlayer (int)
void set_nwiresperlayer (int)
void set_stripwidth (double)
void set_strippitch (double)
void set_wirepitch (double)
void set_first_strip_localcoo (double)
void set_first_wire_localcoo (double)
void setCscInternalAlignmentPar (const ALinePar &)
double getGasGapIntAlign_s (int gasGap) const
double getGasGapIntAlign_z (int gasGap) const
double getGasGapIntAlign_t (int gasGap) const
double getGasGapIntAlign_rots (int gasGap) const
double getGasGapIntAlign_rotz (int gasGap) const
double getGasGapIntAlign_rott (int gasGap) const
virtual bool containsId (const Identifier &id) const override
double sinStereo (const Identifier &stripId) const
virtual void fillCache () override
double xCoordinateInTrackingFrame (const Identifier &id) const
virtual void clearCache () override final
 clear the cache of the readout elememt
virtual const Trk::PlaneSurfacesurface () const override
 access to chamber surface (phi orientation), uses the first gas gap
virtual const Trk::PlaneSurfacesurface (const Identifier &id) const override
 access to layer surfaces
const Trk::PlaneSurfacesurface (int surfHash) const
 access to layer surfaces
virtual const Trk::SurfaceBoundsbounds () const override
 Return the boundaries of the element.
virtual const Trk::SurfaceBoundsbounds (const Identifier &id) const override
 Return the boundaries of the surface associated with this identifier.
const Trk::SurfaceBoundsbounds (int boundHash) const
virtual const Amg::Vector3Dcenter () const override
 Return the center of the element.
virtual const Amg::Vector3Dcenter (const Identifier &id) const override
 Return the center of the surface associated with this identifier In the case of silicon it returns the same as center()
const Amg::Vector3Dcenter (int layHash) const
virtual const Amg::Vector3Dnormal () const override
 Return the normal of the element.
virtual const Amg::Vector3Dnormal (const Identifier &id) const override
 Return the normal of the surface associated with this identifier In the case of silicon it returns the same as normal()
const Amg::Vector3Dnormal (int layHash) const
virtual const Amg::Transform3Dtransform () const override
 Return local to global transform.
virtual const Amg::Transform3Dtransform (const Identifier &id) const override
 Return local to global transform associated with this identifier.
const Amg::Transform3Dtransform (int surfHash) const
virtual std::vector< const Trk::Surface * > surfaces () const
 returns all the surfaces contained in this detector element
Identifier identify () const override final
 Returns the ATLAS Identifier of the MuonReadOutElement.
IdentifierHash identifyHash () const override final
 Returns the IdentifierHash of the MuonStation, i.e.
IdentifierHash detectorElementHash () const
 Returns the IdentifierHash of the detector element.
void setIdentifier (const Identifier &id)
 Sets the Identifier, hashes & station names.
int getStationIndex () const
int getStationEta () const
int getStationPhi () const
const Amg::Vector3D globalPosition () const
const Amg::Transform3DabsTransform () const
const Amg::Transform3DdefTransform () const
virtual Amg::Vector3D AmdbLRSToGlobalCoords (const Amg::Vector3D &x) const
virtual Amg::Transform3D AmdbLRSToGlobalTransform () const
virtual Amg::Vector3D GlobalToAmdbLRSCoords (const Amg::Vector3D &x) const
virtual Amg::Transform3D GlobalToAmdbLRSTransform () const
std::string getTechnologyType () const
const std::string & getTechnologyName () const
void setTechnologyName (const std::string &str)
std::string getStationType () const
const std::string & getStationName () const
void setStationName (const std::string &)
double getSsize () const
double getRsize () const
double getZsize () const
double getLongSsize () const
double getLongRsize () const
double getLongZsize () const
double getStationS () const
 Seems to be exclusively used by the MDTs --> Move it to MdtReadoutElement.
void setStationS (double)
void setLongSsize (double)
void setLongRsize (double)
void setLongZsize (double)
void setSsize (double)
void setRsize (double)
void setZsize (double)
bool largeSector () const
bool smallSector () const
bool sideA () const
bool sideC () const
const MuonStationparentMuonStation () const
void setParentMuonStation (const MuonStation *)
Amg::Transform3D toParentStation () const
Amg::Vector3D parentMuonStationPos () const
bool hasCutouts () const
void setHasCutouts (bool flag)
void refreshCache ()
const Muon::IMuonIdHelperSvcidHelperSvc () const
Trk::DetectorElemType detectorType () const override final
 Return the Detector element type.
std::string detectorTypeString () const
 Returns a string of the Detector element type.
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Protected Member Functions

const MuonDetectorManagermanager () const

Protected Attributes

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

Private Member Functions

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

Private Attributes

double m_excent {-9999.}
double m_roxacellwidth {-9999.}
double m_RlengthUpToMaxWidth {-9999.}
double m_anodecathode_distance {-9999.}
int m_chamberlayer {-1}
int m_ngasgaps {-1}
int m_nstriplayers {-1}
int m_nwirelayers {-1}
int m_nPhistripsperlayer {-1}
int m_nEtastripsperlayer {-1}
int m_nwiresperlayer {-1}
double m_Phistripwidth {-9999.}
double m_Phistrippitch {-9999.}
double m_Etastripwidth {-9999.}
double m_Etastrippitch {-9999.}
double m_wirepitch {-9999.}
double m_first_strip_localcoo {-9999.}
double m_first_wire_localcoo {-9999.}
std::array< double, maxwlaym_wireplanez {make_array<double, maxwlay>(-9999.)}
double m_cscIntTransl [4][3] {}
double m_cscIntRot [4][3] {}
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)

Friends

class Muon::CscAlignModule
class Muon::CombinedMuonAlignModule
class MuonChamber
class MuonChamberLite

Detailed Description

Definition at line 56 of file CscReadoutElement.h.

Constructor & Destructor Documentation

◆ CscReadoutElement()

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

Definition at line 39 of file CscReadoutElement.cxx.

39 :
41 // Set a few parameters here. The rest are set in MuonChamber::setCscReadoutGeometry
42
43
44 // st name
45 setStationName(stName);
46 for (unsigned int i = 0; i < 4; i++) m_wireplanez[i] = 0.;
47
48 if (mgr->MinimalGeoFlag() == 0) {
49 if (GeoFullPhysVol* pvc = dynamic_cast<GeoFullPhysVol*>(pv)) {
50 unsigned int nchildvol = pvc->getNChildVols();
51 int lgg = 0;
52 std::string::size_type npos;
53 for (unsigned ich = 0; ich < nchildvol; ich++) {
54 PVConstLink pc = pvc->getChildVol(ich);
55 std::string childname = (pc->getLogVol())->getName();
56 int nch1 = pc->getNChildVols();
57 lgg = 3;
58 for (int ngv = 0; ngv < nch1; ngv++) {
59 PVConstLink pcgv = pc->getChildVol(ngv);
60 std::string childname1 = (pcgv->getLogVol())->getName();
61
62 if ((npos = childname1.find("CscArCO2")) != std::string::npos) {
63 const GeoTrf::Vector3D trans = (pvc->getXToChildVol(ich) * pc->getXToChildVol(ngv)).translation();
64 m_wireplanez[lgg] = trans.x();
65 lgg--;
66 }
67 }
68 }
69 } else {
70 std::stringstream error_str{};
71 error_str<<__FILE__<<":"<<__LINE__<<" - Cannot performa dynamic cast!";
72 throw std::runtime_error(error_str.str());
73 }
74 } else {
75 // hard wire for the moment
76 double pitch = 25.69;
77 m_wireplanez[0] = -38.51;
78 for (int i = 1; i < 4; ++i) { m_wireplanez[i] = m_wireplanez[i - 1] + pitch; }
79 }
80
81 for (unsigned int i = 0; i < 4; ++i) {
82 for (unsigned int j = 0; j < 3; ++j) {
83 m_cscIntTransl[i][j] = 0.; // first index is wireLayer, second = 0,1,2 for s,z,t
84 }
85 }
86 for (unsigned int i = 0; i < 4; ++i) {
87 for (unsigned int j = 0; j < 3; ++j) {
88 m_cscIntRot[i][j] = 0.; // first index is wireLayer, second = 0,1,2 for rots,z,t
89 }
90 }
91
92 // doTests();
93 }
std::array< double, maxwlay > m_wireplanez
MuonClusterReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)

◆ ~CscReadoutElement()

MuonGM::CscReadoutElement::~CscReadoutElement ( )
virtual

Definition at line 95 of file CscReadoutElement.cxx.

95{ clearCache(); }
virtual void clearCache() override final
clear the cache of the readout elememt

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

◆ activeWidth()

double MuonGM::CscReadoutElement::activeWidth ( int measuresPhi) const

Definition at line 169 of file CscReadoutElement.cxx.

169 {
170 double midWidth = 0;
171 // we need to know the geometry version
172 // if P or earlier, we have pointing phi strips
173 // if Q or later, we have parallel phi strips
174 // R-strips are alwas parallel in all the geometry layouts
175
176 if (0 == measuresPhi) {
177 midWidth = length() - 2. * roxacellWidth();
178 } else {
179 double beta = std::atan((longWidth() - shortWidth()) / (2. * lengthUpToMaxWidth()));
180 double lWidth = longWidth() - 2 * roxacellWidth() * (1 + std::sin(beta)) / std::cos(beta);
181 midWidth = lWidth;
182 }
183
184 return midWidth;
185 }
virtual bool measuresPhi(const Identifier &id) const override final
returns whether the given identifier measures phi or not

◆ 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

◆ anodeCathodeDistance()

double MuonGM::CscReadoutElement::anodeCathodeDistance ( ) const
inline

Definition at line 306 of file CscReadoutElement.h.

◆ boundaryHash()

int MuonGM::CscReadoutElement::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 324 of file CscReadoutElement.h.

324{ return (measuresPhi(id) ? 0 : 1); }

◆ 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

◆ cathodeReadoutPitch() [1/2]

double MuonGM::CscReadoutElement::cathodeReadoutPitch ( int chLayer,
int measuresPhi ) const

Definition at line 147 of file CscReadoutElement.cxx.

147 {
148 if (measuresPhi == 0)
149 return m_Etastrippitch;
150 else
151 return m_Phistrippitch;
152 }

◆ cathodeReadoutPitch() [2/2]

double MuonGM::CscReadoutElement::cathodeReadoutPitch ( int measuresPhi) const

Definition at line 153 of file CscReadoutElement.cxx.

153 {
154 if (measuresPhi == 0)
155 return m_Etastrippitch;
156 else
157 return m_Phistrippitch;
158 }

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

◆ ChamberLayer()

int MuonGM::CscReadoutElement::ChamberLayer ( ) const
inline

Definition at line 290 of file CscReadoutElement.h.

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

Implements MuonGM::MuonReadoutElement.

Definition at line 718 of file CscReadoutElement.cxx.

718 {
719 const CscIdHelper* idh = manager()->cscIdHelper();
720
721 int chamberLayer = idh->chamberLayer(id);
722 if (chamberLayer != ChamberLayer()) return false;
723
724 int wireLayer = idh->wireLayer(id);
725 if (wireLayer < 1 || wireLayer > Ngasgaps()) return false;
726
727 int measPhi = idh->measuresPhi(id);
728 int channel = idh->strip(id);
729 if (measPhi == 0) {
730 if (channel < 1 || channel > NetaStrips(wireLayer)) return false;
731 } else if (measPhi == 1) {
732 if (channel < 1 || channel > NphiStrips(wireLayer)) return false;
733 } else
734 return false;
735
736 return true;
737 }
int wireLayer(const Identifier &id) const
int chamberLayer(const Identifier &id) const
int strip(const Identifier &id) const
bool measuresPhi(const Identifier &id) const override
int NphiStrips(int gasgaplayer) const
int NetaStrips(int gasgaplayer) const

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

distance to readout.

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

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 739 of file CscReadoutElement.cxx.

739 {
740 MsgStream log(Athena::getMessageSvc(), "CscReadoutElement");
741 if (log.level() <= MSG::WARNING) log << MSG::WARNING << " distanceToReadout::dummy routine " << endmsg;
742 return 0.;
743 }
#define endmsg
IMessageSvc * getMessageSvc(bool quiet=false)

◆ doTests()

void MuonGM::CscReadoutElement::doTests ( )
private

Definition at line 521 of file CscReadoutElement.cxx.

521 {
522#ifndef NDEBUG
523 MsgStream log(Athena::getMessageSvc(), "CscReadoutElement");
524 if (log.level() <= MSG::VERBOSE) {
525 constexpr std::array<int, 2> eta{1, -1};
526 constexpr std::array<int, 2> maxStrips{192, 48};
527 int chamberLayer = 1;
528 int wireLayer = 4;
529 for (int measPhi = 0; measPhi < 2; ++measPhi) {
530 for (int ieta = 0; ieta < 2; ++ieta) {
531 for (int ilayer = 1; ilayer <= wireLayer; ++ilayer) {
532 int strips[3] = {1, maxStrips[measPhi] / 2, maxStrips[measPhi]};
533 for (int i = 0; i < 3; i++) {
534 int istrip = strips[i];
535 Amg::Vector3D npos = nominalLocalStripPos(eta[ieta], chamberLayer, ilayer, measPhi, istrip);
536 Amg::Vector3D pos = localStripPos(eta[ieta], chamberLayer, ilayer, measPhi, istrip);
537 log << MSG::VERBOSE << "the nominal positions = " << npos.x() << " " << npos.y() << " " << npos.z() << endmsg;
538 log << MSG::VERBOSE << "the positions = " << pos.x() << " " << pos.y() << " " << pos.z() << endmsg;
539 }
540 }
541 }
542 }
543 }
544#endif
545 }
Scalar eta() const
pseudorapidity method
Amg::Vector3D localStripPos(const Identifier &id) const
takes into account internal alignment parameters, hence gives generally accurate answer (local here i...
Amg::Vector3D nominalLocalStripPos(const Identifier &id) const
ignores internal alignment parameters, hence gives generally incorrect answer (local here is the stat...
Eigen::Matrix< double, 3, 1 > Vector3D

◆ excent()

double MuonGM::CscReadoutElement::excent ( ) const
inline

Definition at line 304 of file CscReadoutElement.h.

304{ return m_excent; }

◆ fillCache()

void MuonGM::CscReadoutElement::fillCache ( )
overridevirtual

Implements MuonGM::MuonReadoutElement.

Definition at line 659 of file CscReadoutElement.cxx.

659 {
660 if (!m_surfaceData)
661 m_surfaceData = std::make_unique<SurfaceData>();
662 else {
663 MsgStream log(Athena::getMessageSvc(), "CscReadoutElement");
664 if (log.level() <= MSG::WARNING) log << MSG::WARNING << "calling fillCache on an already filled cache" << endmsg;
665 return;
666 }
667 const CscIdHelper* idh = manager()->cscIdHelper();
668 Identifier parentID = idh->parentID(identify());
669
670 // loop over all gas gaps
671 for (int gp = 1; gp <= m_ngasgaps; ++gp) {
672 // loop over phi/eta projections
673 for (int mp = 1; mp >= 0; --mp) {
674 Identifier id = idh->channelID(parentID, ChamberLayer(), gp, mp, 1);
675
676 const Amg::Vector3D gasgapP = localWireLayerPos(gp);
677 const Amg::Translation3D xfp(gasgapP.x(), gasgapP.y(), gasgapP.z());
678 Amg::Transform3D trans3D = absTransform() * xfp;
679 Amg::RotationMatrix3D muonTRotation(trans3D.rotation());
680 Amg::RotationMatrix3D surfaceTRotation;
681 surfaceTRotation.col(0) = muonTRotation.col(1);
682 surfaceTRotation.col(1) = muonTRotation.col(2);
683 surfaceTRotation.col(2) = muonTRotation.col(0);
684 if (mp == 0) surfaceTRotation = surfaceTRotation * Amg::AngleAxis3D(M_PI / 2., Amg::Vector3D::UnitZ());
685
686 Amg::Transform3D transfPtr_orig(surfaceTRotation);
687 transfPtr_orig.pretranslate(trans3D.translation());
688 Amg::Transform3D transfPtr_internalgeo{Amg::Transform3D::Identity()};
689 if (mp == 1) {
690 transfPtr_internalgeo *=
691 Amg::Translation3D(m_cscIntTransl[gp - 1][0], m_cscIntTransl[gp - 1][1], m_cscIntTransl[gp - 1][2]);
692 transfPtr_internalgeo *= Amg::AngleAxis3D(m_cscIntRot[gp - 1][0], Amg::Vector3D::UnitX());
693 transfPtr_internalgeo *= Amg::AngleAxis3D(m_cscIntRot[gp - 1][1], Amg::Vector3D::UnitY());
694 transfPtr_internalgeo *= Amg::AngleAxis3D(m_cscIntRot[gp - 1][2], Amg::Vector3D::UnitZ());
695 } else {
696 transfPtr_internalgeo *=
697 Amg::Translation3D(m_cscIntTransl[gp - 1][1], -m_cscIntTransl[gp - 1][0], m_cscIntTransl[gp - 1][2]);
698 transfPtr_internalgeo *= Amg::AngleAxis3D(-m_cscIntRot[gp - 1][0], Amg::Vector3D::UnitY());
699 transfPtr_internalgeo *= Amg::AngleAxis3D(m_cscIntRot[gp - 1][1], Amg::Vector3D::UnitX());
700 transfPtr_internalgeo *= Amg::AngleAxis3D(m_cscIntRot[gp - 1][2], Amg::Vector3D::UnitZ());
701 }
702
703 m_surfaceData->m_layerTransforms.push_back(Amg::Transform3D(transfPtr_orig * transfPtr_internalgeo));
704 m_surfaceData->m_layerSurfaces.emplace_back(std::make_unique<Trk::PlaneSurface>(*this, id));
705 if (mp == 1) {
706 m_surfaceData->m_layerCenters.push_back(m_surfaceData->m_layerTransforms.back() * Amg::Vector3D(0., 0., 0.));
707 m_surfaceData->m_layerNormals.emplace_back(m_surfaceData->m_layerTransforms.back().linear() * Amg::Vector3D::UnitZ());
708 }
709 }
710 }
711
712 m_surfaceData->m_surfBounds.emplace_back(
713 std::make_unique<Trk::TrapezoidBounds>(m_Ssize / 2., m_LongSsize / 2., m_Rsize / 2.)); // phi measurement
714 m_surfaceData->m_surfBounds.emplace_back(
715 std::make_unique<Trk::RotatedTrapezoidBounds>(m_Rsize / 2., m_Ssize / 2., m_LongSsize / 2.)); // eta measurement
716 }
#define M_PI
Identifier parentID(const Identifier &id) const
get parent id from channel id
Identifier channelID(int stationName, int stationEta, int stationPhi, int chamberLayer, int wireLayer, int measuresPhi, int strip) const
Amg::Vector3D localWireLayerPos(const Identifier &id) const
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Eigen::AngleAxisd AngleAxis3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Affine3d Transform3D
Eigen::Translation< double, 3 > Translation3D

◆ getGasGapIntAlign_rots()

double MuonGM::CscReadoutElement::getGasGapIntAlign_rots ( int gasGap) const

Definition at line 608 of file CscReadoutElement.cxx.

◆ getGasGapIntAlign_rott()

double MuonGM::CscReadoutElement::getGasGapIntAlign_rott ( int gasGap) const

Definition at line 612 of file CscReadoutElement.cxx.

612{ return m_cscIntRot[gasGap - 1][2]; }

◆ getGasGapIntAlign_rotz()

double MuonGM::CscReadoutElement::getGasGapIntAlign_rotz ( int gasGap) const

Definition at line 610 of file CscReadoutElement.cxx.

610{ return m_cscIntRot[gasGap - 1][1]; }

◆ getGasGapIntAlign_s()

double MuonGM::CscReadoutElement::getGasGapIntAlign_s ( int gasGap) const

Definition at line 602 of file CscReadoutElement.cxx.

602{ return m_cscIntTransl[gasGap - 1][0]; }

◆ getGasGapIntAlign_t()

double MuonGM::CscReadoutElement::getGasGapIntAlign_t ( int gasGap) const

Definition at line 606 of file CscReadoutElement.cxx.

606{ return m_cscIntTransl[gasGap - 1][2]; }

◆ getGasGapIntAlign_z()

double MuonGM::CscReadoutElement::getGasGapIntAlign_z ( int gasGap) const

Definition at line 604 of file CscReadoutElement.cxx.

604{ return m_cscIntTransl[gasGap - 1][1]; }

◆ getLongRsize()

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

◆ getLongSsize()

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

◆ getLongZsize()

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

◆ getRsize()

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

◆ getSsize()

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

◆ getStationEta()

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

◆ getStationIndex()

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

◆ getStationName()

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

◆ getStationPhi()

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

◆ getStationS()

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

◆ getStationType()

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

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

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

◆ getTechnologyName()

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

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

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

◆ getTechnologyType()

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

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

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

◆ getZsize()

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

◆ globalPos()

Amg::Vector3D MuonGM::CscReadoutElement::globalPos ( const Amg::Vector3D & localP) const

station-level method: does not depend on the strip view/layer, hence it cannot account for internal alignment parameters

Definition at line 460 of file CscReadoutElement.cxx.

460{ return nominalGlobalPos(localP); }
Amg::Vector3D nominalGlobalPos(const Amg::Vector3D &localP) const
ignores internal alignment parameters, hence gives generally incorrect answer

◆ globalPosition()

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

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

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

◆ GlobalToAmdbLRSCoords()

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

◆ GlobalToAmdbLRSTransform()

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

◆ globalToLocalCoords()

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

Definition at line 114 of file CscReadoutElement.cxx.

114 {
115 return localToGlobalTransf(id).inverse() * x;
116 }
Amg::Transform3D localToGlobalTransf(const Identifier &id) const

◆ globalToLocalTransf()

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

Definition at line 118 of file CscReadoutElement.cxx.

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

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

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

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

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.

Definition at line 318 of file CscReadoutElement.h.

318{ return manager()->cscIdHelper()->wireLayer(id) - 1; }

◆ length()

double MuonGM::CscReadoutElement::length ( ) const
inline

◆ lengthCorrection()

double MuonGM::CscReadoutElement::lengthCorrection ( int measuresPhi,
double stripPos ) const

Definition at line 333 of file CscReadoutElement.cxx.

333 {
334 if (lengthUpToMaxWidth() == length()) return 0.0; // CSS
335
336 double epsilon = 0.0;
337 double alpha = std::atan((excent() - lengthUpToMaxWidth()) / (longWidth() / 2.));
338 double beta = std::atan((longWidth() - shortWidth()) / (2. * lengthUpToMaxWidth()));
339
340 double bigLength = length() - 2 * roxacellWidth();
341 double shortLongWidth = longWidth() * (excent() - length()) / (excent() - lengthUpToMaxWidth());
342 double gslWidth = shortLongWidth - 2 * roxacellWidth() * (1 - std::cos(alpha)) / std::sin(alpha);
343 double smallWidth = shortWidth() - 2 * roxacellWidth() * (1 - std::sin(beta)) / std::cos(beta);
344 double bigWidth = 2 * (bigLength + 0.5 * smallWidth / std::tan(beta) + 0.5 * gslWidth * std::tan(alpha)) /
345 (std::tan(alpha) + 1.0 / std::tan(beta));
346 double shortLength = bigLength - (bigWidth - gslWidth) * std::tan(alpha) / 2.;
347
348 if (measuresPhi == 1) {
349 if (std::abs(stripPos) > (gslWidth / 2.)) epsilon = (std::abs(stripPos) - gslWidth / 2.) * std::tan(alpha);
350 } else {
351 double z0 = shortLength - bigLength / 2;
352 if (stripPos > z0) {
353 double diff = stripPos - z0;
354 double corr1 = diff / std::tan(alpha);
355 double corr2 = diff * std::tan(beta);
356 epsilon = 2.0 * (corr1 + corr2);
357 }
358 }
359 if (epsilon < 0.0) epsilon = 0.0;
360 return epsilon;
361 }
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
Definition Jet.cxx:631
Amg::Vector3D stripPos(const Identifier &id) const
takes into account internal alignment parameters, hence gives accurate answer

◆ lengthUpToMaxWidth()

double MuonGM::CscReadoutElement::lengthUpToMaxWidth ( ) const
inline

Definition at line 302 of file CscReadoutElement.h.

◆ localClusterPos()

Amg::Vector3D MuonGM::CscReadoutElement::localClusterPos ( int eta,
int wireLayer,
int measPhi,
double x0 ) const

takes into account internal alignment parameters, hence gives generally answer (local here is the station frame, coherent with the gas gas frames)

Definition at line 432 of file CscReadoutElement.cxx.

432 {
433 Amg::Vector3D nominalLCP = nominalLocalClusterPos(eta, wireLayer, measPhi, p);
434
435 Amg::Transform3D transfPtr_internalgeo = Amg::Transform3D::Identity();
436 transfPtr_internalgeo *=
437 Amg::Translation3D(m_cscIntTransl[wireLayer - 1][2], m_cscIntTransl[wireLayer - 1][0], m_cscIntTransl[wireLayer - 1][1]);
438 transfPtr_internalgeo *= Amg::AngleAxis3D(m_cscIntRot[wireLayer - 1][0], Amg::Vector3D::UnitY());
439 transfPtr_internalgeo *= Amg::AngleAxis3D(m_cscIntRot[wireLayer - 1][1], Amg::Vector3D::UnitZ());
440 transfPtr_internalgeo *= Amg::AngleAxis3D(m_cscIntRot[wireLayer - 1][2], Amg::Vector3D::UnitX());
441
442 return transfPtr_internalgeo * nominalLCP;
443 }
Amg::Vector3D nominalLocalClusterPos(int eta, int wireLayer, int measPhi, double x0) const
ignores internal alignment parameters, hence gives generally incorrect answer (local here is the stat...

◆ localPos()

Amg::Vector3D MuonGM::CscReadoutElement::localPos ( const Amg::Vector3D & globalP) const

station-level method: does not depend on the strip view/layer, hence it cannot account for internal alignment parameters

Definition at line 446 of file CscReadoutElement.cxx.

446 {
447 // localP is a local position
448 const Amg::Transform3D cscTrans = absTransform();
449 return cscTrans.inverse() * globalP;
450 }

◆ localStripLayerPos() [1/3]

Amg::Vector3D MuonGM::CscReadoutElement::localStripLayerPos ( const Identifier & id) const

◆ localStripLayerPos() [2/3]

Amg::Vector3D MuonGM::CscReadoutElement::localStripLayerPos ( const IdentifierHash & id) const

◆ localStripLayerPos() [3/3]

Amg::Vector3D MuonGM::CscReadoutElement::localStripLayerPos ( int chamberLayer,
int wireLayer,
int measPhi,
int channel ) const

Definition at line 477 of file CscReadoutElement.cxx.

477 {
478 if (measPhi != 0 && measPhi != 1) throw std::runtime_error ("CscReadoutElement::localStripLayerPos bad measPhi");
479 Amg::Vector3D wireLayerPosition = localWireLayerPos(wireLayer);
480 double anodeCathodeDis = anodeCathodeDistance();
481 double x = wireLayerPosition.x();
482 double y = wireLayerPosition.y();
483 double z = wireLayerPosition.z();
484
485 if (wireLayer == 1 || wireLayer == 3) {
486 if (measPhi == 0)
487 x = wireLayerPosition.x() + anodeCathodeDis;
488 else
489 x = wireLayerPosition.x() - anodeCathodeDis;
490 } else {
491 if (measPhi == 0)
492 x = wireLayerPosition.x() - anodeCathodeDis;
493 else
494 x = wireLayerPosition.x() + anodeCathodeDis;
495 }
496
497 return Amg::Vector3D(x, y, z);
498 }
#define y
#define z

◆ localStripPos() [1/2]

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

takes into account internal alignment parameters, hence gives generally accurate answer (local here is the station frame, coherent with the gas gas frames) - digitization should use this method to emulate internal alignment parameters

Definition at line 206 of file CscReadoutElement.cxx.

206 {
207 // uses localStripPos(int chamberLayer, int wireLayer, int measPhi, int channel) const;
208 const CscIdHelper* idh = manager()->cscIdHelper();
209 int eta = idh->stationEta(id);
210 int chamberLayer = idh->chamberLayer(id);
211 int wireLayer = idh->wireLayer(id);
212 int measPhi = idh->measuresPhi(id);
213 int channel = idh->strip(id);
214 return localStripPos(eta, chamberLayer, wireLayer, measPhi, channel);
215 }
int stationEta(const Identifier &id) const

◆ localStripPos() [2/2]

Amg::Vector3D MuonGM::CscReadoutElement::localStripPos ( int eta,
int chamberLayer,
int wireLayer,
int measPhi,
int channel ) const

takes into account internal alignment parameters, hence gives generally accurate answer (local here is the station frame, coherent with the gas gas frames) - digitization should use this method to emulate internal alignment parameters

Definition at line 364 of file CscReadoutElement.cxx.

364 {
365 Amg::Vector3D nominalLP = nominalLocalStripPos(eta, chamberLayer, wireLayer, measPhi, strip);
366 // const Amg::Transform3D cscTrans = absTransform();
367 Amg::Transform3D transfPtr_internalgeo(
368 Amg::Translation3D(m_cscIntTransl[wireLayer - 1][2], m_cscIntTransl[wireLayer - 1][0], m_cscIntTransl[wireLayer - 1][1]) *
369 Amg::AngleAxis3D(m_cscIntRot[wireLayer - 1][0], Amg::Vector3D::UnitY()) *
370 Amg::AngleAxis3D(m_cscIntRot[wireLayer - 1][1], Amg::Vector3D::UnitZ()) *
371 Amg::AngleAxis3D(m_cscIntRot[wireLayer - 1][2], Amg::Vector3D::UnitX()));
372 return transfPtr_internalgeo * nominalLP;
373 }

◆ localToGlobalCoords()

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

localToGlobalCoords and Transf connect the Gas Gap Frame (defined as a Sensitive Detector) to the Global Frame; Notice that internal CSC alignment affects the strip plane orientation and position in the CSC station frame, but does not impact on the gas gap geometry within the station; therefore the following methods do not depen on internal alignment parameters.

Otherwise stated, the internal alignment parameters in MC can be emulated at the digitization stage.

Parameters
[out]localToGlobalCoordsthe coordinates in the Global Atlas Frame of point at x in the local frame
[in]idCSC gas gap identifier - view and strip field must be 0
[in]xlocal coordinates of the point in the gas gap = sensitive volume

Definition at line 97 of file CscReadoutElement.cxx.

97 {
98 const Amg::Vector3D gasgapP = localWireLayerPos(id);
99 const Amg::Translation3D xfp(gasgapP.x(), gasgapP.y(), gasgapP.z());
100 return absTransform() * xfp * x;
101 }

◆ localToGlobalTransf() [1/2]

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

Definition at line 108 of file CscReadoutElement.cxx.

108 {
109 const Amg::Vector3D gasgapP = localWireLayerPos(id);
110 const Amg::Translation3D xfp(gasgapP.x(), gasgapP.y(), gasgapP.z());
111 return absTransform() * xfp;
112 }

◆ localToGlobalTransf() [2/2]

Amg::Transform3D MuonGM::CscReadoutElement::localToGlobalTransf ( int gasGap) const

Definition at line 103 of file CscReadoutElement.cxx.

103 {
104 const Amg::Vector3D gasgapP = localWireLayerPos(gasGap);
105 const Amg::Translation3D xfp(gasgapP.x(), gasgapP.y(), gasgapP.z());
106 return absTransform() * xfp;
107 }

◆ localWireLayerPos() [1/2]

Amg::Vector3D MuonGM::CscReadoutElement::localWireLayerPos ( const Identifier & id) const

Definition at line 120 of file CscReadoutElement.cxx.

120 {
121 const CscIdHelper* idh = manager()->cscIdHelper();
122 int gasgap = idh->wireLayer(id);
123 return localWireLayerPos(gasgap);
124 }

◆ localWireLayerPos() [2/2]

Amg::Vector3D MuonGM::CscReadoutElement::localWireLayerPos ( int gg) const

Definition at line 126 of file CscReadoutElement.cxx.

126 {
127 Amg::Vector3D localP(m_wireplanez[gg - 1], 0., 0.);
128 return localP;
129 }

◆ longWidth()

double MuonGM::CscReadoutElement::longWidth ( ) const
inline

◆ manager()

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

◆ maxNumberOfStrips() [1/2]

int MuonGM::CscReadoutElement::maxNumberOfStrips ( int measuresPhi) const

Definition at line 162 of file CscReadoutElement.cxx.

162 {
163 if (measuresPhi == 0)
165 else
167 }

◆ maxNumberOfStrips() [2/2]

int MuonGM::CscReadoutElement::maxNumberOfStrips ( int measuresPhi,
double width ) const

Definition at line 160 of file CscReadoutElement.cxx.

int maxNumberOfStrips(int measuresPhi) const

◆ measuresPhi()

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

returns whether the given identifier measures phi or not

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 326 of file CscReadoutElement.h.

326{ return manager()->cscIdHelper()->measuresPhi(id); }

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

◆ NetaStripLayers()

int MuonGM::CscReadoutElement::NetaStripLayers ( ) const
inline

Definition at line 312 of file CscReadoutElement.h.

312{ return m_ngasgaps; }

◆ NetaStrips()

int MuonGM::CscReadoutElement::NetaStrips ( int gasgaplayer) const
inline

Definition at line 316 of file CscReadoutElement.h.

316{ return m_nEtastripsperlayer; }

◆ Ngasgaps()

int MuonGM::CscReadoutElement::Ngasgaps ( ) const
inline

Definition at line 308 of file CscReadoutElement.h.

308{ return m_ngasgaps; }

◆ nominalCenter()

Amg::Vector3D MuonGM::CscReadoutElement::nominalCenter ( int gasGap) const

like tracking center but nominal - returns a Amg::Vector3D not a reference to it

Definition at line 656 of file CscReadoutElement.cxx.

656{ return nominalTransform(gasGap, 1) * Amg::Vector3D(0., 0., 0.); }
Amg::Transform3D nominalTransform(const Identifier &id) const
like tracking Transform but nominal - returns a transform not a reference to it

◆ nominalGlobalPos()

Amg::Vector3D MuonGM::CscReadoutElement::nominalGlobalPos ( const Amg::Vector3D & localP) const

ignores internal alignment parameters, hence gives generally incorrect answer

Definition at line 453 of file CscReadoutElement.cxx.

453 {
454 // globalP is a global position
455 const Amg::Transform3D cscTrans = absTransform();
456 return cscTrans * localP;
457 }

◆ nominalLocalClusterPos()

Amg::Vector3D MuonGM::CscReadoutElement::nominalLocalClusterPos ( int eta,
int wireLayer,
int measPhi,
double x0 ) const

ignores internal alignment parameters, hence gives generally incorrect answer (local here is the station frame, coherent with the gas gas frames)

Definition at line 410 of file CscReadoutElement.cxx.

410 {
411 // get the coordinates of the wire plane
412 Amg::Vector3D wireLayerPosition = localWireLayerPos(wireLayer);
413
414 // some initializations
415 double x = wireLayerPosition.x();
416 double y = wireLayerPosition.y();
417 double z = wireLayerPosition.z();
418
419 // local position of cluster
420 if (0 == measPhi)
421 z = p;
422 else {
423 if (eta < 0)
424 y = p;
425 else
426 y = -p;
427 }
428 return Amg::Vector3D(x, y, z);
429 }

◆ nominalLocalStripPos() [1/2]

Amg::Vector3D MuonGM::CscReadoutElement::nominalLocalStripPos ( const Identifier & id) const

ignores internal alignment parameters, hence gives generally incorrect answer (local here is the station frame, coherent with the gas gas frames)

Definition at line 216 of file CscReadoutElement.cxx.

216 {
217 // uses localStripPos(int chamberLayer, int wireLayer, int measPhi, int channel) const;
218 const CscIdHelper* idh = manager()->cscIdHelper();
219 int eta = idh->stationEta(id);
220 int chamberLayer = idh->chamberLayer(id);
221 int wireLayer = idh->wireLayer(id);
222 int measPhi = idh->measuresPhi(id);
223 int channel = idh->strip(id);
224 return nominalLocalStripPos(eta, chamberLayer, wireLayer, measPhi, channel);
225 }

◆ nominalLocalStripPos() [2/2]

Amg::Vector3D MuonGM::CscReadoutElement::nominalLocalStripPos ( int eta,
int chamberLayer,
int wireLayer,
int measPhi,
int channel ) const

ignores internal alignment parameters, hence gives generally incorrect answer (local here is the station frame, coherent with the gas gas frames)

Definition at line 375 of file CscReadoutElement.cxx.

375 {
376 // get the coordinate of the strip plane
377 Amg::Vector3D stripPlane = localStripLayerPos(chamberLayer, wireLayer, measPhi, strip);
378
379 // some initializations
380 double x = stripPlane.x();
381 double y = stripPlane.y();
382 double z = stripPlane.z();
383
384 // we need to know the geometry version
385 // if P or earlier, we have pointing phi strips
386 // if Q or later, we have parallel phi strips
387 // R-strips are alwas parallel in all the geometry layouts
388
389 double epsilon = 0.0;
390 double lengthOfStrip = stripLength(chamberLayer, measPhi, strip, epsilon);
391
392 // get some necessary parameters
393 double stripWidth = cathodeReadoutPitch(chamberLayer, measPhi);
394 int nStrips = maxNumberOfStrips(measPhi, stripWidth);
395
396 if (0 == measPhi) {
397 z = stripWidth * (strip - 0.5 - nStrips / 2.0);
398 } else {
399 z = (length() - 2 * roxacellWidth() - lengthOfStrip) / 2.0 - epsilon;
400 if (eta < 0)
401 y = stripWidth * (strip - 0.5 - nStrips / 2.0);
402 else
403 y = -stripWidth * (strip - 0.5 - nStrips / 2.0);
404 }
405
406 return Amg::Vector3D(x, y, z);
407 }
double stripLength(int chamberLayer, int measuresPhi, int stripNumber, double &epsilon) const
double cathodeReadoutPitch(int chLayer, int measuresPhi) const
Amg::Vector3D localStripLayerPos(const Identifier &id) const
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)

◆ nominalStripPos() [1/2]

Amg::Vector3D MuonGM::CscReadoutElement::nominalStripPos ( const Identifier & id) const

ignores internal alignment parameters, hence gives generally incorrect answer

Definition at line 236 of file CscReadoutElement.cxx.

236 {
237 const CscIdHelper* idh = manager()->cscIdHelper();
238 int eta = idh->stationEta(id);
239 int chamberLayer = idh->chamberLayer(id);
240 int wireLayer = idh->wireLayer(id);
241 int measPhi = idh->measuresPhi(id);
242 int channel = idh->strip(id);
243 return nominalStripPos(eta, chamberLayer, wireLayer, measPhi, channel);
244 }
Amg::Vector3D nominalStripPos(const Identifier &id) const
ignores internal alignment parameters, hence gives generally incorrect answer

◆ nominalStripPos() [2/2]

Amg::Vector3D MuonGM::CscReadoutElement::nominalStripPos ( int eta,
int chamberLayer,
int wireLayer,
int measPhi,
int channel ) const

ignores internal alignment parameters, hence gives generally incorrect answer

Definition at line 254 of file CscReadoutElement.cxx.

254 {
255 const Amg::Vector3D localP = nominalLocalStripPos(eta, chamberLayer, wireLayer, measPhi, channel);
256 const Amg::Transform3D cscTrans = absTransform();
257 return cscTrans * localP;
258 }

◆ nominalTransform() [1/2]

Amg::Transform3D MuonGM::CscReadoutElement::nominalTransform ( const Identifier & id) const

like tracking Transform but nominal - returns a transform not a reference to it

Definition at line 614 of file CscReadoutElement.cxx.

614 {
615 const CscIdHelper* idh = manager()->cscIdHelper();
616 return nominalTransform(idh->wireLayer(id), idh->measuresPhi(id));
617 }

◆ nominalTransform() [2/2]

Amg::Transform3D MuonGM::CscReadoutElement::nominalTransform ( int gasGap,
int measPhi ) const

like tracking Transform but nominal - returns a transform not a reference to it

Definition at line 618 of file CscReadoutElement.cxx.

618 {
619 Amg::RotationMatrix3D muonTRotation(localToGlobalTransf(gasGap).rotation());
620 Amg::RotationMatrix3D surfaceTRotation;
621 surfaceTRotation.col(0) = muonTRotation.col(1);
622 surfaceTRotation.col(1) = muonTRotation.col(2);
623 surfaceTRotation.col(2) = muonTRotation.col(0);
624 if (measPhi == 0) surfaceTRotation = surfaceTRotation * Amg::AngleAxis3D(M_PI / 2., Amg::Vector3D::UnitZ());
625
626 Amg::Transform3D transfPtr_orig(surfaceTRotation);
627 transfPtr_orig *= Amg::Translation3D(localToGlobalTransf(gasGap).translation());
628#ifndef NDEBUG
629 MsgStream log(Athena::getMessageSvc(), "CscReadoutElement");
630 if (log.level() <= MSG::DEBUG) {
631 log << MSG::DEBUG << "nominalTransform+++++++++++Original Tranformation ++++++++++++++++++++++" << endmsg;
632 log << MSG::DEBUG << (transfPtr_orig)(0, 0) << " " << (transfPtr_orig)(0, 1) << " " << (transfPtr_orig)(0, 2) << " "
633 << (transfPtr_orig)(0, 3) << endmsg;
634 log << MSG::DEBUG << (transfPtr_orig)(1, 0) << " " << (transfPtr_orig)(1, 1) << " " << (transfPtr_orig)(1, 2) << " "
635 << (transfPtr_orig)(1, 3) << endmsg;
636 log << MSG::DEBUG << (transfPtr_orig)(2, 0) << " " << (transfPtr_orig)(2, 1) << " " << (transfPtr_orig)(2, 2) << " "
637 << (transfPtr_orig)(2, 3) << endmsg;
638 log << MSG::DEBUG << "+++++ transf ends " << endmsg;
639 }
640#endif
641 return transfPtr_orig;
642 }

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

◆ NphiStripLayers()

int MuonGM::CscReadoutElement::NphiStripLayers ( ) const
inline

Definition at line 310 of file CscReadoutElement.h.

310{ return m_ngasgaps; }

◆ NphiStrips()

int MuonGM::CscReadoutElement::NphiStrips ( int gasgaplayer) const
inline

Definition at line 314 of file CscReadoutElement.h.

314{ return m_nPhistripsperlayer; }

◆ numberOfLayers()

int MuonGM::CscReadoutElement::numberOfLayers ( bool ) const
inlinefinaloverridevirtual

number of layers in phi/eta projection

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 328 of file CscReadoutElement.h.

328{ return Ngasgaps(); }

◆ numberOfStrips() [1/2]

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

number of strips per layer

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 329 of file CscReadoutElement.h.

329{ return NphiStrips(1); }

◆ numberOfStrips() [2/2]

int MuonGM::CscReadoutElement::numberOfStrips ( int layer,
bool  ) const
inlinefinaloverridevirtual

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 330 of file CscReadoutElement.h.

330{ return NphiStrips(1); }

◆ originForInternalALines()

Amg::Vector3D MuonGM::CscReadoutElement::originForInternalALines ( int gasGap) const

like tracking center but nominal - returns a Amg::Vector3D not a reference to it

Definition at line 657 of file CscReadoutElement.cxx.

657{ return nominalCenter(gasGap); }
Amg::Vector3D nominalCenter(int gasGap) const
like tracking center but nominal - returns a Amg::Vector3D not a reference to it

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

◆ 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

◆ roxacellWidth()

double MuonGM::CscReadoutElement::roxacellWidth ( ) const
inline

Definition at line 300 of file CscReadoutElement.h.

◆ set_first_strip_localcoo()

void MuonGM::CscReadoutElement::set_first_strip_localcoo ( double )

◆ set_first_wire_localcoo()

void MuonGM::CscReadoutElement::set_first_wire_localcoo ( double )

◆ set_ngasgaps()

void MuonGM::CscReadoutElement::set_ngasgaps ( int )

◆ set_nstriplayers()

void MuonGM::CscReadoutElement::set_nstriplayers ( int )

◆ set_nstripsperlayer()

void MuonGM::CscReadoutElement::set_nstripsperlayer ( int )

◆ set_nwirelayers()

void MuonGM::CscReadoutElement::set_nwirelayers ( int )

◆ set_nwiresperlayer()

void MuonGM::CscReadoutElement::set_nwiresperlayer ( int )

◆ set_strippitch()

void MuonGM::CscReadoutElement::set_strippitch ( double )

◆ set_stripwidth()

void MuonGM::CscReadoutElement::set_stripwidth ( double )

◆ set_wirepitch()

void MuonGM::CscReadoutElement::set_wirepitch ( double )

◆ setChamberLayer()

void MuonGM::CscReadoutElement::setChamberLayer ( int cl)
inline

Definition at line 292 of file CscReadoutElement.h.

292{ m_chamberlayer = cl; }
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]

◆ setCscInternalAlignmentPar()

void MuonGM::CscReadoutElement::setCscInternalAlignmentPar ( const ALinePar & x)

Definition at line 572 of file CscReadoutElement.cxx.

572 {
573 // get id helper
574 const CscIdHelper& idh{idHelperSvc()->cscIdHelper()};
575 const int wlayer = idh.wireLayer(x.identify());
576 const bool notAllowedLayer = (wlayer > 4 || wlayer <1);
577
578
579 if (idh.elementID(x.identify()) != idh.elementID(identify()) || notAllowedLayer) {
580 ATH_MSG_WARNING("Trying to set the following CSC internal A-line " << x << " for Csc readout Element " << idHelperSvc()->toString(identify())
581 << "Inconsistent CSC int. Aline assignment - Internal alignment will not be applied ");
582 return;
583 }
584 ATH_MSG_DEBUG("Set internal alignment parameter "<<x);
585 using Parameter = ALinePar::Parameter;
586 m_cscIntTransl[wlayer - 1][0] = x.getParameter(Parameter::transS);
587 m_cscIntTransl[wlayer - 1][1] = x.getParameter(Parameter::transZ);
588 m_cscIntTransl[wlayer - 1][2] = x.getParameter(Parameter::transT);
589 m_cscIntRot[wlayer - 1][0] =x.getParameter(Parameter::rotS);
590 m_cscIntRot[wlayer - 1][1] =x.getParameter(Parameter::rotZ);
591 m_cscIntRot[wlayer - 1][2] =x.getParameter(Parameter::rotT);
592
593 for (unsigned int j = 0; j < 3; ++j) {
594 ATH_MSG_DEBUG("<CscReadoutElement::setCscInternalAlignmentPar()>: m_cscIntTransl[" << (wlayer - 1) << "][" << j
595 << "]: " << m_cscIntTransl[(wlayer - 1)][j]);
596 ATH_MSG_DEBUG("<CscReadoutElement::setCscInternalAlignmentPar()>: m_cscIntRot[" << (wlayer - 1) << "][" << j
597 << "]: " << m_cscIntRot[(wlayer - 1)][j]);
598 }
599 }
#define ATH_MSG_DEBUG(x)
Parameter
amdb frame (s, z, t) = chamber frame (y, z, x)
Definition ALinePar.h:23
Identifier elementID(int stationName, int stationEta, int stationPhi) const
virtual const CscIdHelper & cscIdHelper() const =0
access to CscIdHelper
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.

◆ 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

◆ shortWidth()

double MuonGM::CscReadoutElement::shortWidth ( ) const
inline

◆ sideA()

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

◆ sideC()

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

◆ sinStereo()

double MuonGM::CscReadoutElement::sinStereo ( const Identifier & stripId) const

Definition at line 501 of file CscReadoutElement.cxx.

501 {
502 // sin stero for R-strips
503 Amg::Vector3D posStrip = stripPos(id);
504 const CscIdHelper* idh = manager()->cscIdHelper();
505 int measPhi = idh->measuresPhi(id);
506 if (measPhi == 0) return 1.0;
507
508 // return zero for phi strips in layout P
509 // std::string gVersion = manager()->geometryVersion();
510
511 // sin stero for phi strips in layout Q and above
512 int eta = idh->stationEta(id);
513 int chamberLayer = idh->chamberLayer(id);
514 int wireLayer = idh->wireLayer(id);
515 int strip = maxNumberOfStrips(measPhi) / 2;
516 Amg::Vector3D etaAxis = stripPos(eta, chamberLayer, wireLayer, measPhi, strip);
517 double sinstero = (posStrip.y() * etaAxis.x() - posStrip.x() * etaAxis.y()) / (posStrip.perp() * etaAxis.perp());
518 return sinstero;
519 }

◆ smallSector()

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

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

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

◆ spacePointPosition() [1/3]

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

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

Definition at line 339 of file CscReadoutElement.h.

339 {
340 pos[0] = phiPos.x();
341 pos[1] = etaPos.x();
342 }

◆ spacePointPosition() [2/3]

bool MuonGM::CscReadoutElement::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 763 of file CscReadoutElement.cxx.

763 {
764 Amg::Vector2D phiPos;
765 Amg::Vector2D etaPos;
766 if (!stripPosition(phiId, phiPos) || !stripPosition(etaId, etaPos)) return false;
767 spacePointPosition(phiPos, etaPos, pos);
768 return true;
769 }
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const override final
strip position If the strip number is outside the range of valid strips, the function will return fal...
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...
Eigen::Matrix< double, 2, 1 > Vector2D

◆ spacePointPosition() [3/3]

bool MuonGM::CscReadoutElement::spacePointPosition ( const Identifier & phiId,
const Identifier & etaId,
Amg::Vector3D & pos ) const
inlineoverridevirtual

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 332 of file CscReadoutElement.h.

332 {
333 Amg::Vector2D lpos;
334 spacePointPosition(phiId, etaId, lpos);
335 surface(phiId).localToGlobal(lpos, pos, pos);
336 return true;
337 }
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.

◆ stripLayerPos() [1/3]

Amg::Vector3D MuonGM::CscReadoutElement::stripLayerPos ( const Identifier & id) const

Definition at line 547 of file CscReadoutElement.cxx.

547 {
548 const CscIdHelper* idh = manager()->cscIdHelper();
549 int chamberLayer = idh->chamberLayer(id);
550 int wireLayer = idh->wireLayer(id);
551 int measuresPhi = idh->measuresPhi(id);
552 int strip = idh->strip(id);
553 return stripLayerPos(chamberLayer, wireLayer, measuresPhi, strip);
554 }
Amg::Vector3D stripLayerPos(const Identifier &id) const

◆ stripLayerPos() [2/3]

Amg::Vector3D MuonGM::CscReadoutElement::stripLayerPos ( const IdentifierHash & id) const

Definition at line 556 of file CscReadoutElement.cxx.

556 {
557 Identifier id;
558 const CscIdHelper* idh = manager()->cscIdHelper();
559 IdContext context = idh->channel_context();
560 if (!idh->get_id(hash, id, &context))
561 return stripLayerPos(id);
562 else
563 return Amg::Vector3D(0, 0, 0);
564 }
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override
Create compact id from hash id (return == 0 for OK)
IdContext channel_context() const
id for channel

◆ stripLayerPos() [3/3]

Amg::Vector3D MuonGM::CscReadoutElement::stripLayerPos ( int chamberLayer,
int wireLayer,
int measPhi,
int channel ) const

Definition at line 566 of file CscReadoutElement.cxx.

566 {
567 Amg::Vector3D localP = localStripLayerPos(chamberLayer, wireLayer, measPhi, channel);
568 const Amg::Transform3D cscTrans = absTransform();
569 return cscTrans * localP;
570 }

◆ stripLength() [1/2]

double MuonGM::CscReadoutElement::stripLength ( const Identifier & id) const

Definition at line 282 of file CscReadoutElement.cxx.

282 {
283 const CscIdHelper* idh = manager()->cscIdHelper();
284 int chamberLayer = idh->chamberLayer(id);
285 int measPhi = idh->measuresPhi(id);
286 int channel = idh->strip(id);
287 double epsilon;
288 return stripLength(chamberLayer, measPhi, channel, epsilon);
289 }

◆ stripLength() [2/2]

double MuonGM::CscReadoutElement::stripLength ( int chamberLayer,
int measuresPhi,
int stripNumber,
double & epsilon ) const

Definition at line 292 of file CscReadoutElement.cxx.

292 {
293 double stripWidth = cathodeReadoutPitch(chamberLayer, measuresPhi);
295
296 double chamberLength = length() - 2 * roxacellWidth();
297 double beta = std::atan((longWidth() - shortWidth()) / (2. * lengthUpToMaxWidth()));
298
299 double smallWidth = shortWidth() - 2 * roxacellWidth() * (1.0 - std::sin(beta)) / std::cos(beta);
300 double bigWidth = longWidth() - 2 * roxacellWidth() * (1.0 + std::sin(beta)) / std::cos(beta);
301 double gslWidth{0.}, sLength{0.};
302
303 double alpha = std::atan((excent() - lengthUpToMaxWidth()) / (longWidth() / 2.));
304 if (length() != lengthUpToMaxWidth()) {
305 double shortLongWidth = longWidth() * (excent() - length()) / (excent() - lengthUpToMaxWidth());
306 gslWidth = shortLongWidth - 2 * roxacellWidth() * (1 - std::cos(alpha)) / std::sin(alpha);
307 bigWidth = 2 * (chamberLength + 0.5 * smallWidth / std::tan(beta) + 0.5 * gslWidth * std::tan(alpha)) /
308 (std::tan(alpha) + 1.0 / std::tan(beta));
309 }
310
311 double pos = stripWidth * (stripNumber - 0.5 - numberOfStrips / 2.0);
313 double stripPos = std::abs(pos);
314
315 if (measuresPhi == 0) {
316 double effectiveLength = stripWidth * numberOfStrips;
317 sLength = 2.0 * (effectiveLength / 2.0 + pos) * std::tan(beta) + smallWidth;
318 } else {
319 if (stripPos <= (smallWidth / 2.0))
320 sLength = chamberLength;
321 else {
322 double diff = stripPos - smallWidth / 2.0;
323 if (length() != lengthUpToMaxWidth()) {
324 double shortLength = chamberLength - (bigWidth - gslWidth) * std::tan(alpha) / 2.;
325 sLength = chamberLength - 2.0 * diff * shortLength / (bigWidth - smallWidth);
326 } else
327 sLength = chamberLength * (1.0 - 2.0 * diff / (bigWidth - smallWidth));
328 }
329 }
330 return (sLength - epsilon);
331 }
virtual int stripNumber(const Amg::Vector2D &pos, const Identifier &id) const override final
strip number corresponding to local position.
double lengthCorrection(int measuresPhi, double stripPos) const
virtual int numberOfStrips(const Identifier &layerId) const override final
number of strips per layer

◆ stripNumber()

int MuonGM::CscReadoutElement::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 745 of file CscReadoutElement.cxx.

745 {
746 MsgStream log(Athena::getMessageSvc(), "CscReadoutElement");
747 if (log.level() <= MSG::WARNING) log << MSG::WARNING << " stripNumber::dummy routine " << endmsg;
748 return 1;
749 }

◆ StripPitch() [1/2]

double MuonGM::CscReadoutElement::StripPitch ( int chlayer,
int measphi ) const

Definition at line 265 of file CscReadoutElement.cxx.

265 {
266 // assume StripWidth = StripPitch
267 double width = cathodeReadoutPitch(chlayer, measphi);
268 return width;
269 }
const double width

◆ StripPitch() [2/2]

double MuonGM::CscReadoutElement::StripPitch ( int measphi) const

Definition at line 275 of file CscReadoutElement.cxx.

275 {
276 // assume StripWidth = StripPitch
277 double width = cathodeReadoutPitch(measphi);
278 return width;
279 }

◆ stripPos() [1/2]

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

takes into account internal alignment parameters, hence gives accurate answer

Definition at line 227 of file CscReadoutElement.cxx.

227 {
228 const CscIdHelper* idh = manager()->cscIdHelper();
229 int eta = idh->stationEta(id);
230 int chamberLayer = idh->chamberLayer(id);
231 int wireLayer = idh->wireLayer(id);
232 int measPhi = idh->measuresPhi(id);
233 int channel = idh->strip(id);
234 return stripPos(eta, chamberLayer, wireLayer, measPhi, channel);
235 }

◆ stripPos() [2/2]

Amg::Vector3D MuonGM::CscReadoutElement::stripPos ( int eta,
int chamberLayer,
int wireLayer,
int measPhi,
int channel ) const

takes into account internal alignment parameters, hence gives accurate answer

Definition at line 246 of file CscReadoutElement.cxx.

246 {
247 // const Amg::Vector3D localP = nominalLocalStripPos(eta, chamberLayer, wireLayer,
248 // measPhi, channel);
249 const Amg::Vector3D localP = localStripPos(eta, chamberLayer, wireLayer, measPhi, channel);
250 const Amg::Transform3D cscTrans = absTransform();
251 return cscTrans * localP;
252 }

◆ stripPosition()

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

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

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

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 751 of file CscReadoutElement.cxx.

751 {
753 Amg::Vector3D gpos = stripPos(id);
754 if (!surface(id).globalToLocal(gpos, gpos, pos)) {
755 MsgStream log(Athena::getMessageSvc(), "CscReadoutElement");
756 if (log.level() <= MSG::WARNING)
757 log << MSG::WARNING << " stripPosition:: globalToLocal failed " << surface(id).transform().inverse() * gpos << endmsg;
758 return false;
759 }
760 return true;
761 }
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.

◆ stripPosOnTrackingSurface() [1/2]

Amg::Vector3D MuonGM::CscReadoutElement::stripPosOnTrackingSurface ( const Identifier & id) const

nominal strip pos in the tracking local frame of the measurement surface

Definition at line 643 of file CscReadoutElement.cxx.

643 {
644 const CscIdHelper* idh = manager()->cscIdHelper();
645 return stripPosOnTrackingSurface(idh->stationEta(id), idh->chamberLayer(id), idh->wireLayer(id), idh->measuresPhi(id),
646 idh->strip(id));
647 }
Amg::Vector3D stripPosOnTrackingSurface(const Identifier &id) const
nominal strip pos in the tracking local frame of the measurement surface

◆ stripPosOnTrackingSurface() [2/2]

Amg::Vector3D MuonGM::CscReadoutElement::stripPosOnTrackingSurface ( int eta,
int chamberLayer,
int wireLayer,
int measPhi,
int channel ) const

nominal strip pos in the tracking local frame of the measurement surface

Definition at line 648 of file CscReadoutElement.cxx.

648 {
649 Amg::Vector3D nP = nominalLocalStripPos(eta, chamberLayer, wireLayer, measPhi, channel);
650
651 if (measPhi == 1)
652 return Amg::Vector3D(nP.y(), 0., 0.);
653 else
654 return Amg::Vector3D(nP.z(), 0., 0.);
655 }

◆ StripWidth() [1/2]

double MuonGM::CscReadoutElement::StripWidth ( int chlayer,
int measphi ) const

Definition at line 260 of file CscReadoutElement.cxx.

260 {
261 // assume StripWidth = StripPitch
262 double width = cathodeReadoutPitch(chlayer, measphi);
263 return width;
264 }

◆ StripWidth() [2/2]

double MuonGM::CscReadoutElement::StripWidth ( int measphi) const

Definition at line 270 of file CscReadoutElement.cxx.

270 {
271 // assume StripWidth = StripPitch
272 double width = cathodeReadoutPitch(measphi);
273 return width;
274 }

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

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

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

Implements MuonGM::MuonClusterReadoutElement.

Definition at line 320 of file CscReadoutElement.h.

320 {
321 return 2 * (manager()->cscIdHelper()->wireLayer(id) - 1) + (manager()->cscIdHelper()->measuresPhi(id) ? 0 : 1);
322 }

◆ 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); }
virtual const Amg::Transform3D & transform() const override
Return local to global transform.

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

◆ wireLayerPos() [1/2]

Amg::Vector3D MuonGM::CscReadoutElement::wireLayerPos ( const Identifier & id) const

Definition at line 131 of file CscReadoutElement.cxx.

131 {
132 const CscIdHelper* idh = manager()->cscIdHelper();
133 int gasgap = idh->wireLayer(id);
134 return wireLayerPos(gasgap);
135 }
Amg::Vector3D wireLayerPos(const Identifier &id) const

◆ wireLayerPos() [2/2]

Amg::Vector3D MuonGM::CscReadoutElement::wireLayerPos ( int gg) const

Definition at line 137 of file CscReadoutElement.cxx.

137 {
138 const Amg::Vector3D localP = localWireLayerPos(gg);
139 const Amg::Transform3D cscTrans = absTransform();
140#ifndef NDEBUG
141 MsgStream log(Athena::getMessageSvc(), "CscReadoutElement");
142 if (log.level() <= MSG::VERBOSE) log << "CscReadoutElement::wireLayerPos got localWireLayerPos " << localP << endmsg;
143#endif
144 return cscTrans * localP;
145 }

◆ xCoordinateInTrackingFrame()

double MuonGM::CscReadoutElement::xCoordinateInTrackingFrame ( const Identifier & id) const

Definition at line 462 of file CscReadoutElement.cxx.

462 {
463 const CscIdHelper* idh = manager()->cscIdHelper();
464 int eta = idh->stationEta(id);
465 int chamberLayer = idh->chamberLayer(id);
466 bool measPhi = idh->measuresPhi(id);
467 int strip = idh->strip(id);
468 // get some necessary parameters
469 double stripWidth = cathodeReadoutPitch(chamberLayer, measPhi);
470 int nStrips = maxNumberOfStrips(measPhi, stripWidth);
471 double pos = stripWidth * (strip - 0.5 - nStrips / 2.0);
472 if (eta > 0 && measPhi) pos *= -1;
473 return pos;
474 }

◆ z0()

double MuonGM::CscReadoutElement::z0 ( ) const

Definition at line 187 of file CscReadoutElement.cxx.

187 {
188 double beta = std::atan((longWidth() - shortWidth()) / (2. * lengthUpToMaxWidth()));
189 double sWidth = shortWidth() - 2 * roxacellWidth() * (1 - std::sin(beta)) / std::cos(beta);
190 double lWidth = longWidth() - 2 * roxacellWidth() * (1 + std::sin(beta)) / std::cos(beta);
191 if (lengthUpToMaxWidth() == length()) {
192 double realLength = lengthUpToMaxWidth() - 2 * roxacellWidth();
193 return (realLength * sWidth / (lWidth - sWidth));
194 } else {
195 double bigLength = length() - 2 * roxacellWidth();
196 double alpha = std::atan((excent() - lengthUpToMaxWidth()) / (longWidth() / 2.));
197 double shortLongWidth = longWidth() * (excent() - length()) / (excent() - lengthUpToMaxWidth());
198 double gslWidth = shortLongWidth - 2 * roxacellWidth() * (1 - std::cos(alpha)) / std::sin(alpha);
199 lWidth = 2 * (bigLength + 0.5 * sWidth / std::tan(beta) + 0.5 * gslWidth * std::tan(alpha)) /
200 (std::tan(alpha) + 1.0 / std::tan(beta));
201 double shortLength = bigLength - (lWidth - gslWidth) * std::tan(alpha) / 2.;
202 return (shortLength * sWidth / (lWidth - sWidth));
203 }
204 }

◆ Muon::CombinedMuonAlignModule

friend class Muon::CombinedMuonAlignModule
friend

Definition at line 58 of file CscReadoutElement.h.

◆ Muon::CscAlignModule

friend class Muon::CscAlignModule
friend

Definition at line 57 of file CscReadoutElement.h.

◆ MuonChamber

friend class MuonChamber
friend

Definition at line 59 of file CscReadoutElement.h.

◆ MuonChamberLite

friend class MuonChamberLite
friend

Definition at line 60 of file CscReadoutElement.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_anodecathode_distance

double MuonGM::CscReadoutElement::m_anodecathode_distance {-9999.}
private

Definition at line 268 of file CscReadoutElement.h.

268{-9999.};

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

int MuonGM::CscReadoutElement::m_chamberlayer {-1}
private

Definition at line 269 of file CscReadoutElement.h.

269{-1};

◆ m_cscIntRot

double MuonGM::CscReadoutElement::m_cscIntRot[4][3] {}
private

Definition at line 287 of file CscReadoutElement.h.

287{}; // first index is wireLayer, second = 0,1,2 for rots,z,t

◆ m_cscIntTransl

double MuonGM::CscReadoutElement::m_cscIntTransl[4][3] {}
private

Definition at line 286 of file CscReadoutElement.h.

286{}; // first index is wireLayer, second = 0,1,2 for s,z,t

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

double MuonGM::CscReadoutElement::m_Etastrippitch {-9999.}
private

Definition at line 279 of file CscReadoutElement.h.

279{-9999.};

◆ m_Etastripwidth

double MuonGM::CscReadoutElement::m_Etastripwidth {-9999.}
private

Definition at line 278 of file CscReadoutElement.h.

278{-9999.};

◆ m_excent

double MuonGM::CscReadoutElement::m_excent {-9999.}
private

Definition at line 265 of file CscReadoutElement.h.

265{-9999.};

◆ m_first_strip_localcoo

double MuonGM::CscReadoutElement::m_first_strip_localcoo {-9999.}
private

Definition at line 281 of file CscReadoutElement.h.

281{-9999.};

◆ m_first_wire_localcoo

double MuonGM::CscReadoutElement::m_first_wire_localcoo {-9999.}
private

Definition at line 282 of file CscReadoutElement.h.

282{-9999.};

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

int MuonGM::CscReadoutElement::m_nEtastripsperlayer {-1}
private

Definition at line 274 of file CscReadoutElement.h.

274{-1};

◆ m_ngasgaps

int MuonGM::CscReadoutElement::m_ngasgaps {-1}
private

Definition at line 270 of file CscReadoutElement.h.

270{-1};

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_nPhistripsperlayer

int MuonGM::CscReadoutElement::m_nPhistripsperlayer {-1}
private

Definition at line 273 of file CscReadoutElement.h.

273{-1};

◆ m_nstriplayers

int MuonGM::CscReadoutElement::m_nstriplayers {-1}
private

Definition at line 271 of file CscReadoutElement.h.

271{-1};

◆ m_nwirelayers

int MuonGM::CscReadoutElement::m_nwirelayers {-1}
private

Definition at line 272 of file CscReadoutElement.h.

272{-1};

◆ m_nwiresperlayer

int MuonGM::CscReadoutElement::m_nwiresperlayer {-1}
private

Definition at line 275 of file CscReadoutElement.h.

275{-1};

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

double MuonGM::CscReadoutElement::m_Phistrippitch {-9999.}
private

Definition at line 277 of file CscReadoutElement.h.

277{-9999.};

◆ m_Phistripwidth

double MuonGM::CscReadoutElement::m_Phistripwidth {-9999.}
private

Definition at line 276 of file CscReadoutElement.h.

276{-9999.};

◆ m_RlengthUpToMaxWidth

double MuonGM::CscReadoutElement::m_RlengthUpToMaxWidth {-9999.}
private

Definition at line 267 of file CscReadoutElement.h.

267{-9999.};

◆ m_roxacellwidth

double MuonGM::CscReadoutElement::m_roxacellwidth {-9999.}
private

Definition at line 266 of file CscReadoutElement.h.

266{-9999.};

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

double MuonGM::CscReadoutElement::m_wirepitch {-9999.}
private

Definition at line 280 of file CscReadoutElement.h.

280{-9999.};

◆ m_wireplanez

std::array<double, maxwlay> MuonGM::CscReadoutElement::m_wireplanez {make_array<double, maxwlay>(-9999.)}
private

Definition at line 283 of file CscReadoutElement.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_Zsize

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

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