ATLAS Offline Software
Loading...
Searching...
No Matches
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
int getEtaIndex () const
 a la AMDB
const std::string & getKey () const
std::string getStationType () const
 like BMS, T1F, CSL
const std::string & getStationName () const
 like BMS5, T1F1, CSL1
void setEtaPhiIndices (int eta, int phi)
 a la AMDB
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
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
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.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Private Types

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

Private Member Functions

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

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
PVLink m_physVol {nullptr}
 Link the full physical volume associated with the station.
CxxUtils::CachedValue< double > m_mdtRsize {}
CxxUtils::CachedValue< double > m_mdtZsize {}
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging)

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 23 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 }
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
double Zsize() const
double LongSsize() const
double LongZsize() const
std::string m_statname
double Ssize() const
double LongRsize() const
double Rsize() const

◆ ~MuonStation()

MuonGM::MuonStation::~MuonStation ( )
default

Member Function Documentation

◆ addMuonReadoutElementWithAlTransf()

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

Definition at line 174 of file MuonStation.cxx.

174 {
175 ATH_MSG_DEBUG("addMuonReadoutElementWithAlTransf for station " << getStationName() << " at zi/fi = " << getEtaIndex()
176 << "/" << getPhiIndex() << " adding new component with Alignable transf... " << a->getStationName()
177 << " job ondex = " << jobIndex );
178 m_REwithAlTransfInStation[jobIndex] = std::make_pair(a, ptrsf);
179
180 ATH_MSG_DEBUG("addMuonReadoutElementWithAlTransf for station " << getStationName() << " at zi/fi = " << getEtaIndex()
181 << "/" << getPhiIndex() << " added new component - now size of map is " << m_REwithAlTransfInStation.size());
182 }
#define ATH_MSG_DEBUG(x)
static Double_t a
int getEtaIndex() const
a la AMDB
int getPhiIndex() const
a la AMDB
const std::string & getStationName() const
like BMS5, T1F1, CSL1
std::map< int, pairRE_AlignTransf > m_REwithAlTransfInStation
keep track of the REs in this station

◆ barrel()

bool MuonGM::MuonStation::barrel ( ) const

Definition at line 378 of file MuonStation.cxx.

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

◆ clearCache()

void MuonGM::MuonStation::clearCache ( )

Definition at line 236 of file MuonStation.cxx.

236 {
237 ATH_MSG_DEBUG("n. of RE in this station is " << m_REwithAlTransfInStation.size());
238 for (auto& [jobId, readAlignPair] : m_REwithAlTransfInStation) {
239 ATH_MSG_DEBUG("Clearing cache .... for RE ... iteration n. " << jobId);
240 MuonReadoutElement* re = readAlignPair.first;
241 if (!re) {
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 }
const boost::regex re(r_e)
#define ATH_MSG_WARNING(x)
std::string getStationType() const
like BMS, T1F, CSL

◆ endcap()

bool MuonGM::MuonStation::endcap ( ) const

Definition at line 381 of file MuonStation.cxx.

381{ return !barrel(); }

◆ fillCache()

void MuonGM::MuonStation::fillCache ( )

Definition at line 251 of file MuonStation.cxx.

251 {
252 for (auto& [jobId, readAlignPair] : m_REwithAlTransfInStation) {
253 ATH_MSG_DEBUG("fillCache cache .... for RE ... iteration n. " << jobId);
254 MuonReadoutElement* re = readAlignPair.first;
255 if (!re) {
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 }

◆ 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]; }
Amg::Transform3D m_delta_amdb_frame

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

Amg::Transform3D m_amdbl_to_global

◆ getBlineFixedPointInAmdbLRS()

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

Definition at line 78 of file MuonStation.cxx.

78 {
79 // needed to update the station-level BlineFixedPoint with data from second multilayer
81 }
Amg::Vector3D m_BlineFixedPointInAmdbLRS

◆ getComponentAlTransf()

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

Definition at line 169 of file MuonStation.cxx.

169 {
170 std::map<int, pairRE_AlignTransf>::const_iterator itr = m_REwithAlTransfInStation.find(jobIndex);
171 return itr != m_REwithAlTransfInStation.end() ? itr->second.second : nullptr;
172 }

◆ 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; }
GeoAlignableTransform * 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 383 of file MuonStation.cxx.

383 {
384 if (!m_XTomoData) {
385 ATH_MSG_WARNING("No Mdt AsBuilt parameters for chamber " << getStationName());
386 }
387 return m_XTomoData;
388 }
const MdtAsBuiltPar * m_XTomoData

◆ getMuonReadoutElement() [1/2]

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

Definition at line 164 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;
167 }

◆ getMuonReadoutElement() [2/2]

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

Definition at line 160 of file MuonStation.cxx.

160 {
161 std::map<int, pairRE_AlignTransf>::const_iterator itr = m_REwithAlTransfInStation.find(jobIndex);
162 return itr !=m_REwithAlTransfInStation.end() ? itr->second.first : nullptr;
163 }

◆ getNativeToAmdbLRS()

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

Definition at line 193 of file MuonStation.h.

193{ return m_native_to_amdbl; }
Amg::Transform3D 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 396 of file MuonStation.cxx.

396{ return m_physVol; }
PVLink m_physVol
Link the full physical volume associated with the station.

◆ getPhysVol() [2/2]

PVConstLink MuonGM::MuonStation::getPhysVol ( ) const

Definition at line 395 of file MuonStation.cxx.

395{return m_physVol; }

◆ 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 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)

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

164{
165 MsgStream* ms = m_msg_tls.get();
166 if (!ms) {
167 if (!m_initialized.test_and_set()) initMessaging();
168 ms = new MsgStream(m_imsg,m_nm);
169 m_msg_tls.reset( ms );
170 }
171
172 ms->setLevel (m_lvl);
173 return *ms;
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.

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

179{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ 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_lvl <= lvl) {
154 msg() << lvl;
155 return true;
156 } else {
157 return false;
158 }
159}

◆ 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 264 of file MuonStation.cxx.

264 {
265 clearCache();
266 fillCache();
267 }

◆ 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 293 of file MuonStation.cxx.

293 {
294 if (getStationName()[0] == 'T' || getStationName()[0] == 'C') return 0.; // TGC and CSC stations
295 if (m_mdtRsize.isValid()) {
296 return *m_mdtRsize.ptr();
297 }
298 double Rsize = 0.;
299
300 Amg::Vector3D RposFirst{Amg::Vector3D::Zero()}, Rpos{Amg::Vector3D::Zero()};
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;
327 m_mdtRsize.set(Rsize);
328 return Rsize;
329 }
#define ATH_MSG_VERBOSE(x)
int nMuonReadoutElements() const
CxxUtils::CachedValue< double > m_mdtRsize
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D
bool first
Definition DeMoScan.py:534
static std::atomic< int > nmdt
Definition DBReader.h:140

◆ setBline()

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

Definition at line 269 of file MuonStation.cxx.

269 {
270 if (!bline) return;
271 m_hasBLines = true;
272 for (auto& [jobId, readAlignPair] : m_REwithAlTransfInStation) {
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 }

◆ setBlineFixedPointInAmdbLRS()

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

Definition at line 62 of file MuonStation.cxx.

62 {
63
64 ATH_MSG_DEBUG("Station " << getStationType() << " at zi/fi " << getEtaIndex() << "/" << getPhiIndex()
65 << " setting fixed point for B-lines at s0,z0,t0 = " << s0 << " " << z0 << " " << t0 );
66
67
71
72 ATH_MSG_DEBUG("setBlineFixedPointInAmdbLRS: stationName/Jff/Jzz " << getStationType() << " " << getPhiIndex() << " "
73 << getEtaIndex() << " nominal(i.e. from-station-envelop-only) B-line fixed point "
75
76 }
static Double_t s0
static Double_t t0

◆ 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 137 of file MuonStation.cxx.

137 {
138 // store here the angles of A-line
139 m_rots = rots;
140 m_rotz = rotz;
141 m_rott = rott;
142
143 Amg::Transform3D delta_amdb{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 }
void setDeltaAmdbLRS(Amg::Transform3D xf)
set the delta transform in the amdb frame and update the geoModel Delta
Amg::Transform3D getRotateX3D(double angle)
get a rotation transformation around X-axis
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Eigen::Affine3d Transform3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Eigen::Translation< double, 3 > Translation3D

◆ 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 184 of file MuonStation.cxx.

185 {
186 GeoAlignableTransform* parentToChild = getComponentAlTransf(jobindex);
187 if (!parentToChild) {
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 }
GeoAlignableTransform * getComponentAlTransf(int jobIndex) const
const MuonReadoutElement * getMuonReadoutElement(int jobIndex) const

◆ setDeltaAmdbLRS()

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

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

Definition at line 128 of file MuonStation.cxx.

128 {
129 m_delta_amdb_frame = std::move(xf);
130 ATH_MSG_DEBUG("Station " << getStationType() << " at zi/fi " << getEtaIndex() << "/" << getPhiIndex()
131 << " adding Aline " << std::endl
132 << " native_to_amdbl computed from A-line " << Amg::toString(m_native_to_amdbl) << std::endl
133 << "Station amdbl_to_global " << endmsg << Amg::toString(m_amdbl_to_global));
135 }
#define endmsg

◆ setEtaPhiIndices()

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

a la AMDB

Definition at line 42 of file MuonStation.cxx.

42 {
45 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method

◆ 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 390 of file MuonStation.cxx.

390 {
391 m_XTomoData = xtomo;
392 refreshCache();
393 }

◆ setMdtRsize()

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

Definition at line 370 of file MuonStation.cxx.

370 {
371 m_mdtRsize.reset();
372 m_mdtRsize.set(rSize);
373 }

◆ setMdtZsize()

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

Definition at line 374 of file MuonStation.cxx.

374 {
375 m_mdtZsize.reset();
376 m_mdtZsize.set(zSize);
377 }
CxxUtils::CachedValue< double > m_mdtZsize

◆ setNativeToAmdbLRS()

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

Definition at line 51 of file MuonStation.cxx.

51 {
52 m_native_to_amdbl = std::move(xf);
53 ATH_MSG_VERBOSE("stationName/Jff/Jzz " << getStationType() << " " << getPhiIndex() << " "<< getEtaIndex()
54 <<"setNativeToAmdbLRS: "<<Amg::toString(m_native_to_amdbl));
55 }

◆ setNominalAmdbLRSToGlobal()

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

Definition at line 57 of file MuonStation.cxx.

57 {
58 m_amdbl_to_global = std::move(xf);
59 ATH_MSG_DEBUG("setNominalAmdbLRSToGlobal: stationName/Jff/Jzz " << getStationType() << " " << getPhiIndex() << " "<< getEtaIndex()
60 << " Origin of AmdbLocalFrame= " << Amg::toString(m_amdbl_to_global.translation()));
61 }

◆ setPhysVol()

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

Definition at line 394 of file MuonStation.cxx.

394{ m_physVol = vol; }

◆ setTransform()

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

Definition at line 47 of file MuonStation.cxx.

47{ m_transform = xf; }

◆ setxAmdbCRO()

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

Definition at line 49 of file MuonStation.cxx.

49{ m_xAmdbCRO = xpos; }

◆ 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 83 of file MuonStation.cxx.

83 {
84 if (!m_firstRequestBlineFixedP) return;
85 // Before correction m_BlineFixedPointInAmdbLRS has a z set at the edge of
86 // lowest-z tube of the first layer of one of the two multilayers.
87 // For endcap A, endcap C, and barrel A, this is correct, given the tube staggering
88 // For barrel side C, given the tube staggering, the z should be at the
89 // edge at the second layer, i.e. the z should be corrected by a half tube
90 // pitch. Correction is thus computed only for barrel side C.
91 if (barrel() && (getEtaIndex() < 0)) {
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 }

◆ 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 330 of file MuonStation.cxx.

330 {
331 if (getStationName()[0] == 'T' || getStationName()[0] == 'C') return 0.; // TGC and CSC stations
332 if (m_mdtZsize.isValid()) {
333 return *m_mdtZsize.ptr();
334 }
335 double Zsize = 0.;
336
337 Amg::Vector3D ZposFirst{Amg::Vector3D::Zero()}, Zpos{Amg::Vector3D::Zero()};
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;
367 m_mdtZsize.set(Zsize);
368 return Zsize;
369 }

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.

155{Amg::Transform3D::Identity()}; // nominal

◆ m_BlineFixedPointInAmdbLRS

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

Definition at line 161 of file MuonStation.h.

161{Amg::Vector3D::Zero()};

◆ m_delta_amdb_frame

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

Definition at line 153 of file MuonStation.h.

153{Amg::Transform3D::Identity()};

◆ m_descratzneg

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

Definition at line 147 of file MuonStation.h.

147{false};

◆ m_firstRequestBlineFixedP

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

Definition at line 137 of file MuonStation.h.

137{true};

◆ m_hasALines

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

Definition at line 159 of file MuonStation.h.

159{false};

◆ m_hasBLines

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

Definition at line 160 of file MuonStation.h.

160{false};

◆ m_imsg

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

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_key

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

Definition at line 150 of file MuonStation.h.

150{};

◆ m_LongRsize

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

Definition at line 144 of file MuonStation.h.

144{0.};

◆ m_LongSsize

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

Definition at line 143 of file MuonStation.h.

143{0.};

◆ m_LongZsize

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

Definition at line 145 of file MuonStation.h.

145{0.};

◆ m_lvl

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

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_mdtRsize

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

Definition at line 169 of file MuonStation.h.

169{};

◆ m_mdtZsize

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

Definition at line 170 of file MuonStation.h.

170{};

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

154{Amg::Transform3D::Identity()};

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

167{nullptr};

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

165{};

◆ m_rots

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

Definition at line 156 of file MuonStation.h.

156{0.};

◆ m_rott

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

Definition at line 158 of file MuonStation.h.

158{0.};

◆ m_rotz

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

Definition at line 157 of file MuonStation.h.

157{0.};

◆ m_Rsize

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

Definition at line 141 of file MuonStation.h.

141{0.};

◆ m_Ssize

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

Definition at line 140 of file MuonStation.h.

140{0.};

◆ m_statEtaIndex

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

Definition at line 149 of file MuonStation.h.

149{0};

◆ m_statname

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

Definition at line 139 of file MuonStation.h.

139{};

◆ m_statPhiIndex

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

Definition at line 148 of file MuonStation.h.

148{0};

◆ m_transform

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

Definition at line 151 of file MuonStation.h.

151{nullptr};

◆ m_xAmdbCRO

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

Definition at line 146 of file MuonStation.h.

146{0.};

◆ m_XTomoData

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

Definition at line 162 of file MuonStation.h.

162{nullptr};

◆ m_Zsize

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

Definition at line 142 of file MuonStation.h.

142{0.};

The documentation for this class was generated from the following files: