ATLAS Offline Software
Loading...
Searching...
No Matches
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
24namespace MuonGM {
25
26
27 class MuonDetectorManager;
28 class MuonStation;
29
39
41 public:
42 // Destructor default
44
45
48 inline Identifier identify() const override final;
51 inline IdentifierHash identifyHash() const override final;
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; }
121 void setHasCutouts(bool flag) { m_hasCutouts = flag; }
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:
135 MuonReadoutElement(GeoVFullPhysVol* pv, MuonDetectorManager* mgr, Trk::DetectorElemType detType);
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
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; }
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
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
#define x
Define macros for attributes used to control the static checker.
#define ATLAS_CHECK_FILE_THREAD_SAFETY
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
This is a "hash" representation of an Identifier.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
void setIdentifier(const Identifier &id)
Sets the Identifier, hashes & station names.
MuonReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)
IdentifierHash identifyHash() const override final
Returns the IdentifierHash of the MuonStation, i.e.
IdentifierHash detectorElementHash() const
Returns the IdentifierHash of the detector element.
virtual void fillCache()=0
virtual Amg::Vector3D AmdbLRSToGlobalCoords(const Amg::Vector3D &x) const
Trk::DetectorElemType detectorType() const override final
Return the Detector element type.
double getStationS() const
Seems to be exclusively used by the MDTs --> Move it to MdtReadoutElement.
virtual Amg::Vector3D GlobalToAmdbLRSCoords(const Amg::Vector3D &x) const
virtual void clearCache()=0
std::string m_techname
MDT or RPC or TGC or CSC plus a two digits subtype; example RPC17.
int m_caching
0 if we want to avoid caching geometry info for tracking interface
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
virtual bool containsId(const Identifier &id) const =0
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
This is the base class for all tracking detector elements with read-out relevant information.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Affine3d Transform3D
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27
STL namespace.