ATLAS Offline Software
Loading...
Searching...
No Matches
MuonGM::MuonDetectorManager Class Reference

The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and provides access to all main blocks of information needed by generic clients of the geometry: XxxReadoutElements, MuonStations, MuonIdHelpers, geometryVersion, etc. More...

#include <MuonDetectorManager.h>

Inheritance diagram for MuonGM::MuonDetectorManager:

Public Member Functions

 MuonDetectorManager ()
 ~MuonDetectorManager ()
virtual unsigned int getNumTreeTops () const
virtual PVConstLink getTreeTop (unsigned int i) const
PVLink getTreeTop (unsigned int i)
void addTreeTop (PVLink)
void addMdtReadoutElement (std::unique_ptr< MdtReadoutElement > &&reEle)
 store the MdtReadoutElement using as "key" the identifier
void addRpcReadoutElement (std::unique_ptr< RpcReadoutElement > &&reEle)
 store the RpcReadoutElement using as "key" the identifier
void addTgcReadoutElement (std::unique_ptr< TgcReadoutElement > &&reEle)
 store the TgcReadoutElement using as "key" the identifier
void addCscReadoutElement (std::unique_ptr< CscReadoutElement > &&reEle)
 store the CscReadoutElement using as "key" the identifier
void addsTgcReadoutElement (std::unique_ptr< sTgcReadoutElement > &&reEle)
 store the sTGCReadoutElement using as "key" the identifier
void addMMReadoutElement (std::unique_ptr< MMReadoutElement > &&reEle)
 store the MMReadoutElement using as "key" the identifier
const MdtReadoutElementgetMdtReadoutElement (const Identifier &id) const
 access via extended identifier (requires unpacking)
const RpcReadoutElementgetRpcReadoutElement (const Identifier &id) const
 access via extended identifier (requires unpacking)
const TgcReadoutElementgetTgcReadoutElement (const Identifier &id) const
 access via extended identifier (requires unpacking)
const CscReadoutElementgetCscReadoutElement (const Identifier &id) const
 access via extended identifier (requires unpacking)
const MMReadoutElementgetMMReadoutElement (const Identifier &id) const
 access via extended identifier (requires unpacking)
const sTgcReadoutElementgetsTgcReadoutElement (const Identifier &id) const
 access via extended identifier (requires unpacking)
const MuonReadoutElementgetReadoutElement (const Identifier &id) const
 Get any read out element.
MdtReadoutElementgetMdtReadoutElement (const Identifier &id)
CscReadoutElementgetCscReadoutElement (const Identifier &id)
TgcReadoutElementgetTgcReadoutElement (const Identifier &id)
const MdtReadoutElementgetMdtReadoutElement (const IdentifierHash &id) const
 access via detector-element hash id
const RpcReadoutElementgetRpcReadoutElement (const IdentifierHash &id) const
 access via detector-element hash id
const TgcReadoutElementgetTgcReadoutElement (const IdentifierHash &id) const
 access via detector-element hash id
const CscReadoutElementgetCscReadoutElement (const IdentifierHash &id) const
 access via detector-element hash id
unsigned int nMuonStation () const
 Number of MuonStations.
unsigned int nMdtRE () const
 Number of Mdt ReadoutElements.
unsigned int nsTgcRE () const
 Number of sTgc ReadoutElements.
unsigned int nMMRE () const
 Number of MM ReadoutElements.
unsigned int nCscRE () const
 Number of Csc ReadoutElements.
unsigned int nRpcRE () const
 Number of Rpc ReadoutElements.
unsigned int nTgcRE () const
 Number of Tgc ReadoutElements.
unsigned int nMdtDE () const
 Number of Mdt DetectorElements.
unsigned int nCscDE () const
 Number of Csc DetectorElements.
unsigned int nRpcDE () const
 Number of Rpc DetectorElements.
unsigned int nTgcDE () const
 Number of Tgc DetectorElements.
const std::string & geometryVersion () const
 it can be Rome-Initial or P03, or ... it's the name of the layout
void setGeometryVersion (const std::string &version)
const std::string & get_DBMuonVersion () const
 the name of the MuonSpectrometer tag (in the geometry DB) actually accessed
void set_DBMuonVersion (const std::string &version)
const MdtIdHelpermdtIdHelper () const
const CscIdHelpercscIdHelper () const
const RpcIdHelperrpcIdHelper () const
const TgcIdHelpertgcIdHelper () const
const sTgcIdHelperstgcIdHelper () const
const MmIdHelpermmIdHelper () const
void setMinimalGeoFlag (int flag)
int MinimalGeoFlag () const
void setCutoutsFlag (int flag)
int IncludeCutoutsFlag () const
void setCutoutsBogFlag (int flag)
int IncludeCutoutsBogFlag () const
void addMuonStation (std::unique_ptr< MuonStation > &&mst)
const MuonStationgetMuonStation (const std::string &stName, int eta, int phi) const
MuonStationgetMuonStation (const std::string &stName, int eta, int phi)
void clearCache ()
void fillCache ()
StatusCode updateAlignment (const ALineContainer &a)
StatusCode updateDeformations (const BLineContainer &a)
StatusCode updateMdtAsBuiltParams (const MdtAsBuiltContainer &a)
StatusCode updateCSCInternalAlignmentMap (const ALineContainer &cscIntAline)
void setNswAsBuilt (const NswAsBuiltDbData *nswAsBuiltData)
void setsTGCAsBuilt (const sTGCAsBuiltData *stgcAsBuilt)
const NswAsBuilt::StripCalculatorgetMMAsBuiltCalculator () const
const sTGCAsBuiltDatagetsTGCAsBuilt () const
const NswPassivationDbDatagetMMPassivation () const
void setMMPassivation (const NswPassivationDbData *passiv)
int rpcStationName (const int stationIndex) const
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.

Static Public Member Functions

static std::string muonStationKey (const std::string &stName, int statEtaIndex, int statPhiIndex)

Static Public Attributes

static constexpr int NCscStEtaOffset = 1
 Identifier <-> AMDB conversion constants in use.
static constexpr int NTgcStatTypeOff = -41
static constexpr int NTgcStEtaOffset = 5

Private Types

enum  RpcStatType {
  BML = 0 , BMS , BOL , BOS ,
  BMF , BOF , BOG , BME ,
  BIR , BIM , BIL , BIS ,
  UNKNOWN
}

Private Member Functions

void loadStationIndices ()
unsigned int rpcStationTypeIdx (const int stationName) const
int rpcIdentToArrayIdx (const Identifier &id) const
 Helper method to convert the Identifier into the corresponding index accessing the array.
int tgcIdentToArrayIdx (const Identifier &id) const
int cscIdentToArrayIdx (const Identifier &id) const
int stgcIdentToArrayIdx (const Identifier &id) const
int mmIdenToArrayIdx (const Identifier &id) const
int mdtIdentToArrayIdx (const Identifier &id) const
void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {"Muon::MuonIdHelperSvc/MuonIdHelperSvc", "MuonDetectorManager"}
int m_minimalgeo {0}
int m_includeCutouts {0}
int m_includeCutoutsBog {0}
std::vector< PVLink > m_envelope
std::string m_geometryVersion {}
std::string m_DBMuonVersion {}
std::vector< std::unique_ptr< MdtReadoutElement > > m_mdtArray
std::vector< std::unique_ptr< CscReadoutElement > > m_cscArray
std::vector< std::unique_ptr< TgcReadoutElement > > m_tgcArray
std::vector< std::unique_ptr< RpcReadoutElement > > m_rpcArray
std::vector< std::unique_ptr< sTgcReadoutElement > > m_stgArray
std::vector< std::unique_ptr< MMReadoutElement > > m_mmcArray
std::map< std::string, std::unique_ptr< MuonStation > > m_MuonStationMap
unsigned int m_n_mdtRE {0}
unsigned int m_n_cscRE {0}
unsigned int m_n_rpcRE {0}
unsigned int m_n_tgcRE {0}
unsigned int m_n_stgRE {0}
unsigned int m_n_mmcRE {0}
unsigned int m_n_mdtDE {0}
unsigned int m_n_cscDE {0}
unsigned int m_n_rpcDE {0}
unsigned int m_n_tgcDE {0}
const NswAsBuiltDbDatam_nswAsBuilt {nullptr}
const sTGCAsBuiltDatam_stgcAsBuildData {nullptr}
const NswPassivationDbDatam_mmPassivation {nullptr}
std::map< int, int > m_rpcStatToIdx
 RPC name caches.
std::map< int, int > m_rpcIdxToStat
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

The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and provides access to all main blocks of information needed by generic clients of the geometry: XxxReadoutElements, MuonStations, MuonIdHelpers, geometryVersion, etc.

More details below.

Definition at line 51 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

Member Enumeration Documentation

◆ RpcStatType

Enumerator
BML 
BMS 
BOL 
BOS 
BMF 
BOF 
BOG 
BME 
BIR 
BIM 
BIL 
BIS 
UNKNOWN 

Definition at line 178 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

178{ BML = 0, BMS, BOL, BOS, BMF, BOF, BOG, BME, BIR, BIM, BIL, BIS, UNKNOWN };

Constructor & Destructor Documentation

◆ MuonDetectorManager()

MuonGM::MuonDetectorManager::MuonDetectorManager ( )

Definition at line 38 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

38 : AthMessaging{"MGM::MuonDetectorManager"} {
39 setName("Muon");
40 if (m_idHelperSvc.retrieve().isFailure()) {
41 THROW_EXCEPTION("MuonDetectorManager() - No IdHelper svc is available");
42 }
44 if (m_idHelperSvc->hasMDT()){
45 m_mdtArray.resize(m_idHelperSvc->mdtIdHelper().detectorElement_hash_max());
46 }
47 if (m_idHelperSvc->hasCSC()){
48 m_cscArray.resize(m_idHelperSvc->cscIdHelper().detectorElement_hash_max());
49 }
50 if (m_idHelperSvc->hasTGC()){
51 m_tgcArray.resize(m_idHelperSvc->tgcIdHelper().detectorElement_hash_max());
52 }
53 if (m_idHelperSvc->hasRPC()){
54 m_rpcArray.resize(m_idHelperSvc->rpcIdHelper().detectorElement_hash_max());
55 }
56 if (m_idHelperSvc->hasMM()){
57 m_mmcArray.resize(m_idHelperSvc->mmIdHelper().detectorElement_hash_max());
58 }
59 if (m_idHelperSvc->hasSTGC()){
60 m_stgArray.resize(m_idHelperSvc->stgcIdHelper().detectorElement_hash_max());
61 }
62 }
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
#define THROW_EXCEPTION(MESSAGE)
Definition throwExcept.h:10

◆ ~MuonDetectorManager()

MuonGM::MuonDetectorManager::~MuonDetectorManager ( )
default

Member Function Documentation

◆ addCscReadoutElement()

void MuonGM::MuonDetectorManager::addCscReadoutElement ( std::unique_ptr< CscReadoutElement > && reEle)

store the CscReadoutElement using as "key" the identifier

Definition at line 216 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

216 {
217 const Identifier id = x->identify();
218 const int array_idx = cscIdentToArrayIdx(id);
219 if (m_cscArray[array_idx]) {
220 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Trying to add ReadoutElement "<<m_idHelperSvc->toStringDetEl(id)<<" which has been already added.");
221 THROW_EXCEPTION("Double readout element assignment");
222 }
223 m_cscArray[array_idx] = std::move(x);
224 ++m_n_cscRE;
225 }
#define ATH_MSG_FATAL(x)
#define x

◆ addMdtReadoutElement()

void MuonGM::MuonDetectorManager::addMdtReadoutElement ( std::unique_ptr< MdtReadoutElement > && reEle)

store the MdtReadoutElement using as "key" the identifier

Definition at line 195 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

195 {
196 const Identifier id = x->identify();
197 const int arrayIdx = mdtIdentToArrayIdx(id);
198 if (m_mdtArray[arrayIdx]) {
199 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Trying to add ReadoutElement "<<m_idHelperSvc->toStringDetEl(id)<<" which has been already added.");
200 THROW_EXCEPTION("Double readout element assignment");
201 }
202 m_mdtArray[arrayIdx] = std::move(x);
203 ++m_n_mdtRE;
204 }

◆ addMMReadoutElement()

void MuonGM::MuonDetectorManager::addMMReadoutElement ( std::unique_ptr< MMReadoutElement > && reEle)

store the MMReadoutElement using as "key" the identifier

Definition at line 175 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

175 {
176 const int array_idx = mmIdenToArrayIdx(x->identify());
177 if (m_mmcArray[array_idx]) {
178 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Trying to add ReadoutElement "<<m_idHelperSvc->toStringDetEl(x->identify())<<" which has been already added.");
179 THROW_EXCEPTION("Double readout element assignment");
180 }
181 m_mmcArray[array_idx] = std::move(x);
182 ++m_n_mmcRE;
183 }

◆ addMuonStation()

void MuonGM::MuonDetectorManager::addMuonStation ( std::unique_ptr< MuonStation > && mst)

Definition at line 123 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

123 {
124 std::string key = muonStationKey(mst->getStationType(), mst->getEtaIndex(), mst->getPhiIndex());
125 m_MuonStationMap[key] = std::move(mst);
126 }
static std::string muonStationKey(const std::string &stName, int statEtaIndex, int statPhiIndex)
std::map< std::string, std::unique_ptr< MuonStation > > m_MuonStationMap

◆ addRpcReadoutElement()

void MuonGM::MuonDetectorManager::addRpcReadoutElement ( std::unique_ptr< RpcReadoutElement > && reEle)

store the RpcReadoutElement using as "key" the identifier

Definition at line 159 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

159 {
160 const Identifier id = x->identify();
161 int idx = rpcIdentToArrayIdx(id);
162 if (m_rpcArray[idx]) {
163 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Trying to add ReadoutElement "<<m_idHelperSvc->toStringDetEl(id)<<" which has been already added.");
164 THROW_EXCEPTION("Double readout element assignment");
165 }
166 m_rpcArray[idx] = std::move(x);
167 ++m_n_rpcRE;
168 }
int rpcIdentToArrayIdx(const Identifier &id) const
Helper method to convert the Identifier into the corresponding index accessing the array.

◆ addsTgcReadoutElement()

void MuonGM::MuonDetectorManager::addsTgcReadoutElement ( std::unique_ptr< sTgcReadoutElement > && reEle)

store the sTGCReadoutElement using as "key" the identifier

Definition at line 185 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

185 {
186 const int array_idx = stgcIdentToArrayIdx(x->identify());
187 if (m_stgArray[array_idx]) {
188 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Trying to add ReadoutElement "<<m_idHelperSvc->toStringDetEl(x->identify())<<" which has been already added.");
189 THROW_EXCEPTION("Double readout element assignment");
190 }
191 m_stgArray[array_idx] = std::move(x);
192 ++m_n_stgRE;
193 }

◆ addTgcReadoutElement()

void MuonGM::MuonDetectorManager::addTgcReadoutElement ( std::unique_ptr< TgcReadoutElement > && reEle)

store the TgcReadoutElement using as "key" the identifier

Definition at line 237 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

237 {
238 const Identifier id = x->identify();
239 const int array_idx = tgcIdentToArrayIdx(id);
240 if (m_tgcArray[array_idx]) {
241 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Trying to add ReadoutElement "<<m_idHelperSvc->toStringDetEl(id)<<" which has been already added.");
242 THROW_EXCEPTION("Double readout element assignment");
243 }
244
245 m_tgcArray[array_idx] = std::move(x);
246 ++m_n_tgcRE;
247 }

◆ addTreeTop()

void MuonGM::MuonDetectorManager::addTreeTop ( PVLink pV)

◆ clearCache()

◆ cscIdentToArrayIdx()

int MuonGM::MuonDetectorManager::cscIdentToArrayIdx ( const Identifier & id) const
private

Definition at line 316 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

316 {
317 const int hash = static_cast<int>(m_idHelperSvc->detElementHash(id));
318#ifndef NDEBUG
319 if (hash <0) {
320 ATH_MSG_WARNING("Failed to retrieve a proper hash for "<<m_idHelperSvc->toString(id));
321 return -1;
322 }
323#endif
324 return hash;
325 }
#define ATH_MSG_WARNING(x)

◆ cscIdHelper()

const CscIdHelper * MuonGM::MuonDetectorManager::cscIdHelper ( ) const
inline

Definition at line 235 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

235 {
236 return m_idHelperSvc->hasCSC() ? &(m_idHelperSvc->cscIdHelper()) : nullptr;
237 }

◆ fillCache()

◆ geometryVersion()

const std::string & MuonGM::MuonDetectorManager::geometryVersion ( ) const
inline

it can be Rome-Initial or P03, or ... it's the name of the layout

Definition at line 257 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

◆ get_DBMuonVersion()

const std::string & MuonGM::MuonDetectorManager::get_DBMuonVersion ( ) const
inline

the name of the MuonSpectrometer tag (in the geometry DB) actually accessed

Definition at line 258 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

◆ getCscReadoutElement() [1/3]

CscReadoutElement * MuonGM::MuonDetectorManager::getCscReadoutElement ( const Identifier & id)

Definition at line 232 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

232 {
233 const int array_idx = cscIdentToArrayIdx(id);
234 return array_idx < 0 ? nullptr : m_cscArray[array_idx].get();
235 }

◆ getCscReadoutElement() [2/3]

const CscReadoutElement * MuonGM::MuonDetectorManager::getCscReadoutElement ( const Identifier & id) const

access via extended identifier (requires unpacking)

Definition at line 227 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

227 {
228 const int array_idx = cscIdentToArrayIdx(id);
229 return array_idx < 0 ? nullptr : m_cscArray[array_idx].get();
230 }

◆ getCscReadoutElement() [3/3]

const CscReadoutElement * MuonGM::MuonDetectorManager::getCscReadoutElement ( const IdentifierHash & id) const

access via detector-element hash id

Definition at line 635 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

635 {
636#ifndef NDEBUG
637 if (id >= m_idHelperSvc->cscIdHelper().detectorElement_hash_max()) {
638 ATH_MSG_WARNING(" try to getCscReadoutElement with hashId " << (unsigned int)id << " outside range 0-"
639 << m_idHelperSvc->cscIdHelper().detectorElement_hash_max() - 1 );
640 return nullptr;
641 }
642#endif
643 return m_cscArray[id].get();
644 }

◆ getMdtReadoutElement() [1/3]

MdtReadoutElement * MuonGM::MuonDetectorManager::getMdtReadoutElement ( const Identifier & id)

Definition at line 211 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

211 {
212 const int arrayIdx = mdtIdentToArrayIdx(id);
213 return arrayIdx < 0 ? nullptr : m_mdtArray[arrayIdx].get();
214 }

◆ getMdtReadoutElement() [2/3]

const MdtReadoutElement * MuonGM::MuonDetectorManager::getMdtReadoutElement ( const Identifier & id) const

access via extended identifier (requires unpacking)

Definition at line 206 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

206 {
207 const int arrayIdx = mdtIdentToArrayIdx(id);
208 return arrayIdx < 0 ? nullptr : m_mdtArray[arrayIdx].get();
209 }

◆ getMdtReadoutElement() [3/3]

const MdtReadoutElement * MuonGM::MuonDetectorManager::getMdtReadoutElement ( const IdentifierHash & id) const

access via detector-element hash id

Definition at line 602 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

602 {
603#ifndef NDEBUG
604 if (id >= m_idHelperSvc->mdtIdHelper().detectorElement_hash_max()) {
605 ATH_MSG_WARNING(" try to getMdtReadoutElement with hashId " << (unsigned int)id << " outside range 0-"
606 << m_idHelperSvc->mdtIdHelper().detectorElement_hash_max() - 1 );
607 return nullptr;
608 }
609#endif
610 return m_mdtArray[id].get();
611 }

◆ getMMAsBuiltCalculator()

const NswAsBuilt::StripCalculator * MuonGM::MuonDetectorManager::getMMAsBuiltCalculator ( ) const
inline

◆ getMMPassivation()

const NswPassivationDbData * MuonGM::MuonDetectorManager::getMMPassivation ( ) const
inline

◆ getMMReadoutElement()

const MMReadoutElement * MuonGM::MuonDetectorManager::getMMReadoutElement ( const Identifier & id) const

access via extended identifier (requires unpacking)

Definition at line 257 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

257 {
258 const int array_idx = mmIdenToArrayIdx(id);
259 return array_idx < 0 ? nullptr : m_mmcArray[array_idx].get();
260 }

◆ getMuonStation() [1/2]

MuonStation * MuonGM::MuonDetectorManager::getMuonStation ( const std::string & stName,
int eta,
int phi )

Definition at line 149 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

149 {
150 std::string key = muonStationKey(stName, stEtaIndex, stPhiIndex);
151
152 std::map<std::string, std::unique_ptr<MuonStation>>::const_iterator it = m_MuonStationMap.find(key);
153 if (it != m_MuonStationMap.end())
154 return (*it).second.get();
155 else
156 return nullptr;
157 }

◆ getMuonStation() [2/2]

const MuonStation * MuonGM::MuonDetectorManager::getMuonStation ( const std::string & stName,
int eta,
int phi ) const

Definition at line 139 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

139 {
140 std::string key = muonStationKey(stName, stEtaIndex, stPhiIndex);
141
142 std::map<std::string, std::unique_ptr<MuonStation>>::const_iterator it = m_MuonStationMap.find(key);
143 if (it != m_MuonStationMap.end())
144 return (*it).second.get();
145 else
146 return nullptr;
147 }

◆ getNumTreeTops()

unsigned int MuonGM::MuonDetectorManager::getNumTreeTops ( ) const
virtual

Definition at line 115 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

115{ return m_envelope.size(); }

◆ getReadoutElement()

const MuonReadoutElement * MuonGM::MuonDetectorManager::getReadoutElement ( const Identifier & id) const

Get any read out element.

Definition at line 86 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

86 {
87 const MuonReadoutElement* reEle{nullptr};
89 switch (m_idHelperSvc->technologyIndex(id)){
90 case TechIndex::MDT:
91 reEle = getMdtReadoutElement(id);
92 break;
93 case TechIndex::RPC:
94 reEle = getRpcReadoutElement(id);
95 break;
96 case TechIndex::TGC:
97 reEle = getTgcReadoutElement(id);
98 break;
99 case TechIndex::CSC:
100 reEle = getCscReadoutElement(id);
101 break;
102 case TechIndex::MM:
103 reEle = getMMReadoutElement(id);
104 break;
105 case TechIndex::STGC:
106 reEle = getsTgcReadoutElement(id);
107 break;
108 default:
109 ATH_MSG_WARNING("Invalid technology ");
110 };
111 if (!reEle) ATH_MSG_WARNING("No readout element retrieved "<<m_idHelperSvc->toString(id));
112 return reEle;
113 }
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const MMReadoutElement * getMMReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const sTgcReadoutElement * getsTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
TechnologyIndex
enum to classify the different layers in the muon spectrometer

◆ getRpcReadoutElement() [1/2]

const RpcReadoutElement * MuonGM::MuonDetectorManager::getRpcReadoutElement ( const Identifier & id) const

access via extended identifier (requires unpacking)

Definition at line 170 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

170 {
171 int idx = rpcIdentToArrayIdx(id);
172 return m_rpcArray[idx].get();
173 }

◆ getRpcReadoutElement() [2/2]

const RpcReadoutElement * MuonGM::MuonDetectorManager::getRpcReadoutElement ( const IdentifierHash & id) const

access via detector-element hash id

Definition at line 613 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

613 {
614#ifndef NDEBUG
615 if (id >= m_idHelperSvc->rpcIdHelper().detectorElement_hash_max()) {
616 ATH_MSG_WARNING(" try to getRpcReadoutElement with hashId " << (unsigned int)id << " outside range 0-"
617 << m_idHelperSvc->rpcIdHelper().detectorElement_hash_max() - 1 );
618 return nullptr;
619 }
620#endif
621 return m_rpcArray[id].get();
622 }

◆ getsTGCAsBuilt()

const sTGCAsBuiltData * MuonGM::MuonDetectorManager::getsTGCAsBuilt ( ) const
inline

◆ getsTgcReadoutElement()

const sTgcReadoutElement * MuonGM::MuonDetectorManager::getsTgcReadoutElement ( const Identifier & id) const

access via extended identifier (requires unpacking)

Definition at line 261 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

261 {
262 const int array_idx = stgcIdentToArrayIdx(id);
263 return array_idx < 0 ? nullptr : m_stgArray[array_idx].get();
264 }

◆ getTgcReadoutElement() [1/3]

TgcReadoutElement * MuonGM::MuonDetectorManager::getTgcReadoutElement ( const Identifier & id)

Definition at line 253 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

253 {
254 const int array_idx = tgcIdentToArrayIdx(id);
255 return array_idx < 0 ? nullptr : m_tgcArray[array_idx].get();
256 }

◆ getTgcReadoutElement() [2/3]

const TgcReadoutElement * MuonGM::MuonDetectorManager::getTgcReadoutElement ( const Identifier & id) const

access via extended identifier (requires unpacking)

Definition at line 249 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

249 {
250 const int array_idx = tgcIdentToArrayIdx(id);
251 return array_idx < 0 ? nullptr : m_tgcArray[array_idx].get();
252 }

◆ getTgcReadoutElement() [3/3]

const TgcReadoutElement * MuonGM::MuonDetectorManager::getTgcReadoutElement ( const IdentifierHash & id) const

access via detector-element hash id

Definition at line 624 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

624 {
625#ifndef NDEBUG
626 if (id >= m_idHelperSvc->tgcIdHelper().detectorElement_hash_max()) {
627 ATH_MSG_WARNING(" try to getTgcReadoutElement with hashId " << (unsigned int)id << " outside range 0-"
628 << m_idHelperSvc->tgcIdHelper().detectorElement_hash_max() - 1 );
629 return nullptr;
630 }
631#endif
632 return m_tgcArray[id].get();
633 }

◆ getTreeTop() [1/2]

PVLink MuonGM::MuonDetectorManager::getTreeTop ( unsigned int i)

◆ getTreeTop() [2/2]

PVConstLink MuonGM::MuonDetectorManager::getTreeTop ( unsigned int i) const
virtual

◆ IncludeCutoutsBogFlag()

int MuonGM::MuonDetectorManager::IncludeCutoutsBogFlag ( ) const
inline

◆ IncludeCutoutsFlag()

int MuonGM::MuonDetectorManager::IncludeCutoutsFlag ( ) const
inline

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

◆ loadStationIndices()

void MuonGM::MuonDetectorManager::loadStationIndices ( )
private

Definition at line 657 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

657 {
658
659 if (!m_idHelperSvc->hasRPC()) return;
660 const RpcIdHelper& rpcHelper{m_idHelperSvc->rpcIdHelper()};
661 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BML"), RpcStatType::BML));
662 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BMS"), RpcStatType::BMS));
663 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOL"), RpcStatType::BOL));
664 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOS"), RpcStatType::BOS));
665 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BMF"), RpcStatType::BMF));
666 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOF"), RpcStatType::BOF));
667 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOG"), RpcStatType::BOG));
668 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BME"), RpcStatType::BME));
669 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIR"), RpcStatType::BIR));
670 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIM"), RpcStatType::BIM));
671 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIL"), RpcStatType::BIL));
672 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIS"), RpcStatType::BIS));
673
674 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BML, rpcHelper.stationNameIndex("BML")));
675 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BMS, rpcHelper.stationNameIndex("BMS")));
676 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOL, rpcHelper.stationNameIndex("BOL")));
677 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOS, rpcHelper.stationNameIndex("BOS")));
678 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BMF, rpcHelper.stationNameIndex("BMF")));
679 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOF, rpcHelper.stationNameIndex("BOF")));
680 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOG, rpcHelper.stationNameIndex("BOG")));
681 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BME, rpcHelper.stationNameIndex("BME")));
682 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIR, rpcHelper.stationNameIndex("BIR")));
683 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIM, rpcHelper.stationNameIndex("BIM")));
684 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIL, rpcHelper.stationNameIndex("BIL")));
685 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIS, rpcHelper.stationNameIndex("BIS")));
686 }
int stationNameIndex(const std::string &name) const

◆ mdtIdentToArrayIdx()

int MuonGM::MuonDetectorManager::mdtIdentToArrayIdx ( const Identifier & id) const
private

Definition at line 265 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

265 {
266 const int hash = static_cast<int>(m_idHelperSvc->detElementHash(id));
267#ifndef NDEBUG
268 if (hash <0) {
269 ATH_MSG_WARNING("Failed to retrieve a proper hash for "<<m_idHelperSvc->toString(id));
270 return -1;
271 }
272#endif
273 return hash;
274 }

◆ mdtIdHelper()

const MdtIdHelper * MuonGM::MuonDetectorManager::mdtIdHelper ( ) const
inline

Definition at line 232 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

232 {
233 return m_idHelperSvc->hasMDT() ? &(m_idHelperSvc->mdtIdHelper()) : nullptr;
234 }

◆ MinimalGeoFlag()

int MuonGM::MuonDetectorManager::MinimalGeoFlag ( ) const
inline

◆ mmIdenToArrayIdx()

int MuonGM::MuonDetectorManager::mmIdenToArrayIdx ( const Identifier & id) const
private

Definition at line 276 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

276 {
277 const int hash = static_cast<int>(m_idHelperSvc->detElementHash(id));
278#ifndef NDEBUG
279 if (hash <0) {
280 ATH_MSG_WARNING("Failed to retrieve a proper hash for "<<m_idHelperSvc->toString(id));
281 return -1;
282 }
283#endif
284 return hash;
285 }

◆ mmIdHelper()

const MmIdHelper * MuonGM::MuonDetectorManager::mmIdHelper ( ) const
inline

Definition at line 247 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

247 {
248 return m_idHelperSvc->hasMM() ? &(m_idHelperSvc->mmIdHelper()) : nullptr;
249 }

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

◆ muonStationKey()

std::string MuonGM::MuonDetectorManager::muonStationKey ( const std::string & stName,
int statEtaIndex,
int statPhiIndex )
static

Definition at line 128 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

128 {
129 std::string key;
130 if (statEtaIndex < 0)
131 key = stName.substr(0, 3) + "_C_zi" + MuonGM::buildString(std::abs(statEtaIndex), 2) + "fi" +
132 MuonGM::buildString(statPhiIndex, 2);
133 else
134 key = stName.substr(0, 3) + "_A_zi" + MuonGM::buildString(std::abs(statEtaIndex), 2) + "fi" +
135 MuonGM::buildString(statPhiIndex, 2);
136 return key;
137 }
std::string buildString(int i, int ncha)
const std::string & stName(StIndex index)
convert StIndex into a string

◆ nCscDE()

unsigned int MuonGM::MuonDetectorManager::nCscDE ( ) const
inline

◆ nCscRE()

unsigned int MuonGM::MuonDetectorManager::nCscRE ( ) const
inline

Number of Csc ReadoutElements.

Definition at line 263 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

263{ return m_n_cscRE; }

◆ nMdtDE()

unsigned int MuonGM::MuonDetectorManager::nMdtDE ( ) const
inline

◆ nMdtRE()

unsigned int MuonGM::MuonDetectorManager::nMdtRE ( ) const
inline

Number of Mdt ReadoutElements.

Definition at line 262 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

262{ return m_n_mdtRE; }

◆ nMMRE()

unsigned int MuonGM::MuonDetectorManager::nMMRE ( ) const
inline

Number of MM ReadoutElements.

Definition at line 267 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

267{ return m_n_mmcRE; }

◆ nMuonStation()

unsigned int MuonGM::MuonDetectorManager::nMuonStation ( ) const
inline

Number of MuonStations.

Definition at line 261 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

261{ return m_MuonStationMap.size(); }

◆ nRpcDE()

unsigned int MuonGM::MuonDetectorManager::nRpcDE ( ) const
inline

◆ nRpcRE()

unsigned int MuonGM::MuonDetectorManager::nRpcRE ( ) const
inline

Number of Rpc ReadoutElements.

Definition at line 264 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

264{ return m_n_rpcRE; }

◆ nsTgcRE()

unsigned int MuonGM::MuonDetectorManager::nsTgcRE ( ) const
inline

Number of sTgc ReadoutElements.

Definition at line 266 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

266{ return m_n_stgRE; }

◆ nTgcDE()

unsigned int MuonGM::MuonDetectorManager::nTgcDE ( ) const
inline

◆ nTgcRE()

unsigned int MuonGM::MuonDetectorManager::nTgcRE ( ) const
inline

Number of Tgc ReadoutElements.

Definition at line 265 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

265{ return m_n_tgcRE; }

◆ rpcIdentToArrayIdx()

int MuonGM::MuonDetectorManager::rpcIdentToArrayIdx ( const Identifier & id) const
private

Helper method to convert the Identifier into the corresponding index accessing the array.

Definition at line 296 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

296 {
297 const int hash = static_cast<int>(m_idHelperSvc->detElementHash(id));
298#ifndef NDEBUG
299 if (hash <0) {
300 ATH_MSG_WARNING("Failed to retrieve a proper hash for "<<m_idHelperSvc->toString(id));
301 return -1;
302 }
303#endif
304 return hash;
305 }

◆ rpcIdHelper()

const RpcIdHelper * MuonGM::MuonDetectorManager::rpcIdHelper ( ) const
inline

Definition at line 238 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

238 {
239 return m_idHelperSvc->hasRPC() ? &(m_idHelperSvc->rpcIdHelper()): nullptr;
240 }

◆ rpcStationName()

int MuonGM::MuonDetectorManager::rpcStationName ( const int stationIndex) const

Definition at line 652 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

652 {
653 std::map<int, int>::const_iterator itr = m_rpcIdxToStat.find(stationIndex);
654 if (itr != m_rpcIdxToStat.end()) return itr->second;
655 return -1;
656 }

◆ rpcStationTypeIdx()

unsigned int MuonGM::MuonDetectorManager::rpcStationTypeIdx ( const int stationName) const
private

Definition at line 646 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

646 {
647 std::map<int, int>::const_iterator itr = m_rpcStatToIdx.find(stationName);
648 if (itr != m_rpcStatToIdx.end()) return itr->second;
650 }

◆ set_DBMuonVersion()

void MuonGM::MuonDetectorManager::set_DBMuonVersion ( const std::string & version)

◆ setCutoutsBogFlag()

void MuonGM::MuonDetectorManager::setCutoutsBogFlag ( int flag)

◆ setCutoutsFlag()

void MuonGM::MuonDetectorManager::setCutoutsFlag ( int flag)

◆ setGeometryVersion()

void MuonGM::MuonDetectorManager::setGeometryVersion ( const std::string & version)

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

◆ setMinimalGeoFlag()

void MuonGM::MuonDetectorManager::setMinimalGeoFlag ( int flag)

◆ setMMPassivation()

void MuonGM::MuonDetectorManager::setMMPassivation ( const NswPassivationDbData * passiv)

Definition at line 63 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

63 {
64 m_mmPassivation = passiv;
65 }

◆ setNswAsBuilt()

void MuonGM::MuonDetectorManager::setNswAsBuilt ( const NswAsBuiltDbData * nswAsBuiltData)

Definition at line 594 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

594 {
595 m_nswAsBuilt = nswAsBuiltData;
596 }

◆ setsTGCAsBuilt()

void MuonGM::MuonDetectorManager::setsTGCAsBuilt ( const sTGCAsBuiltData * stgcAsBuilt)

Definition at line 598 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

598 {
599 m_stgcAsBuildData = stgcAsBuilt;
600 }

◆ stgcIdentToArrayIdx()

int MuonGM::MuonDetectorManager::stgcIdentToArrayIdx ( const Identifier & id) const
private

Definition at line 286 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

286 {
287 const int hash = static_cast<int>(m_idHelperSvc->detElementHash(id));
288#ifndef NDEBUG
289 if (hash <0) {
290 ATH_MSG_WARNING("Failed to retrieve a proper hash for "<<m_idHelperSvc->toString(id));
291 return -1;
292 }
293#endif
294 return hash;
295 }

◆ stgcIdHelper()

const sTgcIdHelper * MuonGM::MuonDetectorManager::stgcIdHelper ( ) const
inline

Definition at line 244 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

244 {
245 return m_idHelperSvc->hasSTGC() ? &(m_idHelperSvc->stgcIdHelper()) : nullptr;
246 }

◆ tgcIdentToArrayIdx()

int MuonGM::MuonDetectorManager::tgcIdentToArrayIdx ( const Identifier & id) const
private

Definition at line 306 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

306 {
307 const int hash = static_cast<int>(m_idHelperSvc->detElementHash(id));
308#ifndef NDEBUG
309 if (hash <0) {
310 ATH_MSG_WARNING("Failed to retrieve a proper hash for "<<m_idHelperSvc->toString(id));
311 return -1;
312 }
313#endif
314 return hash;
315 }

◆ tgcIdHelper()

const TgcIdHelper * MuonGM::MuonDetectorManager::tgcIdHelper ( ) const
inline

Definition at line 241 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

241 {
242 return m_idHelperSvc->hasTGC() ? &(m_idHelperSvc->tgcIdHelper()) : nullptr;
243 }

◆ updateAlignment()

StatusCode MuonGM::MuonDetectorManager::updateAlignment ( const ALineContainer & a)

Definition at line 327 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

327 {
328 if (alineData.empty()) {
329 ATH_MSG_DEBUG("Got empty A-line container (expected for MC), not applying A-lines...");
330 return StatusCode::SUCCESS;
331 }
332
333 using Parameter = ALinePar::Parameter;
334 // loop over the container of the updates passed by the MuonAlignmentDbTool
335 unsigned int nLines{0}, nUpdates{0};
336 for (const ALinePar& ALine : alineData) {
337 nLines++;
338 ATH_MSG_DEBUG(ALine << " is new. ID = " << m_idHelperSvc->toString(ALine.identify()));
339 const std::string stType = ALine.AmdbStation();
340 const int jff = ALine.AmdbPhi();
341 const int jzz = ALine.AmdbEta();
342 const int job = ALine.AmdbJob();
343 //********************
344 // NSW Cases
345 //********************
346 if (stType[0] == 'M' || stType[0] == 'S') {
347 if (!nMMRE() || !nsTgcRE()) {
348 ATH_MSG_WARNING("Unable to set A-line; the manager does not contain NSW readout elements" );
349 continue;
350 }
351 if (stType[0] == 'M') {
352 // Micromegas
353 const int array_idx = mmIdenToArrayIdx(ALine.identify());
354 MMReadoutElement* RE = m_mmcArray[array_idx].get();
355
356 if (!RE) {
357 ATH_MSG_WARNING(ALine << " *** No MM readout element found\n"
358 << "PLEASE CHECK FOR possible MISMATCHES between alignment constants from COOL and Geometry Layout in use");
359 return StatusCode::FAILURE;
360 }
361
362 RE->setDelta(ALine);
363
364 } else if (stType[0] == 'S') {
365 // sTGC
366 const int array_idx = stgcIdentToArrayIdx(ALine.identify());
367 sTgcReadoutElement* RE = m_stgArray[array_idx].get();
368
369 if (!RE) {
370 ATH_MSG_WARNING(ALine << " *** No sTGC readout element found\n"
371 << "PLEASE CHECK FOR possible MISMATCHES between alignment constants from COOL and Geometry Layout in use");
372 return StatusCode::FAILURE;
373 }
374
375 RE->setDelta(ALine);
376 }
377 continue;
378 }
379
380
381 //********************
382 // Non-NSW Cases
383 //********************
384 MuonStation* thisStation = getMuonStation(stType, jzz, jff);
385 if (!thisStation) {
386 ATH_MSG_WARNING("ALinePar with AmdbId " << stType << " " << jzz << " " << jff << " " << job << "*** No MuonStation found\n"
387 << "PLEASE CHECK FOR possible MISMATCHES between alignment constants from COOL and Geometry Layout in use" );
388 continue;
389 }
390
391 if (job != 0) {
392 // job different than 0 (standard for TGC conditions for Sept 2010 repro.)
393 if (stType[0] == 'T') {
394 ATH_MSG_DEBUG( "ALinePar with AmdbId " << stType << " " << jzz << " " << jff << " " << job
395 << " has JOB not 0 - this is expected for TGC" );
396 } else {
397 ATH_MSG_WARNING("ALinePar with AmdbId " << stType << " " << jzz << " " << jff << " " << job
398 << " has JOB not 0 - this is NOT EXPECTED yet for non TGC chambers - skipping this A-line" );
399 continue;
400 }
401 }
402 if (job == 0) {
403 ATH_MSG_DEBUG( "Setting delta transform for Station " << ALine);
404 using Parameter = ALinePar::Parameter;
405 thisStation->setDelta_fromAline(ALine.getParameter(Parameter::transS),
406 ALine.getParameter(Parameter::transZ),
407 ALine.getParameter(Parameter::transT),
408 ALine.getParameter(Parameter::rotS),
409 ALine.getParameter(Parameter::rotZ),
410 ALine.getParameter(Parameter::rotT));
411
412 thisStation->clearCache();
413 thisStation->fillCache();
414 } else {
415 // job different than 0 (standard for TGC conditions for Sept 2010 repro.)
416 ATH_MSG_DEBUG( "Setting delta transform for component " << ALine);
417 thisStation->setDelta_fromAline_forComp(job,
418 ALine.getParameter(Parameter::transS),
419 ALine.getParameter(Parameter::transZ),
420 ALine.getParameter(Parameter::transT),
421 ALine.getParameter(Parameter::rotS),
422 ALine.getParameter(Parameter::rotZ),
423 ALine.getParameter(Parameter::rotT));
424
425 thisStation->getMuonReadoutElement(job)->refreshCache();
426
427 }
428 nUpdates++;
429 }
430 ATH_MSG_INFO( "# of A-lines read from the ALineMapContainer in StoreGate is " << nLines );
431 ATH_MSG_INFO( "# of deltaTransforms updated according to A-lines is " << nUpdates );
432 return StatusCode::SUCCESS;
433 }
#define ATH_MSG_DEBUG(x)
Parameter
amdb frame (s, z, t) = chamber frame (y, z, x)
Definition ALinePar.h:23
const MuonStation * getMuonStation(const std::string &stName, int eta, int phi) const

◆ updateCSCInternalAlignmentMap()

StatusCode MuonGM::MuonDetectorManager::updateCSCInternalAlignmentMap ( const ALineContainer & cscIntAline)

Definition at line 513 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

513 {
514
515 if (ilineData.empty()) {
516 ATH_MSG_WARNING("Empty temporary CSC I-line container - nothing to do here" );
517 return StatusCode::SUCCESS;
518 } else
519 ATH_MSG_INFO( "temporary CSC I-line container with size = " << ilineData.size() );
520
521 // loop over the container of the updates passed by the MuonAlignmentDbTool
522 unsigned int nLines{0}, nUpdates{0};
523 for (const ALinePar& ILine : ilineData) {
524 nLines++;
525 const std::string stType = ILine.AmdbStation();
526 const int jff = ILine.AmdbPhi();
527 const int jzz = ILine.AmdbEta();
528 const int job = ILine.AmdbJob();
529 ATH_MSG_DEBUG( "CscInternalAlignmentPar with AmdbId " << ILine << " is new ID = " << m_idHelperSvc->toString(ILine.identify()) );
530 if (job == 3) {
531 MuonStation* thisStation = getMuonStation(stType, jzz, jff);
532 if (!thisStation) {
533 ATH_MSG_WARNING("CscInternalAlignmentPar with AmdbId " << ILine
534 << " *** No MuonStation found \n PLEASE CHECK FOR possible MISMATCHES between alignment constants from COOL and "
535 "Geometry Layout in use");
536 continue;
537 }
538 ATH_MSG_DEBUG( "Setting CSC I-Lines for Station " <<ILine);
539 CscReadoutElement* CscRE = dynamic_cast<CscReadoutElement*>(thisStation->getMuonReadoutElement(job));
540 if (!CscRE)
541 ATH_MSG_ERROR( "The CSC I-lines container includes stations which are no CSCs! This is impossible." );
542 else {
543 CscRE->setCscInternalAlignmentPar(ILine);
544 }
545 thisStation->refreshCache();
546
547 nUpdates++;
548
549 } else {
550 ATH_MSG_ERROR( "job for CSC I-Lines= " << job << " is not 3 => This is not valid." );
551 }
552 }
553 ATH_MSG_INFO( "# of CSC I-lines read from the ILineMapContainer in StoreGate is " << nLines );
554 ATH_MSG_INFO( "# of deltaTransforms updated according to A-lines is " << nUpdates );
555 return StatusCode::SUCCESS;
556 }
#define ATH_MSG_ERROR(x)
void setCscInternalAlignmentPar(const ALinePar &)

◆ updateDeformations()

StatusCode MuonGM::MuonDetectorManager::updateDeformations ( const BLineContainer & a)

Definition at line 435 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

435 {
436 ATH_MSG_DEBUG( "In updateDeformations()" );
437 if (blineData.empty()) {
438 ATH_MSG_DEBUG( "Got empty B-line container (expected for MC), not applying B-lines..." );
439 return StatusCode::SUCCESS;
440 } else
441 ATH_MSG_INFO( "temporary B-line container with size = " << blineData.size() );
442
443 // loop over the container of the updates passed by the MuonAlignmentDbTool
444 unsigned int nLines{0}, nUpdates{0};
445 for (const BLinePar& BLine : blineData) {
446 ++nLines;
447 const std::string stType = BLine.AmdbStation();
448 const int jff = BLine.AmdbPhi();
449 const int jzz = BLine.AmdbEta();
450 const int job = BLine.AmdbJob();
451 //********************
452 // NSW Cases
453 //********************
454 if (stType[0] == 'M' || stType[0] == 'S') {
455 if (!nMMRE() || !nsTgcRE()) {
456 ATH_MSG_WARNING("Unable to set B-line; the manager does not contain NSW readout elements" );
457 continue;
458 }
459 if (stType[0] == 'M') {
460 // Micromegas
461 const int array_idx = mmIdenToArrayIdx(BLine.identify());
462 MMReadoutElement* RE = m_mmcArray[array_idx].get();
463
464 if (!RE) {
465 ATH_MSG_WARNING("BlinePar with AmdbId " <<BLine<< " *** No MM readout element found\n"
466 << "PLEASE CHECK FOR possible MISMATCHES between alignment constants from COOL and Geometry Layout in use");
467 return StatusCode::FAILURE;
468 }
469 RE->setBLinePar(BLine);
470 } else if (stType[0] == 'S') {
471 // sTGC
472 const int array_idx = stgcIdentToArrayIdx(BLine.identify());
473 sTgcReadoutElement* RE = m_stgArray[array_idx].get();
474 if (!RE) {
475 ATH_MSG_WARNING("BlinePar with AmdbId " << BLine << " *** No sTGC readout element found\n"
476 << "PLEASE CHECK FOR possible MISMATCHES between alignment constants from COOL and Geometry Layout in use");
477 return StatusCode::FAILURE;
478 }
479 RE->setBLinePar(BLine);
480 }
481 continue;
482 }
483
484 //********************
485 // MDT Cases
486 //********************
487 if (stType.at(0) == 'T' || stType.at(0) == 'C' || (stType.substr(0, 3) == "BML" && std::abs(jzz) == 7)) {
488 ATH_MSG_DEBUG( "BLinePar with AmdbId " << BLine << " is not a MDT station - skipping" );
489 continue;
490 }
491 ATH_MSG_DEBUG( "BLinePar with AmdbId " <<BLine << " is new ID = " << m_idHelperSvc->toString(BLine.identify()) );
492 if (job == 0) {
493 MuonStation* thisStation = getMuonStation(stType, jzz, jff);
494 if (!thisStation) {
495 ATH_MSG_WARNING("BLinePar with AmdbId " << BLine <<
496 " *** No MuonStation found \n PLEASE CHECK FOR possible MISMATCHES between alignment constants from COOL and "
497 "Geometry Layout in use");
498 continue;
499 }
500 ATH_MSG_DEBUG( "Setting deformation parameters for Station " << stType << " " << jzz << " " << jff << " ");
501 thisStation->setBline(&BLine);
502 nUpdates++;
503 } else {
504 ATH_MSG_WARNING("BLinePar with AmdbId " << stType << " " << jzz << " " << jff << " " << job << " has JOB not 0 ");
505 return StatusCode::FAILURE;
506 }
507 }
508 ATH_MSG_INFO( "# of B-lines read from the ALineMapContainer in StoreGate is " << nLines );
509 ATH_MSG_INFO( "# of deform-Transforms updated according to B-lines is " << nUpdates );
510 return StatusCode::SUCCESS;
511 }

◆ updateMdtAsBuiltParams()

StatusCode MuonGM::MuonDetectorManager::updateMdtAsBuiltParams ( const MdtAsBuiltContainer & a)

Definition at line 557 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

557 {
558
559 if (asbuiltData.empty()) {
560 ATH_MSG_WARNING("Empty temporary As-Built container - nothing to do here" );
561 return StatusCode::SUCCESS;
562 } else
563 ATH_MSG_INFO( "temporary As-Built container with size = " << asbuiltData.size() );
564
565 // loop over the container of the updates passed by the MuonAlignmentDbTool
566 unsigned int nLines{0}, nUpdates{0};
567 for (const auto& AsBuiltPar : asbuiltData) {
568 nLines++;
569 const std::string stType = AsBuiltPar.AmdbStation();
570 const int jff = AsBuiltPar.AmdbPhi();
571 const int jzz = AsBuiltPar.AmdbEta();
572
573 ATH_MSG_DEBUG( "MdtAsBuiltPar with AmdbId " << AsBuiltPar
574 << " is new ID = " << m_idHelperSvc->toString(AsBuiltPar.identify()) );
575
576 MuonStation* thisStation = getMuonStation(stType, jzz, jff);
577 if (thisStation) {
578
579 ATH_MSG_DEBUG( "Setting as-built parameters for Station " << AsBuiltPar );
580 thisStation->setMdtAsBuiltParams(&AsBuiltPar);
581 nUpdates++;
582 } else {
583 ATH_MSG_WARNING("MdtAsBuiltPar with AmdbId " <<AsBuiltPar
584 << " *** No MuonStation found \n PLEASE CHECK FOR possible MISMATCHES between alignment constants from COOL and "
585 "Geometry Layout in use");
586 continue;
587 }
588 }
589 ATH_MSG_INFO( "# of MDT As-Built read from the MdtAsBuiltMapContainer in StoreGate is " << nLines );
590 ATH_MSG_INFO( "# of deltaTransforms updated according to As-Built is " << nUpdates );
591 return StatusCode::SUCCESS;
592 }

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_cscArray

std::vector<std::unique_ptr<CscReadoutElement> > MuonGM::MuonDetectorManager::m_cscArray
private

◆ m_DBMuonVersion

std::string MuonGM::MuonDetectorManager::m_DBMuonVersion {}
private

Definition at line 196 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

196{}; // name of the MuonVersion table-collection in Oracle

◆ m_envelope

std::vector<PVLink> MuonGM::MuonDetectorManager::m_envelope
private

◆ m_geometryVersion

std::string MuonGM::MuonDetectorManager::m_geometryVersion {}
private

Definition at line 195 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

195{}; // generic name of the Layout

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonGM::MuonDetectorManager::m_idHelperSvc {"Muon::MuonIdHelperSvc/MuonIdHelperSvc", "MuonDetectorManager"}
private

Definition at line 175 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

175{"Muon::MuonIdHelperSvc/MuonIdHelperSvc", "MuonDetectorManager"};

◆ m_imsg

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

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_includeCutouts

int MuonGM::MuonDetectorManager::m_includeCutouts {0}
private

◆ m_includeCutoutsBog

int MuonGM::MuonDetectorManager::m_includeCutoutsBog {0}
private

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

std::vector<std::unique_ptr<MdtReadoutElement> > MuonGM::MuonDetectorManager::m_mdtArray
private

◆ m_minimalgeo

int MuonGM::MuonDetectorManager::m_minimalgeo {0}
private

◆ m_mmcArray

std::vector<std::unique_ptr<MMReadoutElement> > MuonGM::MuonDetectorManager::m_mmcArray
private

◆ m_mmPassivation

const NswPassivationDbData* MuonGM::MuonDetectorManager::m_mmPassivation {nullptr}
private

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

std::map<std::string, std::unique_ptr<MuonStation> > MuonGM::MuonDetectorManager::m_MuonStationMap
private

◆ m_n_cscDE

unsigned int MuonGM::MuonDetectorManager::m_n_cscDE {0}
private

◆ m_n_cscRE

unsigned int MuonGM::MuonDetectorManager::m_n_cscRE {0}
private

◆ m_n_mdtDE

unsigned int MuonGM::MuonDetectorManager::m_n_mdtDE {0}
private

◆ m_n_mdtRE

unsigned int MuonGM::MuonDetectorManager::m_n_mdtRE {0}
private

◆ m_n_mmcRE

unsigned int MuonGM::MuonDetectorManager::m_n_mmcRE {0}
private

◆ m_n_rpcDE

unsigned int MuonGM::MuonDetectorManager::m_n_rpcDE {0}
private

◆ m_n_rpcRE

unsigned int MuonGM::MuonDetectorManager::m_n_rpcRE {0}
private

◆ m_n_stgRE

unsigned int MuonGM::MuonDetectorManager::m_n_stgRE {0}
private

◆ m_n_tgcDE

unsigned int MuonGM::MuonDetectorManager::m_n_tgcDE {0}
private

◆ m_n_tgcRE

unsigned int MuonGM::MuonDetectorManager::m_n_tgcRE {0}
private

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_nswAsBuilt

const NswAsBuiltDbData* MuonGM::MuonDetectorManager::m_nswAsBuilt {nullptr}
private

◆ m_rpcArray

std::vector<std::unique_ptr<RpcReadoutElement> > MuonGM::MuonDetectorManager::m_rpcArray
private

◆ m_rpcIdxToStat

std::map<int, int> MuonGM::MuonDetectorManager::m_rpcIdxToStat
private

◆ m_rpcStatToIdx

std::map<int, int> MuonGM::MuonDetectorManager::m_rpcStatToIdx
private

◆ m_stgArray

std::vector<std::unique_ptr<sTgcReadoutElement> > MuonGM::MuonDetectorManager::m_stgArray
private

◆ m_stgcAsBuildData

const sTGCAsBuiltData* MuonGM::MuonDetectorManager::m_stgcAsBuildData {nullptr}
private

◆ m_tgcArray

std::vector<std::unique_ptr<TgcReadoutElement> > MuonGM::MuonDetectorManager::m_tgcArray
private

◆ NCscStEtaOffset

int MuonGM::MuonDetectorManager::NCscStEtaOffset = 1
staticconstexpr

Identifier <-> AMDB conversion constants in use.

Definition at line 159 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

◆ NTgcStatTypeOff

int MuonGM::MuonDetectorManager::NTgcStatTypeOff = -41
staticconstexpr

◆ NTgcStEtaOffset

int MuonGM::MuonDetectorManager::NTgcStEtaOffset = 5
staticconstexpr

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