ATLAS Offline Software
MuonStation.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MuonReadoutGeometry_MuonStation_H
6 #define MuonReadoutGeometry_MuonStation_H
7 
11 
12 #include <map>
13 #include <memory>
14 
15 #include "GeoModelKernel/GeoAlignableTransform.h"
16 #include "GeoModelKernel/GeoFullPhysVol.h"
19 class BLinePar;
20 class MdtAsBuiltPar;
21 
22 namespace MuonGM {
23 
49  class MuonReadoutElement;
50 
51  class MuonStation: public AthMessaging {
52  public:
53  MuonStation(std::string_view stName,
54  double Ssize, double Rsize, double Zsize,
55  double LongSsize, double LongRsize, double LongZsize,
56  int zi, int fi, bool m_descratzneg);
58 
59  inline int getPhiIndex() const;
60 
61  inline int getEtaIndex() const;
62 
63  inline const std::string& getKey() const;
64  inline std::string getStationType() const;
65 
66  inline const std::string& getStationName() const;
67 
68  void setEtaPhiIndices(int eta, int phi);
69 
70  inline double Rsize() const;
71  inline double Ssize() const;
72  inline double Zsize() const;
73  inline double LongRsize() const;
74  inline double LongSsize() const;
75  inline double LongZsize() const;
76  double RsizeMdtStation() const;
77  double ZsizeMdtStation() const;
78  bool endcap() const;
79  bool barrel() const;
80 
81  inline double xAmdbCRO() const;
82  void setxAmdbCRO(double xpos);
83 
84  void setTransform(GeoAlignableTransform* xf);
85  void setBlineFixedPointInAmdbLRS(double s0, double z0, double t0);
87 
93 
94  void setDelta_fromAline_forComp(int, double, double, double, double, double, double);
95  void setDelta_fromAline(double, double, double, double, double, double);
97  void addMuonReadoutElementWithAlTransf(MuonReadoutElement* a, GeoAlignableTransform* ptrsf, int jobIndex);
98  const MuonReadoutElement* getMuonReadoutElement(int jobIndex) const;
100  GeoAlignableTransform* getComponentAlTransf(int jobIndex) const;
101 
102  inline int nMuonReadoutElements() const;
103  void clearCache();
104  void fillCache();
105  void refreshCache();
106  void setBline(const BLinePar* bline);
107  inline const GeoAlignableTransform* getGeoTransform() const;
108  inline Amg::Transform3D getTransform() const;
109  inline const Amg::Transform3D& getNativeToAmdbLRS() const;
110  inline Amg::Transform3D getAmdbLRSToGlobal() const;
111  inline const Amg::Transform3D& getNominalAmdbLRSToGlobal() const;
112  inline double getALine_tras() const;
113  inline double getALine_traz() const;
114  inline double getALine_trat() const;
115  inline double getALine_rots() const;
116  inline double getALine_rotz() const;
117  inline double getALine_rott() const;
118  inline bool hasALines() const;
119  inline bool hasBLines() const;
120  inline bool hasMdtAsBuiltParams() const;
121  const MdtAsBuiltPar* getMdtAsBuiltParams() const;
122  void setMdtAsBuiltParams(const MdtAsBuiltPar* xtomo);
123 
124  void setPhysVol(const PVLink& vol);
125  PVConstLink getPhysVol() const;
126  PVLink getPhysVol();
127  private:
128  // Declaring private message stream member.
130 
131  std::string m_statname{};
132  double m_Ssize{0.};
133  double m_Rsize{0.};
134  double m_Zsize{0.};
135  double m_LongSsize{0.};
136  double m_LongRsize{0.};
137  double m_LongZsize{0.};
138  double m_xAmdbCRO{0.};
139  bool m_descratzneg{false};
142  std::string m_key{};
143  GeoAlignableTransform* m_transform{nullptr};
144 
145  Amg::Transform3D m_delta_amdb_frame{Amg::Transform3D::Identity()};
146  Amg::Transform3D m_native_to_amdbl{Amg::Transform3D::Identity()};
147  Amg::Transform3D m_amdbl_to_global{Amg::Transform3D::Identity()}; // nominal
148  double m_rots{0.};
149  double m_rotz{0.};
150  double m_rott{0.};
151  bool m_hasALines{false};
152  bool m_hasBLines{false};
154  const MdtAsBuiltPar* m_XTomoData{nullptr};
155 
156  using pairRE_AlignTransf = std::pair<MuonReadoutElement*, GeoAlignableTransform*>;
157  std::map<int, pairRE_AlignTransf> m_REwithAlTransfInStation{};
158  PVLink m_physVol{nullptr};
160  };
161 
162  int MuonStation::getPhiIndex() const { return m_statPhiIndex; }
163  int MuonStation::getEtaIndex() const { return m_statEtaIndex; }
164  std::string MuonStation::getStationType() const { return m_statname.substr(0, 3); }
165  const std::string& MuonStation::getStationName() const { return m_statname; }
166 
167  const GeoAlignableTransform* MuonStation::getGeoTransform() const { return m_transform; }
168 
169  Amg::Transform3D MuonStation::getTransform() const { return m_transform->getTransform(); }
170 
171  const std::string& MuonStation::getKey() const { return m_key; }
172 
173  double MuonStation::Rsize() const { return m_Rsize; }
174  double MuonStation::Ssize() const { return m_Ssize; }
175  double MuonStation::Zsize() const { return m_Zsize; }
176  double MuonStation::LongRsize() const { return m_LongRsize; }
177  double MuonStation::LongSsize() const { return m_LongSsize; }
178  double MuonStation::LongZsize() const { return m_LongZsize; }
179 
180  double MuonStation::xAmdbCRO() const { return m_xAmdbCRO; }
181 
183 
185 
187 
189 
190  double MuonStation::getALine_tras() const { return m_delta_amdb_frame.translation()[0]; }
191  double MuonStation::getALine_traz() const { return m_delta_amdb_frame.translation()[1]; }
192  double MuonStation::getALine_trat() const { return m_delta_amdb_frame.translation()[2]; }
193  double MuonStation::getALine_rots() const { return m_rots; }
194  double MuonStation::getALine_rotz() const { return m_rotz; }
195  double MuonStation::getALine_rott() const { return m_rott; }
196  bool MuonStation::hasALines() const { return m_hasALines; }
197  bool MuonStation::hasBLines() const { return m_hasBLines; }
198  bool MuonStation::hasMdtAsBuiltParams() const { return m_XTomoData != nullptr; }
199 
200 } // namespace MuonGM
201 
202 #endif
MuonGM::MuonStation::setEtaPhiIndices
void setEtaPhiIndices(int eta, int phi)
a la AMDB
Definition: MuonStation.cxx:45
MuonGM::MuonStation::m_XTomoData
const MdtAsBuiltPar * m_XTomoData
Definition: MuonStation.h:154
MuonGM::MuonStation::m_descratzneg
bool m_descratzneg
Definition: MuonStation.h:139
MuonGM::MuonStation::getALine_trat
double getALine_trat() const
Definition: MuonStation.h:192
MuonGM::MuonStation::getStationType
std::string getStationType() const
like BMS, T1F, CSL
Definition: MuonStation.h:164
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
MuonGM::MuonStation::setDelta_fromAline_forComp
void setDelta_fromAline_forComp(int, double, double, double, double, double, double)
Definition: MuonStation.cxx:188
MuonGM::MuonStation::getAmdbLRSToGlobal
Amg::Transform3D getAmdbLRSToGlobal() const
Definition: MuonStation.h:186
MuonGM::MuonStation::m_native_to_amdbl
Amg::Transform3D m_native_to_amdbl
Definition: MuonStation.h:146
MuonGM::MuonStation::m_REwithAlTransfInStation
std::map< int, pairRE_AlignTransf > m_REwithAlTransfInStation
keep track of the REs in this station
Definition: MuonStation.h:157
MuonGM::MuonStation::fillCache
void fillCache()
Definition: MuonStation.cxx:253
MuonGM::MuonStation::getPhysVol
PVConstLink getPhysVol() const
Definition: MuonStation.cxx:381
MuonGM::MuonStation::m_hasBLines
bool m_hasBLines
Definition: MuonStation.h:152
MuonGM::MuonStation::m_hasALines
bool m_hasALines
Definition: MuonStation.h:151
MuonGM::MuonStation::m_LongRsize
double m_LongRsize
Definition: MuonStation.h:136
MuonGM::MuonStation::getALine_rotz
double getALine_rotz() const
Definition: MuonStation.h:194
MuonGM::MuonStation::pairRE_AlignTransf
std::pair< MuonReadoutElement *, GeoAlignableTransform * > pairRE_AlignTransf
Definition: MuonStation.h:156
MuonGM::MuonStation::getALine_traz
double getALine_traz() const
Definition: MuonStation.h:191
MuonGM::MuonStation::getTransform
Amg::Transform3D getTransform() const
Definition: MuonStation.h:169
MuonGM::MuonStation::getALine_tras
double getALine_tras() const
Definition: MuonStation.h:190
MuonGM::MuonStation::setBlineFixedPointInAmdbLRS
void setBlineFixedPointInAmdbLRS(double s0, double z0, double t0)
Definition: MuonStation.cxx:65
MuonGM::MuonStation::setMdtAsBuiltParams
void setMdtAsBuiltParams(const MdtAsBuiltPar *xtomo)
Definition: MuonStation.cxx:376
MuonGM::MuonStation::m_physVol
PVLink m_physVol
Link the full physical volume associated with the station.
Definition: MuonStation.h:159
MuonGM::MuonStation::~MuonStation
~MuonStation()
MuonGM::MuonStation::updateBlineFixedPointInAmdbLRS
void updateBlineFixedPointInAmdbLRS()
Definition: MuonStation.cxx:86
MuonGM::MuonStation::m_delta_amdb_frame
Amg::Transform3D m_delta_amdb_frame
Definition: MuonStation.h:145
MuonGM::MuonStation::endcap
bool endcap() const
Definition: MuonStation.cxx:367
MuonGM::MuonStation::getStationName
const std::string & getStationName() const
like BMS5, T1F1, CSL1
Definition: MuonStation.h:165
MuonGM::MuonStation::LongZsize
double LongZsize() const
Definition: MuonStation.h:178
MuonGM::MuonStation::m_BlineFixedPointInAmdbLRS
Amg::Vector3D m_BlineFixedPointInAmdbLRS
Definition: MuonStation.h:153
MuonGM::MuonStation::getComponentAlTransf
GeoAlignableTransform * getComponentAlTransf(int jobIndex) const
Definition: MuonStation.cxx:173
MuonGM::MuonStation::m_rots
double m_rots
Definition: MuonStation.h:148
MuonGM::MuonReadoutElement
Base class for the XxxReadoutElement, with Xxx = Mdt, Rpc, Tgc, Csc.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:40
MuonGM::MuonStation::getMuonReadoutElement
const MuonReadoutElement * getMuonReadoutElement(int jobIndex) const
Definition: MuonStation.cxx:163
MuonGM::MuonStation::m_statPhiIndex
int m_statPhiIndex
Definition: MuonStation.h:140
MuonGM::MuonStation::getKey
const std::string & getKey() const
Definition: MuonStation.h:171
MuonGM::MuonStation::Ssize
double Ssize() const
Definition: MuonStation.h:174
MuonGM::MuonStation::m_amdbl_to_global
Amg::Transform3D m_amdbl_to_global
Definition: MuonStation.h:147
MuonGM::MuonStation::getPhiIndex
int getPhiIndex() const
a la AMDB
Definition: MuonStation.h:162
MuonGM::MuonStation::Zsize
double Zsize() const
Definition: MuonStation.h:175
MuonGM::MuonStation::setNativeToAmdbLRS
void setNativeToAmdbLRS(Amg::Transform3D xf)
Definition: MuonStation.cxx:54
MuonGM::MuonStation::m_xAmdbCRO
double m_xAmdbCRO
Definition: MuonStation.h:138
MuonGM::MuonStation::LongRsize
double LongRsize() const
Definition: MuonStation.h:176
MuonGM::MuonStation::Rsize
double Rsize() const
Definition: MuonStation.h:173
MuonGM::MuonStation::getALine_rott
double getALine_rott() const
Definition: MuonStation.h:195
MuonGM::MuonStation::setTransform
void setTransform(GeoAlignableTransform *xf)
Definition: MuonStation.cxx:50
MuonGM::MuonStation::m_key
std::string m_key
Definition: MuonStation.h:142
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonGM::MuonStation
Definition: MuonStation.h:51
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
MuonGM::MuonStation::getNominalAmdbLRSToGlobal
const Amg::Transform3D & getNominalAmdbLRSToGlobal() const
Definition: MuonStation.h:184
MuonGM::MuonStation::getNativeToAmdbLRS
const Amg::Transform3D & getNativeToAmdbLRS() const
Definition: MuonStation.h:182
MuonGM::MuonStation::refreshCache
void refreshCache()
Definition: MuonStation.cxx:266
MuonGM::MuonStation::barrel
bool barrel() const
Definition: MuonStation.cxx:364
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
BLinePar
Definition: BLinePar.h:14
GlobalUtilities.h
MuonGM::MuonStation::getGeoTransform
const GeoAlignableTransform * getGeoTransform() const
Definition: MuonStation.h:167
CLHEPtoEigenConverter.h
MuonGM::MuonStation::m_firstRequestBlineFixedP
bool m_firstRequestBlineFixedP
Definition: MuonStation.h:129
MuonGM::MuonStation::setBline
void setBline(const BLinePar *bline)
Definition: MuonStation.cxx:271
MuonGM::MuonStation::m_transform
GeoAlignableTransform * m_transform
Definition: MuonStation.h:143
MuonGM::MuonStation::nMuonReadoutElements
int nMuonReadoutElements() const
Definition: MuonStation.h:188
MuonGM::MuonStation::m_LongSsize
double m_LongSsize
Definition: MuonStation.h:135
MuonGM::MuonStation::setDelta_fromAline
void setDelta_fromAline(double, double, double, double, double, double)
set the delta transform in the amdb frame and update the geoModel Delta
Definition: MuonStation.cxx:140
MuonGM::MuonStation::m_LongZsize
double m_LongZsize
Definition: MuonStation.h:137
MuonGM::MuonStation::m_Ssize
double m_Ssize
Definition: MuonStation.h:132
MuonGM::MuonStation::hasMdtAsBuiltParams
bool hasMdtAsBuiltParams() const
Definition: MuonStation.h:198
MuonGM::MuonStation::setPhysVol
void setPhysVol(const PVLink &vol)
Definition: MuonStation.cxx:380
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGM::MuonStation::m_statname
std::string m_statname
Definition: MuonStation.h:131
MuonGM::MuonStation::m_rotz
double m_rotz
Definition: MuonStation.h:149
MuonGM::MuonStation::addMuonReadoutElementWithAlTransf
void addMuonReadoutElementWithAlTransf(MuonReadoutElement *a, GeoAlignableTransform *ptrsf, int jobIndex)
Definition: MuonStation.cxx:178
MuonGM::MuonStation::MuonStation
MuonStation(std::string_view stName, double Ssize, double Rsize, double Zsize, double LongSsize, double LongRsize, double LongZsize, int zi, int fi, bool m_descratzneg)
Definition: MuonStation.cxx:26
MdtAsBuiltPar
Container classifier the MDT as-built parameters See parameter description in http://atlas-muon-align...
Definition: MdtAsBuiltPar.h:18
a
TList * a
Definition: liststreamerinfos.cxx:10
MuonGM::MuonStation::clearCache
void clearCache()
Definition: MuonStation.cxx:238
MuonGM::MuonStation::RsizeMdtStation
double RsizeMdtStation() const
Definition: MuonStation.cxx:295
MuonGM::MuonStation::m_Rsize
double m_Rsize
Definition: MuonStation.h:133
GeoPrimitivesHelpers.h
MuonGM::MuonStation::getEtaIndex
int getEtaIndex() const
a la AMDB
Definition: MuonStation.h:163
AthMessaging.h
MuonGM::MuonStation::getMdtAsBuiltParams
const MdtAsBuiltPar * getMdtAsBuiltParams() const
Definition: MuonStation.cxx:369
checkFileSG.fi
fi
Definition: checkFileSG.py:65
MuonGM::MuonStation::hasALines
bool hasALines() const
Definition: MuonStation.h:196
MuonGM::MuonStation::m_statEtaIndex
int m_statEtaIndex
Definition: MuonStation.h:141
MuonGM::MuonStation::xAmdbCRO
double xAmdbCRO() const
Definition: MuonStation.h:180
MuonGM::MuonStation::getBlineFixedPointInAmdbLRS
const Amg::Vector3D & getBlineFixedPointInAmdbLRS() const
Definition: MuonStation.cxx:81
MuonGM::MuonStation::setDeltaAmdbLRS
void setDeltaAmdbLRS(Amg::Transform3D xf)
set the delta transform in the amdb frame and update the geoModel Delta
Definition: MuonStation.cxx:131
MuonGM::MuonStation::ZsizeMdtStation
double ZsizeMdtStation() const
Definition: MuonStation.cxx:327
MuonGM::MuonStation::getALine_rots
double getALine_rots() const
Definition: MuonStation.h:193
MuonGM::MuonStation::hasBLines
bool hasBLines() const
Definition: MuonStation.h:197
MuonGM::MuonStation::LongSsize
double LongSsize() const
Definition: MuonStation.h:177
MuonGM::MuonStation::setxAmdbCRO
void setxAmdbCRO(double xpos)
Definition: MuonStation.cxx:52
MuonGM::MuonStation::setNominalAmdbLRSToGlobal
void setNominalAmdbLRSToGlobal(Amg::Transform3D xf)
Definition: MuonStation.cxx:60
MuonGM::MuonStation::m_Zsize
double m_Zsize
Definition: MuonStation.h:134
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonGM::MuonStation::m_rott
double m_rott
Definition: MuonStation.h:150