Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
 
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 ()
 
void setMdtRsize (const double rSize)
 
void setMdtZsize (const double zSize)
 
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...
 
CxxUtils::CachedValue< double > m_mdtRsize {}
 
CxxUtils::CachedValue< double > m_mdtZsize {}
 
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 164 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;
37  m_statPhiIndex = fi;
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 177 of file MuonStation.cxx.

185  {

◆ barrel()

bool MuonGM::MuonStation::barrel ( ) const

Definition at line 381 of file MuonStation.cxx.

381  { return !barrel(); }
382 

◆ clearCache()

void MuonGM::MuonStation::clearCache ( )

Definition at line 239 of file MuonStation.cxx.

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

◆ endcap()

bool MuonGM::MuonStation::endcap ( ) const

Definition at line 384 of file MuonStation.cxx.

384 {

◆ fillCache()

void MuonGM::MuonStation::fillCache ( )

Definition at line 254 of file MuonStation.cxx.

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

◆ getALine_rots()

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

Definition at line 204 of file MuonStation.h.

204 { return m_rots; }

◆ getALine_rott()

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

Definition at line 206 of file MuonStation.h.

206 { return m_rott; }

◆ getALine_rotz()

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

Definition at line 205 of file MuonStation.h.

205 { return m_rotz; }

◆ getALine_tras()

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

Definition at line 201 of file MuonStation.h.

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

◆ getALine_trat()

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

Definition at line 203 of file MuonStation.h.

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

◆ getALine_traz()

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

Definition at line 202 of file MuonStation.h.

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

◆ getAmdbLRSToGlobal()

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

Definition at line 197 of file MuonStation.h.

◆ getBlineFixedPointInAmdbLRS()

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

Definition at line 81 of file MuonStation.cxx.

83  {
84  if (!m_firstRequestBlineFixedP) return;

◆ getComponentAlTransf()

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

Definition at line 172 of file MuonStation.cxx.

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

◆ getEtaIndex()

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

a la AMDB

Definition at line 174 of file MuonStation.h.

174 { return m_statEtaIndex; }

◆ getGeoTransform()

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

Definition at line 178 of file MuonStation.h.

178 { return m_transform; }

◆ getKey()

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

Definition at line 182 of file MuonStation.h.

182 { return m_key; }

◆ getMdtAsBuiltParams()

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

Definition at line 386 of file MuonStation.cxx.

390  {
391  m_XTomoData = xtomo;

◆ getMuonReadoutElement() [1/2]

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

Definition at line 167 of file MuonStation.cxx.

169  {
170  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 163 of file MuonStation.cxx.

164  {
165  std::map<int, pairRE_AlignTransf>::const_iterator itr = m_REwithAlTransfInStation.find(jobIndex);
166  return itr !=m_REwithAlTransfInStation.end() ? itr->second.first : nullptr;

◆ getNativeToAmdbLRS()

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

Definition at line 193 of file MuonStation.h.

193 { return m_native_to_amdbl; }

◆ getNominalAmdbLRSToGlobal()

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

Definition at line 195 of file MuonStation.h.

195 { return m_amdbl_to_global; }

◆ getPhiIndex()

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

a la AMDB

Definition at line 173 of file MuonStation.h.

173 { return m_statPhiIndex; }

◆ getPhysVol() [1/2]

PVLink MuonGM::MuonStation::getPhysVol ( )

Definition at line 399 of file MuonStation.cxx.

◆ getPhysVol() [2/2]

PVConstLink MuonGM::MuonStation::getPhysVol ( ) const

Definition at line 398 of file MuonStation.cxx.

◆ getStationName()

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

like BMS5, T1F1, CSL1

Definition at line 176 of file MuonStation.h.

176 { return m_statname; }

◆ getStationType()

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

like BMS, T1F, CSL

Definition at line 175 of file MuonStation.h.

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

◆ getTransform()

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

Definition at line 180 of file MuonStation.h.

180 { return m_transform->getTransform(); }

◆ hasALines()

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

Definition at line 207 of file MuonStation.h.

207 { return m_hasALines; }

◆ hasBLines()

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

Definition at line 208 of file MuonStation.h.

208 { return m_hasBLines; }

◆ hasMdtAsBuiltParams()

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

Definition at line 209 of file MuonStation.h.

209 { 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 187 of file MuonStation.h.

187 { return m_LongRsize; }

◆ LongSsize()

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

Definition at line 188 of file MuonStation.h.

188 { return m_LongSsize; }

◆ LongZsize()

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

Definition at line 189 of file MuonStation.h.

189 { 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 199 of file MuonStation.h.

199 { return m_REwithAlTransfInStation.size(); }

◆ refreshCache()

void MuonGM::MuonStation::refreshCache ( )

Definition at line 267 of file MuonStation.cxx.

269  {
270  if (!bline) return;

◆ Rsize()

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

Definition at line 184 of file MuonStation.h.

184 { return m_Rsize; }

◆ RsizeMdtStation()

double MuonGM::MuonStation::RsizeMdtStation ( ) const

Definition at line 296 of file MuonStation.cxx.

301  bool first = true;
302  int nmdt = 0;
303  ATH_MSG_VERBOSE("RsizeMdtStation for " << getStationType() << " at zi/fi " << getEtaIndex() << "/" << getPhiIndex()
304  << " nRE = " << nMuonReadoutElements());
305 
306  for (const auto& [jIdx, reWithTrf ] : m_REwithAlTransfInStation) {
307  const MuonReadoutElement* activeComponent = reWithTrf.first;
308  if (activeComponent->detectorType() !=Trk::DetectorElemType::Mdt) {
309  continue;
310  }
311  ++nmdt;
312  Rsize += activeComponent->getRsize() / 2.;
313  Rpos = activeComponent->toParentStation().translation();
314  ATH_MSG_VERBOSE("Readout element "<<activeComponent->idHelperSvc()->toStringDetEl(activeComponent->identify())
315  <<" r position: "<<Amg::toString(Rpos));
316  if (first) {
317  RposFirst = Rpos;
318  first = false;
319  } else {
320  if (barrel())
321  Rsize += std::abs(Rpos.x() - RposFirst.x());
322  else
323  Rsize += std::abs(Rpos.y() - RposFirst.y());
324  }
325  }
326  if (nmdt == 1) Rsize = 2. * Rsize;
328  return Rsize;
329  }
330  double MuonStation::ZsizeMdtStation() const {
331  if (getStationName()[0] == 'T' || getStationName()[0] == 'C') return 0.; // TGC and CSC stations
332  if (m_mdtZsize.isValid()) {

◆ setBline()

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

Definition at line 272 of file MuonStation.cxx.

273  ATH_MSG_DEBUG("fillCache cache .... for RE ... iteration n. " << jobId);
274  MuonReadoutElement* re = readAlignPair.first;
275  if (re->detectorType() !=Trk::DetectorElemType::Mdt) {
276  continue;
277  }
278  MdtReadoutElement* mdt = dynamic_cast<MdtReadoutElement*>(re);
279  mdt->setBLinePar(bline);
280  }
281  }
282 
283 
284 #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 140 of file MuonStation.cxx.

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

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

137  {
138  // 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 393 of file MuonStation.cxx.

394  { m_physVol = vol; }
395  PVConstLink MuonStation::getPhysVol() const {return m_physVol; }
396  PVLink MuonStation::getPhysVol() { return m_physVol; }

◆ setMdtRsize()

void MuonGM::MuonStation::setMdtRsize ( const double  rSize)

Definition at line 373 of file MuonStation.cxx.

374  {
375  m_mdtZsize.reset();
376  m_mdtZsize.set(zSize);

◆ setMdtZsize()

void MuonGM::MuonStation::setMdtZsize ( const double  zSize)

Definition at line 377 of file MuonStation.cxx.

378  {
379  return getStationName()[0] == 'B';
380  }

◆ 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 397 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 185 of file MuonStation.h.

185 { return m_Ssize; }

◆ updateBlineFixedPointInAmdbLRS()

void MuonGM::MuonStation::updateBlineFixedPointInAmdbLRS ( )

Definition at line 86 of file MuonStation.cxx.

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

◆ xAmdbCRO()

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

Definition at line 191 of file MuonStation.h.

191 { return m_xAmdbCRO; }

◆ Zsize()

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

Definition at line 186 of file MuonStation.h.

186 { return m_Zsize; }

◆ ZsizeMdtStation()

double MuonGM::MuonStation::ZsizeMdtStation ( ) const

Definition at line 333 of file MuonStation.cxx.

338  bool first = true;
339  int nmdt = 0;
340 
341 
342  ATH_MSG_VERBOSE("ZsizeMdtStation for " << getStationType() << " at zi/fi " << getEtaIndex() << "/" << getPhiIndex()
343  << " nRE = " << nMuonReadoutElements());
344 
345  for (const auto& [jobIdx, compWithTrf] : m_REwithAlTransfInStation) {
346  const MuonReadoutElement* activeComponent = compWithTrf.first;
347  if (activeComponent->detectorType() !=Trk::DetectorElemType::Mdt) {
348  continue;
349  }
350  ++nmdt;
351 
352  Zsize += activeComponent->getZsize() / 2.;
353  Zpos = activeComponent->toParentStation() * Amg::Vector3D(0., 0., 0.);
354  ATH_MSG_VERBOSE("Readout element "<<activeComponent->idHelperSvc()->toStringDetEl(activeComponent->identify())
355  <<" z position: "<<Amg::toString(Zpos));
356  if (first) {
357  ZposFirst = Zpos;
358  first = false;
359  } else {
360  if (barrel())
361  Zsize += std::abs(Zpos.z() - ZposFirst.z());
362  else
363  Zsize += std::abs(Zpos.x() - ZposFirst.x());
364  }
365  }
366  if (nmdt == 1) Zsize = 2. * Zsize;
368  return Zsize;
369  }
370  void MuonStation::setMdtRsize(const double rSize){
371  m_mdtRsize.reset();
372  m_mdtRsize.set(rSize);

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 155 of file MuonStation.h.

◆ m_BlineFixedPointInAmdbLRS

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

Definition at line 161 of file MuonStation.h.

◆ m_delta_amdb_frame

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

Definition at line 153 of file MuonStation.h.

◆ m_descratzneg

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

Definition at line 147 of file MuonStation.h.

◆ m_firstRequestBlineFixedP

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

Definition at line 137 of file MuonStation.h.

◆ m_hasALines

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

Definition at line 159 of file MuonStation.h.

◆ m_hasBLines

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

Definition at line 160 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 150 of file MuonStation.h.

◆ m_LongRsize

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

Definition at line 144 of file MuonStation.h.

◆ m_LongSsize

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

Definition at line 143 of file MuonStation.h.

◆ m_LongZsize

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

Definition at line 145 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_mdtRsize

CxxUtils::CachedValue<double> MuonGM::MuonStation::m_mdtRsize {}
private

Definition at line 169 of file MuonStation.h.

◆ m_mdtZsize

CxxUtils::CachedValue<double> MuonGM::MuonStation::m_mdtZsize {}
private

Definition at line 170 of file MuonStation.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 154 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 167 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 165 of file MuonStation.h.

◆ m_rots

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

Definition at line 156 of file MuonStation.h.

◆ m_rott

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

Definition at line 158 of file MuonStation.h.

◆ m_rotz

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

Definition at line 157 of file MuonStation.h.

◆ m_Rsize

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

Definition at line 141 of file MuonStation.h.

◆ m_Ssize

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

Definition at line 140 of file MuonStation.h.

◆ m_statEtaIndex

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

Definition at line 149 of file MuonStation.h.

◆ m_statname

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

Definition at line 139 of file MuonStation.h.

◆ m_statPhiIndex

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

Definition at line 148 of file MuonStation.h.

◆ m_transform

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

Definition at line 151 of file MuonStation.h.

◆ m_xAmdbCRO

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

Definition at line 146 of file MuonStation.h.

◆ m_XTomoData

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

Definition at line 162 of file MuonStation.h.

◆ m_Zsize

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

Definition at line 142 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:162
MuonGM::MuonStation::m_descratzneg
bool m_descratzneg
Definition: MuonStation.h:147
CxxUtils::CachedValue::reset
void reset()
Reset the value to invalid.
MuonGM::MuonStation::getStationType
std::string getStationType() const
like BMS, T1F, CSL
Definition: MuonStation.h:175
MuonGM::MuonStation::m_native_to_amdbl
Amg::Transform3D m_native_to_amdbl
Definition: MuonStation.h:154
MuonGM::MuonStation::m_REwithAlTransfInStation
std::map< int, pairRE_AlignTransf > m_REwithAlTransfInStation
keep track of the REs in this station
Definition: MuonStation.h:165
MuonGM::MuonStation::fillCache
void fillCache()
Definition: MuonStation.cxx:254
collListGuids.line
string line
Definition: collListGuids.py:77
MuonGM::MuonStation::getPhysVol
PVConstLink getPhysVol() const
Definition: MuonStation.cxx:398
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MuonGM::MuonStation::m_hasBLines
bool m_hasBLines
Definition: MuonStation.h:160
MuonGM::MuonStation::m_hasALines
bool m_hasALines
Definition: MuonStation.h:159
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
MuonGM::MuonStation::m_LongRsize
double m_LongRsize
Definition: MuonStation.h:144
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:167
MuonGM::MuonStation::~MuonStation
~MuonStation()
MuonGM::MuonStation::m_delta_amdb_frame
Amg::Transform3D m_delta_amdb_frame
Definition: MuonStation.h:153
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonGM::MuonStation::getStationName
const std::string & getStationName() const
like BMS5, T1F1, CSL1
Definition: MuonStation.h:176
MuonGM::MuonStation::LongZsize
double LongZsize() const
Definition: MuonStation.h:189
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:161
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:156
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:163
MuonGM::MuonStation::m_statPhiIndex
int m_statPhiIndex
Definition: MuonStation.h:148
MuonGM::MuonStation::Ssize
double Ssize() const
Definition: MuonStation.h:185
MuonGM::MuonStation::m_amdbl_to_global
Amg::Transform3D m_amdbl_to_global
Definition: MuonStation.h:155
MuonGM::MuonStation::getPhiIndex
int getPhiIndex() const
a la AMDB
Definition: MuonStation.h:173
MuonGM::MuonStation::Zsize
double Zsize() const
Definition: MuonStation.h:186
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:146
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:187
MuonGM::MuonStation::Rsize
double Rsize() const
Definition: MuonStation.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGM::MuonStation::m_key
std::string m_key
Definition: MuonStation.h:150
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:267
MuonGM::MuonStation::barrel
bool barrel() const
Definition: MuonStation.cxx:381
beamspotman.jobId
int jobId
Definition: beamspotman.py:1148
MuonGM::MuonStation::m_mdtRsize
CxxUtils::CachedValue< double > m_mdtRsize
Definition: MuonStation.h:169
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:137
MuonGM::MuonStation::m_transform
GeoAlignableTransform * m_transform
Definition: MuonStation.h:151
MuonGM::MuonStation::nMuonReadoutElements
int nMuonReadoutElements() const
Definition: MuonStation.h:199
MuonGM::MuonStation::m_LongSsize
double m_LongSsize
Definition: MuonStation.h:143
MuonGM::MuonStation::m_LongZsize
double m_LongZsize
Definition: MuonStation.h:145
MuonGM::MuonStation::m_Ssize
double m_Ssize
Definition: MuonStation.h:140
MuonGM::MuonStation::setMdtRsize
void setMdtRsize(const double rSize)
Definition: MuonStation.cxx:373
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
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGM::MuonStation::m_statname
std::string m_statname
Definition: MuonStation.h:139
MuonGM::MuonStation::m_rotz
double m_rotz
Definition: MuonStation.h:157
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:239
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonGM::MuonStation::m_mdtZsize
CxxUtils::CachedValue< double > m_mdtZsize
Definition: MuonStation.h:170
MuonGM::MuonStation::m_Rsize
double m_Rsize
Definition: MuonStation.h:141
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
MuonGM::MuonStation::getEtaIndex
int getEtaIndex() const
a la AMDB
Definition: MuonStation.h:174
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
DeMoScan.first
bool first
Definition: DeMoScan.py:536
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:386
MuonGM::MuonStation::m_statEtaIndex
int m_statEtaIndex
Definition: MuonStation.h:149
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:131
MuonGM::MuonStation::ZsizeMdtStation
double ZsizeMdtStation() const
Definition: MuonStation.cxx:333
MuonGM::MuonStation::LongSsize
double LongSsize() const
Definition: MuonStation.h:188
Trk::DetectorElemType::Mdt
@ Mdt
MuonGM::MuonStation::m_Zsize
double m_Zsize
Definition: MuonStation.h:142
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonGM::MuonStation::m_rott
double m_rott
Definition: MuonStation.h:158