ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MuonGM::MuonStation Class Reference

#include <MuonStation.h>

Inheritance diagram for MuonGM::MuonStation:
Collaboration diagram for MuonGM::MuonStation:

Public Member Functions

 MuonStation (std::string_view stName, double Ssize, double Rsize, double Zsize, double LongSsize, double LongRsize, double LongZsize, int zi, int fi, bool m_descratzneg)
 
 ~MuonStation ()
 
int getPhiIndex () const
 a la AMDB More...
 
int getEtaIndex () const
 a la AMDB More...
 
const std::string & getKey () const
 
std::string getStationType () const
 like BMS, T1F, CSL More...
 
const std::string & getStationName () const
 like BMS5, T1F1, CSL1 More...
 
void setEtaPhiIndices (int eta, int phi)
 a la AMDB More...
 
double Rsize () const
 
double Ssize () const
 
double Zsize () const
 
double LongRsize () const
 
double LongSsize () const
 
double LongZsize () const
 
double RsizeMdtStation () const
 
double ZsizeMdtStation () const
 
bool endcap () const
 
bool barrel () const
 
double xAmdbCRO () const
 
void setxAmdbCRO (double xpos)
 
void setTransform (GeoAlignableTransform *xf)
 
void setBlineFixedPointInAmdbLRS (double s0, double z0, double t0)
 
const Amg::Vector3DgetBlineFixedPointInAmdbLRS () const
 
const Amg::Vector3DgetUpdatedBlineFixedPointInAmdbLRS () const
 
void updateBlineFixedPointInAmdbLRS ()
 
void setNativeToAmdbLRS (Amg::Transform3D xf)
 
void setNominalAmdbLRSToGlobal (Amg::Transform3D xf)
 
void setDeltaAmdbLRS (Amg::Transform3D xf)
 set the delta transform in the amdb frame and update the geoModel Delta More...
 
void setDelta_fromAline_forComp (int, double, double, double, double, double, double)
 
void setDelta_fromAline (double, double, double, double, double, double)
 set the delta transform in the amdb frame and update the geoModel Delta More...
 
void addMuonReadoutElementWithAlTransf (MuonReadoutElement *a, GeoAlignableTransform *ptrsf, int jobIndex)
 
const MuonReadoutElementgetMuonReadoutElement (int jobIndex) const
 
MuonReadoutElementgetMuonReadoutElement (int jobIndex)
 
GeoAlignableTransform * getComponentAlTransf (int jobIndex) const
 
int nMuonReadoutElements () const
 
void clearCache ()
 
void fillCache ()
 
void refreshCache ()
 
void setBline (const BLinePar *bline)
 
const GeoAlignableTransform * getGeoTransform () const
 
Amg::Transform3D getTransform () const
 
const Amg::Transform3DgetNativeToAmdbLRS () const
 
Amg::Transform3D getAmdbLRSToGlobal () const
 
const Amg::Transform3DgetNominalAmdbLRSToGlobal () const
 
double getALine_tras () const
 
double getALine_traz () const
 
double getALine_trat () const
 
double getALine_rots () const
 
double getALine_rotz () const
 
double getALine_rott () const
 
bool hasALines () const
 
bool hasBLines () const
 
bool hasMdtAsBuiltParams () const
 
const MdtAsBuiltPargetMdtAsBuiltParams () const
 
void setMdtAsBuiltParams (const MdtAsBuiltPar *xtomo)
 
void setPhysVol (const PVLink &vol)
 
PVConstLink getPhysVol () const
 
PVLink getPhysVol ()
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Private Types

using pairRE_AlignTransf = std::pair< MuonReadoutElement *, GeoAlignableTransform * >
 

Private Member Functions

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

Private Attributes

bool m_firstRequestBlineFixedP {true}
 
std::string m_statname {}
 
double m_Ssize {0.}
 
double m_Rsize {0.}
 
double m_Zsize {0.}
 
double m_LongSsize {0.}
 
double m_LongRsize {0.}
 
double m_LongZsize {0.}
 
double m_xAmdbCRO {0.}
 
bool m_descratzneg {false}
 
int m_statPhiIndex {0}
 
int m_statEtaIndex {0}
 
std::string m_key {}
 
GeoAlignableTransform * m_transform {nullptr}
 
Amg::Transform3D m_delta_amdb_frame {Amg::Transform3D::Identity()}
 
Amg::Transform3D m_native_to_amdbl {Amg::Transform3D::Identity()}
 
Amg::Transform3D m_amdbl_to_global {Amg::Transform3D::Identity()}
 
double m_rots {0.}
 
double m_rotz {0.}
 
double m_rott {0.}
 
bool m_hasALines {false}
 
bool m_hasBLines {false}
 
Amg::Vector3D m_BlineFixedPointInAmdbLRS {Amg::Vector3D::Zero()}
 
const MdtAsBuiltParm_XTomoData {nullptr}
 
std::map< int, pairRE_AlignTransfm_REwithAlTransfInStation {}
 keep track of the REs in this station More...
 
PVLink m_physVol {nullptr}
 Link the full physical volume associated with the station. More...
 
std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Detailed Description

Definition at line 51 of file MuonStation.h.

Member Typedef Documentation

◆ pairRE_AlignTransf

using MuonGM::MuonStation::pairRE_AlignTransf = std::pair<MuonReadoutElement*, GeoAlignableTransform*>
private

Definition at line 156 of file MuonStation.h.

Constructor & Destructor Documentation

◆ MuonStation()

MuonGM::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 at line 26 of file MuonStation.cxx.

26  :
27  AthMessaging{"MuonStation"},
28  m_statname(stName) {
29  m_Ssize = Ssize;
30  m_Rsize = Rsize;
31  m_Zsize = Zsize;
35  m_descratzneg = descratzneg;
36  m_statEtaIndex = zi;
38  }
39 
40  MuonStation::~MuonStation() = default;
41 

◆ ~MuonStation()

MuonGM::MuonStation::~MuonStation ( )
default

Member Function Documentation

◆ addMuonReadoutElementWithAlTransf()

void MuonGM::MuonStation::addMuonReadoutElementWithAlTransf ( MuonReadoutElement a,
GeoAlignableTransform *  ptrsf,
int  jobIndex 
)

Definition at line 180 of file MuonStation.cxx.

188  {

◆ barrel()

bool MuonGM::MuonStation::barrel ( ) const

Definition at line 366 of file MuonStation.cxx.

366  { return !barrel(); }
367 

◆ clearCache()

void MuonGM::MuonStation::clearCache ( )

Definition at line 240 of file MuonStation.cxx.

242  {
243  ATH_MSG_WARNING(" in MuonStation:clearCache " << getStationType() << " at zi/fi " << getEtaIndex() << "/"
244  << getPhiIndex() << " trying to get a not existing RE (iteration n. ) " << jobId << " RE is null, skipping" );
245  continue;
246  }
247  re->clearCache();
248  ATH_MSG_DEBUG("cache cleared ");
249  }
250  }
251 
252  void MuonStation::fillCache() {
253  for (auto& [jobId, readAlignPair] : m_REwithAlTransfInStation) {

◆ endcap()

bool MuonGM::MuonStation::endcap ( ) const

Definition at line 369 of file MuonStation.cxx.

369 {

◆ fillCache()

void MuonGM::MuonStation::fillCache ( )

Definition at line 255 of file MuonStation.cxx.

256  {
257  ATH_MSG_WARNING(" in MuonStation:fillCache " << getStationType() << " at zi/fi " << getEtaIndex() << "/"
258  << getPhiIndex() << " trying to get a not existing RE (iteration n. ) " << jobId << " RE is null, skipping" );
259  continue;
260  }
261  re->fillCache();
262  }
263  }
264 
266  clearCache();

◆ getALine_rots()

double MuonGM::MuonStation::getALine_rots ( ) const
inline

Definition at line 193 of file MuonStation.h.

193 { return m_rots; }

◆ getALine_rott()

double MuonGM::MuonStation::getALine_rott ( ) const
inline

Definition at line 195 of file MuonStation.h.

195 { return m_rott; }

◆ getALine_rotz()

double MuonGM::MuonStation::getALine_rotz ( ) const
inline

Definition at line 194 of file MuonStation.h.

194 { return m_rotz; }

◆ getALine_tras()

double MuonGM::MuonStation::getALine_tras ( ) const
inline

Definition at line 190 of file MuonStation.h.

190 { return m_delta_amdb_frame.translation()[0]; }

◆ getALine_trat()

double MuonGM::MuonStation::getALine_trat ( ) const
inline

Definition at line 192 of file MuonStation.h.

192 { return m_delta_amdb_frame.translation()[2]; }

◆ getALine_traz()

double MuonGM::MuonStation::getALine_traz ( ) const
inline

Definition at line 191 of file MuonStation.h.

191 { return m_delta_amdb_frame.translation()[1]; }

◆ getAmdbLRSToGlobal()

Amg::Transform3D MuonGM::MuonStation::getAmdbLRSToGlobal ( ) const
inline

Definition at line 186 of file MuonStation.h.

◆ getBlineFixedPointInAmdbLRS()

const Amg::Vector3D & MuonGM::MuonStation::getBlineFixedPointInAmdbLRS ( ) const

Definition at line 81 of file MuonStation.cxx.

83  { return m_BlineFixedPointInAmdbLRS; }
84 

◆ getComponentAlTransf()

GeoAlignableTransform * MuonGM::MuonStation::getComponentAlTransf ( int  jobIndex) const

Definition at line 175 of file MuonStation.cxx.

177  {
178  ATH_MSG_DEBUG("addMuonReadoutElementWithAlTransf for station " << getStationName() << " at zi/fi = " << getEtaIndex()

◆ getEtaIndex()

int MuonGM::MuonStation::getEtaIndex ( ) const
inline

a la AMDB

Definition at line 163 of file MuonStation.h.

163 { return m_statEtaIndex; }

◆ getGeoTransform()

const GeoAlignableTransform * MuonGM::MuonStation::getGeoTransform ( ) const
inline

Definition at line 167 of file MuonStation.h.

167 { return m_transform; }

◆ getKey()

const std::string & MuonGM::MuonStation::getKey ( ) const
inline

Definition at line 171 of file MuonStation.h.

171 { return m_key; }

◆ getMdtAsBuiltParams()

const MdtAsBuiltPar * MuonGM::MuonStation::getMdtAsBuiltParams ( ) const

Definition at line 371 of file MuonStation.cxx.

375  {
376  m_XTomoData = xtomo;

◆ getMuonReadoutElement() [1/2]

MuonReadoutElement * MuonGM::MuonStation::getMuonReadoutElement ( int  jobIndex)

Definition at line 170 of file MuonStation.cxx.

172  {
173  std::map<int, pairRE_AlignTransf>::const_iterator itr = m_REwithAlTransfInStation.find(jobIndex);

◆ getMuonReadoutElement() [2/2]

const MuonReadoutElement * MuonGM::MuonStation::getMuonReadoutElement ( int  jobIndex) const

Definition at line 165 of file MuonStation.cxx.

167  {
168  std::map<int, pairRE_AlignTransf>::const_iterator itr = m_REwithAlTransfInStation.find(jobIndex);

◆ getNativeToAmdbLRS()

const Amg::Transform3D & MuonGM::MuonStation::getNativeToAmdbLRS ( ) const
inline

Definition at line 182 of file MuonStation.h.

182 { return m_native_to_amdbl; }

◆ getNominalAmdbLRSToGlobal()

const Amg::Transform3D & MuonGM::MuonStation::getNominalAmdbLRSToGlobal ( ) const
inline

Definition at line 184 of file MuonStation.h.

184 { return m_amdbl_to_global; }

◆ getPhiIndex()

int MuonGM::MuonStation::getPhiIndex ( ) const
inline

a la AMDB

Definition at line 162 of file MuonStation.h.

162 { return m_statPhiIndex; }

◆ getPhysVol() [1/2]

PVLink MuonGM::MuonStation::getPhysVol ( )

Definition at line 384 of file MuonStation.cxx.

◆ getPhysVol() [2/2]

PVConstLink MuonGM::MuonStation::getPhysVol ( ) const

Definition at line 383 of file MuonStation.cxx.

◆ getStationName()

const std::string & MuonGM::MuonStation::getStationName ( ) const
inline

like BMS5, T1F1, CSL1

Definition at line 165 of file MuonStation.h.

165 { return m_statname; }

◆ getStationType()

std::string MuonGM::MuonStation::getStationType ( ) const
inline

like BMS, T1F, CSL

Definition at line 164 of file MuonStation.h.

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

◆ getTransform()

Amg::Transform3D MuonGM::MuonStation::getTransform ( ) const
inline

Definition at line 169 of file MuonStation.h.

169 { return m_transform->getTransform(); }

◆ getUpdatedBlineFixedPointInAmdbLRS()

const Amg::Vector3D & MuonGM::MuonStation::getUpdatedBlineFixedPointInAmdbLRS ( ) const

Definition at line 86 of file MuonStation.cxx.

93 {

◆ hasALines()

bool MuonGM::MuonStation::hasALines ( ) const
inline

Definition at line 196 of file MuonStation.h.

196 { return m_hasALines; }

◆ hasBLines()

bool MuonGM::MuonStation::hasBLines ( ) const
inline

Definition at line 197 of file MuonStation.h.

197 { return m_hasBLines; }

◆ hasMdtAsBuiltParams()

bool MuonGM::MuonStation::hasMdtAsBuiltParams ( ) const
inline

Definition at line 198 of file MuonStation.h.

198 { return m_XTomoData != nullptr; }

◆ 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  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ LongRsize()

double MuonGM::MuonStation::LongRsize ( ) const
inline

Definition at line 176 of file MuonStation.h.

176 { return m_LongRsize; }

◆ LongSsize()

double MuonGM::MuonStation::LongSsize ( ) const
inline

Definition at line 177 of file MuonStation.h.

177 { return m_LongSsize; }

◆ LongZsize()

double MuonGM::MuonStation::LongZsize ( ) const
inline

Definition at line 178 of file MuonStation.h.

178 { return m_LongZsize; }

◆ 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 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ 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 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ 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_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ nMuonReadoutElements()

int MuonGM::MuonStation::nMuonReadoutElements ( ) const
inline

Definition at line 188 of file MuonStation.h.

188 { return m_REwithAlTransfInStation.size(); }

◆ refreshCache()

void MuonGM::MuonStation::refreshCache ( )

Definition at line 268 of file MuonStation.cxx.

270  {
271  if (!bline) return;

◆ Rsize()

double MuonGM::MuonStation::Rsize ( ) const
inline

Definition at line 173 of file MuonStation.h.

173 { return m_Rsize; }

◆ RsizeMdtStation()

double MuonGM::MuonStation::RsizeMdtStation ( ) const

Definition at line 297 of file MuonStation.cxx.

299  bool first = true;
300  int nmdt = 0;
301  ATH_MSG_DEBUG("RsizeMdtStation for " << getStationType() << " at zi/fi " << getEtaIndex() << "/" << getPhiIndex()
302  << " nRE = " << nMuonReadoutElements());
303 
304  for (int j = 1; j < 30; ++j) {
305  const MuonReadoutElement* activeComponent = getMuonReadoutElement(j);
306  if (!activeComponent) continue;
307  if (activeComponent->detectorType() !=Trk::DetectorElemType::Mdt) {
308  continue;
309  }
310  ++nmdt;
311  Rsize += activeComponent->getRsize() / 2.;
312  Rpos = activeComponent->toParentStation().translation();
313  if (first) {
314  RposFirst = Rpos;
315  first = false;
316  } else {
317  if (barrel())
318  Rsize += std::abs(Rpos.x() - RposFirst.x());
319  else
320  Rsize += std::abs(Rpos.y() - RposFirst.y());
321  }
322  }
323  if (nmdt == 1) Rsize = 2. * Rsize;
324  return Rsize;
325  }
326  double MuonStation::ZsizeMdtStation() const {
327  if (getStationName()[0] == 'T' || getStationName()[0] == 'C') return 0.; // TGC and CSC stations
328  double Zsize = 0.;

◆ setBline()

void MuonGM::MuonStation::setBline ( const BLinePar bline)

Definition at line 273 of file MuonStation.cxx.

274  ATH_MSG_DEBUG("fillCache cache .... for RE ... iteration n. " << jobId);
275  MuonReadoutElement* re = readAlignPair.first;
276  if (re->detectorType() !=Trk::DetectorElemType::Mdt) {
277  continue;
278  }
279  MdtReadoutElement* mdt = dynamic_cast<MdtReadoutElement*>(re);
280  mdt->setBLinePar(bline);
281  }
282  }
283 
284 
285 #if defined(FLATTEN)

◆ setBlineFixedPointInAmdbLRS()

void MuonGM::MuonStation::setBlineFixedPointInAmdbLRS ( double  s0,
double  z0,
double  t0 
)

Definition at line 65 of file MuonStation.cxx.

72  : stationName/Jff/Jzz " << getStationType() << " " << getPhiIndex() << " "
73  << getEtaIndex() << " nominal(i.e. from-station-envelop-only) B-line fixed point "
74  << Amg::toString(m_BlineFixedPointInAmdbLRS));
75 
76  }
77 
78  const Amg::Vector3D& MuonStation::getBlineFixedPointInAmdbLRS() const {
79  // needed to update the station-level BlineFixedPoint with data from second multilayer

◆ setDelta_fromAline()

void MuonGM::MuonStation::setDelta_fromAline ( double  tras,
double  traz,
double  trat,
double  rots,
double  rotz,
double  rott 
)

set the delta transform in the amdb frame and update the geoModel Delta

Definition at line 142 of file MuonStation.cxx.

145  {Amg::Transform3D::Identity()};
146  if (std::abs(tras) + std::abs(traz) + std::abs(trat) + (std::abs(rots) + std::abs(rotz) + std::abs(rott)) * 1000. > 0.01) {
147  // compute the delta transform in the local AMDB frame
148  delta_amdb = Amg::Translation3D{tras, traz, trat} *
150  m_hasALines = true;
151  }
152 
153  // store the delta transform in the local AMDB frame
154  setDeltaAmdbLRS(delta_amdb);
155 
156  ATH_MSG_DEBUG("Station " << getStationType() << " at zi/fi " << getEtaIndex() << "/" << getPhiIndex()
157  << " adding Aline " << setiosflags(std::ios::fixed) << std::setprecision(6) << std::setw(12)
158  << tras << " " << traz << " " << trat << " " << rots << " " << rotz << " " << rott << std::endl
159  << " delta_amdb computed from A-line " << Amg::toString(delta_amdb));
160  }
161 
162  const MuonReadoutElement* MuonStation::getMuonReadoutElement(int jobIndex) const {
163  std::map<int, pairRE_AlignTransf>::const_iterator itr = m_REwithAlTransfInStation.find(jobIndex);

◆ setDelta_fromAline_forComp()

void MuonGM::MuonStation::setDelta_fromAline_forComp ( int  jobindex,
double  tras,
double  traz,
double  trat,
double  rots,
double  rotz,
double  rott 
)

this is what happens for a full station : m_transform->setDelta( m_native_to_amdbl->inverse() * m_delta_amdb_frame * m_native_to_amdbl );

Definition at line 190 of file MuonStation.cxx.

190  {
191  ATH_MSG_WARNING( "setDelta_fromAline_forComp: WARNING: component for index " << jobindex
192  << " not found in MuonStation named " << getStationName() << " at zi/fi = " << getEtaIndex() << "/" << getPhiIndex());
193  return;
194  }
195  if (std::abs(tras) + std::abs(traz) + std::abs(trat) + (std::abs(rots) + std::abs(rotz) + std::abs(rott)) * 1000. < 0.01) {
196  ATH_MSG_DEBUG("setDelta_fromAline_forComp: A-line ignored --- too small (translations < 10microns & rotations <10microrad)");
197  return;
198  }
199 
202 
203  Amg::Transform3D parentToChildT = parentToChild->getTransform();
204  Amg::Transform3D delta_amdb = Amg::Translation3D{tras, traz, trat} *
206  // The station to component transform is static and must be computed in terms of "nominal geometry parameters"; fixing here bug
207  const Amg::Vector3D thisREnominalCenter{getMuonReadoutElement(jobindex)->defTransform().translation()};
208  double Rcomp = thisREnominalCenter.perp() - (getMuonReadoutElement(jobindex)->getRsize()) / 2.;
209  double DZcomp = std::abs(thisREnominalCenter.z()) - std::abs((m_amdbl_to_global.translation()).z()) -
210  std::abs((getMuonReadoutElement(jobindex)->getZsize()) / 2.);
211 
212  Amg::Transform3D childToLocAmdbStation = m_native_to_amdbl * parentToChildT;
213  Amg::Transform3D locAmdbStatToLocAmdbComp{Amg::Transform3D::Identity()};
214  // the following line is needed to go for scenario B in last slide of
215  // http://www.fisica.unisalento.it/~spagnolo/allow_listing/TGC_Alines/TGC-ALines_2011_03_01.pdf COMMENT next line to go
216  // for scenario A in last slide of http://www.fisica.unisalento.it/~spagnolo/allow_listing/TGC_Alines/TGC-ALines_2011_03_01.pdf
217  if (getStationType()[0] == 'T') locAmdbStatToLocAmdbComp = Amg::Translation3D{0,-Rcomp, -DZcomp};
218  Amg::Transform3D childToLocAmdbComponent = locAmdbStatToLocAmdbComp * childToLocAmdbStation;
219 
220  ATH_MSG_DEBUG("setDelta_fromAline_forComp: stationName/Jff/Jzz " << getStationType() << " " << getPhiIndex() << " "
221  << getEtaIndex() << " Job " << jobindex << " Origin of component/station AmdbLocalFrame= "
222  <<Amg::toString(m_amdbl_to_global * locAmdbStatToLocAmdbComp.inverse().translation()) << " / "
223  << Amg::toString(m_amdbl_to_global.translation()));
224 
225  parentToChild->setDelta(childToLocAmdbComponent.inverse() * delta_amdb * childToLocAmdbComponent);
226  ATH_MSG_DEBUG("setDelta_fromAline_forComp2:stationName/Jff/Jzz " << getStationType() << " " << getPhiIndex() << " "
227  << getEtaIndex() << " Job " << jobindex << " Origin of component/station AmdbLocalFrame= "
228  << Amg::toString(m_amdbl_to_global * locAmdbStatToLocAmdbComp.inverse().translation()) << " / "
229  << Amg::toString(m_amdbl_to_global.translation()));
230 
231  ATH_MSG_DEBUG("Station " << getStationType() << " at zi/fi " << getEtaIndex() << "/" << getPhiIndex()
232  << " adding Aline " << tras << " " << traz << " " << trat << " " << rots << " " << rotz << " " << rott
233  << " for component with index =" << jobindex << std::endl
234  << " delta_amdb computed from A-line " <<Amg::toString(delta_amdb));
235  }
236 
237  void MuonStation::clearCache() {
238  ATH_MSG_DEBUG("n. of RE in this station is " << m_REwithAlTransfInStation.size());

◆ setDeltaAmdbLRS()

void MuonGM::MuonStation::setDeltaAmdbLRS ( Amg::Transform3D  xf)

set the delta transform in the amdb frame and update the geoModel Delta

Definition at line 133 of file MuonStation.cxx.

139  {
140  // store here the angles of A-line

◆ setEtaPhiIndices()

void MuonGM::MuonStation::setEtaPhiIndices ( int  eta,
int  phi 
)

a la AMDB

Definition at line 45 of file MuonStation.cxx.

47  { m_transform = xf; }
48 

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

◆ setMdtAsBuiltParams()

void MuonGM::MuonStation::setMdtAsBuiltParams ( const MdtAsBuiltPar xtomo)

Definition at line 378 of file MuonStation.cxx.

379  { m_physVol = vol; }
380  PVConstLink MuonStation::getPhysVol() const {return m_physVol; }
381  PVLink MuonStation::getPhysVol() { return m_physVol; }

◆ setNativeToAmdbLRS()

void MuonGM::MuonStation::setNativeToAmdbLRS ( Amg::Transform3D  xf)

Definition at line 54 of file MuonStation.cxx.

54  : "<<Amg::toString(m_native_to_amdbl));
55  }
56 
57  void MuonStation::setNominalAmdbLRSToGlobal(Amg::Transform3D xf) {
58  m_amdbl_to_global = std::move(xf);

◆ setNominalAmdbLRSToGlobal()

void MuonGM::MuonStation::setNominalAmdbLRSToGlobal ( Amg::Transform3D  xf)

Definition at line 60 of file MuonStation.cxx.

62  {
63 
64  ATH_MSG_DEBUG("Station " << getStationType() << " at zi/fi " << getEtaIndex() << "/" << getPhiIndex()

◆ setPhysVol()

void MuonGM::MuonStation::setPhysVol ( const PVLink &  vol)

Definition at line 382 of file MuonStation.cxx.

◆ setTransform()

void MuonGM::MuonStation::setTransform ( GeoAlignableTransform *  xf)

Definition at line 50 of file MuonStation.cxx.

◆ setxAmdbCRO()

void MuonGM::MuonStation::setxAmdbCRO ( double  xpos)

Definition at line 52 of file MuonStation.cxx.

54 : "<<Amg::toString(m_native_to_amdbl));

◆ Ssize()

double MuonGM::MuonStation::Ssize ( ) const
inline

Definition at line 174 of file MuonStation.h.

174 { return m_Ssize; }

◆ updateBlineFixedPointInAmdbLRS()

void MuonGM::MuonStation::updateBlineFixedPointInAmdbLRS ( )

Definition at line 88 of file MuonStation.cxx.

93  {
94  for (auto&[jobId, alignPair] :m_REwithAlTransfInStation) {
95  const MuonReadoutElement* muonRE = alignPair.first;
96 
97  if (muonRE->detectorType() !=Trk::DetectorElemType::Mdt) {
98  continue;
99  }
100  const MdtReadoutElement* mdtRE = dynamic_cast<const MdtReadoutElement*>(muonRE);
101  // Correct for tube staggering on barrel side C
102  double shiftInZ = -0.5 * mdtRE->tubePitch();
103  // in addition, correct for 35microm glue width incorrectly applied
104  double multilayerRealSize{0};
105  for (int ilayer = 1; ilayer <= 2; ++ilayer) {
106  double val{0.};
107  bool wellDefined = mdtRE->getWireFirstLocalCoordAlongZ(ilayer, val);
108  if (!wellDefined) {
109  ATH_MSG_WARNING("getUpdatedBlineFixedPointInAmdbLRS: stationName/Jff/Jzz " << getStationType()
110  << " " << getPhiIndex() << " " << getEtaIndex()
111  << " cannot get wire coordinates for second tube layer");
112  val = 0.;
113  }
114  if ((ilayer == 1) || (val > multilayerRealSize)) multilayerRealSize = val;
115  }
116  multilayerRealSize += (mdtRE->getNtubesperlayer() - 1) * mdtRE->tubePitch();
117  multilayerRealSize += mdtRE->outerTubeRadius(); // last tube: no glue width
118  shiftInZ += mdtRE->getZsize() - multilayerRealSize;
119 
121  ATH_MSG_DEBUG("getUpdatedBlineFixedPointInAmdbLRS: stationName/Jff/Jzz " << getStationType() << " "
122  << getPhiIndex() << " " << getEtaIndex() << " shiftInZ = " << shiftInZ << " re-set B-line fixed point "
124  break;
125  }
126  }
128  }
129 
131  m_delta_amdb_frame = std::move(xf);

◆ xAmdbCRO()

double MuonGM::MuonStation::xAmdbCRO ( ) const
inline

Definition at line 180 of file MuonStation.h.

180 { return m_xAmdbCRO; }

◆ Zsize()

double MuonGM::MuonStation::Zsize ( ) const
inline

Definition at line 175 of file MuonStation.h.

175 { return m_Zsize; }

◆ ZsizeMdtStation()

double MuonGM::MuonStation::ZsizeMdtStation ( ) const

Definition at line 329 of file MuonStation.cxx.

331  bool first = true;
332  int nmdt = 0;
333 
334 
335  ATH_MSG_DEBUG("ZsizeMdtStation for " << getStationType() << " at zi/fi " << getEtaIndex() << "/" << getPhiIndex()
336  << " nRE = " << nMuonReadoutElements());
337 
338  for (int j = 1; j < 30; ++j) {
339  const MuonReadoutElement* activeComponent = getMuonReadoutElement(j);
340  if (!activeComponent) continue;
341  if (activeComponent->detectorType() !=Trk::DetectorElemType::Mdt) {
342  continue;
343  }
344  ++nmdt;
345 
346  Zsize += activeComponent->getZsize() / 2.;
347  Zpos = activeComponent->toParentStation() * Amg::Vector3D(0., 0., 0.);
348  if (first) {
349  ZposFirst = Zpos;
350  first = false;
351  } else {
352  if (barrel())
353  Zsize += std::abs(Zpos.z() - ZposFirst.z());
354  else
355  Zsize += std::abs(Zpos.x() - ZposFirst.x());
356  }
357  }
358  if (nmdt == 1) Zsize = 2. * Zsize;
359 
360  return Zsize;
361  }
362 
363  bool MuonStation::barrel() const {
364  return getStationName()[0] == 'B';

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_amdbl_to_global

Amg::Transform3D MuonGM::MuonStation::m_amdbl_to_global {Amg::Transform3D::Identity()}
private

Definition at line 147 of file MuonStation.h.

◆ m_BlineFixedPointInAmdbLRS

Amg::Vector3D MuonGM::MuonStation::m_BlineFixedPointInAmdbLRS {Amg::Vector3D::Zero()}
private

Definition at line 153 of file MuonStation.h.

◆ m_delta_amdb_frame

Amg::Transform3D MuonGM::MuonStation::m_delta_amdb_frame {Amg::Transform3D::Identity()}
private

Definition at line 145 of file MuonStation.h.

◆ m_descratzneg

bool MuonGM::MuonStation::m_descratzneg {false}
private

Definition at line 139 of file MuonStation.h.

◆ m_firstRequestBlineFixedP

bool MuonGM::MuonStation::m_firstRequestBlineFixedP {true}
private

Definition at line 129 of file MuonStation.h.

◆ m_hasALines

bool MuonGM::MuonStation::m_hasALines {false}
private

Definition at line 151 of file MuonStation.h.

◆ m_hasBLines

bool MuonGM::MuonStation::m_hasBLines {false}
private

Definition at line 152 of file MuonStation.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_key

std::string MuonGM::MuonStation::m_key {}
private

Definition at line 142 of file MuonStation.h.

◆ m_LongRsize

double MuonGM::MuonStation::m_LongRsize {0.}
private

Definition at line 136 of file MuonStation.h.

◆ m_LongSsize

double MuonGM::MuonStation::m_LongSsize {0.}
private

Definition at line 135 of file MuonStation.h.

◆ m_LongZsize

double MuonGM::MuonStation::m_LongZsize {0.}
private

Definition at line 137 of file MuonStation.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

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

Amg::Transform3D MuonGM::MuonStation::m_native_to_amdbl {Amg::Transform3D::Identity()}
private

Definition at line 146 of file MuonStation.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_physVol

PVLink MuonGM::MuonStation::m_physVol {nullptr}
private

Link the full physical volume associated with the station.

Definition at line 159 of file MuonStation.h.

◆ m_REwithAlTransfInStation

std::map<int, pairRE_AlignTransf> MuonGM::MuonStation::m_REwithAlTransfInStation {}
private

keep track of the REs in this station

Definition at line 157 of file MuonStation.h.

◆ m_rots

double MuonGM::MuonStation::m_rots {0.}
private

Definition at line 148 of file MuonStation.h.

◆ m_rott

double MuonGM::MuonStation::m_rott {0.}
private

Definition at line 150 of file MuonStation.h.

◆ m_rotz

double MuonGM::MuonStation::m_rotz {0.}
private

Definition at line 149 of file MuonStation.h.

◆ m_Rsize

double MuonGM::MuonStation::m_Rsize {0.}
private

Definition at line 133 of file MuonStation.h.

◆ m_Ssize

double MuonGM::MuonStation::m_Ssize {0.}
private

Definition at line 132 of file MuonStation.h.

◆ m_statEtaIndex

int MuonGM::MuonStation::m_statEtaIndex {0}
private

Definition at line 141 of file MuonStation.h.

◆ m_statname

std::string MuonGM::MuonStation::m_statname {}
private

Definition at line 131 of file MuonStation.h.

◆ m_statPhiIndex

int MuonGM::MuonStation::m_statPhiIndex {0}
private

Definition at line 140 of file MuonStation.h.

◆ m_transform

GeoAlignableTransform* MuonGM::MuonStation::m_transform {nullptr}
private

Definition at line 143 of file MuonStation.h.

◆ m_xAmdbCRO

double MuonGM::MuonStation::m_xAmdbCRO {0.}
private

Definition at line 138 of file MuonStation.h.

◆ m_XTomoData

const MdtAsBuiltPar* MuonGM::MuonStation::m_XTomoData {nullptr}
private

Definition at line 154 of file MuonStation.h.

◆ m_Zsize

double MuonGM::MuonStation::m_Zsize {0.}
private

Definition at line 134 of file MuonStation.h.


The documentation for this class was generated from the following files:
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
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::getStationType
std::string getStationType() const
like BMS, T1F, CSL
Definition: MuonStation.h:164
checkFileSG.line
line
Definition: checkFileSG.py:75
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:255
MuonGM::MuonStation::getPhysVol
PVConstLink getPhysVol() const
Definition: MuonStation.cxx:383
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
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::MuonReadoutElement::defTransform
const Amg::Transform3D & defTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:212
Amg::y
@ y
Definition: GeoPrimitives.h:35
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::m_delta_amdb_frame
Amg::Transform3D m_delta_amdb_frame
Definition: MuonStation.h:145
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
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
MuonGM::MuonStation::m_BlineFixedPointInAmdbLRS
Amg::Vector3D m_BlineFixedPointInAmdbLRS
Definition: MuonStation.h:153
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonGM::MuonStation::m_rots
double m_rots
Definition: MuonStation.h:148
Amg::getRotateZ3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Definition: GeoPrimitivesHelpers.h:270
MuonGM::MuonStation::getMuonReadoutElement
const MuonReadoutElement * getMuonReadoutElement(int jobIndex) const
Definition: MuonStation.cxx:165
MuonGM::MuonStation::m_statPhiIndex
int m_statPhiIndex
Definition: MuonStation.h:140
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
Amg::getRotateX3D
Amg::Transform3D getRotateX3D(double angle)
get a rotation transformation around X-axis
Definition: GeoPrimitivesHelpers.h:252
MuonGM::MuonStation::m_xAmdbCRO
double m_xAmdbCRO
Definition: MuonStation.h:138
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
MuonGM::MuonStation::LongRsize
double LongRsize() const
Definition: MuonStation.h:176
MuonGM::MuonStation::Rsize
double Rsize() const
Definition: MuonStation.h:173
lumiFormat.i
int i
Definition: lumiFormat.py:92
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGM::MuonStation::m_key
std::string m_key
Definition: MuonStation.h:142
top::nominal
@ nominal
Definition: ScaleFactorRetriever.h:29
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
MuonGM::MuonStation::refreshCache
void refreshCache()
Definition: MuonStation.cxx:268
MuonGM::MuonStation::barrel
bool barrel() const
Definition: MuonStation.cxx:366
beamspotman.jobId
int jobId
Definition: beamspotman.py:1148
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
python.CaloBCIDAvgAlgConfig.only
list only
Definition: CaloBCIDAvgAlgConfig.py:32
MuonGM::MuonStation::m_firstRequestBlineFixedP
bool m_firstRequestBlineFixedP
Definition: MuonStation.h:129
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::m_LongZsize
double m_LongZsize
Definition: MuonStation.h:137
MuonGM::MuonStation::m_Ssize
double m_Ssize
Definition: MuonStation.h:132
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
Amg::getRotateY3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Definition: GeoPrimitivesHelpers.h:261
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
MdtAsBuiltPar
Container classifier the MDT as-built parameters See parameter description in http://atlas-muon-align...
Definition: MdtAsBuiltPar.h:18
MuonGM::MuonStation::clearCache
void clearCache()
Definition: MuonStation.cxx:240
MuonGM::MuonReadoutElement::getRsize
double getRsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:197
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonGM::MuonStation::m_Rsize
double m_Rsize
Definition: MuonStation.h:133
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
MuonGM::MuonStation::getEtaIndex
int getEtaIndex() const
a la AMDB
Definition: MuonStation.h:163
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
DeMoScan.first
bool first
Definition: DeMoScan.py:534
re
const boost::regex re(r_e)
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
MuonGM::MuonStation::getMdtAsBuiltParams
const MdtAsBuiltPar * getMdtAsBuiltParams() const
Definition: MuonStation.cxx:371
checkFileSG.fi
fi
Definition: checkFileSG.py:65
MuonGM::MuonStation::m_statEtaIndex
int m_statEtaIndex
Definition: MuonStation.h:141
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
MuonGM::MuonStation::setDeltaAmdbLRS
void setDeltaAmdbLRS(Amg::Transform3D xf)
set the delta transform in the amdb frame and update the geoModel Delta
Definition: MuonStation.cxx:133
MuonGM::MuonStation::ZsizeMdtStation
double ZsizeMdtStation() const
Definition: MuonStation.cxx:329
MuonGM::MuonStation::LongSsize
double LongSsize() const
Definition: MuonStation.h:177
Trk::DetectorElemType::Mdt
@ Mdt
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