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 Muon::IMuonIdHelperSvcidHelperSvc () 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 188 of file MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h.

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

Constructor & Destructor Documentation

◆ MuonDetectorManager()

MuonGM::MuonDetectorManager::MuonDetectorManager ( )

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

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

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

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

◆ addMMReadoutElement()

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

store the MMReadoutElement using as "key" the identifier

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

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

◆ addMuonStation()

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

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

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

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

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

◆ addTgcReadoutElement()

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

store the TgcReadoutElement using as "key" the identifier

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

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

◆ addTreeTop()

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

◆ clearCache()

◆ cscIdentToArrayIdx()

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

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

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

◆ cscIdHelper()

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

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

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

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

◆ getAllReadoutElements()

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

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

728 {
729 std::vector<const MuonReadoutElement*> res{};
730 unpackSmartPtr(m_mdtArray, res);
731 unpackSmartPtr(m_rpcArray, res);
732 unpackSmartPtr(m_tgcArray, res);
733 unpackSmartPtr(m_stgArray, res);
734 unpackSmartPtr(m_mmcArray, res);
735 unpackSmartPtr(m_cscArray, res);
736 return res;
737 }
std::pair< std::vector< unsigned int >, bool > res

◆ getCscReadoutElement() [1/3]

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

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

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

◆ getCscReadoutElement() [2/3]

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

access via extended identifier (requires unpacking)

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

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

◆ getCscReadoutElement() [3/3]

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

access via detector-element hash id

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

670 {
671#ifndef NDEBUG
672 if (id >= m_idHelperSvc->cscIdHelper().detectorElement_hash_max()) {
673 ATH_MSG_WARNING(" try to getCscReadoutElement with hashId " << (unsigned int)id << " outside range 0-"
674 << m_idHelperSvc->cscIdHelper().detectorElement_hash_max() - 1 );
675 return nullptr;
676 }
677#endif
678 return m_cscArray[id].get();
679 }

◆ getMdtReadoutElement() [1/3]

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

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

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

◆ getMdtReadoutElement() [2/3]

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

access via extended identifier (requires unpacking)

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

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

◆ getMdtReadoutElement() [3/3]

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

access via detector-element hash id

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

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

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

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

◆ getMuonStation() [1/2]

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

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

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

◆ getMuonStation() [2/2]

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

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

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

◆ getNumTreeTops()

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

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

126{ return m_envelope.size(); }

◆ getReadoutElement()

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

Get any read out element.

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

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

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

◆ getRpcReadoutElement() [2/2]

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

access via detector-element hash id

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

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

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

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

◆ getTgcReadoutElement() [1/3]

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

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

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

◆ getTgcReadoutElement() [2/3]

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

access via extended identifier (requires unpacking)

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

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

◆ getTgcReadoutElement() [3/3]

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

access via detector-element hash id

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

659 {
660#ifndef NDEBUG
661 if (id >= m_idHelperSvc->tgcIdHelper().detectorElement_hash_max()) {
662 ATH_MSG_WARNING(" try to getTgcReadoutElement with hashId " << (unsigned int)id << " outside range 0-"
663 << m_idHelperSvc->tgcIdHelper().detectorElement_hash_max() - 1 );
664 return nullptr;
665 }
666#endif
667 return m_tgcArray[id].get();
668 }

◆ getTreeTop() [1/2]

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

◆ getTreeTop() [2/2]

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

◆ idHelperSvc()

const Muon::IMuonIdHelperSvc * MuonGM::MuonDetectorManager::idHelperSvc ( ) const
inline

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

173 {
174 return m_idHelperSvc.get();
175 }

◆ 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)
int outputLevel(const IMessageSvc *ims, const std::string &source)

◆ loadStationIndices()

void MuonGM::MuonDetectorManager::loadStationIndices ( )
private

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

692 {
693
694 if (!m_idHelperSvc->hasRPC()) return;
695 const RpcIdHelper& rpcHelper{m_idHelperSvc->rpcIdHelper()};
696 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BML"), RpcStatType::BML));
697 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BMS"), RpcStatType::BMS));
698 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOL"), RpcStatType::BOL));
699 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOS"), RpcStatType::BOS));
700 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BMF"), RpcStatType::BMF));
701 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOF"), RpcStatType::BOF));
702 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BOG"), RpcStatType::BOG));
703 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BME"), RpcStatType::BME));
704 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIR"), RpcStatType::BIR));
705 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIM"), RpcStatType::BIM));
706 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIL"), RpcStatType::BIL));
707 m_rpcStatToIdx.insert(std::make_pair(rpcHelper.stationNameIndex("BIS"), RpcStatType::BIS));
708
709 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BML, rpcHelper.stationNameIndex("BML")));
710 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BMS, rpcHelper.stationNameIndex("BMS")));
711 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOL, rpcHelper.stationNameIndex("BOL")));
712 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOS, rpcHelper.stationNameIndex("BOS")));
713 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BMF, rpcHelper.stationNameIndex("BMF")));
714 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOF, rpcHelper.stationNameIndex("BOF")));
715 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BOG, rpcHelper.stationNameIndex("BOG")));
716 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BME, rpcHelper.stationNameIndex("BME")));
717 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIR, rpcHelper.stationNameIndex("BIR")));
718 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIM, rpcHelper.stationNameIndex("BIM")));
719 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIL, rpcHelper.stationNameIndex("BIL")));
720 m_rpcIdxToStat.insert(std::make_pair(RpcStatType::BIS, rpcHelper.stationNameIndex("BIS")));
721 }
int stationNameIndex(const std::string &name) const

◆ mdtIdentToArrayIdx()

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

◆ mdtIdHelper()

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

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

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

◆ MinimalGeoFlag()

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

◆ mmIdenToArrayIdx()

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

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

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

◆ mmIdHelper()

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

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

258 {
259 return m_idHelperSvc->hasMM() ? &(m_idHelperSvc->mmIdHelper()) : nullptr;
260 }

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

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

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

273{ return m_n_mdtRE; }

◆ nMMRE()

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

Number of MM ReadoutElements.

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

278{ return m_n_mmcRE; }

◆ nMuonStation()

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

Number of MuonStations.

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

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

275{ return m_n_rpcRE; }

◆ nsTgcRE()

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

Number of sTgc ReadoutElements.

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

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

276{ 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 307 of file MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx.

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

◆ rpcIdHelper()

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

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

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

◆ rpcStationName()

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

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

687 {
688 std::map<int, int>::const_iterator itr = m_rpcIdxToStat.find(stationIndex);
689 if (itr != m_rpcIdxToStat.end()) return itr->second;
690 return -1;
691 }

◆ rpcStationTypeIdx()

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

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

681 {
682 std::map<int, int>::const_iterator itr = m_rpcStatToIdx.find(stationName);
683 if (itr != m_rpcStatToIdx.end()) return itr->second;
685 }

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

629 {
630 m_mmAsBuilt2 = mmAsBuilt2;
631 }

◆ setMMPassivation()

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

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

74 {
75 m_mmPassivation = passiv;
76 }

◆ setNswAsBuilt()

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

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

625 {
626 m_nswAsBuilt = nswAsBuiltData;
627 }

◆ setsTGCAsBuilt()

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

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

633 {
634 m_stgcAsBuildData = stgcAsBuilt;
635 }

◆ stgcIdentToArrayIdx()

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

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

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

◆ stgcIdHelper()

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

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

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

◆ tgcIdentToArrayIdx()

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

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

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

◆ tgcIdHelper()

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

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

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

◆ updateAlignment()

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

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

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

544 {
545
546 if (ilineData.empty()) {
547 ATH_MSG_WARNING("Empty temporary CSC I-line container - nothing to do here" );
548 return StatusCode::SUCCESS;
549 } else
550 ATH_MSG_INFO( "temporary CSC I-line container with size = " << ilineData.size() );
551
552 // loop over the container of the updates passed by the MuonAlignmentDbTool
553 unsigned int nLines{0}, nUpdates{0};
554 for (const ALinePar& ILine : ilineData) {
555 nLines++;
556 const std::string stType = ILine.AmdbStation();
557 const int jff = ILine.AmdbPhi();
558 const int jzz = ILine.AmdbEta();
559 const int job = ILine.AmdbJob();
560 ATH_MSG_DEBUG( "CscInternalAlignmentPar with AmdbId " << ILine << " is new ID = " << m_idHelperSvc->toString(ILine.identify()) );
561 if (job == 3) {
562 MuonStation* thisStation = getMuonStation(stType, jzz, jff);
563 if (!thisStation) {
564 ATH_MSG_WARNING("CscInternalAlignmentPar with AmdbId " << ILine
565 << " *** No MuonStation found \n PLEASE CHECK FOR possible MISMATCHES between alignment constants from COOL and "
566 "Geometry Layout in use");
567 continue;
568 }
569 ATH_MSG_DEBUG( "Setting CSC I-Lines for Station " <<ILine);
570 CscReadoutElement* CscRE = dynamic_cast<CscReadoutElement*>(thisStation->getMuonReadoutElement(job));
571 if (!CscRE)
572 ATH_MSG_ERROR( "The CSC I-lines container includes stations which are no CSCs! This is impossible." );
573 else {
574 CscRE->setCscInternalAlignmentPar(ILine);
575 }
576 thisStation->refreshCache();
577
578 nUpdates++;
579
580 } else {
581 ATH_MSG_ERROR( "job for CSC I-Lines= " << job << " is not 3 => This is not valid." );
582 }
583 }
584 ATH_MSG_INFO( "# of CSC I-lines read from the ILineMapContainer in StoreGate is " << nLines );
585 ATH_MSG_INFO( "# of deltaTransforms updated according to A-lines is " << nUpdates );
586 return StatusCode::SUCCESS;
587 }
#define ATH_MSG_ERROR(x,...)
void setCscInternalAlignmentPar(const ALinePar &)

◆ updateDeformations()

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

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

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

◆ updateMdtAsBuiltParams()

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

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

588 {
589
590 if (asbuiltData.empty()) {
591 ATH_MSG_WARNING("Empty temporary As-Built container - nothing to do here" );
592 return StatusCode::SUCCESS;
593 } else
594 ATH_MSG_INFO( "temporary As-Built container with size = " << asbuiltData.size() );
595
596 // loop over the container of the updates passed by the MuonAlignmentDbTool
597 unsigned int nLines{0}, nUpdates{0};
598 for (const auto& AsBuiltPar : asbuiltData) {
599 nLines++;
600 const std::string stType = AsBuiltPar.AmdbStation();
601 const int jff = AsBuiltPar.AmdbPhi();
602 const int jzz = AsBuiltPar.AmdbEta();
603
604 ATH_MSG_DEBUG( "MdtAsBuiltPar with AmdbId " << AsBuiltPar
605 << " is new ID = " << m_idHelperSvc->toString(AsBuiltPar.identify()) );
606
607 MuonStation* thisStation = getMuonStation(stType, jzz, jff);
608 if (thisStation) {
609
610 ATH_MSG_DEBUG( "Setting as-built parameters for Station " << AsBuiltPar );
611 thisStation->setMdtAsBuiltParams(&AsBuiltPar);
612 nUpdates++;
613 } else {
614 ATH_MSG_WARNING("MdtAsBuiltPar with AmdbId " <<AsBuiltPar
615 << " *** No MuonStation found \n PLEASE CHECK FOR possible MISMATCHES between alignment constants from COOL and "
616 "Geometry Layout in use");
617 continue;
618 }
619 }
620 ATH_MSG_INFO( "# of MDT As-Built read from the MdtAsBuiltMapContainer in StoreGate is " << nLines );
621 ATH_MSG_INFO( "# of deltaTransforms updated according to As-Built is " << nUpdates );
622 return StatusCode::SUCCESS;
623 }

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

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

205{}; // generic name of the Layout

◆ m_idHelperSvc

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

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

185{"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: