Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MuonIdHelperSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <iostream>
8 #include <format>
9 #include <ranges>
10 
11 
12 namespace Muon {
13 
14  MuonIdHelperSvc::MuonIdHelperSvc(const std::string& name, ISvcLocator* svc) :
15  base_class(name, svc) {}
16 
18  ATH_CHECK(m_detStore.retrieve());
19  if (m_hasMDT) ATH_CHECK(m_detStore->retrieve(m_mdtIdHelper));
20  if (m_hasRPC) ATH_CHECK(m_detStore->retrieve(m_rpcIdHelper));
21  if (m_hasTGC) ATH_CHECK(m_detStore->retrieve(m_tgcIdHelper));
22  if (m_hasCSC) ATH_CHECK(m_detStore->retrieve(m_cscIdHelper));
24  if (m_hasMM) ATH_CHECK(m_detStore->retrieve(m_mmIdHelper));
25 
27  using AllHelperArray = std::array<const MuonIdHelper*, 6>;
28  const AllHelperArray allHelpers{m_mdtIdHelper, m_rpcIdHelper, m_tgcIdHelper,
30  AllHelperArray::const_iterator itr = std::ranges::find_if(allHelpers,
31  [](const MuonIdHelper* h){return h != nullptr;});
32  if (itr == allHelpers.end()){
33  ATH_MSG_WARNING("No MuonIdHelper has been created before. Please do not setup the service if no muon layout is loaded");
34  return StatusCode::SUCCESS;
35  }
36  m_primaryHelper = (*itr);
37 
38  std::stringstream techStr{};
39 
40  for (int tech = 0; tech <= m_primaryHelper->technologyNameIndexMax(); ++tech) {
41  std::string name = m_primaryHelper->technologyString(tech);
42 
43  if (name == "MDT") m_technologies.push_back(TechIdx::MDT);
44  if (name == "CSC") m_technologies.push_back(TechIdx::CSCI);
45  if (name == "RPC") m_technologies.push_back(TechIdx::RPC);
46  if (name == "TGC") m_technologies.push_back(TechIdx::TGC);
47  if (name == "STGC") m_technologies.push_back(TechIdx::STGC);
48  if (name == "MM") m_technologies.push_back(TechIdx::MM);
49  techStr<< ", " << tech << " " << name;
50  }
51  ATH_MSG_DEBUG(" Technologies: size " << m_primaryHelper->technologyNameIndexMax()<<" "<<techStr.str());
52 
53  unsigned int nstationsNames = m_primaryHelper->stationNameIndexMax() + 1;
54  m_stationNameData.resize(nstationsNames);
55  for (int i = 0; i <= m_primaryHelper->stationNameIndexMax(); ++i) {
56  std::string name = m_primaryHelper->stationNameString(i);
57  if (name.compare(MuonIdHelper::BAD_NAME) == 0) continue;
58 
60 
61  data.stationName = name;
62  data.isEndcap = m_primaryHelper->isEndcap(i);
63  data.isSmall = m_primaryHelper->isSmall(i);
64 
65  if (data.isEndcap) {
66  if (data.stationName[1] == '1')
67  data.chIndex = ChIdx::EML;
68  else if (data.stationName[1] == '2')
69  data.chIndex = ChIdx::EML;
70  else if (data.stationName[1] == '3')
71  data.chIndex = ChIdx::EML;
72  else if (data.stationName[1] == '4')
73  data.chIndex = ChIdx::EIL;
74 
75  if (data.stationName[1] == 'O') {
76  if (data.stationName[2] == 'L')
77  data.chIndex = ChIdx::EOL;
78  else
79  data.chIndex = ChIdx::EOS;
80  } else if (data.stationName[1] == 'M') {
81  if (data.stationName[2] == 'L')
82  data.chIndex = ChIdx::EML;
83  else
84  data.chIndex = ChIdx::EMS;
85  } else if (data.stationName[1] == 'I') {
86  if (data.stationName[2] == 'L')
87  data.chIndex = ChIdx::EIL;
88  else
89  data.chIndex = ChIdx::EIS;
90  } else if (data.stationName[1] == 'E') {
91  if (data.stationName[0] == 'B') {
92  data.chIndex = ChIdx::BEE;
93  } else {
94  if (data.stationName[2] == 'L')
95  data.chIndex = ChIdx::EEL;
96  else
97  data.chIndex = ChIdx::EES;
98  }
99  } else if (data.stationName[0] == 'C') {
100  if (data.stationName[2] == 'L')
101  data.chIndex = ChIdx::CSL;
102  else
103  data.chIndex = ChIdx::CSS;
104  }
105  if (data.stationName[0] == 'S' || data.stationName[0] == 'M') {
106  if (data.isSmall)
107  data.chIndex = ChIdx::EIS;
108  else
109  data.chIndex = ChIdx::EIL;
110  }
111 
112  } else {
113  if (data.stationName[1] == 'O') {
114  if (data.stationName[2] == 'L')
115  data.chIndex = ChIdx::BOL;
116  else
117  data.chIndex = ChIdx::BOS;
118  } else if (data.stationName[1] == 'M') {
119  if (data.stationName[2] == 'L' || data.stationName[2] == 'E')
120  data.chIndex = ChIdx::BML;
121  else
122  data.chIndex = ChIdx::BMS;
123  } else if (data.stationName[1] == 'I') {
124  if (data.stationName[2] == 'L' || data.stationName[2] == 'M' || data.stationName[2] == 'R')
125  data.chIndex = ChIdx::BIL;
126  else
127  data.chIndex = ChIdx::BIS;
128  }
129  }
130  if (data.chIndex == ChIdx::ChUnknown) {
131  ATH_MSG_ERROR("data.chIndex is negative in MuonIdHelperSvc::initialize ");
132  return StatusCode::FAILURE;
133  }
134  data.stIndex = MuonStationIndex::toStationIndex(data.chIndex);
135 
136  if (msgLvl(MSG::DEBUG)) {
137  msg(MSG::DEBUG) << "Adding station " << i << " " << data.stationName << " ";
138  if (data.isEndcap)
139  msg(MSG::DEBUG) << " Endcap, ";
140  else
141  msg(MSG::DEBUG) << " Barrel, ";
142  if (data.isSmall)
143  msg(MSG::DEBUG) << " Small, ";
144  else
145  msg(MSG::DEBUG) << " Large, ";
146 
148  }
149  }
151  // now, let's check if we are in the inner barrel layer, and if there are RPCs installed
152  // if yes, the MDT chambers must be sMDTs
153  if (m_mdtIdHelper && m_rpcIdHelper) {
155  for (int eta = MdtIdHelper::stationEtaMin(true); eta <= MdtIdHelper::stationEtaMax(true); ++eta) {
156  for (int phi = 1; phi <= 8; ++phi) {
157  // now, let's check if we are in the inner barrel layer, and if there are RPCs installed
158  // if yes, the MDT chambers must be sMDTs
159  // now try to retrieve RPC identifier with the same station name/eta/phi and check if it is valid
160  bool isValid = false;
161  m_rpcIdHelper->elementID(m_BIS_stat, eta, phi, 1, isValid);
162  // last 4 arguments are: doubletR, check, isValid
163  // there is a BI RPC in the same station, thus, this station was already upgraded and sMDTs are present
164  if (!isValid) continue;
165  m_smdt_stat.emplace(m_mdtIdHelper->elementID(m_BIS_stat, eta, phi));
166  }
167  }
168  }
169 
170  std::ranges::for_each(allHelpers, [this](const MuonIdHelper* idHelper){
171  if (!idHelper) return;
172  const TechIdx techIdx = technologyIndex(*idHelper->module_begin());
173  for (auto itr = idHelper->module_begin(); itr != idHelper->module_end(); ++itr) {
175  if (idx == Muon::MuonStationIndex::StUnknown) continue;
176  const int stIdx = static_cast<int>(idx);
177  m_techPerStation[stIdx].insert(techIdx);
178  }
179  });
180 
181  ATH_MSG_DEBUG("Configured the service with the following flags --- hasMDT: "<< hasMDT()<<" hasRPC: "<<hasRPC()
182  <<" hasTGC"<< hasTGC() << " hasCSC: "<< hasCSC() << " hasSTGC: " << hasSTGC() << " hasMM: " << hasMM() );
183  return StatusCode::SUCCESS;
184  }
185 
186  int MuonIdHelperSvc::gasGap(const Identifier& id) const {
187  if (isRpc(id)) {
188  return m_rpcIdHelper->gasGap(id);
189  } else if (isTgc(id)) {
190  return m_tgcIdHelper->gasGap(id);
191 
192  } else if (isCsc(id)) {
193  return m_cscIdHelper->wireLayer(id);
194 
195  } else if (issTgc(id)) {
196  return m_stgcIdHelper->gasGap(id);
197 
198  } else if (isMM(id)) {
199  return m_mmIdHelper->gasGap(id);
200  } else {
201  return m_mdtIdHelper->channel(id);
202  }
203  return 1;
204  }
205 
206  bool MuonIdHelperSvc::isMuon(const Identifier& id) const {
207  return m_primaryHelper && m_primaryHelper->is_muon(id);
208  }
209  bool MuonIdHelperSvc::isMdt(const Identifier& id) const {
210  return m_mdtIdHelper && m_mdtIdHelper->is_mdt(id);
211  }
212  bool MuonIdHelperSvc::isMM(const Identifier& id) const {
213  return m_mmIdHelper && m_mmIdHelper->is_mm(id);
214  }
215  bool MuonIdHelperSvc::isCsc(const Identifier& id) const {
216  return m_cscIdHelper && m_cscIdHelper->is_csc(id);
217  }
218  bool MuonIdHelperSvc::isRpc(const Identifier& id) const {
219  return m_rpcIdHelper && m_rpcIdHelper->is_rpc(id);
220  }
221 
222  bool MuonIdHelperSvc::isTgc(const Identifier& id) const {
223  return m_tgcIdHelper && m_tgcIdHelper->is_tgc(id);
224  }
225 
226  bool MuonIdHelperSvc::issTgc(const Identifier& id) const {
227  return m_stgcIdHelper && m_stgcIdHelper->is_stgc(id);
228  }
229 
230  const std::set<MuonStationIndex::TechnologyIndex>&
232  assert(static_cast<unsigned>(stIndex) < m_techPerStation.size());
233  return m_techPerStation[static_cast<unsigned>(stIndex)];
234  }
235  bool MuonIdHelperSvc::issMdt(const Identifier& id) const {
236  if (!isMdt(id))
237  return false;
238  if (stationName(id) == m_BIS_stat) {
239  return m_smdt_stat.find(m_mdtIdHelper->elementID(id)) != m_smdt_stat.end();
240  }
241  return m_mdtIdHelper->isBME(id) || m_mdtIdHelper->isBMG(id);
242  }
243 
244  bool MuonIdHelperSvc::hasHPTDC(const Identifier& id) const {
247  // the remaining sMDTs (installed in BI in LS1) all have an HPTDC in Run3
248  // all BME sMDTs have no HPTDC
249  return issMdt(id) && !m_mdtIdHelper->isBME(id);
250  }
251 
252  bool MuonIdHelperSvc::measuresPhi(const Identifier& id) const {
253  if (isRpc(id)) {
254  return m_rpcIdHelper->measuresPhi(id);
255  } else if (isTgc(id)) {
256  return m_tgcIdHelper->measuresPhi(id);
257  } else if (isCsc(id)) {
258  return m_cscIdHelper->measuresPhi(id);
259  } else if (issTgc(id)) {
260  return m_stgcIdHelper->measuresPhi(id);
261  }
262  // MM and MDTs only measure eta
263  return false;
264  }
265 
266  bool MuonIdHelperSvc::isTrigger(const Identifier& id) const {
267  return isRpc(id) || isTgc(id);
268  }
269 
270  bool MuonIdHelperSvc::isEndcap(const Identifier& id) const { return m_primaryHelper->isEndcap(id); }
271 
272  bool MuonIdHelperSvc::isSmallChamber(const Identifier& id) const { return m_primaryHelper->isSmall(id); }
273 
275  if (!id.is_valid() || !isMuon(id)) {
276  if (id.is_valid()) ATH_MSG_WARNING("chamberIndex: invalid ID " << m_primaryHelper->print_to_string(id));
277  return ChIdx::ChUnknown;
278  }
279  return m_stationNameData[stationName(id)].chIndex;
280  }
281 
283  if (!id.is_valid() || !isMuon(id)) {
284  if (id.is_valid()) ATH_MSG_WARNING("stationIndex: invalid ID " << m_primaryHelper->print_to_string(id));
285  return StIdx::StUnknown;
286  }
287  return m_stationNameData[stationName(id)].stIndex;
288  }
289 
291  if (!id.is_valid() || !isMuon(id)) {
292  if (id.is_valid()) ATH_MSG_WARNING("phiIndex: invalid ID " << m_primaryHelper->print_to_string(id));
293  return PhiIdx::PhiUnknown;
294  }
295  if (isMdt(id) || isMM(id)) {
296  ATH_MSG_WARNING("phiIndex: not supported for " << toString(id));
297  return PhiIdx::PhiUnknown;
298  }
300  const StIdx stIndex = stationIndex(id);
301  if (stIndex == StIdx::BI) {
303  } else if (stIndex == StIdx::BM) {
305  } else if (stIndex == StIdx::BO) {
307  } else if (stIndex == StIdx::EI) {
308  if (isCsc(id)) {
309  index = PhiIdx::CSC;
310  } else if (isTgc(id)) {
311  index = PhiIdx::T4;
312  } else if (m_stgcIdHelper->multilayer(id) == 1) {
314  } else {
316  }
317  } else if (stIndex == StIdx::EM) {
318  std::string chamberName = chamberNameString(id);
319  if (chamberName[1] == '1')
320  index = PhiIdx::T1;
321  else if (chamberName[1] == '2')
322  index = PhiIdx::T2;
323  else
324  index = PhiIdx::T3;
325  }
326  return index;
327  }
328 
330  using DetRegIdx = MuonStationIndex::DetectorRegionIndex;
331  if (isEndcap(id)) return stationEta(id) < 0 ? DetRegIdx::EndcapC : DetRegIdx::EndcapA;
332  return DetRegIdx::Barrel;
333  }
334 
337  }
338 
340  if (isMdt(id)) return TechIdx::MDT;
341  if (isCsc(id)) return TechIdx::CSCI;
342  if (isTgc(id)) return TechIdx::TGC;
343  if (isRpc(id)) return TechIdx::RPC;
344  if (issTgc(id)) return TechIdx::STGC;
345  if (isMM(id)) return TechIdx::MM;
347  }
348  std::string MuonIdHelperSvc::toString(const Identifier& id) const {
349  if (!id.is_valid()) return " Invalid Identifier";
350  if (isMdt(id)) {
351  return toStringGasGap(id);
352  }
353  const std::string_view phiStr{measuresPhi(id) ? "phi" : "eta"};
354  if (isRpc(id)) {
355  return std::format("{:} {:} channel {:2d}",toStringGasGap(id), measuresPhi(id) ? "phi" : "eta", m_rpcIdHelper->channel(id));
356  } else if (isTgc(id)) {
357  return std::format("{:} {:} channel {:2d}",toStringGasGap(id), measuresPhi(id) ? "phi" : "eta", m_tgcIdHelper->channel(id));
358  } else if (isCsc(id)) {
359  return std::format("{:} {:} channel {:2d}",toStringGasGap(id), measuresPhi(id) ? "phi" : "eta", m_cscIdHelper->channel(id));
360  } else if (isMM(id)) {
361  return std::format("{:} channel {:4d}",toStringGasGap(id), m_mmIdHelper->channel(id));
362  }
363  using sTgcType = sTgcIdHelper::sTgcChannelTypes;
364  const int channelType = m_stgcIdHelper->channelType(id);
365  return std::format("{:} {:} channel {:3d}",toStringGasGap(id),
366  channelType == sTgcType::Strip ? "eta" : channelType == sTgcType::Wire ? "phi" : "pad" ,
367  m_stgcIdHelper->channel(id));
368  }
369 
370  std::string MuonIdHelperSvc::toStringTech(const Identifier& id) const {
372  }
373 
374  std::string MuonIdHelperSvc::chamberNameString(const Identifier& id) const {
376  }
377 
378  std::string MuonIdHelperSvc::toStringStation(const Identifier& id) const {
379  return std::format("{:} {:} eta {:2d} phi {:2d}", toStringTech(id),stationNameString(id),
380  stationEta(id), stationPhi(id));
381  }
382  std::string MuonIdHelperSvc::toStringChamber(const Identifier& id) const {
383  if (!id.is_valid()) {
384  return " Invalid Identifier";
385  }
386  if (isRpc(id)) {
387  return std::format("{:} dbR {:1}", toStringStation(id), m_rpcIdHelper->doubletR(id));
388  }
389  return toStringStation(id);
390  }
391 
392  std::string MuonIdHelperSvc::toStringDetEl(const Identifier& id) const {
393 
394  if (!id.is_valid()) return " Invalid Identifier";
395  if (isMdt(id)) {
396  return std::format("{:} ml {:1d}", toStringChamber(id), m_mdtIdHelper->multilayer(id));
397  } else if (isRpc(id)) {
398  return std::format("{:} dbZ {:1d} dbPhi {:1d}", toStringChamber(id), m_rpcIdHelper->doubletZ(id), m_rpcIdHelper->doubletPhi(id));
399  } else if (isTgc(id)) {
400  return toStringChamber(id);
401  }
402  int ml{0};
403  if (isCsc(id)) {
404  ml = m_cscIdHelper->chamberLayer(id);
405  } else if (isMM(id)) {
406  ml = m_mmIdHelper->multilayer(id);
407  } else {
408  ml = m_stgcIdHelper->multilayer(id);
409  }
410  return std::format("{:} chlay {:1d}",toStringChamber(id), ml);
411  }
412 
413  std::string MuonIdHelperSvc::toStringGasGap(const Identifier& id) const {
414  if (!id.is_valid()) return " Invalid Identifier";
415  if (isMdt(id)) {
416  return std::format("{:} lay {:1d} tube {:1d}", toStringDetEl(id),m_mdtIdHelper->tubeLayer(id), m_mdtIdHelper->tube(id));
417  } else if (isRpc(id) || isTgc(id)) {
418  return std::format("{:} gap {:1d}", toStringDetEl(id), gasGap(id));
419  }
420  return std::format("{:} lay {:1d}", toStringDetEl(id), gasGap(id));
421  }
422 
424  Identifier chId;
425  // use phi hits on segment
426  if (isTgc(id)) {
427  chId = m_tgcIdHelper->elementID(id);
428  } else if (isRpc(id)) {
429  chId = m_rpcIdHelper->elementID(id);
430  } else if (isMM(id)) {
431  chId = m_mmIdHelper->elementID(id);
432  } else if (issTgc(id)) {
433  chId = m_stgcIdHelper->elementID(id);
434  } else if (isCsc(id)) {
435  chId = m_cscIdHelper->channelID(id, 2, 1, 1, 1);
436  } else if (isMdt(id)) {
437  chId = m_mdtIdHelper->elementID(id);
438  }
439  return chId;
440  }
441 
443  // use phi hits on segment
444  if (isTgc(id)) {
445  return m_tgcIdHelper->elementID(id);
446  } else if (isRpc(id)) {
447  return m_rpcIdHelper->channelID(id, m_rpcIdHelper->doubletZ(id), m_rpcIdHelper->doubletPhi(id), 1, false, 1);
448  } else if (isCsc(id)) {
449  return m_cscIdHelper->channelID(id, 2, 1, 1, 1);
450  } else if (issTgc(id)) {
451  return m_stgcIdHelper->channelID(id, m_stgcIdHelper->multilayer(id), 1, sTgcIdHelper::sTgcChannelTypes::Strip, 1);
452  } else if (isMM(id)) {
453  return m_mmIdHelper->channelID(id, m_mmIdHelper->multilayer(id), 1, 1);
454  }
455  return m_mdtIdHelper->channelID(id, m_mdtIdHelper->multilayer(id), 1, 1);
456  }
457 
459  // use phi hits on segment
460  if (isTgc(id)) {
462  } else if (isRpc(id)) {
465  } else if (isCsc(id)) {
467  m_cscIdHelper->measuresPhi(id), 1);
468  } else if (isMM(id)) {
470  } else if (issTgc(id)) {
473  }
475  return id;
476  }
477 
479  // use phi hits on segment
480  if (isTgc(id)) {
481  return m_tgcIdHelper->channelID(id, m_tgcIdHelper->gasGap(id), false, 1);
482 
483  } else if (isRpc(id)) {
485  m_rpcIdHelper->gasGap(id), false, 1);
486 
487  } else if (isCsc(id)) {
489  } else if (isMM(id)) {
491 
492  } else if (issTgc(id)) {
494  sTgcIdHelper::sTgcChannelTypes::Strip, 1);
495 
496  }
498  }
499 
501  if (!id.is_valid()) {
502  ATH_MSG_WARNING("stationPhi: invalid ID");
503  return 0;
504  }
505  if (isRpc(id)) {
506  return m_rpcIdHelper->stationPhi(id);
507  } else if (isTgc(id)) {
508  return m_tgcIdHelper->stationPhi(id);
509  } else if (isMdt(id)) {
510  return m_mdtIdHelper->stationPhi(id);
511  } else if (isCsc(id)) {
512  return m_cscIdHelper->stationPhi(id);
513  } else if (issTgc(id)) {
514  return m_stgcIdHelper->stationPhi(id);
515  } else if (isMM(id)) {
516  return m_mmIdHelper->stationPhi(id);
517  }
518  return 0;
519  }
520 
522  if (!id.is_valid()) {
523  ATH_MSG_WARNING("stationEta: invalid ID");
524  return 0;
525  }
526  if (isRpc(id)) {
527  return m_rpcIdHelper->stationEta(id);
528  } else if (isTgc(id)) {
529  return m_tgcIdHelper->stationEta(id);
530  } else if (isMdt(id)) {
531  return m_mdtIdHelper->stationEta(id);
532  } else if (isCsc(id)) {
533  return m_cscIdHelper->stationEta(id);
534  } else if (issTgc(id)) {
535  return m_stgcIdHelper->stationEta(id);
536  } else if (isMM(id)) {
537  return m_mmIdHelper->stationEta(id);
538  }
539  return 0;
540  }
541 
543  if (!id.is_valid()) {
544  ATH_MSG_WARNING("stationName: invalid ID");
545  return 0;
546  }
547  if (isRpc(id)) {
548  return m_rpcIdHelper->stationName(id);
549  } else if (isTgc(id)) {
550  return m_tgcIdHelper->stationName(id);
551  } else if (isMdt(id)) {
552  return m_mdtIdHelper->stationName(id);
553  } else if (isCsc(id)) {
554  return m_cscIdHelper->stationName(id);
555  } else if (issTgc(id)) {
556  return m_stgcIdHelper->stationName(id);
557  } else if (isMM(id)) {
558  return m_mmIdHelper->stationName(id);
559  }
560  return 0;
561  }
562 
564  if (!id.is_valid()) {
565  ATH_MSG_WARNING("stationRegion: invalid ID");
566  return 0;
567  }
568  if (isRpc(id)) {
569  return m_rpcIdHelper->stationRegion(id);
570  } else if (isTgc(id)) {
571  return m_tgcIdHelper->stationRegion(id);
572  } else if (isMdt(id)) {
573  return m_mdtIdHelper->stationRegion(id);
574  } else if (isCsc(id)) {
575  return m_cscIdHelper->stationRegion(id);
576  } else if (issTgc(id)) {
577  return m_stgcIdHelper->stationRegion(id);
578  } else if (isMM(id)) {
579  return m_mmIdHelper->stationRegion(id);
580  }
581  return 0;
582  }
583 
584  int MuonIdHelperSvc::sector(const Identifier& id) const {
585  // TGC has different segmentation, return 0 for the moment
586  if (isTgc(id)) {
587  auto initTgcSectorMapping = [&]() -> std::vector<int>* {
588  std::vector<int>* mapping = nullptr;
589  StatusCode sc = m_detStore->retrieve(mapping, "TGC_SectorMapping");
590  if (sc.isFailure() || !mapping) {
591  ATH_MSG_WARNING("sector: failed to retrieve TGC sector mapping");
592  return nullptr;
593  }
594  ATH_MSG_DEBUG("sector: retrieve TGC sector mapping " << mapping->size());
595  return mapping;
596  };
597  static const std::vector<int> tgcSectorMapping = *initTgcSectorMapping();
598 
601  if (hash >= tgcSectorMapping.size()) {
602  ATH_MSG_WARNING("sector: TGC not yet supported");
603  return 0;
604  }
605  return tgcSectorMapping[hash];
606  }
607  int sect = 2 * stationPhi(id);
608  if (!isSmallChamber(id)) --sect;
609  return sect;
610  }
611 
612  bool MuonIdHelperSvc::hasRPC() const { return m_rpcIdHelper != nullptr; }
613  bool MuonIdHelperSvc::hasTGC() const { return m_tgcIdHelper != nullptr; }
614  bool MuonIdHelperSvc::hasMDT() const { return m_mdtIdHelper != nullptr; }
615  bool MuonIdHelperSvc::hasCSC() const { return m_hasCSC; }
616  bool MuonIdHelperSvc::hasSTGC() const { return m_hasSTGC; }
617  bool MuonIdHelperSvc::hasMM() const { return m_hasMM; }
618 
619  std::string MuonIdHelperSvc::stationNameString(const Identifier& id) const {
620  const int station = stationName(id);
621  if (isMdt(id)) return m_mdtIdHelper->stationNameString(station);
622  else if (isRpc(id)) return m_rpcIdHelper->stationNameString(station);
623  else if (isTgc(id)) return m_tgcIdHelper->stationNameString(station);
624  else if (isMM(id)) return m_mmIdHelper->stationNameString(station);
625  else if (issTgc(id)) return m_stgcIdHelper->stationNameString(station);
626  else if (isCsc(id)) return m_cscIdHelper->stationNameString(station);
627  return "UNKNOWN";
628  }
629  inline IdentifierHash MuonIdHelperSvc::moduleHash(const MuonIdHelper& idHelper, const Identifier& id) const{
631  if (idHelper.get_module_hash(id, hash) ||
632  static_cast<unsigned int>(hash) >= idHelper.module_hash_max()){
633  ATH_MSG_VERBOSE("Failed to deduce module hash "<<toString(id));
634  }
635  return hash;
636  }
637  inline IdentifierHash MuonIdHelperSvc::detElementHash(const MuonIdHelper& idHelper, const Identifier& id) const{
639  if (idHelper.get_detectorElement_hash(id, hash) ||
640  static_cast<unsigned int>(hash)>= idHelper.detectorElement_hash_max()) {
641  ATH_MSG_VERBOSE("Failed to deduce detector element hash "<<toString(id));
642  }
643  return hash;
644  }
646  if (isMdt(id)) return moduleHash(*m_mdtIdHelper, id);
647  else if (isRpc(id)) return moduleHash(*m_rpcIdHelper, id);
648  else if (isTgc(id)) return moduleHash(*m_tgcIdHelper, id);
649  else if (isMM(id)) return moduleHash(*m_mmIdHelper, id);
650  else if (issTgc(id)) return moduleHash(*m_stgcIdHelper, id);
651  else if (isCsc(id)) return moduleHash(*m_cscIdHelper, id);
652  ATH_MSG_WARNING("moduleHash(): No muon Identifier "<<id);
653  return IdentifierHash{};
654  }
656  if (isMdt(id)) return detElementHash(*m_mdtIdHelper, id);
657  else if (isRpc(id)) return detElementHash(*m_rpcIdHelper, id);
658  else if (isTgc(id)) return detElementHash(*m_tgcIdHelper, id);
659  else if (isMM(id)) return detElementHash(*m_mmIdHelper, id);
660  else if (issTgc(id)) return detElementHash(*m_stgcIdHelper, id);
661  else if (isCsc(id)) return detElementHash(*m_cscIdHelper, id);
662  ATH_MSG_WARNING("detElementHash(): No muon Identifier "<<id);
663  return IdentifierHash{};
664  }
665 
666 } // namespace Muon
Muon::MuonStationIndex::T3
@ T3
Definition: MuonStationIndex.h:33
MdtIdHelper::isBMG
bool isBMG(const Identifier &id) const
is this a BMG chamber
Definition: MdtIdHelper.cxx:734
MuonIdHelper::is_muon
bool is_muon(const Identifier &id) const
Definition: MuonIdHelper.cxx:779
BIS
@ BIS
Definition: RegSelEnums.h:11
MdtIdHelper::multilayer
int multilayer(const Identifier &id) const
Access to components of the ID.
Definition: MdtIdHelper.cxx:722
Muon::MuonIdHelperSvc::m_mmIdHelper
const MmIdHelper * m_mmIdHelper
Definition: MuonIdHelperSvc.h:187
TGC
@ TGC
Definition: RegSelEnums.h:33
Muon::MuonIdHelperSvc::initialize
virtual StatusCode initialize() override
AlgTool initilize.
Definition: MuonIdHelperSvc.cxx:17
Muon::MuonStationIndex::LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:38
Muon::MuonIdHelperSvc::isTgc
virtual bool isTgc(const Identifier &id) const override
returns whether this is a TGC Identifier or not
Definition: MuonIdHelperSvc.cxx:222
MuonIdHelper::stationNameIndex
int stationNameIndex(const std::string &name) const
Definition: MuonIdHelper.cxx:842
sTgcIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1017
Muon::MuonStationIndex::EIL
@ EIL
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::BM1
@ BM1
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::StUnknown
@ StUnknown
Definition: MuonStationIndex.h:24
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
STGC
@ STGC
Definition: RegSelEnums.h:39
MuonIdHelper::stationRegion
int stationRegion(const Identifier &id) const
Definition: MuonIdHelper.cxx:711
CSS
@ CSS
Definition: ParabolaCscClusterFitter.h:25
BIL
@ BIL
Definition: RegSelEnums.h:10
Muon::MuonIdHelperSvc::m_hasSTGC
Gaudi::Property< bool > m_hasSTGC
Definition: MuonIdHelperSvc.h:196
MdtIdHelper::stationEtaMin
static int stationEtaMin(bool barrel)
Access to min and max of level ranges.
Definition: MdtIdHelper.cxx:740
MuonIdHelper::is_rpc
bool is_rpc(const Identifier &id) const
Definition: MuonIdHelper.cxx:788
Muon::MuonIdHelperSvc::m_hasMDT
Gaudi::Property< bool > m_hasMDT
Definition: MuonIdHelperSvc.h:192
vtune_athena.format
format
Definition: vtune_athena.py:14
Muon::MuonIdHelperSvc::m_rpcIdHelper
const RpcIdHelper * m_rpcIdHelper
Sub detector specific IdHelpers.
Definition: MuonIdHelperSvc.h:183
TgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: TgcIdHelper.cxx:642
Muon::MuonIdHelperSvc::stationName
virtual int stationName(const Identifier &id) const override
Return stationName for all technologies.
Definition: MuonIdHelperSvc.cxx:542
RpcIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi, int doubletR) const
Definition: RpcIdHelper.cxx:793
Muon::MuonStationIndex::EOL
@ EOL
Definition: MuonStationIndex.h:18
Muon::MuonIdHelperSvc::layerIndex
virtual MuonStationIndex::LayerIndex layerIndex(const Identifier &id) const override
calculate layer index from Identifier
Definition: MuonIdHelperSvc.cxx:335
Muon::MuonIdHelperSvc::toString
virtual std::string toString(const Identifier &id) const override
print all fields to string
Definition: MuonIdHelperSvc.cxx:348
MuonIdHelper::is_mdt
bool is_mdt(const Identifier &id) const
Definition: MuonIdHelper.cxx:782
RpcIdHelper::doubletZ
int doubletZ(const Identifier &id) const
Definition: RpcIdHelper.cxx:1053
index
Definition: index.py:1
sTgcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const
Definition: sTgcIdHelper.cxx:886
Muon::MuonIdHelperSvc::isCsc
virtual bool isCsc(const Identifier &id) const override
returns whether this is a CSC Identifier or not
Definition: MuonIdHelperSvc.cxx:215
MuonIdHelper::detectorElement_hash_max
size_type detectorElement_hash_max() const
Definition: MuonIdHelper.h:186
Muon::MuonIdHelperSvc::m_primaryHelper
const MuonIdHelper * m_primaryHelper
Definition: MuonIdHelperSvc.h:190
Muon::MuonStationIndex::BO2
@ BO2
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::BM
@ BM
Definition: MuonStationIndex.h:25
Muon::MuonIdHelperSvc::m_hasRPC
Gaudi::Property< bool > m_hasRPC
Definition: MuonIdHelperSvc.h:193
xAOD::L2MuonParameters::BEE
@ BEE
BEE measurement point.
Definition: TrigMuonDefs.h:24
sTgcIdHelper::measuresPhi
bool measuresPhi(const Identifier &id) const override
returns measuresPhi
Definition: sTgcIdHelper.cxx:1025
Muon::MuonIdHelperSvc::chamberIndex
virtual MuonStationIndex::ChIndex chamberIndex(const Identifier &id) const override
calculate chamber index from Identifier
Definition: MuonIdHelperSvc.cxx:274
Muon::MuonStationIndex::stName
const std::string & stName(StIndex index)
convert StIndex into a string
Definition: MuonStationIndex.cxx:104
Muon::MuonStationIndex::EndcapA
@ EndcapA
Definition: MuonStationIndex.h:49
Muon::MuonStationIndex::TechnologyIndex
TechnologyIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:54
RpcIdHelper::measuresPhi
bool measuresPhi(const Identifier &id) const override
Definition: RpcIdHelper.cxx:1059
Muon::MuonIdHelperSvc::stationNameString
virtual std::string stationNameString(const Identifier &id) const override
Return the station name string for all technologies.
Definition: MuonIdHelperSvc.cxx:619
Muon::MuonIdHelperSvc::isEndcap
virtual bool isEndcap(const Identifier &id) const override
returns whether this is an endcap Identifier or not
Definition: MuonIdHelperSvc.cxx:270
MM
@ MM
Definition: RegSelEnums.h:38
MuonIdHelper::is_csc
bool is_csc(const Identifier &id) const
Definition: MuonIdHelper.cxx:785
MdtIdHelper::tubeLayer
int tubeLayer(const Identifier &id) const
Definition: MdtIdHelper.cxx:724
Muon::MuonIdHelperSvc::isSmallChamber
virtual bool isSmallChamber(const Identifier &id) const override
returns whether this is a small chamber, always returns true for TGCs
Definition: MuonIdHelperSvc.cxx:272
MuonIdHelper::technologyString
const std::string & technologyString(const int &index) const
Definition: MuonIdHelper.cxx:861
Muon::MuonIdHelperSvc::m_BIS_stat
int m_BIS_stat
Definition: MuonIdHelperSvc.h:215
Muon::MuonIdHelperSvc::sector
virtual int sector(const Identifier &id) const override
return sector number 1-16, odd=large, even=small
Definition: MuonIdHelperSvc.cxx:584
Muon::MuonStationIndex::STGC2
@ STGC2
Definition: MuonStationIndex.h:33
MuonIdHelper::module_end
const_id_iterator module_end() const
Definition: MuonIdHelper.cxx:756
Muon::MuonIdHelperSvc::m_detStore
ServiceHandle< StoreGateSvc > m_detStore
Definition: MuonIdHelperSvc.h:199
Muon::MuonIdHelperSvc::m_stgcIdHelper
const sTgcIdHelper * m_stgcIdHelper
Definition: MuonIdHelperSvc.h:188
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:800
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::MuonStationIndex::BO
@ BO
Definition: MuonStationIndex.h:25
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:812
RpcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
Definition: RpcIdHelper.cxx:931
sTgcIdHelper::sTgcChannelTypes
sTgcChannelTypes
Definition: sTgcIdHelper.h:190
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
BOL
@ BOL
Definition: RegSelEnums.h:14
Muon::MuonStationIndex::EI
@ EI
Definition: MuonStationIndex.h:26
MuonIdHelper::stationNameIndexMax
int stationNameIndexMax() const
Definition: MuonIdHelper.cxx:820
find_tgc_unfilled_channelids.mapping
mapping
Definition: find_tgc_unfilled_channelids.py:17
TgcIdHelper::measuresPhi
bool measuresPhi(const Identifier &id) const override
Definition: TgcIdHelper.cxx:647
MuonIdHelperSvc.h
Muon::MuonIdHelperSvc::m_stationNameData
std::vector< StationNameData > m_stationNameData
Definition: MuonIdHelperSvc.h:212
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
DetType::Barrel
@ Barrel
Definition: DetType.h:14
CscIdHelper::channel
int channel(const Identifier &id) const override
Definition: CscIdHelper.cxx:778
MuonIdHelper::is_tgc
bool is_tgc(const Identifier &id) const
Definition: MuonIdHelper.cxx:791
Muon::MuonStationIndex::BI1
@ BI1
Definition: MuonStationIndex.h:33
MmIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: MmIdHelper.cxx:796
Muon::MuonIdHelperSvc::m_hasMM
Gaudi::Property< bool > m_hasMM
Definition: MuonIdHelperSvc.h:197
RpcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: RpcIdHelper.cxx:1057
MuonIdHelper::isSmall
bool isSmall(const Identifier &id) const
Definition: MuonIdHelper.cxx:831
Muon::MuonIdHelperSvc::isMM
virtual bool isMM(const Identifier &id) const override
returns whether this is a MM Identifier or not
Definition: MuonIdHelperSvc.cxx:212
TgcIdHelper::channel
int channel(const Identifier &id) const override
Definition: TgcIdHelper.cxx:649
Muon::MuonStationIndex::STGC1
@ STGC1
Definition: MuonStationIndex.h:33
Muon::MuonIdHelperSvc::stationPhi
virtual int stationPhi(const Identifier &id) const override
Return stationPhi for all technologies.
Definition: MuonIdHelperSvc.cxx:500
Muon::MuonIdHelperSvc::chamberId
virtual Identifier chamberId(const Identifier &id) const override
create a chamber ID
Definition: MuonIdHelperSvc.cxx:423
CscIdHelper::wireLayer
int wireLayer(const Identifier &id) const
Definition: CscIdHelper.cxx:772
MuonIdHelper::is_stgc
bool is_stgc(const Identifier &id) const
Definition: MuonIdHelper.cxx:794
Muon::MuonIdHelperSvc::regionIndex
virtual MuonStationIndex::DetectorRegionIndex regionIndex(const Identifier &id) const override
calculate detector region index from Identifier
Definition: MuonIdHelperSvc.cxx:329
Muon::MuonStationIndex::toStationIndex
StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
Muon::MuonStationIndex::EMS
@ EMS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::CSCI
@ CSCI
Definition: MuonStationIndex.h:56
Muon::MuonIdHelperSvc::m_mdtIdHelper
const MdtIdHelper * m_mdtIdHelper
Definition: MuonIdHelperSvc.h:186
Muon::MuonStationIndex::BI
@ BI
Definition: MuonStationIndex.h:25
Muon::MuonIdHelperSvc::issTgc
virtual bool issTgc(const Identifier &id) const override
returns whether this is a sTGC Identifier or not
Definition: MuonIdHelperSvc.cxx:226
Muon::MuonIdHelperSvc::toStringGasGap
virtual std::string toStringGasGap(const Identifier &id) const override
print all fields up to gas gap to string
Definition: MuonIdHelperSvc.cxx:413
MuonIdHelper
Definition: MuonIdHelper.h:80
Muon::MuonStationIndex::EES
@ EES
Definition: MuonStationIndex.h:18
sTgcIdHelper::channel
int channel(const Identifier &id) const override
Definition: sTgcIdHelper.cxx:1027
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Ringer::EM
@ EM
Definition: CaloRingsDefs.h:19
Muon::MuonIdHelperSvc::m_hasCSC
Gaudi::Property< bool > m_hasCSC
Definition: MuonIdHelperSvc.h:195
RpcIdHelper::doubletR
int doubletR(const Identifier &id) const
Definition: RpcIdHelper.cxx:1051
Muon::MuonStationIndex::ChUnknown
@ ChUnknown
Definition: MuonStationIndex.h:16
Muon::MuonIdHelperSvc::layerId
virtual Identifier layerId(const Identifier &id) const override
create a layer ID, returns tube id for the MDTs
Definition: MuonIdHelperSvc.cxx:458
Muon::MuonIdHelperSvc::MuonIdHelperSvc
MuonIdHelperSvc(const std::string &name, ISvcLocator *svc)
default AlgService constructor
Definition: MuonIdHelperSvc.cxx:14
lumiFormat.i
int i
Definition: lumiFormat.py:85
MdtIdHelper::stationEtaMax
static int stationEtaMax(bool barrel)
Definition: MdtIdHelper.cxx:748
Muon::MuonIdHelperSvc::hasHPTDC
virtual bool hasHPTDC(const Identifier &id) const override
returns whether this Identifier belongs to an MDT with HPTDC or not NOTE that in Run4,...
Definition: MuonIdHelperSvc.cxx:244
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Muon::MuonStationIndex::chName
const std::string & chName(ChIndex index)
convert ChIndex into a string
Definition: MuonStationIndex.cxx:119
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MdtIdHelper::channel
int channel(const Identifier &id) const override
Definition: MdtIdHelper.cxx:736
Muon::MuonStationIndex::EML
@ EML
Definition: MuonStationIndex.h:18
Muon::MuonIdHelperSvc::isMdt
virtual bool isMdt(const Identifier &id) const override
returns whether this is a MDT Identifier or not
Definition: MuonIdHelperSvc.cxx:209
Muon::MuonIdHelperSvc::detElId
virtual Identifier detElId(const Identifier &id) const override
create a detector element ID
Definition: MuonIdHelperSvc.cxx:442
TgcIdHelper::get_module_hash
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override
Definition: TgcIdHelper.cxx:234
Muon::MuonIdHelperSvc::isTrigger
virtual bool isTrigger(const Identifier &id) const override
returns whether trigger chamber id or not
Definition: MuonIdHelperSvc.cxx:266
MuonIdHelper::get_module_hash
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const
Definition: MuonIdHelper.cxx:97
sTgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: sTgcIdHelper.cxx:1020
Muon::MuonIdHelperSvc::technologiesInStation
virtual const std::set< MuonStationIndex::TechnologyIndex > & technologiesInStation(MuonStationIndex::StIndex stIndex) const override
Recieve all technologies in a station.
Definition: MuonIdHelperSvc.cxx:231
Muon::MuonStationIndex::EndcapC
@ EndcapC
Definition: MuonStationIndex.h:49
MdtIdHelper::tube
int tube(const Identifier &id) const
Definition: MdtIdHelper.cxx:726
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonIdHelper::get_detectorElement_hash
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const
Definition: MuonIdHelper.cxx:118
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
Muon::MuonStationIndex::technologyName
const std::string & technologyName(TechnologyIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:169
MuonIdHelper::is_mm
bool is_mm(const Identifier &id) const
Definition: MuonIdHelper.cxx:797
Muon::MuonIdHelperSvc::hasCSC
bool hasCSC() const override
Definition: MuonIdHelperSvc.cxx:615
Muon::MuonIdHelperSvc::m_tgcIdHelper
const TgcIdHelper * m_tgcIdHelper
Definition: MuonIdHelperSvc.h:184
MuonIdHelper::technologyNameIndexMax
int technologyNameIndexMax() const
Definition: MuonIdHelper.cxx:822
Muon::MuonIdHelperSvc::hasTGC
bool hasTGC() const override
Definition: MuonIdHelperSvc.cxx:613
Muon::MuonIdHelperSvc::isRpc
virtual bool isRpc(const Identifier &id) const override
returns whether this is a RPC Identifier or not
Definition: MuonIdHelperSvc.cxx:218
Muon::MuonStationIndex::BM2
@ BM2
Definition: MuonStationIndex.h:33
Muon::MuonIdHelperSvc::m_techPerStation
std::array< std::set< TechIdx >, static_cast< int >StIdx::StIndexMax)> m_techPerStation
Array holding which technologies are there per station.
Definition: MuonIdHelperSvc.h:218
TgcIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: TgcIdHelper.cxx:556
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:810
Muon::MuonStationIndex::BO1
@ BO1
Definition: MuonStationIndex.h:33
Muon::MuonIdHelperSvc::m_hasTGC
Gaudi::Property< bool > m_hasTGC
Definition: MuonIdHelperSvc.h:194
RpcIdHelper::channel
int channel(const Identifier &id) const override
Definition: RpcIdHelper.cxx:1063
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:854
AtlasDetectorID::print_to_string
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:408
Muon::MuonIdHelperSvc::stationEta
virtual int stationEta(const Identifier &id) const override
Return stationEta for all technologies.
Definition: MuonIdHelperSvc.cxx:521
Muon::MuonIdHelperSvc::gasGapId
virtual Identifier gasGapId(const Identifier &id) const override
create a gasGap ID (will return layer Id for MDTs)
Definition: MuonIdHelperSvc.cxx:478
MmIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: MmIdHelper.cxx:706
Muon::MuonIdHelperSvc::detElementHash
virtual IdentifierHash detElementHash(const Identifier &id) const override
Returns the detector element hash associated to an Identifier.
Definition: MuonIdHelperSvc.cxx:655
Muon::MuonIdHelperSvc::toStringTech
virtual std::string toStringTech(const Identifier &id) const override
print all fields up to technology to string
Definition: MuonIdHelperSvc.cxx:370
RPC
@ RPC
Definition: RegSelEnums.h:32
CscIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int chamberLayer, int wireLayer, int measuresPhi, int strip) const
Definition: CscIdHelper.cxx:706
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
MdtIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
Definition: MdtIdHelper.cxx:659
Muon::MuonIdHelperSvc::stationIndex
virtual MuonStationIndex::StIndex stationIndex(const Identifier &id) const override
calculate station index from Identifier
Definition: MuonIdHelperSvc.cxx:282
Muon::MuonIdHelperSvc::chamberNameString
virtual std::string chamberNameString(const Identifier &id) const override
print chamber name to string
Definition: MuonIdHelperSvc.cxx:374
Muon::MuonIdHelperSvc::stationRegion
virtual int stationRegion(const Identifier &id) const override
Return stationRegion for all technologies.
Definition: MuonIdHelperSvc.cxx:563
Muon::MuonIdHelperSvc::measuresPhi
virtual bool measuresPhi(const Identifier &id) const override
returns whether channel measures phi or not
Definition: MuonIdHelperSvc.cxx:252
Muon::MuonStationIndex::T4
@ T4
Definition: MuonStationIndex.h:33
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:805
Muon::MuonIdHelperSvc::isMuon
virtual bool isMuon(const Identifier &id) const override
returns whether this is a Muon Identifier or not
Definition: MuonIdHelperSvc.cxx:206
Muon::MuonIdHelperSvc::technologyIndex
virtual MuonStationIndex::TechnologyIndex technologyIndex(const Identifier &id) const override
calculate layer index from Identifier
Definition: MuonIdHelperSvc.cxx:339
Muon::MuonIdHelperSvc::issMdt
virtual bool issMdt(const Identifier &id) const override
returns whether this is a sMDT Identifier or not
Definition: MuonIdHelperSvc.cxx:235
Muon::MuonStationIndex::PhiIndex
PhiIndex
enum to classify the different phi layers in the muon spectrometer
Definition: MuonStationIndex.h:31
Muon::MuonIdHelperSvc::toStringDetEl
virtual std::string toStringDetEl(const Identifier &id) const override
print all fields up to detector element to string
Definition: MuonIdHelperSvc.cxx:392
MuonIdHelper::module_hash_max
size_type module_hash_max() const
the maximum hash value
Definition: MuonIdHelper.cxx:748
MdtIdHelper::isBME
bool isBME(const Identifier &id) const
is this a BME chamber
Definition: MdtIdHelper.cxx:732
MuonIdHelper::isEndcap
bool isEndcap(const Identifier &id) const
Definition: MuonIdHelper.cxx:827
sTgcIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: sTgcIdHelper.cxx:856
Muon::MuonIdHelperSvc::hasMDT
bool hasMDT() const override
Definition: MuonIdHelperSvc.cxx:614
MdtIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: MdtIdHelper.cxx:630
DeMoScan.index
string index
Definition: DeMoScan.py:364
MmIdHelper::channel
int channel(const Identifier &id) const override
Definition: MmIdHelper.cxx:800
Muon::MuonStationIndex::DetectorRegionIndex
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:47
h
MmIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: MmIdHelper.cxx:798
BML
@ BML
Definition: RegSelEnums.h:12
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
Muon::MuonIdHelperSvc::m_smdt_stat
std::unordered_set< Identifier > m_smdt_stat
Definition: MuonIdHelperSvc.h:216
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::MuonStationIndex::TechnologyUnknown
@ TechnologyUnknown
Definition: MuonStationIndex.h:55
Muon::MuonStationIndex::BI2
@ BI2
Definition: MuonStationIndex.h:33
BMS
@ BMS
Definition: RegSelEnums.h:13
DEBUG
#define DEBUG
Definition: page_access.h:11
Muon::MuonStationIndex::T2
@ T2
Definition: MuonStationIndex.h:33
Muon::MuonIdHelperSvc::m_cscIdHelper
const CscIdHelper * m_cscIdHelper
Definition: MuonIdHelperSvc.h:185
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
Muon::MuonIdHelperSvc::moduleHash
virtual IdentifierHash moduleHash(const Identifier &id) const override
Returns the module hash associated to an Identifier.
Definition: MuonIdHelperSvc.cxx:645
Muon::MuonIdHelperSvc::hasSTGC
bool hasSTGC() const override
Definition: MuonIdHelperSvc.cxx:616
Muon::MuonStationIndex::EEL
@ EEL
Definition: MuonStationIndex.h:18
Muon::MuonIdHelperSvc::toStringStation
virtual std::string toStringStation(const Identifier &id) const override
print all fields up to stationName to string
Definition: MuonIdHelperSvc.cxx:378
TgcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int gasGap, int isStrip, int channel) const
Definition: TgcIdHelper.cxx:583
Muon::MuonStationIndex::toLayerIndex
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
Muon::MuonStationIndex::T1
@ T1
Definition: MuonStationIndex.h:33
Muon::MuonIdHelperSvc::hasRPC
bool hasRPC() const override
Definition: MuonIdHelperSvc.cxx:612
CSC
@ CSC
Definition: RegSelEnums.h:34
CscIdHelper::measuresPhi
bool measuresPhi(const Identifier &id) const override
Definition: CscIdHelper.cxx:774
Muon::MuonIdHelperSvc::phiIndex
virtual MuonStationIndex::PhiIndex phiIndex(const Identifier &id) const override
calculate phi index from Identifier (not supported for MDT hits)
Definition: MuonIdHelperSvc.cxx:290
Muon::MuonStationIndex::PhiUnknown
@ PhiUnknown
Definition: MuonStationIndex.h:32
Muon::MuonIdHelperSvc::toStringChamber
virtual std::string toStringChamber(const Identifier &id) const override
print all fields up to chamber to string
Definition: MuonIdHelperSvc.cxx:382
CSL
@ CSL
Definition: ParabolaCscClusterFitter.h:25
MuonIdHelper::module_begin
const_id_iterator module_begin() const
Iterators over full set of ids.
Definition: MuonIdHelper.cxx:754
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
Muon::MuonIdHelperSvc::m_technologies
std::vector< TechIdx > m_technologies
Definition: MuonIdHelperSvc.h:213
Muon::MuonIdHelperSvc::hasMM
bool hasMM() const override
Definition: MuonIdHelperSvc.cxx:617
BOS
@ BOS
Definition: RegSelEnums.h:15
MmIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Definition: MmIdHelper.cxx:736
sTgcIdHelper::channelType
int channelType(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1022
Muon::MuonIdHelperSvc::StationNameData
Definition: MuonIdHelperSvc.h:205
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Muon::MuonStationIndex::EOS
@ EOS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::EIS
@ EIS
Definition: MuonStationIndex.h:18
CscIdHelper::chamberLayer
int chamberLayer(const Identifier &id) const
Definition: CscIdHelper.cxx:770
MDT
@ MDT
Definition: RegSelEnums.h:31
Muon::MuonIdHelperSvc::gasGap
virtual int gasGap(const Identifier &id) const override
returns gas gap: gasGap for RPC + TGC, wireLayer for CSC, tube for MDT
Definition: MuonIdHelperSvc.cxx:186
RpcIdHelper::doubletPhi
int doubletPhi(const Identifier &id) const
Definition: RpcIdHelper.cxx:1055
MuonIdHelper::BAD_NAME
static const std::string BAD_NAME
Definition: MuonIdHelper.h:224
Identifier
Definition: IdentifierFieldParser.cxx:14