ATLAS Offline Software
MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  Common Muon Readout Element properties
7  -----------------------------------------
8  ***************************************************************************/
9 
10 #ifndef MUONREADOUTGEOMETRY_MUONREADOUTELEMENT_H
11 #define MUONREADOUTGEOMETRY_MUONREADOUTELEMENT_H
12 
16 #include "Identifier/Identifier.h"
20 #include "GaudiKernel/ServiceHandle.h"
23 
24 namespace MuonGM {
25 
26 
27  class MuonDetectorManager;
28  class MuonStation;
29 
41  public:
42  // Destructor default
44 
45 
48  inline Identifier identify() const override final;
51  inline IdentifierHash identifyHash() const override final;
56  void setIdentifier(const Identifier& id);
57 
58 
59  virtual bool containsId(const Identifier& id) const = 0;
60 
61  inline int getStationIndex() const;
62  inline int getStationEta() const;
63  inline int getStationPhi() const;
64 
65 
69 
70  // Amdb local (szt) to global coord
73  // Global to Amdb local (szt) coord
76 
77  // like MDT, RPC, TGC, CSC
78  inline std::string getTechnologyType() const;
79  // like MDT1, RPC4, TGC1, etc...
80  inline const std::string& getTechnologyName() const;
81  void setTechnologyName(const std::string& str);
82  // BOL, EIS, BMF, T1F, etc ...
83  inline std::string getStationType() const;
84  // BOL1, BEE1, etc...
85  inline const std::string& getStationName() const;
86  void setStationName(const std::string&);
87 
88  // size of the detector
89  inline double getSsize() const;
90  inline double getRsize() const;
91  inline double getZsize() const;
92  inline double getLongSsize() const;
93  inline double getLongRsize() const;
94  inline double getLongZsize() const;
95 
98  inline double getStationS() const;
99  void setStationS(double);
100 
101 
102  void setLongSsize(double);
103  void setLongRsize(double);
104  void setLongZsize(double);
105  void setSsize(double);
106  void setRsize(double);
107  void setZsize(double);
108 
109  bool largeSector() const;
110  bool smallSector() const;
111 
112  inline bool sideA() const;
113  inline bool sideC() const;
114 
119 
120  bool hasCutouts() const { return m_hasCutouts; }
122 
123  // Tracking related interfaces
124  // Element Surface
125  // This creates a new surface. The client is responsible for deleting it.
126  virtual void clearCache() = 0;
127  virtual void fillCache() = 0;
128  void refreshCache();
129 
130  const Muon::IMuonIdHelperSvc* idHelperSvc() const { return m_idHelperSvc.get(); }
131 
132  Trk::DetectorElemType detectorType() const override final { return m_type; }
133 
134  protected:
136 
137  double m_Ssize{-9999.};
138  double m_Rsize{-9999.};
139  double m_Zsize{-9999.};
140  double m_LongSsize{-9999.};
141  double m_LongRsize{-9999.};
142  double m_LongZsize{-9999.};
144 
145  inline const MuonDetectorManager* manager() const;
146  std::string m_techname{"TTT0"};
148  std::string m_statname{"XXX0"};
149 
150  int m_caching{-1};
152  bool m_hasCutouts{false};
153 
154  private:
155  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{"Muon::MuonIdHelperSvc/MuonIdHelperSvc", "MuonDetectorManager"};
160 
161  double m_stationS{0.};
163  int m_stIdx{-1};
165  int m_eta{-1};
167  int m_phi{-1};
168 
171  };
172 
176  std::string MuonReadoutElement::getTechnologyType() const { return m_techname.substr(0, 3); }
177  const std::string& MuonReadoutElement::getTechnologyName() const { return m_techname; }
178  std::string MuonReadoutElement::getStationType() const { return m_statname.substr(0,3); }
179  const std::string& MuonReadoutElement::getStationName() const { return m_statname; }
180 
182  int MuonReadoutElement::getStationEta() const { return m_eta; }
183  int MuonReadoutElement::getStationPhi() const { return m_phi; }
184 
185  double MuonReadoutElement::getSsize() const { return m_Ssize; }
186  double MuonReadoutElement::getRsize() const { return m_Rsize; }
187  double MuonReadoutElement::getZsize() const { return m_Zsize; }
191  double MuonReadoutElement::getStationS() const { return m_stationS; }
192 
194 
195 
196  bool MuonReadoutElement::sideA() const { return (getStationEta() > 0); }
197  bool MuonReadoutElement::sideC() const { return (getStationEta() < 0); }
198 
199  inline const Amg::Transform3D& MuonReadoutElement::absTransform() const { return getMaterialGeom()->getAbsoluteTransform(); }
200 
201  inline const Amg::Transform3D& MuonReadoutElement::defTransform() const { return getMaterialGeom()->getDefAbsoluteTransform(); }
202 
203 } // namespace MuonGM
204 
205 #endif // MUONREADOUTGEOMETRY_MUONREADOUTELEMENT_H
TrkDetElementBase.h
MuonGM::MuonReadoutElement::AmdbLRSToGlobalTransform
virtual Amg::Transform3D AmdbLRSToGlobalTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:90
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
MuonGM::MuonReadoutElement::m_statname
std::string m_statname
examples are BMS5, CSS1, EML1
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:148
MuonGM::MuonReadoutElement::setZsize
void setZsize(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:121
MuonGM::MuonReadoutElement::absTransform
const Amg::Transform3D & absTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:199
MuonGM::MuonReadoutElement::m_id
Identifier m_id
extended data-collection identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:157
MuonGM::MuonReadoutElement::smallSector
bool smallSector() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:67
MuonGM::MuonReadoutElement::m_techname
std::string m_techname
MDT or RPC or TGC or CSC plus a two digits subtype; example RPC17.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:146
MuonGM::MuonReadoutElement::m_Zsize
double m_Zsize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:139
MuonGM::MuonReadoutElement::m_caching
int m_caching
0 if we want to avoid caching geometry info for tracking interface
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:150
MuonGM::MuonReadoutElement::setHasCutouts
void setHasCutouts(bool flag)
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:121
MuonGM::MuonReadoutElement::m_LongRsize
double m_LongRsize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:141
MuonGM::MuonReadoutElement::getStationS
double getStationS() const
Seems to be exclusively used by the MDTs --> Move it to MdtReadoutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:191
MuonGM::MuonReadoutElement::m_eta
int m_eta
Identifier field of the station eta.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:165
MuonGM::MuonReadoutElement::m_detectorElIdhash
IdentifierHash m_detectorElIdhash
detector element hash identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:159
MuonGM::MuonReadoutElement::fillCache
virtual void fillCache()=0
MuonGM::MuonReadoutElement::defTransform
const Amg::Transform3D & defTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:201
MuonGM::MuonReadoutElement::largeSector
bool largeSector() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:49
MuonGM::MuonReadoutElement::GlobalToAmdbLRSTransform
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:98
MuonGM::MuonReadoutElement::m_Ssize
double m_Ssize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:137
MuonGM::MuonReadoutElement::getZsize
double getZsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:187
MuonGM::MuonReadoutElement::detectorElementHash
IdentifierHash detectorElementHash() const
Returns the IdentifierHash of the detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:175
MuonGM::MuonReadoutElement::setLongRsize
void setLongRsize(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:117
MuonGM::MuonReadoutElement::m_parentMuonStation
const MuonStation * m_parentMuonStation
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:169
MuonGM::MuonReadoutElement::m_type
Trk::DetectorElemType m_type
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:156
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
MuonGM::MuonReadoutElement::getTechnologyName
const std::string & getTechnologyName() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:177
MuonGM::MuonReadoutElement::m_stationS
double m_stationS
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:161
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
MuonGM::MuonReadoutElement::getLongSsize
double getLongSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:188
MuonGM::MuonReadoutElement::setSsize
void setSsize(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:119
x
#define x
MuonGM::MuonReadoutElement::m_phi
int m_phi
Identifier field of the station phi.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:167
MuonGM::MuonReadoutElement
Base class for the XxxReadoutElement, with Xxx = Mdt, Rpc, Tgc, Csc.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:40
MuonGM::MuonReadoutElement::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:130
MuonGM::MuonReadoutElement::getLongRsize
double getLongRsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:189
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
MuonGM::MuonReadoutElement::getSsize
double getSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:185
MuonGM::MuonReadoutElement::setRsize
void setRsize(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:120
MuonGM::MuonReadoutElement::refreshCache
void refreshCache()
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:122
MuonGM::MuonReadoutElement::clearCache
virtual void clearCache()=0
MuonGM::MuonReadoutElement::GlobalToAmdbLRSCoords
virtual Amg::Vector3D GlobalToAmdbLRSCoords(const Amg::Vector3D &x) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:94
MuonGM::MuonReadoutElement::getStationName
const std::string & getStationName() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:179
Trk::DetectorElemType::SolidState
@ SolidState
MuonGM::MuonReadoutElement::m_Rsize
double m_Rsize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:138
MuonGM::MuonReadoutElement::getLongZsize
double getLongZsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:190
MuonGM::MuonReadoutElement::setIdentifier
void setIdentifier(const Identifier &id)
Sets the Identifier, hashes & station names.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:101
MuonGM::MuonReadoutElement::parentMuonStation
const MuonStation * parentMuonStation() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:80
master.flag
bool flag
Definition: master.py:29
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonGM::MuonReadoutElement::sideC
bool sideC() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:197
MuonGM::MuonStation
Definition: MuonStation.h:51
ATLAS_CHECK_FILE_THREAD_SAFETY
ATLAS_CHECK_FILE_THREAD_SAFETY
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:22
MuonGM::MuonReadoutElement::setTechnologyName
void setTechnologyName(const std::string &str)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:113
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
Trk::DetectorElemType
DetectorElemType
Definition: TrkDetElementBase.h:39
MuonGM::MuonReadoutElement::manager
const MuonDetectorManager * manager() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:193
MuonGM::MuonReadoutElement::m_hasCutouts
bool m_hasCutouts
true is there are cutouts in the readdout-element
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:152
MuonGM::MuonReadoutElement::getTechnologyType
std::string getTechnologyType() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:176
MuonGM::MuonReadoutElement::globalPosition
const Amg::Vector3D globalPosition() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:47
MuonGM::MuonReadoutElement::setLongSsize
void setLongSsize(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:116
MuonGM::MuonReadoutElement::detectorType
Trk::DetectorElemType detectorType() const override final
Return the Detector element type.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:132
MuonGM::MuonReadoutElement::setStationName
void setStationName(const std::string &)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:114
CLHEPtoEigenConverter.h
MuonGM::MuonReadoutElement::m_LongSsize
double m_LongSsize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:140
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
IdentifierHash.h
MuonGM::MuonReadoutElement::m_idhash
IdentifierHash m_idhash
data-collection hash identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:158
MuonGM::MuonReadoutElement::setLongZsize
void setLongZsize(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:118
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGM::MuonReadoutElement::m_LongZsize
double m_LongZsize
size in the specified direction
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:142
MuonGM::MuonReadoutElement::toParentStation
Amg::Transform3D toParentStation() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:72
MuonGM::MuonReadoutElement::getStationIndex
int getStationIndex() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:181
MuonGM::MuonReadoutElement::m_muon_mgr
MuonDetectorManager * m_muon_mgr
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:170
MuonGM::MuonReadoutElement::AmdbLRSToGlobalCoords
virtual Amg::Vector3D AmdbLRSToGlobalCoords(const Amg::Vector3D &x) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:86
MuonGM::MuonReadoutElement::getRsize
double getRsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:186
MuonGM::MuonReadoutElement::~MuonReadoutElement
virtual ~MuonReadoutElement()
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:51
MuonGM::MuonReadoutElement::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:155
MuonGM::MuonReadoutElement::containsId
virtual bool containsId(const Identifier &id) const =0
GeoPrimitivesHelpers.h
MuonGM::MuonReadoutElement::getStationType
std::string getStationType() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:178
AthMessaging.h
MuonGM::MuonReadoutElement::identify
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:173
python.changerun.pv
pv
Definition: changerun.py:79
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:27
str
Definition: BTagTrackIpAccessor.cxx:11
MuonGM::MuonReadoutElement::m_stIdx
int m_stIdx
Identifier field of the station index.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:163
MuonGM::MuonReadoutElement::identifyHash
IdentifierHash identifyHash() const override final
Returns the IdentifierHash of the MuonStation, i.e.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:174
MuonGM::MuonReadoutElement::sideA
bool sideA() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:196
MuonGM::MuonReadoutElement::parentMuonStationPos
Amg::Vector3D parentMuonStationPos() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:82
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
checker_macros.h
Define macros for attributes used to control the static checker.
MuonGM::MuonReadoutElement::hasCutouts
bool hasCutouts() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:120
MuonGM::MuonReadoutElement::MuonReadoutElement
MuonReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:34
MuonGM::MuonReadoutElement::setParentMuonStation
void setParentMuonStation(const MuonStation *)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:76
MuonGM::MuonReadoutElement::getStationPhi
int getStationPhi() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:183
IMuonIdHelperSvc.h
MuonGM::MuonReadoutElement::getStationEta
int getStationEta() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:182
ServiceHandle< Muon::IMuonIdHelperSvc >
MuonGM::MuonReadoutElement::setStationS
void setStationS(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:115
Identifier
Definition: IdentifierFieldParser.cxx:14