ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::MuonIdHelperSvc Class Reference

Helper service that creates muon Identifiers and can be used to print Identifiers. More...

#include <MuonIdHelperSvc.h>

Inheritance diagram for Muon::MuonIdHelperSvc:

Classes

struct  StationNameData

Public Member Functions

virtual ~MuonIdHelperSvc () override=default
 destructor
virtual StatusCode initialize () override
 AlgTool initilize.
virtual std::string toString (const Identifier &id) const override
 print all fields to string
virtual std::string toStringTech (const Identifier &id) const override
 print all fields up to technology to string
virtual std::string toStringStation (const Identifier &id) const override
 print all fields up to stationName to string
virtual std::string toStringChamber (const Identifier &id) const override
 print all fields up to chamber to string
virtual std::string toStringDetEl (const Identifier &id) const override
 print all fields up to detector element to string
virtual std::string toStringGasGap (const Identifier &id) const override
 print all fields up to gas gap to string
virtual std::string chamberNameString (const Identifier &id) const override
 print chamber name to string
virtual bool isMuon (const Identifier &id) const override
 returns whether this is a Muon Identifier or not
virtual bool isMdt (const Identifier &id) const override
 returns whether this is a MDT Identifier or not
virtual bool isMM (const Identifier &id) const override
 returns whether this is a MM Identifier or not
virtual bool isCsc (const Identifier &id) const override
 returns whether this is a CSC Identifier or not
virtual bool isRpc (const Identifier &id) const override
 returns whether this is a RPC Identifier or not
virtual bool isTgc (const Identifier &id) const override
 returns whether this is a TGC Identifier or not
virtual bool issTgc (const Identifier &id) const override
 returns whether this is a sTGC Identifier or not
virtual bool issMdt (const Identifier &id) const override
 returns whether this is a sMDT Identifier or not
virtual bool hasHPTDC (const Identifier &id) const override
 returns whether this Identifier belongs to an MDT with HPTDC or not NOTE that in Run4, no HPTDCs at all are planned to be present any more, so this function should be obsolete from Run4 onwards
virtual bool measuresPhi (const Identifier &id) const override
 returns whether channel measures phi or not
virtual bool isEndcap (const Identifier &id) const override
 returns whether this is an endcap Identifier or not
virtual bool isTrigger (const Identifier &id) const override
 returns whether trigger chamber id or not
virtual bool isSmallChamber (const Identifier &id) const override
 returns whether this is a small chamber, always returns true for TGCs
virtual int gasGap (const Identifier &id) const override
 returns gas gap: gasGap for RPC + TGC, wireLayer for CSC, tube for MDT
virtual Identifier chamberId (const Identifier &id) const override
 create a chamber ID
virtual Identifier detElId (const Identifier &id) const override
 create a detector element ID
virtual Identifier gasGapId (const Identifier &id) const override
 create a gasGap ID (will return layer Id for MDTs)
virtual Identifier layerId (const Identifier &id) const override
 create a layer ID, returns tube id for the MDTs
virtual const MdtIdHelpermdtIdHelper () const override
 access to MdtIdHelper
virtual const RpcIdHelperrpcIdHelper () const override
 access to RpcIdHelper
virtual const TgcIdHelpertgcIdHelper () const override
 access to TgcIdHelper
virtual const CscIdHelpercscIdHelper () const override
 access to CscIdHelper
virtual const sTgcIdHelperstgcIdHelper () const override
 access to TgcIdHelper
virtual const MmIdHelpermmIdHelper () const override
 access to CscIdHelper
virtual MuonStationIndex::ChIndex chamberIndex (const Identifier &id) const override
 calculate chamber index from Identifier
virtual MuonStationIndex::StIndex stationIndex (const Identifier &id) const override
 calculate station index from Identifier
virtual MuonStationIndex::PhiIndex phiIndex (const Identifier &id) const override
 calculate phi index from Identifier (not supported for MDT hits)
virtual MuonStationIndex::DetectorRegionIndex regionIndex (const Identifier &id) const override
 calculate detector region index from Identifier
virtual MuonStationIndex::LayerIndex layerIndex (const Identifier &id) const override
 calculate layer index from Identifier
virtual MuonStationIndex::TechnologyIndex technologyIndex (const Identifier &id) const override
 calculate layer index from Identifier
virtual int stationPhi (const Identifier &id) const override
 Return stationPhi for all technologies.
virtual int stationEta (const Identifier &id) const override
 Return stationEta for all technologies.
virtual std::string stationNameString (const Identifier &id) const override
 Return the station name string for all technologies.
virtual int stationName (const Identifier &id) const override
 Return stationName for all technologies.
virtual int stationRegion (const Identifier &id) const override
 Return stationRegion for all technologies.
virtual int sector (const Identifier &id) const override
 return sector number 1-16, odd=large, even=small
virtual const std::set< MuonStationIndex::TechnologyIndex > & technologiesInStation (MuonStationIndex::StIndex stIndex) const override
 Recieve all technologies in a station.
bool hasRPC () const override
bool hasTGC () const override
bool hasMDT () const override
bool hasCSC () const override
bool hasSTGC () const override
bool hasMM () const override
virtual IdentifierHash moduleHash (const Identifier &id) const override
 Returns the module hash associated to an Identifier.
virtual IdentifierHash detElementHash (const Identifier &id) const override
 Returns the detector element hash associated to an Identifier.

Private Types

using TechIdx = MuonStationIndex::TechnologyIndex
using ChIdx = MuonStationIndex::ChIndex
using StIdx = MuonStationIndex::StIndex
using PhiIdx = MuonStationIndex::PhiIndex

Private Member Functions

IdentifierHash moduleHash (const MuonIdHelper &idHelper, const Identifier &id) const
IdentifierHash detElementHash (const MuonIdHelper &idHelper, const Identifier &id) const

Private Attributes

const RpcIdHelperm_rpcIdHelper {nullptr}
 Sub detector specific IdHelpers.
const TgcIdHelperm_tgcIdHelper {nullptr}
const CscIdHelperm_cscIdHelper {nullptr}
const MdtIdHelperm_mdtIdHelper {nullptr}
const MmIdHelperm_mmIdHelper {nullptr}
const sTgcIdHelperm_stgcIdHelper {nullptr}
const MuonIdHelperm_primaryHelper {nullptr}
Gaudi::Property< bool > m_hasMDT {this, "HasMDT", true, "Specify whether the current detector layour contains MDT chambers"}
Gaudi::Property< bool > m_hasRPC {this, "HasRPC", true, "Specify whether the current detector layour contains RPC chambers"}
Gaudi::Property< bool > m_hasTGC {this, "HasTGC", true, "Specify whether the current detector layour contains TGC chambers"}
Gaudi::Property< bool > m_hasCSC {this, "HasCSC", true, "Specify whether current detector layout contains CSC chambers"}
Gaudi::Property< bool > m_hasSTGC {this, "HasSTGC", true, "Specify whether current detector layout contains STGC chambers"}
Gaudi::Property< bool > m_hasMM {this, "HasMM", true, "Specify whether current detector layout contains MicroMegas chambers"}
ServiceHandle< StoreGateSvcm_detStore {this, "DetectorStore", "DetectorStore"}
std::vector< StationNameDatam_stationNameData {}
std::vector< TechIdxm_technologies {}
int m_BIS_stat {-1}
std::unordered_set< Identifierm_smdt_stat {}
std::array< std::set< TechIdx >, static_cast< int >(StIdx::StIndexMax)> m_techPerStation {}
 Array holding which technologies are there per station.

Detailed Description

Helper service that creates muon Identifiers and can be used to print Identifiers.

Definition at line 20 of file MuonIdHelperSvc.h.

Member Typedef Documentation

◆ ChIdx

Definition at line 221 of file MuonIdHelperSvc.h.

◆ PhiIdx

◆ StIdx

Definition at line 222 of file MuonIdHelperSvc.h.

◆ TechIdx

Constructor & Destructor Documentation

◆ ~MuonIdHelperSvc()

virtual Muon::MuonIdHelperSvc::~MuonIdHelperSvc ( )
overridevirtualdefault

destructor

Member Function Documentation

◆ chamberId()

Identifier Muon::MuonIdHelperSvc::chamberId ( const Identifier & id) const
overridevirtual

create a chamber ID

Definition at line 439 of file MuonIdHelperSvc.cxx.

439 {
440 // use phi hits on segment
441 switch (technologyIndex(id)) {
442 using enum TechnologyIndex;
443 case MDT: {
444 return m_mdtIdHelper->elementID(id);
445 } case RPC: {
446 return m_rpcIdHelper->elementID(id);
447 } case TGC: {
448 return m_tgcIdHelper->elementID(id);
449 } case CSC: {
450 return m_cscIdHelper->elementID(id);
451 } case STGC: {
452 return m_stgcIdHelper->elementID(id);
453 } case MM: {
454 return m_mmIdHelper->elementID(id);
455 } default:
456 break;
457 }
458 return Identifier{};
459 }
@ CSC
Definition RegSelEnums.h:34
@ STGC
Definition RegSelEnums.h:39
@ MM
Definition RegSelEnums.h:38
@ RPC
Definition RegSelEnums.h:32
@ TGC
Definition RegSelEnums.h:33
@ MDT
Definition RegSelEnums.h:31
const TgcIdHelper * m_tgcIdHelper
const MdtIdHelper * m_mdtIdHelper
virtual MuonStationIndex::TechnologyIndex technologyIndex(const Identifier &id) const override
calculate layer index from Identifier
const RpcIdHelper * m_rpcIdHelper
Sub detector specific IdHelpers.
const sTgcIdHelper * m_stgcIdHelper
const MmIdHelper * m_mmIdHelper
const CscIdHelper * m_cscIdHelper
TechnologyIndex
enum to classify the different layers in the muon spectrometer

◆ chamberIndex()

ChIndex Muon::MuonIdHelperSvc::chamberIndex ( const Identifier & id) const
overridevirtual

calculate chamber index from Identifier

Definition at line 269 of file MuonIdHelperSvc.cxx.

269 {
270 if (!id.is_valid() || !isMuon(id)) {
271 if (id.is_valid()) ATH_MSG_WARNING("chamberIndex: invalid ID " << m_primaryHelper->print_to_string(id));
272 return ChIdx::ChUnknown;
273 }
274 return m_stationNameData[stationName(id)].chIndex;
275 }
#define ATH_MSG_WARNING(x)
virtual int stationName(const Identifier &id) const override
Return stationName for all technologies.
const MuonIdHelper * m_primaryHelper
std::vector< StationNameData > m_stationNameData
virtual bool isMuon(const Identifier &id) const override
returns whether this is a Muon Identifier or not

◆ chamberNameString()

std::string Muon::MuonIdHelperSvc::chamberNameString ( const Identifier & id) const
overridevirtual

print chamber name to string

Definition at line 381 of file MuonIdHelperSvc.cxx.

381 {
382 return m_primaryHelper->stationNameString(stationName(id));
383 }

◆ cscIdHelper()

virtual const CscIdHelper & Muon::MuonIdHelperSvc::cscIdHelper ( ) const
inlineoverridevirtual

access to CscIdHelper

Definition at line 127 of file MuonIdHelperSvc.h.

127 {
128 assert(m_cscIdHelper != nullptr);
129 return *m_cscIdHelper;
130 }

◆ detElementHash() [1/2]

IdentifierHash Muon::MuonIdHelperSvc::detElementHash ( const Identifier & id) const
overridevirtual

Returns the detector element hash associated to an Identifier.

Definition at line 606 of file MuonIdHelperSvc.cxx.

606 {
607 switch (technologyIndex(id)){
609 case MDT: {
610 return detElementHash(*m_mdtIdHelper, id);
611 }
612 case RPC: {
613 return detElementHash(*m_rpcIdHelper, id);
614 }
615 case TGC: {
616 return detElementHash(*m_tgcIdHelper, id);
617 }
618 case CSC: {
619 return detElementHash(*m_cscIdHelper, id);
620 }
621 case STGC: {
622 return detElementHash(*m_stgcIdHelper, id);
623 }
624 case MM: {
625 return detElementHash(*m_mmIdHelper, id);
626 }
627 default:
628 break;
629 }
630 ATH_MSG_WARNING("detElementHash(): No muon Identifier "<<id);
631 return IdentifierHash{};
632 }
virtual IdentifierHash detElementHash(const Identifier &id) const override
Returns the detector element hash associated to an Identifier.

◆ detElementHash() [2/2]

IdentifierHash Muon::MuonIdHelperSvc::detElementHash ( const MuonIdHelper & idHelper,
const Identifier & id ) const
inlineprivate

Definition at line 570 of file MuonIdHelperSvc.cxx.

570 {
571 IdentifierHash hash{};
572 if (idHelper.get_detectorElement_hash(id, hash) ||
573 static_cast<unsigned int>(hash)>= idHelper.detectorElement_hash_max()) {
574 ATH_MSG_VERBOSE("Failed to deduce detector element hash "<<toString(id));
575 }
576 return hash;
577 }
#define ATH_MSG_VERBOSE(x)
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const
size_type detectorElement_hash_max() const
virtual std::string toString(const Identifier &id) const override
print all fields to string

◆ detElId()

Identifier Muon::MuonIdHelperSvc::detElId ( const Identifier & id) const
overridevirtual

create a detector element ID

Definition at line 461 of file MuonIdHelperSvc.cxx.

461 {
462 // use phi hits on segment
463 switch (technologyIndex(id)) {
465 case MDT: {
466 return m_mdtIdHelper->channelID(id, m_mdtIdHelper->multilayer(id), 1, 1);;
467 } case RPC: {
468 return m_rpcIdHelper->channelID(id, m_rpcIdHelper->doubletZ(id), m_rpcIdHelper->doubletPhi(id), 1, false, 1);
469 } case TGC: {
470 return m_tgcIdHelper->elementID(id);
471 } case CSC: {
472 return m_cscIdHelper->channelID(id, 2, 1, 1, 1);
473 } case MM: {
474 return m_mmIdHelper->channelID(id, m_mmIdHelper->multilayer(id), 1, 1);
475 } case STGC: {
476 return m_stgcIdHelper->channelID(id, m_stgcIdHelper->multilayer(id), 1, sTgcIdHelper::sTgcChannelTypes::Strip, 1);
477 } default:
478 break;
479 }
480 return id;
481 }

◆ gasGap()

int Muon::MuonIdHelperSvc::gasGap ( const Identifier & id) const
overridevirtual

returns gas gap: gasGap for RPC + TGC, wireLayer for CSC, tube for MDT

Definition at line 194 of file MuonIdHelperSvc.cxx.

194 {
195 switch (technologyIndex(id)) {
196 using enum TechnologyIndex;
197 case RPC: {
198 return m_rpcIdHelper->gasGap(id);
199 } case TGC: {
200 return m_tgcIdHelper->gasGap(id);
201 } case CSC: {
202 return m_cscIdHelper->wireLayer(id);
203 } case STGC: {
204 return m_stgcIdHelper->gasGap(id);
205 } case MM: {
206 return m_mmIdHelper->gasGap(id);
207 } case MDT: {
208 return m_mdtIdHelper->channel(id);
209 } default:
210 break;
211 }
212 return 0;
213 }

◆ gasGapId()

Identifier Muon::MuonIdHelperSvc::gasGapId ( const Identifier & id) const
overridevirtual

create a gasGap ID (will return layer Id for MDTs)

Definition at line 506 of file MuonIdHelperSvc.cxx.

506 {
507 switch (technologyIndex(id)) {
508 using enum TechnologyIndex;
509 case RPC: {
510 return m_rpcIdHelper->channelID(id, m_rpcIdHelper->doubletZ(id), m_rpcIdHelper->doubletPhi(id),
511 m_rpcIdHelper->gasGap(id), false, 1);
512 } case TGC: {
513 return m_tgcIdHelper->channelID(id, m_tgcIdHelper->gasGap(id), false, 1);
514 } case CSC: {
515 return m_cscIdHelper->channelID(id, m_cscIdHelper->chamberLayer(id), m_cscIdHelper->wireLayer(id), 1, 1);
516 } case STGC: {
517 return m_stgcIdHelper->channelID(id, m_stgcIdHelper->multilayer(id), m_stgcIdHelper->gasGap(id),
519 } case MM: {
520 return m_mmIdHelper->channelID(id, m_mmIdHelper->multilayer(id), m_mmIdHelper->gasGap(id), 1);
521 } default:
522 break;
523 }
524 return id;
525 }

◆ hasCSC()

bool Muon::MuonIdHelperSvc::hasCSC ( ) const
override

Definition at line 557 of file MuonIdHelperSvc.cxx.

557{ return m_hasCSC; }
Gaudi::Property< bool > m_hasCSC

◆ hasHPTDC()

bool Muon::MuonIdHelperSvc::hasHPTDC ( const Identifier & id) const
overridevirtual

returns whether this Identifier belongs to an MDT with HPTDC or not NOTE that in Run4, no HPTDCs at all are planned to be present any more, so this function should be obsolete from Run4 onwards

NOTE that in Run4, no HPTDCs at all are planned to be present any more, so this function should be obsolete from Run4 onwards

Definition at line 254 of file MuonIdHelperSvc.cxx.

254 {
257 // the remaining sMDTs (installed in BI in LS1) all have an HPTDC in Run3
258 // all BME sMDTs have no HPTDC
259 return issMdt(id) && !m_mdtIdHelper->isBME(id);
260 }
virtual bool issMdt(const Identifier &id) const override
returns whether this is a sMDT Identifier or not

◆ hasMDT()

bool Muon::MuonIdHelperSvc::hasMDT ( ) const
override

Definition at line 556 of file MuonIdHelperSvc.cxx.

556{ return m_mdtIdHelper != nullptr; }

◆ hasMM()

bool Muon::MuonIdHelperSvc::hasMM ( ) const
override

Definition at line 559 of file MuonIdHelperSvc.cxx.

559{ return m_hasMM; }
Gaudi::Property< bool > m_hasMM

◆ hasRPC()

bool Muon::MuonIdHelperSvc::hasRPC ( ) const
override

Definition at line 554 of file MuonIdHelperSvc.cxx.

554{ return m_rpcIdHelper != nullptr; }

◆ hasSTGC()

bool Muon::MuonIdHelperSvc::hasSTGC ( ) const
override

Definition at line 558 of file MuonIdHelperSvc.cxx.

558{ return m_hasSTGC; }
Gaudi::Property< bool > m_hasSTGC

◆ hasTGC()

bool Muon::MuonIdHelperSvc::hasTGC ( ) const
override

Definition at line 555 of file MuonIdHelperSvc.cxx.

555{ return m_tgcIdHelper != nullptr; }

◆ initialize()

StatusCode Muon::MuonIdHelperSvc::initialize ( )
overridevirtual

AlgTool initilize.

Find an id helper that is not a nullptr

Cache the sMDT stations

Definition at line 15 of file MuonIdHelperSvc.cxx.

15 {
16 ATH_CHECK(m_detStore.retrieve());
17 if (m_hasMDT){
19 }
20 if (m_hasRPC){
22 }
23 if (m_hasTGC){
25 }
26 if (m_hasCSC){
28 }
29 if (m_hasSTGC) {
31 }
32 if (m_hasMM) {
34 }
36 using AllHelperArray = std::array<const MuonIdHelper*, 6>;
37 const AllHelperArray allHelpers{m_mdtIdHelper, m_rpcIdHelper, m_tgcIdHelper,
39 AllHelperArray::const_iterator itr = std::ranges::find_if(allHelpers,
40 [](const MuonIdHelper* h){return h != nullptr;});
41 if (itr == allHelpers.end()){
42 ATH_MSG_WARNING("No MuonIdHelper has been created before. Please do not setup the service if no muon layout is loaded");
43 return StatusCode::SUCCESS;
44 }
45 m_primaryHelper = (*itr);
46
47 std::stringstream techStr{};
48
49 for (int tech = 0; tech <= m_primaryHelper->technologyNameIndexMax(); ++tech) {
50 std::string name = m_primaryHelper->technologyString(tech);
51
52 if (name == "MDT") m_technologies.push_back(TechIdx::MDT);
53 if (name == "CSC") m_technologies.push_back(TechIdx::CSC);
54 if (name == "RPC") m_technologies.push_back(TechIdx::RPC);
55 if (name == "TGC") m_technologies.push_back(TechIdx::TGC);
56 if (name == "STGC") m_technologies.push_back(TechIdx::STGC);
57 if (name == "MM") m_technologies.push_back(TechIdx::MM);
58 techStr<< ", " << tech << " " << name;
59 }
60 ATH_MSG_DEBUG(" Technologies: size " << m_primaryHelper->technologyNameIndexMax()<<" "<<techStr.str());
61
62 unsigned int nstationsNames = m_primaryHelper->stationNameIndexMax() + 1;
63 m_stationNameData.resize(nstationsNames);
64 for (int i = 0; i <= m_primaryHelper->stationNameIndexMax(); ++i) {
65 std::string name = m_primaryHelper->stationNameString(i);
66 if (name.compare(MuonIdHelper::BAD_NAME) == 0) continue;
67
69
70 data.stationName = std::move(name);
71 data.isEndcap = m_primaryHelper->isEndcap(i);
72 data.isSmall = m_primaryHelper->isSmall(i);
73
74 if (data.isEndcap) {
75 if (data.stationName[1] == '1')
76 data.chIndex = ChIdx::EML;
77 else if (data.stationName[1] == '2')
78 data.chIndex = ChIdx::EML;
79 else if (data.stationName[1] == '3')
80 data.chIndex = ChIdx::EML;
81 else if (data.stationName[1] == '4')
82 data.chIndex = ChIdx::EIL;
83
84 if (data.stationName[1] == 'O') {
85 if (data.stationName[2] == 'L')
86 data.chIndex = ChIdx::EOL;
87 else
88 data.chIndex = ChIdx::EOS;
89 } else if (data.stationName[1] == 'M') {
90 if (data.stationName[2] == 'L')
91 data.chIndex = ChIdx::EML;
92 else
93 data.chIndex = ChIdx::EMS;
94 } else if (data.stationName[1] == 'I') {
95 if (data.stationName[2] == 'L')
96 data.chIndex = ChIdx::EIL;
97 else
98 data.chIndex = ChIdx::EIS;
99 } else if (data.stationName[1] == 'E') {
100 if (data.stationName[0] == 'B') {
101 data.chIndex = ChIdx::BEE;
102 } else {
103 if (data.stationName[2] == 'L')
104 data.chIndex = ChIdx::EEL;
105 else
106 data.chIndex = ChIdx::EES;
107 }
108 } else if (data.stationName[0] == 'C') {
109 if (data.stationName[2] == 'L')
110 data.chIndex = ChIdx::CSL;
111 else
112 data.chIndex = ChIdx::CSS;
113 }
114 if (data.stationName[0] == 'S' || data.stationName[0] == 'M') {
115 if (data.isSmall)
116 data.chIndex = ChIdx::EIS;
117 else
118 data.chIndex = ChIdx::EIL;
119 }
120
121 } else {
122 if (data.stationName[1] == 'O') {
123 if (data.stationName[2] == 'L')
124 data.chIndex = ChIdx::BOL;
125 else
126 data.chIndex = ChIdx::BOS;
127 } else if (data.stationName[1] == 'M') {
128 if (data.stationName[2] == 'L' || data.stationName[2] == 'E')
129 data.chIndex = ChIdx::BML;
130 else
131 data.chIndex = ChIdx::BMS;
132 } else if (data.stationName[1] == 'I') {
133 if (data.stationName[2] == 'L' || data.stationName[2] == 'M' || data.stationName[2] == 'R')
134 data.chIndex = ChIdx::BIL;
135 else
136 data.chIndex = ChIdx::BIS;
137 }
138 }
139 if (data.chIndex == ChIdx::ChUnknown) {
140 ATH_MSG_ERROR("data.chIndex is negative in MuonIdHelperSvc::initialize ");
141 return StatusCode::FAILURE;
142 }
143 data.stIndex = toStationIndex(data.chIndex);
144
145 if (msgLvl(MSG::DEBUG)) {
146 msg(MSG::DEBUG) << "Adding station " << i << " " << data.stationName << " ";
147 if (data.isEndcap)
148 msg(MSG::DEBUG) << " Endcap, ";
149 else
150 msg(MSG::DEBUG) << " Barrel, ";
151 if (data.isSmall)
152 msg(MSG::DEBUG) << " Small, ";
153 else
154 msg(MSG::DEBUG) << " Large, ";
155
156 msg(MSG::DEBUG) << chName(data.chIndex) << " " << stName(data.stIndex) << endmsg;
157 }
158 }
160 // now, let's check if we are in the inner barrel layer, and if there are RPCs installed
161 // if yes, the MDT chambers must be sMDTs
163 m_BIS_stat = m_mdtIdHelper->stationNameIndex("BIS");
164 for (int eta = MdtIdHelper::stationEtaMin(true); eta <= MdtIdHelper::stationEtaMax(true); ++eta) {
165 for (int phi = 1; phi <= 8; ++phi) {
166 // now, let's check if we are in the inner barrel layer, and if there are RPCs installed
167 // if yes, the MDT chambers must be sMDTs
168 // now try to retrieve RPC identifier with the same station name/eta/phi and check if it is valid
169 bool isValid = false;
170 m_rpcIdHelper->elementID(m_BIS_stat, eta, phi, 1, isValid);
171 // last 4 arguments are: doubletR, check, isValid
172 // there is a BI RPC in the same station, thus, this station was already upgraded and sMDTs are present
173 if (!isValid) continue;
174 m_smdt_stat.emplace(m_mdtIdHelper->elementID(m_BIS_stat, eta, phi));
175 }
176 }
177 }
178
179 std::ranges::for_each(allHelpers, [this](const MuonIdHelper* idHelper){
180 if (!idHelper) return;
181 const TechIdx techIdx = technologyIndex(*idHelper->module_begin());
182 for (auto itr = idHelper->module_begin(); itr != idHelper->module_end(); ++itr) {
183 const auto idx = toStationIndex(chamberIndex(*itr));
184 if (idx == StIndex::StUnknown) continue;
185 m_techPerStation[toInt(idx)].insert(techIdx);
186 }
187 });
188
189 ATH_MSG_DEBUG("Configured the service with the following flags --- hasMDT: "<< hasMDT()<<" hasRPC: "<<hasRPC()
190 <<" hasTGC"<< hasTGC() << " hasCSC: "<< hasCSC() << " hasSTGC: " << hasSTGC() << " hasMM: " << hasMM() );
191 return StatusCode::SUCCESS;
192 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
static int stationEtaMax(bool barrel)
static int stationEtaMin(bool barrel)
Access to min and max of level ranges.
const_id_iterator module_end() const
const_id_iterator module_begin() const
Iterators over full set of ids.
static const std::string BAD_NAME
ServiceHandle< StoreGateSvc > m_detStore
bool hasCSC() const override
Gaudi::Property< bool > m_hasMDT
std::unordered_set< Identifier > m_smdt_stat
bool hasMDT() const override
std::vector< TechIdx > m_technologies
MuonStationIndex::TechnologyIndex TechIdx
virtual MuonStationIndex::ChIndex chamberIndex(const Identifier &id) const override
calculate chamber index from Identifier
bool hasSTGC() const override
std::array< std::set< TechIdx >, static_cast< int >(StIdx::StIndexMax)> m_techPerStation
Array holding which technologies are there per station.
Gaudi::Property< bool > m_hasRPC
bool hasMM() const override
Gaudi::Property< bool > m_hasTGC
bool hasRPC() const override
bool hasTGC() const override
StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
constexpr int toInt(const EnumType enumVal)
const std::string & stName(StIndex index)
convert StIndex into a string
const std::string & chName(ChIndex index)
convert ChIndex into a string
MsgStream & msg
Definition testRead.cxx:32

◆ isCsc()

bool Muon::MuonIdHelperSvc::isCsc ( const Identifier & id) const
overridevirtual

returns whether this is a CSC Identifier or not

Definition at line 224 of file MuonIdHelperSvc.cxx.

224 {
225 return m_cscIdHelper && m_cscIdHelper->is_csc(id);
226 }

◆ isEndcap()

bool Muon::MuonIdHelperSvc::isEndcap ( const Identifier & id) const
overridevirtual

returns whether this is an endcap Identifier or not

Definition at line 266 of file MuonIdHelperSvc.cxx.

266{ return m_primaryHelper->isEndcap(id); }

◆ isMdt()

bool Muon::MuonIdHelperSvc::isMdt ( const Identifier & id) const
overridevirtual

returns whether this is a MDT Identifier or not

Definition at line 218 of file MuonIdHelperSvc.cxx.

218 {
219 return m_mdtIdHelper && m_mdtIdHelper->is_mdt(id);
220 }

◆ isMM()

bool Muon::MuonIdHelperSvc::isMM ( const Identifier & id) const
overridevirtual

returns whether this is a MM Identifier or not

Definition at line 221 of file MuonIdHelperSvc.cxx.

221 {
222 return m_mmIdHelper && m_mmIdHelper->is_mm(id);
223 }

◆ isMuon()

bool Muon::MuonIdHelperSvc::isMuon ( const Identifier & id) const
overridevirtual

returns whether this is a Muon Identifier or not

Definition at line 215 of file MuonIdHelperSvc.cxx.

215 {
216 return m_primaryHelper && m_primaryHelper->is_muon(id);
217 }

◆ isRpc()

bool Muon::MuonIdHelperSvc::isRpc ( const Identifier & id) const
overridevirtual

returns whether this is a RPC Identifier or not

Definition at line 227 of file MuonIdHelperSvc.cxx.

227 {
228 return m_rpcIdHelper && m_rpcIdHelper->is_rpc(id);
229 }

◆ isSmallChamber()

bool Muon::MuonIdHelperSvc::isSmallChamber ( const Identifier & id) const
overridevirtual

returns whether this is a small chamber, always returns true for TGCs

Definition at line 267 of file MuonIdHelperSvc.cxx.

267{ return m_primaryHelper->isSmall(id); }

◆ issMdt()

bool Muon::MuonIdHelperSvc::issMdt ( const Identifier & id) const
overridevirtual

returns whether this is a sMDT Identifier or not

Definition at line 244 of file MuonIdHelperSvc.cxx.

244 {
245 if (!isMdt(id)) {
246 return false;
247 }
248 if (stationName(id) == m_BIS_stat) {
249 return m_smdt_stat.find(m_mdtIdHelper->elementID(id)) != m_smdt_stat.end();
250 }
251 return m_mdtIdHelper->isBME(id) || m_mdtIdHelper->isBMG(id);
252 }
virtual bool isMdt(const Identifier &id) const override
returns whether this is a MDT Identifier or not

◆ issTgc()

bool Muon::MuonIdHelperSvc::issTgc ( const Identifier & id) const
overridevirtual

returns whether this is a sTGC Identifier or not

Definition at line 235 of file MuonIdHelperSvc.cxx.

235 {
236 return m_stgcIdHelper && m_stgcIdHelper->is_stgc(id);
237 }

◆ isTgc()

bool Muon::MuonIdHelperSvc::isTgc ( const Identifier & id) const
overridevirtual

returns whether this is a TGC Identifier or not

Definition at line 231 of file MuonIdHelperSvc.cxx.

231 {
232 return m_tgcIdHelper && m_tgcIdHelper->is_tgc(id);
233 }

◆ isTrigger()

bool Muon::MuonIdHelperSvc::isTrigger ( const Identifier & id) const
overridevirtual

returns whether trigger chamber id or not

Definition at line 262 of file MuonIdHelperSvc.cxx.

262 {
263 return isRpc(id) || isTgc(id);
264 }
virtual bool isTgc(const Identifier &id) const override
returns whether this is a TGC Identifier or not
virtual bool isRpc(const Identifier &id) const override
returns whether this is a RPC Identifier or not

◆ layerId()

Identifier Muon::MuonIdHelperSvc::layerId ( const Identifier & id) const
overridevirtual

create a layer ID, returns tube id for the MDTs

Return Identifier for the Mdts

Definition at line 483 of file MuonIdHelperSvc.cxx.

483 {
484 switch (technologyIndex(id)) {
485 using enum TechnologyIndex;
486 case TGC: {
487 return m_tgcIdHelper->channelID(id, m_tgcIdHelper->gasGap(id), m_tgcIdHelper->measuresPhi(id), 1);
488 } case RPC: {
489 return m_rpcIdHelper->channelID(id, m_rpcIdHelper->doubletZ(id), m_rpcIdHelper->doubletPhi(id),
490 m_rpcIdHelper->gasGap(id), m_rpcIdHelper->measuresPhi(id), 1);
491 } case CSC: {
492 return m_cscIdHelper->channelID(id, m_cscIdHelper->chamberLayer(id), m_cscIdHelper->wireLayer(id),
493 m_cscIdHelper->measuresPhi(id), 1);
494 } case MM: {
495 return m_mmIdHelper->channelID(id, m_mmIdHelper->multilayer(id), m_mmIdHelper->gasGap(id), 1);
496 } case STGC: {
497 return m_stgcIdHelper->channelID(id, m_stgcIdHelper->multilayer(id),
498 m_stgcIdHelper->gasGap(id), m_stgcIdHelper->channelType(id), 1);
499 } default:
500 break;
501 }
503 return id;
504 }

◆ layerIndex()

LayerIndex Muon::MuonIdHelperSvc::layerIndex ( const Identifier & id) const
overridevirtual

calculate layer index from Identifier

Definition at line 335 of file MuonIdHelperSvc.cxx.

335 {
336 return toLayerIndex(stationIndex(id));
337 }
virtual MuonStationIndex::StIndex stationIndex(const Identifier &id) const override
calculate station index from Identifier
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex

◆ mdtIdHelper()

virtual const MdtIdHelper & Muon::MuonIdHelperSvc::mdtIdHelper ( ) const
inlineoverridevirtual

access to MdtIdHelper

Definition at line 109 of file MuonIdHelperSvc.h.

109 {
110 assert(m_mdtIdHelper != nullptr);
111 return *m_mdtIdHelper;
112 }

◆ measuresPhi()

virtual bool Muon::MuonIdHelperSvc::measuresPhi ( const Identifier & id) const
overridevirtual

returns whether channel measures phi or not

◆ mmIdHelper()

virtual const MmIdHelper & Muon::MuonIdHelperSvc::mmIdHelper ( ) const
inlineoverridevirtual

access to CscIdHelper

Definition at line 139 of file MuonIdHelperSvc.h.

139 {
140 assert(m_mmIdHelper != nullptr);
141 return *m_mmIdHelper;
142 }

◆ moduleHash() [1/2]

IdentifierHash Muon::MuonIdHelperSvc::moduleHash ( const Identifier & id) const
overridevirtual

Returns the module hash associated to an Identifier.

Definition at line 578 of file MuonIdHelperSvc.cxx.

578 {
579 switch (technologyIndex(id)){
581 case MDT: {
582 return moduleHash(*m_mdtIdHelper, id);
583 }
584 case RPC: {
585 return moduleHash(*m_rpcIdHelper, id);
586 }
587 case TGC: {
588 return moduleHash(*m_tgcIdHelper, id);
589 }
590 case CSC: {
591 return moduleHash(*m_cscIdHelper, id);
592 }
593 case STGC: {
594 return moduleHash(*m_stgcIdHelper, id);
595 }
596 case MM: {
597 return moduleHash(*m_mmIdHelper, id);
598 }
599 default:
600 break;
601 }
602
603 ATH_MSG_WARNING("moduleHash(): No muon Identifier "<<id);
604 return IdentifierHash{};
605 }
virtual IdentifierHash moduleHash(const Identifier &id) const override
Returns the module hash associated to an Identifier.

◆ moduleHash() [2/2]

IdentifierHash Muon::MuonIdHelperSvc::moduleHash ( const MuonIdHelper & idHelper,
const Identifier & id ) const
inlineprivate

Definition at line 562 of file MuonIdHelperSvc.cxx.

562 {
563 IdentifierHash hash{};
564 if (idHelper.get_module_hash(id, hash) ||
565 static_cast<unsigned int>(hash) >= idHelper.module_hash_max()){
566 ATH_MSG_VERBOSE("Failed to deduce module hash "<<toString(id));
567 }
568 return hash;
569 }
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const
size_type module_hash_max() const
the maximum hash value

◆ phiIndex()

PhiIndex Muon::MuonIdHelperSvc::phiIndex ( const Identifier & id) const
overridevirtual

calculate phi index from Identifier (not supported for MDT hits)

Definition at line 285 of file MuonIdHelperSvc.cxx.

285 {
286#ifndef NDEBUG
287 if (!id.is_valid() || !isMuon(id)) {
288 if (id.is_valid()) ATH_MSG_WARNING("phiIndex: invalid ID " << m_primaryHelper->print_to_string(id));
289 return PhiIdx::PhiUnknown;
290 }
291 if (isMdt(id) || isMM(id)) {
292 ATH_MSG_WARNING("phiIndex: not supported for " << toString(id));
293 return PhiIdx::PhiUnknown;
294 }
295#endif
296 switch (stationIndex(id)) {
297 case StIndex::BI:{
298 return m_rpcIdHelper->doubletR(id) == 1 ? PhiIdx::BI1 : PhiIdx::BI2;
299 } case StIndex::BM: {
300 return m_rpcIdHelper->doubletR(id) == 1 ? PhiIdx::BM1 : PhiIdx::BM2;
301 } case StIndex::BO: {
302 return m_rpcIdHelper->doubletR(id) == 1 ? PhiIdx::BO1 : PhiIdx::BO2;
303 } case StIndex::EI: {
304 switch (technologyIndex(id)) {
305 case TechIdx::CSC:
306 return PhiIdx::CSC;
307 case TechIdx::TGC:
308 return PhiIdx::T4;
309 case TechIdx::STGC:
310 return m_stgcIdHelper->multilayer(id) == 1 ? PhiIdx::STGC1 : PhiIdx::STGC2;
311 default:
312 break;
313 }
314 break;
315 } case StIndex::EM: {
316 const std::string chamberName = stationNameString(id);
317 if (chamberName[1] == '1') {
318 return PhiIdx::T1;
319 } else if (chamberName[1] == '2') {
320 return PhiIdx::T2;
321 } else {
322 return PhiIdx::T3;
323 }
324 } default:
325 break;
326 }
327 return PhiIdx::PhiUnknown;
328 }
virtual bool isMM(const Identifier &id) const override
returns whether this is a MM Identifier or not
virtual std::string stationNameString(const Identifier &id) const override
Return the station name string for all technologies.

◆ regionIndex()

DetectorRegionIndex Muon::MuonIdHelperSvc::regionIndex ( const Identifier & id) const
overridevirtual

calculate detector region index from Identifier

Definition at line 330 of file MuonIdHelperSvc.cxx.

330 {
331 if (isEndcap(id)) return stationEta(id) < 0 ? DetectorRegionIndex::EndcapC : DetectorRegionIndex::EndcapA;
332 return DetectorRegionIndex::Barrel;
333 }
virtual int stationEta(const Identifier &id) const override
Return stationEta for all technologies.
virtual bool isEndcap(const Identifier &id) const override
returns whether this is an endcap Identifier or not

◆ rpcIdHelper()

virtual const RpcIdHelper & Muon::MuonIdHelperSvc::rpcIdHelper ( ) const
inlineoverridevirtual

access to RpcIdHelper

Definition at line 115 of file MuonIdHelperSvc.h.

115 {
116 assert(m_rpcIdHelper != nullptr);
117 return *m_rpcIdHelper;
118 }

◆ sector()

int Muon::MuonIdHelperSvc::sector ( const Identifier & id) const
overridevirtual

return sector number 1-16, odd=large, even=small

Definition at line 526 of file MuonIdHelperSvc.cxx.

526 {
527 // TGC has different segmentation, return 0 for the moment
528 if (isTgc(id)) {
529 auto initTgcSectorMapping = [&]() -> std::vector<int>* {
530 std::vector<int>* mapping = nullptr;
531 StatusCode sc = m_detStore->retrieve(mapping, "TGC_SectorMapping");
532 if (sc.isFailure() || !mapping) {
533 ATH_MSG_WARNING("sector: failed to retrieve TGC sector mapping");
534 return nullptr;
535 }
536 ATH_MSG_DEBUG("sector: retrieve TGC sector mapping " << mapping->size());
537 return mapping;
538 };
539 static const std::vector<int> tgcSectorMapping = *initTgcSectorMapping();
540
541 IdentifierHash hash;
542 m_tgcIdHelper->get_module_hash(id, hash);
543 if (hash >= tgcSectorMapping.size()) {
544 ATH_MSG_WARNING("sector: TGC not yet supported");
545 return 0;
546 }
547 return tgcSectorMapping[hash];
548 }
549 int sect = 2 * stationPhi(id);
550 if (!isSmallChamber(id)) --sect;
551 return sect;
552 }
static Double_t sc
virtual bool isSmallChamber(const Identifier &id) const override
returns whether this is a small chamber, always returns true for TGCs
virtual int stationPhi(const Identifier &id) const override
Return stationPhi for all technologies.
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ stationEta()

virtual int Muon::MuonIdHelperSvc::stationEta ( const Identifier & id) const
overridevirtual

Return stationEta for all technologies.

◆ stationIndex()

StIndex Muon::MuonIdHelperSvc::stationIndex ( const Identifier & id) const
overridevirtual

calculate station index from Identifier

Definition at line 277 of file MuonIdHelperSvc.cxx.

277 {
278 if (!id.is_valid() || !isMuon(id)) {
279 if (id.is_valid()) ATH_MSG_WARNING("stationIndex: invalid ID " << m_primaryHelper->print_to_string(id));
280 return StIdx::StUnknown;
281 }
282 return m_stationNameData[stationName(id)].stIndex;
283 }

◆ stationName()

virtual int Muon::MuonIdHelperSvc::stationName ( const Identifier & id) const
overridevirtual

Return stationName for all technologies.

◆ stationNameString()

virtual std::string Muon::MuonIdHelperSvc::stationNameString ( const Identifier & id) const
overridevirtual

Return the station name string for all technologies.

◆ stationPhi()

virtual int Muon::MuonIdHelperSvc::stationPhi ( const Identifier & id) const
overridevirtual

Return stationPhi for all technologies.

◆ stationRegion()

virtual int Muon::MuonIdHelperSvc::stationRegion ( const Identifier & id) const
overridevirtual

Return stationRegion for all technologies.

◆ stgcIdHelper()

virtual const sTgcIdHelper & Muon::MuonIdHelperSvc::stgcIdHelper ( ) const
inlineoverridevirtual

access to TgcIdHelper

Definition at line 133 of file MuonIdHelperSvc.h.

133 {
134 assert(m_stgcIdHelper != nullptr);
135 return *m_stgcIdHelper;
136 }

◆ technologiesInStation()

const std::set< TechnologyIndex > & Muon::MuonIdHelperSvc::technologiesInStation ( MuonStationIndex::StIndex stIndex) const
overridevirtual

Recieve all technologies in a station.

Definition at line 240 of file MuonIdHelperSvc.cxx.

240 {
241 assert(toInt(stIndex) < static_cast<int>(m_techPerStation.size()));
242 return m_techPerStation[toInt(stIndex)];
243 }

◆ technologyIndex()

TechnologyIndex Muon::MuonIdHelperSvc::technologyIndex ( const Identifier & id) const
overridevirtual

calculate layer index from Identifier

Definition at line 339 of file MuonIdHelperSvc.cxx.

339 {
340 if (isMdt(id)) return TechIdx::MDT;
341 else if (issTgc(id)) return TechIdx::STGC;
342 else if (isMM(id)) return TechIdx::MM;
343 else if (isTgc(id)) return TechIdx::TGC;
344 else if (isRpc(id)) return TechIdx::RPC;
345 else if (isCsc(id)) return TechIdx::CSC;
346 return TechIdx::TechnologyUnknown;
347 }
virtual bool issTgc(const Identifier &id) const override
returns whether this is a sTGC Identifier or not
virtual bool isCsc(const Identifier &id) const override
returns whether this is a CSC Identifier or not

◆ tgcIdHelper()

virtual const TgcIdHelper & Muon::MuonIdHelperSvc::tgcIdHelper ( ) const
inlineoverridevirtual

access to TgcIdHelper

Definition at line 121 of file MuonIdHelperSvc.h.

121 {
122 assert(m_tgcIdHelper != nullptr);
123 return *m_tgcIdHelper;
124 }

◆ toString()

std::string Muon::MuonIdHelperSvc::toString ( const Identifier & id) const
overridevirtual

print all fields to string

Definition at line 348 of file MuonIdHelperSvc.cxx.

348 {
349 if (!id.is_valid()) return " Invalid Identifier";
350 switch (technologyIndex(id)) {
351 using enum TechnologyIndex;
352 case MDT:{
353 return toStringGasGap(id);
354 } case RPC: {
355 return std::format("{:} {:} channel {:2d}", toStringGasGap(id),
356 measuresPhi(id) ? "phi" : "eta", m_rpcIdHelper->channel(id));
357 } case TGC: {
358 return std::format("{:} {:} channel {:2d}", toStringGasGap(id),
359 measuresPhi(id) ? "phi" : "eta", m_tgcIdHelper->channel(id));
360 } case CSC: {
361 return std::format("{:} {:} channel {:2d}", toStringGasGap(id),
362 measuresPhi(id) ? "phi" : "eta", m_cscIdHelper->channel(id));
363 } case STGC: {
364 using sTgcType = sTgcIdHelper::sTgcChannelTypes;
365 const int channelType = m_stgcIdHelper->channelType(id);
366 return std::format("{:} {:} channel {:3d}", toStringGasGap(id),
367 channelType == sTgcType::Strip ? "eta" : channelType == sTgcType::Wire ? "phi" : "pad" ,
368 m_stgcIdHelper->channel(id));
369 } case MM: {
370 return std::format("{:} channel {:4d}",toStringGasGap(id), m_mmIdHelper->channel(id));
371 } default:
372 break;
373 }
374 return {};
375 }
virtual std::string toStringGasGap(const Identifier &id) const override
print all fields up to gas gap to string
virtual bool measuresPhi(const Identifier &id) const override
returns whether channel measures phi or not

◆ toStringChamber()

std::string Muon::MuonIdHelperSvc::toStringChamber ( const Identifier & id) const
overridevirtual

print all fields up to chamber to string

Definition at line 389 of file MuonIdHelperSvc.cxx.

389 {
390 if (!id.is_valid()) {
391 return " Invalid Identifier";
392 }
393 if (isRpc(id)) {
394 return std::format("{:} dbR {:1}", toStringStation(id), m_rpcIdHelper->doubletR(id));
395 }
396 return toStringStation(id);
397 }
virtual std::string toStringStation(const Identifier &id) const override
print all fields up to stationName to string

◆ toStringDetEl()

std::string Muon::MuonIdHelperSvc::toStringDetEl ( const Identifier & id) const
overridevirtual

print all fields up to detector element to string

Definition at line 399 of file MuonIdHelperSvc.cxx.

399 {
400 switch (technologyIndex(id)) {
401 using enum TechnologyIndex;
402 case MDT: {
403 return std::format("{:} ml {:1d}", toStringChamber(id), m_mdtIdHelper->multilayer(id));
404 } case RPC: {
405 return std::format("{:} dbZ {:1d} dbPhi {:1d}", toStringChamber(id), m_rpcIdHelper->doubletZ(id), m_rpcIdHelper->doubletPhi(id));
406 } case TGC: {
407 return toStringChamber(id);
408 } case CSC: {
409 return std::format("{:} chlay {:1d}",toStringChamber(id), m_cscIdHelper->chamberLayer(id));
410 } case STGC: {
411 return std::format("{:} chlay {:1d}",toStringChamber(id), m_stgcIdHelper->multilayer(id));
412 } case MM: {
413 return std::format("{:} chlay {:1d}",toStringChamber(id), m_mmIdHelper->multilayer(id));
414 } default:
415 break;
416 }
417 return "Invalid detector element";
418 }
virtual std::string toStringChamber(const Identifier &id) const override
print all fields up to chamber to string

◆ toStringGasGap()

std::string Muon::MuonIdHelperSvc::toStringGasGap ( const Identifier & id) const
overridevirtual

print all fields up to gas gap to string

Definition at line 420 of file MuonIdHelperSvc.cxx.

420 {
421 switch (technologyIndex(id)) {
422 using enum TechnologyIndex;
423 case MDT: {
424 return std::format("{:} lay {:1d} tube {:1d}", toStringDetEl(id),
425 m_mdtIdHelper->tubeLayer(id), m_mdtIdHelper->tube(id));
426 } case RPC:
427 case TGC: {
428 return std::format("{:} gap {:1d}", toStringDetEl(id), gasGap(id));
429 } case STGC:
430 case MM:
431 case CSC: {
432 return std::format("{:} lay {:1d}", toStringDetEl(id), gasGap(id));
433 } default:
434 break;
435 }
436 return "invalid gas gap Id";
437 }
virtual int gasGap(const Identifier &id) const override
returns gas gap: gasGap for RPC + TGC, wireLayer for CSC, tube for MDT
virtual std::string toStringDetEl(const Identifier &id) const override
print all fields up to detector element to string

◆ toStringStation()

std::string Muon::MuonIdHelperSvc::toStringStation ( const Identifier & id) const
overridevirtual

print all fields up to stationName to string

Definition at line 385 of file MuonIdHelperSvc.cxx.

385 {
386 return std::format("{:} {:} eta {:2d} phi {:2d}", toStringTech(id),stationNameString(id),
387 stationEta(id), stationPhi(id));
388 }
virtual std::string toStringTech(const Identifier &id) const override
print all fields up to technology to string

◆ toStringTech()

std::string Muon::MuonIdHelperSvc::toStringTech ( const Identifier & id) const
overridevirtual

print all fields up to technology to string

Definition at line 377 of file MuonIdHelperSvc.cxx.

377 {
379 }
const std::string & technologyName(TechnologyIndex index)
convert LayerIndex into a string

Member Data Documentation

◆ m_BIS_stat

int Muon::MuonIdHelperSvc::m_BIS_stat {-1}
private

Definition at line 234 of file MuonIdHelperSvc.h.

234{-1};

◆ m_cscIdHelper

const CscIdHelper* Muon::MuonIdHelperSvc::m_cscIdHelper {nullptr}
private

Definition at line 204 of file MuonIdHelperSvc.h.

204{nullptr};

◆ m_detStore

ServiceHandle<StoreGateSvc> Muon::MuonIdHelperSvc::m_detStore {this, "DetectorStore", "DetectorStore"}
private

Definition at line 218 of file MuonIdHelperSvc.h.

218{this, "DetectorStore", "DetectorStore"};

◆ m_hasCSC

Gaudi::Property<bool> Muon::MuonIdHelperSvc::m_hasCSC {this, "HasCSC", true, "Specify whether current detector layout contains CSC chambers"}
private

Definition at line 214 of file MuonIdHelperSvc.h.

214{this, "HasCSC", true, "Specify whether current detector layout contains CSC chambers"};

◆ m_hasMDT

Gaudi::Property<bool> Muon::MuonIdHelperSvc::m_hasMDT {this, "HasMDT", true, "Specify whether the current detector layour contains MDT chambers"}
private

Definition at line 211 of file MuonIdHelperSvc.h.

211{this, "HasMDT", true, "Specify whether the current detector layour contains MDT chambers"};

◆ m_hasMM

Gaudi::Property<bool> Muon::MuonIdHelperSvc::m_hasMM {this, "HasMM", true, "Specify whether current detector layout contains MicroMegas chambers"}
private

Definition at line 216 of file MuonIdHelperSvc.h.

216{this, "HasMM", true, "Specify whether current detector layout contains MicroMegas chambers"};

◆ m_hasRPC

Gaudi::Property<bool> Muon::MuonIdHelperSvc::m_hasRPC {this, "HasRPC", true, "Specify whether the current detector layour contains RPC chambers"}
private

Definition at line 212 of file MuonIdHelperSvc.h.

212{this, "HasRPC", true, "Specify whether the current detector layour contains RPC chambers"};

◆ m_hasSTGC

Gaudi::Property<bool> Muon::MuonIdHelperSvc::m_hasSTGC {this, "HasSTGC", true, "Specify whether current detector layout contains STGC chambers"}
private

Definition at line 215 of file MuonIdHelperSvc.h.

215{this, "HasSTGC", true, "Specify whether current detector layout contains STGC chambers"};

◆ m_hasTGC

Gaudi::Property<bool> Muon::MuonIdHelperSvc::m_hasTGC {this, "HasTGC", true, "Specify whether the current detector layour contains TGC chambers"}
private

Definition at line 213 of file MuonIdHelperSvc.h.

213{this, "HasTGC", true, "Specify whether the current detector layour contains TGC chambers"};

◆ m_mdtIdHelper

const MdtIdHelper* Muon::MuonIdHelperSvc::m_mdtIdHelper {nullptr}
private

Definition at line 205 of file MuonIdHelperSvc.h.

205{nullptr};

◆ m_mmIdHelper

const MmIdHelper* Muon::MuonIdHelperSvc::m_mmIdHelper {nullptr}
private

Definition at line 206 of file MuonIdHelperSvc.h.

206{nullptr};

◆ m_primaryHelper

const MuonIdHelper* Muon::MuonIdHelperSvc::m_primaryHelper {nullptr}
private

Definition at line 209 of file MuonIdHelperSvc.h.

209{nullptr};

◆ m_rpcIdHelper

const RpcIdHelper* Muon::MuonIdHelperSvc::m_rpcIdHelper {nullptr}
private

Sub detector specific IdHelpers.

Definition at line 202 of file MuonIdHelperSvc.h.

202{nullptr};

◆ m_smdt_stat

std::unordered_set<Identifier> Muon::MuonIdHelperSvc::m_smdt_stat {}
private

Definition at line 235 of file MuonIdHelperSvc.h.

235{};

◆ m_stationNameData

std::vector<StationNameData> Muon::MuonIdHelperSvc::m_stationNameData {}
private

Definition at line 231 of file MuonIdHelperSvc.h.

231{};

◆ m_stgcIdHelper

const sTgcIdHelper* Muon::MuonIdHelperSvc::m_stgcIdHelper {nullptr}
private

Definition at line 207 of file MuonIdHelperSvc.h.

207{nullptr};

◆ m_technologies

std::vector<TechIdx> Muon::MuonIdHelperSvc::m_technologies {}
private

Definition at line 232 of file MuonIdHelperSvc.h.

232{};

◆ m_techPerStation

std::array<std::set<TechIdx>, static_cast<int>(StIdx::StIndexMax)> Muon::MuonIdHelperSvc::m_techPerStation {}
private

Array holding which technologies are there per station.

Definition at line 237 of file MuonIdHelperSvc.h.

237{};

◆ m_tgcIdHelper

const TgcIdHelper* Muon::MuonIdHelperSvc::m_tgcIdHelper {nullptr}
private

Definition at line 203 of file MuonIdHelperSvc.h.

203{nullptr};

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