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
std::vector< const MuonReadoutElement * > getAllReadoutElements () const
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)
void setMmAsBuilt2 (const sTGCAsBuiltData *mmAsBuilt2)
const NswAsBuilt::StripCalculatorgetMMAsBuiltCalculator () const
const sTGCAsBuiltDatagetsTGCAsBuilt () const
const sTGCAsBuiltDatagetMmAsBuilt2 () 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}
const sTGCAsBuiltDatam_mmAsBuilt2 {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 185 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

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

Constructor & Destructor Documentation

◆ MuonDetectorManager()

MuonGM::MuonDetectorManager::MuonDetectorManager ( )

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

48 : AthMessaging{"MGM::MuonDetectorManager"} {
49 setName("Muon");
50 if (m_idHelperSvc.retrieve().isFailure()) {
51 THROW_EXCEPTION("MuonDetectorManager() - No IdHelper svc is available");
52 }
54 if (m_idHelperSvc->hasMDT()){
55 m_mdtArray.resize(m_idHelperSvc->mdtIdHelper().detectorElement_hash_max());
56 }
57 if (m_idHelperSvc->hasCSC()){
58 m_cscArray.resize(m_idHelperSvc->cscIdHelper().detectorElement_hash_max());
59 }
60 if (m_idHelperSvc->hasTGC()){
61 m_tgcArray.resize(m_idHelperSvc->tgcIdHelper().detectorElement_hash_max());
62 }
63 if (m_idHelperSvc->hasRPC()){
64 m_rpcArray.resize(m_idHelperSvc->rpcIdHelper().detectorElement_hash_max());
65 }
66 if (m_idHelperSvc->hasMM()){
67 m_mmcArray.resize(m_idHelperSvc->mmIdHelper().detectorElement_hash_max());
68 }
69 if (m_idHelperSvc->hasSTGC()){
70 m_stgArray.resize(m_idHelperSvc->stgcIdHelper().detectorElement_hash_max());
71 }
72 }
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 226 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

226 {
227 const Identifier id = x->identify();
228 const int array_idx = cscIdentToArrayIdx(id);
229 if (m_cscArray[array_idx]) {
230 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Trying to add ReadoutElement "<<m_idHelperSvc->toStringDetEl(id)<<" which has been already added.");
231 THROW_EXCEPTION("Double readout element assignment");
232 }
233 m_cscArray[array_idx] = std::move(x);
234 ++m_n_cscRE;
235 }
#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 205 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

205 {
206 const Identifier id = x->identify();
207 const int arrayIdx = mdtIdentToArrayIdx(id);
208 if (m_mdtArray[arrayIdx]) {
209 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Trying to add ReadoutElement "<<m_idHelperSvc->toStringDetEl(id)<<" which has been already added.");
210 THROW_EXCEPTION("Double readout element assignment");
211 }
212 m_mdtArray[arrayIdx] = std::move(x);
213 ++m_n_mdtRE;
214 }

◆ addMMReadoutElement()

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

store the MMReadoutElement using as "key" the identifier

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

185 {
186 const int array_idx = mmIdenToArrayIdx(x->identify());
187 if (m_mmcArray[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_mmcArray[array_idx] = std::move(x);
192 ++m_n_mmcRE;
193 }

◆ addMuonStation()

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

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

133 {
134 std::string key = muonStationKey(mst->getStationType(), mst->getEtaIndex(), mst->getPhiIndex());
135 m_MuonStationMap[key] = std::move(mst);
136 }
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 169 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

169 {
170 const Identifier id = x->identify();
171 int idx = rpcIdentToArrayIdx(id);
172 if (m_rpcArray[idx]) {
173 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Trying to add ReadoutElement "<<m_idHelperSvc->toStringDetEl(id)<<" which has been already added.");
174 THROW_EXCEPTION("Double readout element assignment");
175 }
176 m_rpcArray[idx] = std::move(x);
177 ++m_n_rpcRE;
178 }
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 195 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

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

◆ addTgcReadoutElement()

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

store the TgcReadoutElement using as "key" the identifier

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

247 {
248 const Identifier id = x->identify();
249 const int array_idx = tgcIdentToArrayIdx(id);
250 if (m_tgcArray[array_idx]) {
251 ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" Trying to add ReadoutElement "<<m_idHelperSvc->toStringDetEl(id)<<" which has been already added.");
252 THROW_EXCEPTION("Double readout element assignment");
253 }
254
255 m_tgcArray[array_idx] = std::move(x);
256 ++m_n_tgcRE;
257 }

◆ addTreeTop()

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

◆ clearCache()

◆ cscIdentToArrayIdx()

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

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

326 {
327 const int hash = static_cast<int>(m_idHelperSvc->detElementHash(id));
328#ifndef NDEBUG
329 if (hash <0) {
330 ATH_MSG_WARNING("Failed to retrieve a proper hash for "<<m_idHelperSvc->toString(id));
331 return -1;
332 }
333#endif
334 return hash;
335 }
#define ATH_MSG_WARNING(x)

◆ cscIdHelper()

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

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

243 {
244 return m_idHelperSvc->hasCSC() ? &(m_idHelperSvc->cscIdHelper()) : nullptr;
245 }

◆ 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 265 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 266 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

◆ getAllReadoutElements()

std::vector< const MuonReadoutElement * > MuonGM::MuonDetectorManager::getAllReadoutElements ( ) const

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

707 {
708 std::vector<const MuonReadoutElement*> res{};
709 unpackSmartPtr(m_mdtArray, res);
710 unpackSmartPtr(m_rpcArray, res);
711 unpackSmartPtr(m_tgcArray, res);
712 unpackSmartPtr(m_stgArray, res);
713 unpackSmartPtr(m_mmcArray, res);
714 unpackSmartPtr(m_cscArray, res);
715 return res;
716 }
std::pair< std::vector< unsigned int >, bool > res

◆ getCscReadoutElement() [1/3]

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

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

242 {
243 const int array_idx = cscIdentToArrayIdx(id);
244 return array_idx < 0 ? nullptr : m_cscArray[array_idx].get();
245 }

◆ getCscReadoutElement() [2/3]

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

access via extended identifier (requires unpacking)

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

237 {
238 const int array_idx = cscIdentToArrayIdx(id);
239 return array_idx < 0 ? nullptr : m_cscArray[array_idx].get();
240 }

◆ getCscReadoutElement() [3/3]

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

access via detector-element hash id

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

649 {
650#ifndef NDEBUG
651 if (id >= m_idHelperSvc->cscIdHelper().detectorElement_hash_max()) {
652 ATH_MSG_WARNING(" try to getCscReadoutElement with hashId " << (unsigned int)id << " outside range 0-"
653 << m_idHelperSvc->cscIdHelper().detectorElement_hash_max() - 1 );
654 return nullptr;
655 }
656#endif
657 return m_cscArray[id].get();
658 }

◆ getMdtReadoutElement() [1/3]

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

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

221 {
222 const int arrayIdx = mdtIdentToArrayIdx(id);
223 return arrayIdx < 0 ? nullptr : m_mdtArray[arrayIdx].get();
224 }

◆ getMdtReadoutElement() [2/3]

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

access via extended identifier (requires unpacking)

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

216 {
217 const int arrayIdx = mdtIdentToArrayIdx(id);
218 return arrayIdx < 0 ? nullptr : m_mdtArray[arrayIdx].get();
219 }

◆ getMdtReadoutElement() [3/3]

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

access via detector-element hash id

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

616 {
617#ifndef NDEBUG
618 if (id >= m_idHelperSvc->mdtIdHelper().detectorElement_hash_max()) {
619 ATH_MSG_WARNING(" try to getMdtReadoutElement with hashId " << (unsigned int)id << " outside range 0-"
620 << m_idHelperSvc->mdtIdHelper().detectorElement_hash_max() - 1 );
621 return nullptr;
622 }
623#endif
624 return m_mdtArray[id].get();
625 }

◆ getMmAsBuilt2()

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

◆ 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 267 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

267 {
268 const int array_idx = mmIdenToArrayIdx(id);
269 return array_idx < 0 ? nullptr : m_mmcArray[array_idx].get();
270 }

◆ getMuonStation() [1/2]

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

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

159 {
160 std::string key = muonStationKey(stName, stEtaIndex, stPhiIndex);
161
162 std::map<std::string, std::unique_ptr<MuonStation>>::const_iterator it = m_MuonStationMap.find(key);
163 if (it != m_MuonStationMap.end())
164 return (*it).second.get();
165 else
166 return nullptr;
167 }

◆ getMuonStation() [2/2]

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

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 }

◆ getNumTreeTops()

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

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

125{ return m_envelope.size(); }

◆ getReadoutElement()

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

Get any read out element.

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

96 {
97 const MuonReadoutElement* reEle{nullptr};
99 switch (m_idHelperSvc->technologyIndex(id)){
100 case TechIndex::MDT:
101 reEle = getMdtReadoutElement(id);
102 break;
103 case TechIndex::RPC:
104 reEle = getRpcReadoutElement(id);
105 break;
106 case TechIndex::TGC:
107 reEle = getTgcReadoutElement(id);
108 break;
109 case TechIndex::CSC:
110 reEle = getCscReadoutElement(id);
111 break;
112 case TechIndex::MM:
113 reEle = getMMReadoutElement(id);
114 break;
115 case TechIndex::STGC:
116 reEle = getsTgcReadoutElement(id);
117 break;
118 default:
119 ATH_MSG_WARNING("Invalid technology ");
120 };
121 if (!reEle) ATH_MSG_WARNING("No readout element retrieved "<<m_idHelperSvc->toString(id));
122 return reEle;
123 }
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 180 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

180 {
181 int idx = rpcIdentToArrayIdx(id);
182 return m_rpcArray[idx].get();
183 }

◆ getRpcReadoutElement() [2/2]

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

access via detector-element hash id

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

627 {
628#ifndef NDEBUG
629 if (id >= m_idHelperSvc->rpcIdHelper().detectorElement_hash_max()) {
630 ATH_MSG_WARNING(" try to getRpcReadoutElement with hashId " << (unsigned int)id << " outside range 0-"
631 << m_idHelperSvc->rpcIdHelper().detectorElement_hash_max() - 1 );
632 return nullptr;
633 }
634#endif
635 return m_rpcArray[id].get();
636 }

◆ 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 271 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

271 {
272 const int array_idx = stgcIdentToArrayIdx(id);
273 return array_idx < 0 ? nullptr : m_stgArray[array_idx].get();
274 }

◆ getTgcReadoutElement() [1/3]

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

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

263 {
264 const int array_idx = tgcIdentToArrayIdx(id);
265 return array_idx < 0 ? nullptr : m_tgcArray[array_idx].get();
266 }

◆ getTgcReadoutElement() [2/3]

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

access via extended identifier (requires unpacking)

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

259 {
260 const int array_idx = tgcIdentToArrayIdx(id);
261 return array_idx < 0 ? nullptr : m_tgcArray[array_idx].get();
262 }

◆ getTgcReadoutElement() [3/3]

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

access via detector-element hash id

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

638 {
639#ifndef NDEBUG
640 if (id >= m_idHelperSvc->tgcIdHelper().detectorElement_hash_max()) {
641 ATH_MSG_WARNING(" try to getTgcReadoutElement with hashId " << (unsigned int)id << " outside range 0-"
642 << m_idHelperSvc->tgcIdHelper().detectorElement_hash_max() - 1 );
643 return nullptr;
644 }
645#endif
646 return m_tgcArray[id].get();
647 }

◆ 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 671 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

671 {
672
673 if (!m_idHelperSvc->hasRPC()) return;
674 const RpcIdHelper& rpcHelper{m_idHelperSvc->rpcIdHelper()};
675 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BML"), RpcStatType::BML));
676 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BMS"), RpcStatType::BMS));
677 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOL"), RpcStatType::BOL));
678 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOS"), RpcStatType::BOS));
679 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BMF"), RpcStatType::BMF));
680 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOF"), RpcStatType::BOF));
681 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOG"), RpcStatType::BOG));
682 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BME"), RpcStatType::BME));
683 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIR"), RpcStatType::BIR));
684 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIM"), RpcStatType::BIM));
685 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIL"), RpcStatType::BIL));
686 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIS"), RpcStatType::BIS));
687
688 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BML, rpcHelper.stationNameIndex("BML")));
689 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BMS, rpcHelper.stationNameIndex("BMS")));
690 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOL, rpcHelper.stationNameIndex("BOL")));
691 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOS, rpcHelper.stationNameIndex("BOS")));
692 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BMF, rpcHelper.stationNameIndex("BMF")));
693 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOF, rpcHelper.stationNameIndex("BOF")));
694 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOG, rpcHelper.stationNameIndex("BOG")));
695 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BME, rpcHelper.stationNameIndex("BME")));
696 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIR, rpcHelper.stationNameIndex("BIR")));
697 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIM, rpcHelper.stationNameIndex("BIM")));
698 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIL, rpcHelper.stationNameIndex("BIL")));
699 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIS, rpcHelper.stationNameIndex("BIS")));
700 }
int stationNameIndex(const std::string &name) const

◆ mdtIdentToArrayIdx()

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

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

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

◆ mdtIdHelper()

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

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

240 {
241 return m_idHelperSvc->hasMDT() ? &(m_idHelperSvc->mdtIdHelper()) : nullptr;
242 }

◆ MinimalGeoFlag()

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

◆ mmIdenToArrayIdx()

int MuonGM::MuonDetectorManager::mmIdenToArrayIdx ( 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 }

◆ mmIdHelper()

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

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

255 {
256 return m_idHelperSvc->hasMM() ? &(m_idHelperSvc->mmIdHelper()) : nullptr;
257 }

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

168{
169 MsgStream* ms = m_msg_tls.get();
170 if (!ms) {
171 if (!m_initialized.test_and_set()) initMessaging();
172 ms = new MsgStream(m_imsg,m_nm);
173 m_msg_tls.reset( ms );
174 }
175
176 ms->setLevel (m_lvl);
177 return *ms;
178}
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 182 of file AthMessaging.h.

183{ 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 user did not set explicit message level we have to initialize
154 // the messaging and retrieve the default via the MessageSvc.
155 if (m_lvl==MSG::NIL && !m_initialized.test_and_set()) initMessaging();
156
157 if (m_lvl <= lvl) {
158 msg() << lvl;
159 return true;
160 } else {
161 return false;
162 }
163}

◆ muonStationKey()

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

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

138 {
139 std::string key;
140 if (statEtaIndex < 0)
141 key = stName.substr(0, 3) + "_C_zi" + MuonGM::buildString(std::abs(statEtaIndex), 2) + "fi" +
142 MuonGM::buildString(statPhiIndex, 2);
143 else
144 key = stName.substr(0, 3) + "_A_zi" + MuonGM::buildString(std::abs(statEtaIndex), 2) + "fi" +
145 MuonGM::buildString(statPhiIndex, 2);
146 return key;
147 }
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 271 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

271{ 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 270 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

270{ return m_n_mdtRE; }

◆ nMMRE()

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

Number of MM ReadoutElements.

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

275{ return m_n_mmcRE; }

◆ nMuonStation()

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

Number of MuonStations.

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

269{ 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 272 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

272{ return m_n_rpcRE; }

◆ nsTgcRE()

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

Number of sTgc ReadoutElements.

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

274{ 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 273 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

273{ 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 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 }

◆ rpcIdHelper()

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

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

246 {
247 return m_idHelperSvc->hasRPC() ? &(m_idHelperSvc->rpcIdHelper()): nullptr;
248 }

◆ rpcStationName()

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

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

666 {
667 std::map<int, int>::const_iterator itr = m_rpcIdxToStat.find(stationIndex);
668 if (itr != m_rpcIdxToStat.end()) return itr->second;
669 return -1;
670 }

◆ rpcStationTypeIdx()

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

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

660 {
661 std::map<int, int>::const_iterator itr = m_rpcStatToIdx.find(stationName);
662 if (itr != m_rpcStatToIdx.end()) return itr->second;
664 }

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

◆ setMmAsBuilt2()

void MuonGM::MuonDetectorManager::setMmAsBuilt2 ( const sTGCAsBuiltData * mmAsBuilt2)

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

608 {
609 m_mmAsBuilt2 = mmAsBuilt2;
610 }

◆ setMMPassivation()

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

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

73 {
74 m_mmPassivation = passiv;
75 }

◆ setNswAsBuilt()

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

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

604 {
605 m_nswAsBuilt = nswAsBuiltData;
606 }

◆ setsTGCAsBuilt()

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

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

612 {
613 m_stgcAsBuildData = stgcAsBuilt;
614 }

◆ stgcIdentToArrayIdx()

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

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 }

◆ stgcIdHelper()

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

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

252 {
253 return m_idHelperSvc->hasSTGC() ? &(m_idHelperSvc->stgcIdHelper()) : nullptr;
254 }

◆ tgcIdentToArrayIdx()

int MuonGM::MuonDetectorManager::tgcIdentToArrayIdx ( 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 }

◆ tgcIdHelper()

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

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

249 {
250 return m_idHelperSvc->hasTGC() ? &(m_idHelperSvc->tgcIdHelper()) : nullptr;
251 }

◆ updateAlignment()

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

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

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

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

◆ updateDeformations()

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

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

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

◆ updateMdtAsBuiltParams()

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

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

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

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 203 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

203{}; // 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 202 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

202{}; // generic name of the Layout

◆ m_idHelperSvc

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

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

182{"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_mmAsBuilt2

const sTGCAsBuiltData* MuonGM::MuonDetectorManager::m_mmAsBuilt2 {nullptr}
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 163 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: