ATLAS Offline Software
MuonIdHelper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 const std::string MuonIdHelper::BAD_NAME = "UNKNOWN";
9 
10 MuonIdHelper::MuonIdHelper(const std::string& logName,
11  const std::string& group) :
12  AtlasDetectorID(logName.empty() ? "MuonIdHelper" : logName, group)
13 {
14 }
15 
17  // Check whether this helper should be reinitialized
18  if (!reinitialize(dict_mgr)) {
19  ATH_MSG_INFO("Request to reinitialize not satisfied - tags have not changed");
20  return 0;
21  } else {
22  ATH_MSG_DEBUG("(Re)initialize");
23  }
24 
25  // init base object
26  if (AtlasDetectorID::initialize_from_dictionary(dict_mgr)) return 1;
27 
28  // Register version of the MuonSpectrometer dictionary
29  if (register_dict_tag(dict_mgr, "MuonSpectrometer")) return 1;
30 
31  m_dict = dict_mgr.find_dictionary("MuonSpectrometer");
32  if (!m_dict) {
33  ATH_MSG_ERROR(" initialize_from_dict - cannot access MuonSpectrometer dictionary ");
34  return 1;
35  }
36 
37  // Initialize some of the field indices
38  if (initLevelsFromDict()) return 1;
39 
40  //
41  // Build multirange for the valid set of identifiers
42  //
43 
44  // Find value for the field MuonSpectrometer
45  int muonField = -1;
46  const IdDictDictionary* atlasDict = dict_mgr.find_dictionary("ATLAS");
47  if (atlasDict->get_label_value("subdet", "MuonSpectrometer", muonField)) {
48  ATH_MSG_ERROR("Could not get value for label 'MuonSpectrometer' of field 'subdet' in dictionary ");
49  return 1;
50  }
51 
52  // Build MultiRange down to "technology" for all (muon) regions
54  region_id.add(muonField);
55  Range prefix;
56  MultiRange muon_range = m_dict->build_multirange(region_id, prefix, "technology");
57  if (muon_range.size()) {
58  ATH_MSG_INFO("MultiRange built successfully to Technology "
59  << "MultiRange size is " << muon_range.size());
60 
61  } else {
62  ATH_MSG_ERROR("Muon MultiRange is empty");
63  return 1;
64  }
65 
66  return 0;
67 }
68 
69 // From hash get Identifier
70 int MuonIdHelper::get_id(const IdentifierHash& hash_id, Identifier& id, const IdContext* context) const {
71  int result = 1;
72  id.clear();
73 
74  size_t begin = (context) ? context->begin_index() : 0;
75  // cannot get hash if end is 0:
76  size_t end = (context) ? context->end_index() : 0;
77  if (0 == begin) {
78  // No hashes yet for ids with prefixes
79  if (m_MODULE_INDEX == end) {
80  if (hash_id < (unsigned int)(m_module_vec.end() - m_module_vec.begin())) {
81  id = m_module_vec[hash_id];
82  result = 0;
83  }
84  } else if (m_DETECTORELEMENT_INDEX == end) {
85  if (hash_id < (unsigned int)(m_detectorElement_vec.end() - m_detectorElement_vec.begin())) {
86  id = m_detectorElement_vec[hash_id];
87  result = 0;
88  }
89  } else if (m_CHANNEL_INDEX == end) {
90  if (hash_id < (unsigned int)(m_channel_vec.end() - m_channel_vec.begin())) {
91  id = m_channel_vec[hash_id];
92  result = 0;
93  }
94  }
95  }
96  return (result);
97 }
98 
100  // by binary search - overwritten in the derived classes
101  IdContext context = module_context();
102  hash_id = UINT_MAX;
103  size_t begin = context.begin_index();
104  size_t end = context.end_index();
105 
106  if (0 == begin) {
107  // No hashes yet for ids with prefixes
108  if (m_MODULE_INDEX == end) {
109  id_vec_it it = std::lower_bound(m_module_vec.begin(), m_module_vec.end(), id);
110  if ((it != m_module_vec.end()) && (*it == id)) {
111  hash_id = it - m_module_vec.begin();
112  return 0;
113  }
114  }
115  }
116  ATH_MSG_WARNING("MuonIdHelper::get_module_hash(): Could not determine hash for identifier " << id.get_compact());
117  return 1;
118 }
119 
121  // by binary search - overwritten in the derived classes
122  hash_id = UINT_MAX;
124  size_t begin = context.begin_index();
125  size_t end = context.end_index();
126  if (0 == begin) {
127  if (m_DETECTORELEMENT_INDEX == end) {
128  id_vec_it it = std::lower_bound(m_detectorElement_vec.begin(), m_detectorElement_vec.end(), id);
129  if ((it != m_detectorElement_vec.end()) && (*it == id)) {
130  hash_id = it - m_detectorElement_vec.begin();
131  return 0;
132  }
133  }
134  }
135  ATH_MSG_WARNING("MuonIdHelper::get_detectorElement_hash(): Could not determine hash for identifier " << id.get_compact());
136  return 1;
137 }
138 
140  IdContext context = channel_context();
141  return get_hash(id, hash_id, &context);
142 }
143 
144 int MuonIdHelper::get_hash(const Identifier& id, IdentifierHash& hash_id, const IdContext* context) const {
145  // Get the hash code from either a vec. We convert to compact
146  // and call get_hash again. For the latter, we calculate the hash from the
147  // Identifier.
148 
149  int result = 1;
150  hash_id = 0;
151  size_t begin = (context) ? context->begin_index() : 0;
152  // size_t end = (context) ? context->end_index() : 0;
153  if (0 == begin) {
154  // No hashes yet for ids with prefixes
155  result = get_hash_calc(id, hash_id, context);
156  }
157  return (result);
158 }
159 
160 int MuonIdHelper::get_expanded_id(const Identifier& id, ExpandedIdentifier& exp_id, const IdContext* context) const {
161  return (get_expanded_id_calc(id, exp_id, context));
162 }
163 
164 int MuonIdHelper::get_id(const ExpandedIdentifier& old_id, Identifier& new_id) const {
165  // Copy old_id into new_id and get compact if possible
166  int result = 0;
167  new_id.clear();
168 
169  ExpandedIdentifier dummy_id;
170  IdContext context(dummy_id, 0, old_id.fields() - 1);
171  Identifier compact_id;
172  if (!get_compact_id(old_id, compact_id, &context)) { new_id = compact_id; }
173  return (result);
174 }
175 
176 // From compact, get ExpandedIdentifier
177 int MuonIdHelper::get_expanded_id_calc(const Identifier& compact_id, ExpandedIdentifier& id, const IdContext* context) const {
178  int result = 1;
179  id.clear();
180  if (m_dict) {
181  // some preconditions in the case that the dictionary existd
182  size_t begin = (context) ? context->begin_index() : 0;
183  size_t end = (context) ? context->end_index() : m_CHANNEL_INDEX;
184  assert(end <= m_CHANNEL_INDEX);
185  if (0 == end) {
186  result = 0;
187  } else if (0 == begin) {
188  ExpandedIdentifier empty;
189  result = m_dict->unpack(this->group(), compact_id, empty, end, id);
190  // Ensure that the expected number of fields were unpacked.
191  if (id.fields() != end+1) result = 1;
192  } else {
193  // Non-zero prefix - we assume that the prefix contains
194  // the IdDet level
195  result = m_dict->unpack(this->group(), compact_id, context->prefix_id(), end, id);
196  }
197  }
198  if (!id.isValid()) {
199  return EXIT_FAILURE;
200  }
201  return result;
202 }
203 
204 int MuonIdHelper::get_compact_id(const ExpandedIdentifier& id, Identifier& compact_id, const IdContext* context) const {
205  // Get compact for all fields provided
206  int result = 1;
207  compact_id = (Identifier::value_type)0;
208  int exp_id[10];
209 
210  for (size_t i = 0; i < id.fields(); i++) exp_id[i] = id[i];
211 
212  if (m_dict && id.fields() > 0) {
213  size_t begin = (context) ? context->begin_index() : 0;
214  size_t end = (context) ? context->end_index() : id.fields() - 1;
215  result = m_dict->pack32(exp_id, begin, end, m_GROUP_INDEX, compact_id);
216  // result = m_dict->pack32(id, begin, end, compact_id);
217  }
218  return (result);
219 }
220 
221 int MuonIdHelper::get_hash_calc(const Identifier& compact_id, IdentifierHash& hash_id, const IdContext* context) const {
222  // Get the hash code from vec (for wafers only).
223  hash_id = UINT_MAX;
224  size_t begin = (context) ? context->begin_index() : 0;
225  size_t end = (context) ? context->end_index() : 0;
226 
227  if (0 == begin) {
228  // No hashes yet for ids with prefixes
229  if (m_MODULE_INDEX == end) {
230  return get_module_hash(compact_id, hash_id);
231  } else if (m_DETECTORELEMENT_INDEX == end) {
232  return get_detectorElement_hash(compact_id, hash_id);
233  } else if (m_CHANNEL_INDEX == end) {
234  id_vec_it it = std::lower_bound(m_channel_vec.begin(), m_channel_vec.end(), compact_id);
235  if ((it != m_channel_vec.end()) && (*it == compact_id)) {
236  hash_id = it - m_channel_vec.begin();
237  return 0;
238  }
239  }
240  }
241  ATH_MSG_WARNING("MuonIdHelper::get_hash_calc(): Could not determine hash for identifier " << compact_id.get_compact());
242  return 1;
243 }
244 
246  if (!m_dict) {
247  ATH_MSG_ERROR(" initLevelsFromDict - dictionary NOT initialized ");
248  return 1;
249  }
250 
251  // Find out which identifier field corresponds to each level. Use
252  // names to find each field/leve.
253 
254  m_MUON_INDEX = 999;
255  m_NAME_INDEX = 999;
256  m_ETA_INDEX = 999;
257  m_PHI_INDEX = 999;
258  m_CHANNEL_INDEX = 999;
259 
260  // Save index to stations for unpacking
263  ATH_MSG_ERROR("initLevelsFromDict - unable to find a muon station index: id, reg"
264  << " " << std::string(id) << " " << m_station_region_index);
265 
266  return 1;
267  }
268 
269  // Find a Muon region
270  IdDictField* field = m_dict->find_field("subdet");
271  if (field) {
272  m_MUON_INDEX = field->index();
273  } else {
274  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'subdet' field ");
275  return 1;
276  }
277  field = m_dict->find_field("stationName");
278  if (field) {
279  m_NAME_INDEX = field->index();
280 
281  if (m_stationIdxToNameMap.empty()) {
282  // we only need to fill the vectors and sets once
283  for (size_t i = 0; i < field->get_label_number(); i++) {
284  std::string name = field->get_label(i);
285  int index = (int)field->get_label_value(name);
290  // all chambers starting with B are in the barrel except the BEE chambers
291  if ('B' == name[0]) {
292  if (name[1] != 'E')
293  m_isBarrel.insert(index);
294  else
295  m_isSmall.insert(index); // BEE is in the small sector
296  if ('G' == name[2] || 'F' == name[2]) { m_isSmall.insert(index); }
297  } else if ('F' == name[2]) {
298  m_isForward.insert(index);
299  }
300  if ('S' == name[2]) { m_isSmall.insert(index); }
301  }
302  }
303 
304  } else {
305  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'stationName' field ");
306  return 1;
307  }
308  field = m_dict->find_field("stationEta");
309  if (field) {
310  m_ETA_INDEX = field->index();
311  } else {
312  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'stationEta' field ");
313  return 1;
314  }
315  field = m_dict->find_field("stationPhi");
316  if (field) {
317  m_PHI_INDEX = field->index();
318  } else {
319  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'stationPhi' field ");
320  return 1;
321  }
322  field = m_dict->find_field("technology");
323  if (field) {
324  m_TECHNOLOGY_INDEX = field->index();
325 
326  if (m_technologyNameToIdxMap.empty()) {
327  for (size_t i = 0; i < field->get_label_number(); ++i) {
328  std::string name = field->get_label(i);
329  int index = (int)field->get_label_value(name);
333  }
334  }
335 
336  } else {
337  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'technology' field ");
338  return 1;
339  }
341 
342  // Set the field implementations down to the technology
346 
347  // m_stationNameField = m_dict->find_field ("stationName"); // Philipp
348  // m_technologyField = m_dict->find_field ("technology"); // Philipp
349  return 0;
350 }
351 
353  //
354  // create a vector(s) to retrieve the hashes for compact ids. For
355  // the moment, we implement a hash for modules
356  //
357 
358  // module hash
360  ATH_MSG_INFO("The element hash max is " << m_module_hash_max);
362  IdContext context = module_context();
363  unsigned int nids = 0;
364  std::set<Identifier> ids;
365  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
366  const Range& range = m_full_module_range[i];
368  for (const auto & expId:rit) {
369  Identifier id;
370  get_id(expId, id);
371  if (!(ids.insert(id)).second) {
372  ATH_MSG_ERROR("init_hashes "
373  << " Error: duplicated id for module id. nid " << (int)nids << " compact id " << id << " id ");
374  return 1;
375  }
376  nids++;
377  }
378  }
379  if (ids.size() != m_module_hash_max) {
380  ATH_MSG_ERROR("init_hashes "
381  << " Error: set size NOT EQUAL to element hash max. size " << ids.size() << " hash max " << m_module_hash_max);
382 
383  return 1;
384  }
385 
386  nids = 0;
387  std::set<Identifier>::const_iterator first = ids.begin();
388  std::set<Identifier>::const_iterator last = ids.end();
389  for (; first != last && nids < m_module_vec.size(); ++first) {
390  m_module_vec[nids] = (*first);
391  nids++;
392  }
393  // sort the vector of identifiers to be able to use std::lower_bound to find hashes
394  std::sort(m_module_vec.begin(), m_module_vec.end());
395  return 0;
396 }
397 
399  //
400  // create a vector(s) to retrieve the hashes for compact ids. For
401  // the moment, we implement a hash for readout channels
402  //
403 
404  // detector element hash
406  ATH_MSG_INFO("The detector element hash max is " << m_detectorElement_hash_max);
409  unsigned int nids = 0;
410  std::set<Identifier> ids;
411  for (unsigned int i = 0; i < m_full_detectorElement_range.size(); ++i) {
414  for (const auto & expId:rit) {
415  Identifier id;
416  get_id(expId, id);
417  if (!(ids.insert(id)).second) {
418  ATH_MSG_ERROR("init_detectorElement_hashes "
419  << " Error: duplicated id for channel id. nid " << nids << " compact id " << id << " id ");
420 
421  return 1;
422  }
423  nids++;
424  }
425  }
426  if (ids.size() != m_detectorElement_hash_max) {
427  ATH_MSG_ERROR("init_hashes "
428  << " Error: set size NOT EQUAL to hash max. size " << ids.size() << " hash max " << m_detectorElement_hash_max);
429  return 1;
430  }
431 
432  nids = 0;
433  std::set<Identifier>::const_iterator first = ids.begin();
434  std::set<Identifier>::const_iterator last = ids.end();
435  for (; first != last && nids < m_detectorElement_vec.size(); ++first) {
436  m_detectorElement_vec[nids] = (*first);
437  nids++;
438  }
439  // sort the vector of identifiers to be able to use std::lower_bound to find hashes
440  std::sort(m_detectorElement_vec.begin(), m_detectorElement_vec.end());
441  return 0;
442 }
443 
445  //
446  // create a vector(s) to retrieve the hashes for compact ids. For
447  // the moment, we implement a hash for readout channels
448  //
449 
450  // readout channel hash
452  ATH_MSG_INFO("The channel hash max is " << m_channel_hash_max);
454  IdContext context = channel_context();
455  unsigned int nids = 0;
456  std::set<Identifier> ids;
457  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
458  const Range& range = m_full_channel_range[i];
460  for (const auto & expId:rit) {
461  Identifier id;
462  get_id(expId, id);
463 
464  if (!(ids.insert(id)).second) {
465  ATH_MSG_ERROR("init_channel_hashes "
466  << " Error: duplicated id for channel id. nid " << nids << " compact id " << id << " id ");
467  return 1;
468  }
469  m_channel_vec[nids] = id;
470  nids++;
471  }
472  }
473  if (ids.size() != m_channel_hash_max) {
474  ATH_MSG_ERROR("init_hashes "
475  << " Error: set size NOT EQUAL to hash max. size " << ids.size() << " hash max " << m_channel_hash_max);
476 
477  return 1;
478  }
479  // sort the vector of identifiers to be able to use std::lower_bound to find hashes
480  std::sort(m_channel_vec.begin(), m_channel_vec.end());
481  return 0;
482 }
483 
485  unsigned short index = id;
486  if (index < m_prev_phi_module_vec.size()) {
487  if (m_prev_phi_module_vec[index] == NOT_VALID_HASH) return 1;
489  return 0;
490  }
491  return 1;
492 }
493 
495  unsigned short index = id;
496  if (index < m_next_phi_module_vec.size()) {
497  if (m_next_phi_module_vec[index] == NOT_VALID_HASH) return 1;
499  return 0;
500  }
501  return 1;
502 }
503 
505  unsigned short index = id;
506  if (index < m_prev_eta_module_vec.size()) {
507  if (m_prev_eta_module_vec[index] == NOT_VALID_HASH) return 1;
509  return 0;
510  }
511  return 1;
512 }
513 
515  unsigned short index = id;
516  if (index < m_next_eta_module_vec.size()) {
517  if (m_next_eta_module_vec[index] == NOT_VALID_HASH) return 1;
519  return 0;
520  }
521  return 1;
522 }
523 
525  //
526  // create a vector(s) to retrieve the hashes for compact ids for
527  // module neighbors.
528  //
529 
530  ATH_MSG_VERBOSE("MuonIdHelper::init_neighbors ");
535 
536  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
537  const Range& range = m_full_module_range[i];
538  const Range::field& phi_field = range[m_PHI_INDEX];
539  const Range::field& eta_field = range[m_ETA_INDEX];
541  for (const auto & id: rit) {
546  bool pphi = phi_field.get_previous(id[m_PHI_INDEX], previous_phi);
547  bool nphi = phi_field.get_next(id[m_PHI_INDEX], next_phi);
548  bool peta = eta_field.get_previous(id[m_ETA_INDEX], previous_eta);
549  bool neta = eta_field.get_next(id[m_ETA_INDEX], next_eta);
550 
551  Identifier compact_id;
552  IdContext wcontext = module_context();
553 
554  // First get primary hash id
555  IdentifierHash hash_id;
556  if (!get_compact_id(id, compact_id, &wcontext)) {
557  // forward to compact -> hash
558  if (get_hash(compact_id, hash_id, &wcontext)) {
559  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get hash, exp/compact "
560  << " " << std::hex << compact_id << std::dec << endmsg);
561  return 1;
562  }
563  } else {
564  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get compact, exp/compact ");
565  return 1;
566  }
567 
568  // index for the subsequent arrays
569  unsigned short index = hash_id;
570  assert(hash_id < m_prev_phi_module_vec.size());
571  assert(hash_id < m_next_phi_module_vec.size());
572  assert(hash_id < m_prev_eta_module_vec.size());
573  assert(hash_id < m_next_eta_module_vec.size());
574 
575  if (pphi) {
576  // Get previous phi hash id
577  ExpandedIdentifier expId = id;
578  expId[m_PHI_INDEX] = previous_phi;
579  if (!get_compact_id(expId, compact_id, &wcontext)) {
580  // forward to compact -> hash
581  if (get_hash(compact_id, hash_id, &wcontext)) {
582  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get previous phi hash, exp/compact "
583  << " " << std::hex << compact_id << std::dec);
584  return 1;
585  }
586  } else {
587  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get previous phi compact, exp/compact ");
588  return 1;
589  }
590  m_prev_phi_module_vec[index] = hash_id;
591  }
592 
593  if (nphi) {
594  // Get next phi hash id
595  ExpandedIdentifier expId = id;
596  expId[m_PHI_INDEX] = next_phi;
597  if (!get_compact_id(expId, compact_id, &wcontext)) {
598  // forward to compact -> hash
599  if (get_hash(compact_id, hash_id, &wcontext)) {
600  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get next phi hash, exp/compact "
601  << " " << std::hex << compact_id << std::dec);
602  return 1;
603  }
604  } else {
605  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get next phi compact, exp/compact ");
606  return 1;
607  }
608  m_next_phi_module_vec[index] = hash_id;
609  }
610 
611  if (peta) {
612  // Get previous eta hash id
613  ExpandedIdentifier expId = id;
614  expId[m_ETA_INDEX] = previous_eta;
615  if (!get_compact_id(expId, compact_id, &wcontext)) {
616  // forward to compact -> hash
617  if (get_hash(compact_id, hash_id, &wcontext)) {
618  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get previous eta hash, exp/compact "
619  << " " << std::hex << compact_id << std::dec);
620  return 1;
621  }
622  } else {
623  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get previous eta compact, exp/compact ");
624  return 1;
625  }
626  m_prev_eta_module_vec[index] = hash_id;
627  }
628 
629  if (neta) {
630  // Get next eta hash id
631  ExpandedIdentifier expId = id;
632  expId[m_ETA_INDEX] = next_eta;
633  if (!get_compact_id(expId, compact_id, &wcontext)) {
634  // forward to compact -> hash
635  if (get_hash(compact_id, hash_id, &wcontext)) {
636  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get next eta hash, exp/compact "
637  << " " << std::hex << compact_id << std::dec);
638  return 1;
639  }
640  } else {
641  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get next eta compact, exp/compact ");
642  return 1;
643  }
644  m_next_eta_module_vec[index] = hash_id;
645  }
646  }
647  }
648  ATH_MSG_VERBOSE("Finish init_neighors() ...");
649  return 0;
650 }
651 
653  if (m_dict) {
654  int nids = 0;
655  IdContext context = module_context();
657  const_id_iterator last = m_module_vec.end();
658  for (; first != last; ++first, ++nids) {
659  Identifier compact = (*first);
661  if (get_expanded_id(compact, id, &context)) {
662  ATH_MSG_ERROR("test_module_packing: Unable to get expanded id. Compact id " << compact);
663  continue;
664  }
665  Identifier new_compact;
666  if (get_compact_id(id, new_compact, &context)) {
667  ATH_MSG_ERROR("test_module_packing: Unable to get compact id. Expanded id " << std::string(id));
668  continue;
669  }
670  if (compact != new_compact) {
671  ATH_MSG_ERROR("test_module_packing: new and old compacts not equal "
672  << "New/old/expanded ids " << new_compact << " " << compact << " " << std::string(id));
673  continue;
674  }
675  }
676 
677  ATH_MSG_INFO("test_module_packing: Successful tested " << nids << " ids. ");
678  } else {
679  ATH_MSG_ERROR("Unable to test module is packing - no dictionary has been defined. ");
680  }
681 }
682 
683 void MuonIdHelper::test_id(const Identifier& id, const IdContext& context) const {
684  Identifier compact = id;
685  ExpandedIdentifier new_id;
686  if (get_expanded_id(compact, new_id, &context)) {
687  ATH_MSG_ERROR("Unable to get expanded id. Compact id " << compact);
688  return;
689  }
690  Identifier new_compact;
691  if (get_compact_id(new_id, new_compact, &context)) {
692  ATH_MSG_ERROR("Unable to get compact id. Expanded id " << show_to_string(id));
693  return;
694  }
695  if (compact != new_compact) {
696  ATH_MSG_ERROR("new and old compacts not equal. New/old/expanded ids " << new_compact << " " << compact << " "
697  << show_to_string(id));
698  return;
699  }
700 }
701 
702 // Prepend the station ID
703 
704 void MuonIdHelper::addStationID(Identifier& id, int stationName, int stationEta, int stationPhi, int technology) const {
705  ExpandedIdentifier exp_id;
706  IdContext muon_context(exp_id, 0, m_MUON_INDEX);
707  if (get_expanded_id(id, exp_id, &muon_context)) {
708  ATH_MSG_ERROR(" MUON_ID result is NOT ok. MUON id " << show_to_string(id) << " Fields not appended ");
709  } else {
710  exp_id << stationName << stationEta << stationPhi << technology;
711  get_id(exp_id, id); // Fill output
712  }
713 }
714 
716  std::string name = stationNameString(stationName(id));
717 
718  if (name.size() >= 2) {
719  if ('I' == name[1] || '4' == name[1]) return 0;
720  if ('E' == name[1] || '1' == name[1]) return 1;
721  if ('M' == name[1] || '2' == name[1]) return 2;
722  if ('O' == name[1] || '3' == name[1]) return 3;
723  }
724  if (name == "CSS" || name == "CSL") return 0;
725  ATH_MSG_ERROR(" MuonId::stationRegion / id = " << show_to_string(id) << " stationnamestring = " << name);
726  return -1;
727 }
728 
729 /*******************************************************************************/
731 /*******************************************************************************/
734  return (IdContext(id, 0, m_TECHNOLOGY_INDEX));
735 }
736 /*******************************************************************************/
739  return (IdContext(id, 0, m_MODULE_INDEX));
740 }
741 /*******************************************************************************/
744  return (IdContext(id, 0, m_DETECTORELEMENT_INDEX));
745 }
746 /*******************************************************************************/
749  return (IdContext(id, 0, m_CHANNEL_INDEX));
750 }
751 /*******************************************************************************/
753 /*******************************************************************************/
755 /*******************************************************************************/
757 /*******************************************************************************/
758 const std::vector<Identifier>& MuonIdHelper::idVector() const { return m_module_vec; }
759 /*******************************************************************************/
761 /*******************************************************************************/
763 /*******************************************************************************/
765 /*******************************************************************************/
767 
769 /*******************************************************************************/
771 /*******************************************************************************/
772 // Check common station fields
775 bool MuonIdHelper::validTechnology(int technology) const {
777 }
778 
779 /*******************************************************************************/
782 }
783 /*******************************************************************************/
784 // Check if ID for muon system
785 bool MuonIdHelper::is_muon(const Identifier& id) const { return AtlasDetectorID::is_muon(id); }
786 /*******************************************************************************/
787 // Check if ID for MDT
788 bool MuonIdHelper::is_mdt(const Identifier& id) const { return AtlasDetectorID::is_mdt(id); }
789 /*******************************************************************************/
790 // Check if ID for CSC
791 bool MuonIdHelper::is_csc(const Identifier& id) const { return AtlasDetectorID::is_csc(id); }
792 /*******************************************************************************/
793 // Check if ID for RPC
794 bool MuonIdHelper::is_rpc(const Identifier& id) const { return AtlasDetectorID::is_rpc(id); }
795 /*******************************************************************************/
796 // Check if ID for TGC
797 bool MuonIdHelper::is_tgc(const Identifier& id) const { return AtlasDetectorID::is_tgc(id); }
798 /*******************************************************************************/
799 // Check if ID for sTGC
800 bool MuonIdHelper::is_stgc(const Identifier& id) const { return AtlasDetectorID::is_stgc(id); }
801 /*******************************************************************************/
802 // Check if ID for MicroMegas
803 bool MuonIdHelper::is_mm(const Identifier& id) const { return AtlasDetectorID::is_mm(id); }
804 /*******************************************************************************/
805 // Access to components of the ID
806 int MuonIdHelper::stationName(const Identifier& id) const {
807  int result = m_sta_impl.unpack(id);
808  return result;
809 }
810 /*******************************************************************************/
811 int MuonIdHelper::stationEta(const Identifier& id) const {
812  int result = m_eta_impl.unpack(id);
813  return result;
814 }
815 /*******************************************************************************/
816 int MuonIdHelper::stationPhi(const Identifier& id) const {
817  int result = m_phi_impl.unpack(id);
818  return result;
819 }
820 /*******************************************************************************/
821 int MuonIdHelper::technology(const Identifier& id) const {
822  int result = m_tec_impl.unpack(id);
823  return result;
824 }
825 /*******************************************************************************/
827 /*******************************************************************************/
829 /*******************************************************************************/
830 // Methods used by Moore
831 bool MuonIdHelper::isBarrel(const Identifier& id) const { return isBarrel(stationName(id)); }
832 /*******************************************************************************/
833 bool MuonIdHelper::isEndcap(const Identifier& id) const { return isEndcap(stationName(id)); }
834 /*******************************************************************************/
835 bool MuonIdHelper::isForward(const Identifier& id) const { return isForward(stationName(id)); }
836 /*******************************************************************************/
837 bool MuonIdHelper::isSmall(const Identifier& id) const { return isSmall(stationName(id)); }
838 /*******************************************************************************/
839 bool MuonIdHelper::isBarrel(const int& stationNameIndex) const { return (m_isBarrel.count(stationNameIndex) == 1); }
840 /*******************************************************************************/
841 bool MuonIdHelper::isEndcap(const int& stationNameIndex) const { return (m_isBarrel.count(stationNameIndex) == 0); }
842 /*******************************************************************************/
843 bool MuonIdHelper::isForward(const int& stationNameIndex) const { return (m_isForward.count(stationNameIndex) == 1); }
844 /*******************************************************************************/
845 bool MuonIdHelper::isSmall(const int& stationNameIndex) const { return (m_isSmall.count(stationNameIndex) == 1); }
846 /*******************************************************************************/
847 // Access to name and technology maps
848 int MuonIdHelper::stationNameIndex(const std::string& name) const {
849  std::map<std::string, int>::const_iterator itr = m_stationNameToIdxMap.find(name);
850  if (itr != m_stationNameToIdxMap.end()) return itr->second;
851  return -1;
852 }
853 /*******************************************************************************/
854 int MuonIdHelper::technologyIndex(const std::string& name) const {
855  std::map<std::string, int>::const_iterator itr = m_technologyNameToIdxMap.find(name);
856  if (itr != m_technologyNameToIdxMap.end()) return itr->second;
857  return -1;
858 }
859 /*******************************************************************************/
860 const std::string& MuonIdHelper::stationNameString(const int& index) const {
861  assert(index >= 0 && index <= stationNameIndexMax());
862  std::map<int, std::string>::const_iterator itr = m_stationIdxToNameMap.find(index);
863  if (itr != m_stationIdxToNameMap.end()) return itr->second;
864  return BAD_NAME;
865 }
866 /*******************************************************************************/
867 const std::string& MuonIdHelper::technologyString(const int& index) const {
868  assert(index >= 0 && index <= technologyNameIndexMax());
869  std::map<int, std::string>::const_iterator itr = m_technologyIdxToNameMap.find(index);
870  if (itr != m_technologyIdxToNameMap.end()) return itr->second;
871  return BAD_NAME;
872 }
873 /*******************************************************************************/
874 int MuonIdHelper::nStationNames() const { return (int)m_isSmall.size(); }
875 /*******************************************************************************/
876 bool MuonIdHelper::isInitialized() const { return m_init; }
877 /*******************************************************************************/
MuonIdHelper::is_muon
bool is_muon(const Identifier &id) const
Definition: MuonIdHelper.cxx:785
IdDictDictionary::find_region
IdDictRegion * find_region(const std::string &region_name) const
Definition: IdDictDictionary.cxx:92
MuonIdHelper::get_prev_in_phi
int get_prev_in_phi(const IdentifierHash &id, IdentifierHash &prev) const
Access to hashes for neighbors in phi and eta (return == 0 for neighbor found)
Definition: MuonIdHelper.cxx:484
MuonIdHelper::m_next_eta_module_vec
hash_vec m_next_eta_module_vec
Definition: MuonIdHelper.h:286
MuonIdHelper::validStation
bool validStation(int stationName, int technology) const
Definition: MuonIdHelper.cxx:773
MuonIdHelper::stationNameIndex
int stationNameIndex(const std::string &name) const
Definition: MuonIdHelper.cxx:848
MuonIdHelper::detectorElement_context
IdContext detectorElement_context() const
id for detector element
Definition: MuonIdHelper.cxx:742
ConstRangeIterator
Definition: RangeIterator.h:46
MuonIdHelper.h
MuonIdHelper::m_technologyIdxToNameMap
std::map< int, std::string > m_technologyIdxToNameMap
Mapping int -> string.
Definition: MuonIdHelper.h:329
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:161
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictDictionary.cxx:291
AtlasDetectorID::is_rpc
bool is_rpc(Identifier id) const
Definition: AtlasDetectorID.h:870
MuonIdHelper::m_prev_eta_module_vec
hash_vec m_prev_eta_module_vec
Definition: MuonIdHelper.h:285
MuonIdHelper::initLevelsFromDict
int initLevelsFromDict()
Definition: MuonIdHelper.cxx:245
MuonIdHelper::test_id
void test_id(const Identifier &id, const IdContext &context) const
Definition: MuonIdHelper.cxx:683
MuonIdHelper::stationRegion
int stationRegion(const Identifier &id) const
Definition: MuonIdHelper.cxx:715
AtlasDetectorID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: AtlasDetectorID.cxx:250
MuonIdHelper::m_init
bool m_init
Definition: MuonIdHelper.h:342
get_generator_info.result
result
Definition: get_generator_info.py:21
MuonIdHelper::detectorElement_begin
const_id_iterator detectorElement_begin() const
Iterators over full set of ids.
Definition: MuonIdHelper.cxx:764
MuonIdHelper::m_isSmall
std::set< int > m_isSmall
Definition: MuonIdHelper.h:334
MuonIdHelper::is_rpc
bool is_rpc(const Identifier &id) const
Definition: MuonIdHelper.cxx:794
MuonIdHelper::get_id
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override
Create compact id from hash id (return == 0 for OK)
Definition: MuonIdHelper.cxx:70
MuonIdHelper::technologyIndex
int technologyIndex(const std::string &name) const
Definition: MuonIdHelper.cxx:854
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AtlasDetectorID::is_csc
bool is_csc(Identifier id) const
Definition: AtlasDetectorID.h:886
MuonIdHelper::m_next_phi_module_vec
hash_vec m_next_phi_module_vec
Definition: MuonIdHelper.h:284
MuonIdHelper::m_stationInTech
std::set< int > m_stationInTech
Definition: MuonIdHelper.h:254
MuonIdHelper::multiRange
const MultiRange & multiRange() const
multirange
Definition: MuonIdHelper.cxx:752
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MuonIdHelper::channel_context
IdContext channel_context() const
id for channel
Definition: MuonIdHelper.cxx:747
MuonIdHelper::is_mdt
bool is_mdt(const Identifier &id) const
Definition: MuonIdHelper.cxx:788
index
Definition: index.py:1
IdDictDictionary::region
const IdDictRegion & region(size_t i) const
Region at index i.
Definition: IdDictDictionary.h:341
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
MuonIdHelper::m_detectorElement_hash_max
size_type m_detectorElement_hash_max
Definition: MuonIdHelper.h:280
MuonIdHelper::channel_end
const_id_iterator channel_end() const
Definition: MuonIdHelper.cxx:770
MuonIdHelper::m_sta_impl
IdDictFieldImplementation m_sta_impl
Definition: MuonIdHelper.h:289
IdContext::end_index
size_type end_index() const
Definition: IdContext.h:46
MuonIdHelper::m_channel_hash_max
size_type m_channel_hash_max
Definition: MuonIdHelper.h:275
MuonIdHelper::m_technologyNameToIdxMap
std::map< std::string, int > m_technologyNameToIdxMap
Mapping string -> int.
Definition: MuonIdHelper.h:327
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:407
AtlasDetectorID::is_mm
bool is_mm(Identifier id) const
Definition: AtlasDetectorID.h:908
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
Identifier::get_compact
value_type get_compact() const
Get the compact id.
MuonIdHelper::is_csc
bool is_csc(const Identifier &id) const
Definition: MuonIdHelper.cxx:791
ExpandedIdentifier::fields
size_type fields() const
MuonIdHelper::technologyString
const std::string & technologyString(const int &index) const
Definition: MuonIdHelper.cxx:867
MuonIdHelper::module_end
const_id_iterator module_end() const
Definition: MuonIdHelper.cxx:762
MuonIdHelper::m_prev_phi_module_vec
hash_vec m_prev_phi_module_vec
Definition: MuonIdHelper.h:283
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:806
MuonIdHelper::muon
Identifier muon() const
Definition: MuonIdHelper.cxx:730
MuonIdHelper::detectorElement_end
const_id_iterator detectorElement_end() const
Definition: MuonIdHelper.cxx:766
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:872
MuonIdHelper::m_phi_impl
IdDictFieldImplementation m_phi_impl
Definition: MuonIdHelper.h:291
MuonIdHelper::isStNameInTech
virtual bool isStNameInTech(const std::string &stationName) const =0
The valid element checks converted the identifier to a stationName string in order to assess whether ...
IdDictFieldImplementation::unpack
int unpack(Identifier id) const
Identifier manipulation methods.
Definition: IdDictFieldImplementation.h:147
MuonIdHelper::m_full_channel_range
MultiRange m_full_channel_range
Definition: MuonIdHelper.h:274
MuonIdHelper::stationNameIndexMax
int stationNameIndexMax() const
Definition: MuonIdHelper.cxx:826
IdDictDictionary::pack32
int pack32(const ExpandedIdentifier &id, size_t index1, size_t index2, Identifier &packedId) const
Pack to 32bits the subset of id between (inclusive) index1 and index2 - this is generic,...
Definition: IdDictDictionary.cxx:449
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictDictionary.cxx:36
MuonIdHelper::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: MuonIdHelper.cxx:16
CalibDbCompareRT.region_id
region_id
Definition: CalibDbCompareRT.py:67
IdDictRegion
Definition: IdDictRegion.h:20
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
MuonIdHelper::is_tgc
bool is_tgc(const Identifier &id) const
Definition: MuonIdHelper.cxx:797
MuonIdHelper::isSmall
bool isSmall(const Identifier &id) const
Definition: MuonIdHelper.cxx:837
MuonIdHelper::m_stationIdxToNameMap
std::map< int, std::string > m_stationIdxToNameMap
Mapping int -> string.
Definition: MuonIdHelper.h:323
MuonIdHelper::is_stgc
bool is_stgc(const Identifier &id) const
Definition: MuonIdHelper.cxx:800
MuonIdHelper::m_technologyIndexMax
int m_technologyIndexMax
Definition: MuonIdHelper.h:330
MuonIdHelper::m_stationIndexMax
int m_stationIndexMax
Definition: MuonIdHelper.h:325
IdDictRegion::implementation
const IdDictFieldImplementation & implementation(size_t i) const
Definition: IdDictRegion.cxx:17
IdDictMgr
Definition: IdDictMgr.h:14
IdContext::begin_index
size_type begin_index() const
Definition: IdContext.h:45
MuonIdHelper::m_stationNameToIdxMap
std::map< std::string, int > m_stationNameToIdxMap
Mapping string -> int.
Definition: MuonIdHelper.h:321
IdDictMgr::find_dictionary
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:115
MuonIdHelper::m_MUON_INDEX
size_type m_MUON_INDEX
Definition: MuonIdHelper.h:257
MuonIdHelper::addStationID
void addStationID(Identifier &id, int stationName, int stationEta, int stationPhi, int technology) const
Definition: MuonIdHelper.cxx:704
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonIdHelper::m_module_vec
id_vec m_module_vec
Definition: MuonIdHelper.h:271
AtlasDetectorID::is_tgc
bool is_tgc(Identifier id) const
Definition: AtlasDetectorID.h:897
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonIdHelper::get_prev_in_eta
int get_prev_in_eta(const IdentifierHash &id, IdentifierHash &prev) const
Definition: MuonIdHelper.cxx:504
MuonIdHelper::get_module_hash
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const
Definition: MuonIdHelper.cxx:99
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
MuonIdHelper::m_full_detectorElement_range
MultiRange m_full_detectorElement_range
Definition: MuonIdHelper.h:279
MuonIdHelper::isForward
bool isForward(const Identifier &id) const
Definition: MuonIdHelper.cxx:835
IdentifierField::get_next
bool get_next(element_type current, element_type &next) const
Definition: IdentifierField.cxx:149
MuonIdHelper::id_vec_it
id_vec::const_iterator id_vec_it
Definition: MuonIdHelper.h:230
AtlasDetectorID::group
const std::string & group() const
Group name for this helper.
Definition: AtlasDetectorID.cxx:27
MuonIdHelper::get_detectorElement_hash
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const
Definition: MuonIdHelper.cxx:120
MuonIdHelper::m_full_module_range
MultiRange m_full_module_range
Definition: MuonIdHelper.h:269
MuonIdHelper::MuonIdHelper
MuonIdHelper(const std::string &logName, const std::string &group)
Definition: MuonIdHelper.cxx:10
MuonIdHelper::get_expanded_id
int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
Create expanded id from compact id (return == 0 for OK)
Definition: MuonIdHelper.cxx:160
MuonIdHelper::is_mm
bool is_mm(const Identifier &id) const
Definition: MuonIdHelper.cxx:803
MuonIdHelper::get_hash_calc
virtual int get_hash_calc(const Identifier &compact_id, IdentifierHash &hash_id, const IdContext *context) const
Definition: MuonIdHelper.cxx:221
MuonIdHelper::technologyNameIndexMax
int technologyNameIndexMax() const
Definition: MuonIdHelper.cxx:828
MuonIdHelper::m_eta_impl
IdDictFieldImplementation m_eta_impl
Definition: MuonIdHelper.h:290
MuonIdHelper::init_hashes
int init_hashes()
Definition: MuonIdHelper.cxx:352
MuonIdHelper::m_NAME_INDEX
size_type m_NAME_INDEX
Definition: MuonIdHelper.h:259
MuonIdHelper::m_muon_impl
IdDictFieldImplementation m_muon_impl
Definition: MuonIdHelper.h:288
MuonIdHelper::m_GROUP_INDEX
size_t m_GROUP_INDEX
Definition: MuonIdHelper.h:258
MuonIdHelper::nStationNames
int nStationNames() const
Definition: MuonIdHelper.cxx:874
MuonIdHelper::get_next_in_phi
int get_next_in_phi(const IdentifierHash &id, IdentifierHash &next) const
Definition: MuonIdHelper.cxx:494
AtlasDetectorID::register_dict_tag
int register_dict_tag(const IdDictMgr &dict_mgr, const std::string &dict_name)
Register the file and tag names for a particular IdDict dictionary.
Definition: AtlasDetectorID.cxx:196
Identifier::clear
void clear()
Reset to invalid state.
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:816
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictDictionary.cxx:64
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:860
IdDictDictionary::unpack
int unpack(const std::string &group, const Identifier &id, const ExpandedIdentifier &prefix, size_t index2, ExpandedIdentifier &unpackedId) const
Unpack the value_type id to an expanded Identifier for a given group, considering the provided prefix...
Definition: IdDictDictionary.cxx:669
MuonIdHelper::get_channel_hash
virtual int get_channel_hash(const Identifier &id, IdentifierHash &hash_id) const
Definition: MuonIdHelper.cxx:139
MuonIdHelper::init_neighbors
int init_neighbors()
Definition: MuonIdHelper.cxx:524
MuonIdHelper::m_MODULE_INDEX
size_type m_MODULE_INDEX
Definition: MuonIdHelper.h:263
IdContext::prefix_id
const ExpandedIdentifier & prefix_id() const
Accessors.
Definition: IdContext.h:44
MultiRange
A MultiRange combines several Ranges.
Definition: MultiRange.h:17
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
RangeIterator.h
MuonIdHelper::m_detectorElement_vec
id_vec m_detectorElement_vec
Definition: MuonIdHelper.h:281
MuonIdHelper::isBarrel
bool isBarrel(const Identifier &id) const
Definition: MuonIdHelper.cxx:831
AtlasDetectorID::muon_exp
ExpandedIdentifier muon_exp(void) const
Definition: AtlasDetectorID.h:501
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:811
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:29
MuonIdHelper::m_isBarrel
std::set< int > m_isBarrel
Definition: MuonIdHelper.h:333
MuonIdHelper::module_hash_max
size_type module_hash_max() const
the maximum hash value
Definition: MuonIdHelper.cxx:754
IdDictDictionary
Definition: IdDictDictionary.h:30
MuonIdHelper::m_ETA_INDEX
size_type m_ETA_INDEX
Definition: MuonIdHelper.h:260
MuonIdHelper::m_module_hash_max
size_type m_module_hash_max
Definition: MuonIdHelper.h:270
MuonIdHelper::isEndcap
bool isEndcap(const Identifier &id) const
Definition: MuonIdHelper.cxx:833
MuonIdHelper::init_detectorElement_hashes
virtual int init_detectorElement_hashes()
Definition: MuonIdHelper.cxx:398
MuonIdHelper::m_station_region_index
size_type m_station_region_index
Definition: MuonIdHelper.h:256
DeMoScan.index
string index
Definition: DeMoScan.py:362
AtlasDetectorID::reinitialize
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
Definition: AtlasDetectorID.cxx:216
MuonIdHelper::m_TECHNOLOGY_INDEX
size_type m_TECHNOLOGY_INDEX
Definition: MuonIdHelper.h:262
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
AtlasDetectorID::is_muon
bool is_muon(Identifier id) const
Definition: AtlasDetectorID.h:696
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:360
MuonIdHelper::test_module_packing
void test_module_packing() const
Tests of packing.
Definition: MuonIdHelper.cxx:652
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonIdHelper::get_hash
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const override
Create hash id from compact id (return == 0 for OK)
Definition: MuonIdHelper.cxx:144
MuonIdHelper::technology
int technology(const Identifier &id) const
Definition: MuonIdHelper.cxx:821
MultiRange::size
size_type size() const
Definition: MultiRange.cxx:70
AtlasDetectorID::muon
Identifier muon(void) const
Definition: AtlasDetectorID.cxx:71
DeMoScan.first
bool first
Definition: DeMoScan.py:534
MuonIdHelper::size_type
Identifier::size_type size_type
Definition: MuonIdHelper.h:141
MuonIdHelper::get_expanded_id_calc
int get_expanded_id_calc(const Identifier &compact_id, ExpandedIdentifier &id, const IdContext *context) const
Definition: MuonIdHelper.cxx:177
MuonIdHelper::channel_begin
const_id_iterator channel_begin() const
Iterators over full set of ids.
Definition: MuonIdHelper.cxx:768
MuonIdHelper::module_context
IdContext module_context() const
id for module
Definition: MuonIdHelper.cxx:737
IdentifierField
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
Definition: IdentifierField.h:83
MuonIdHelper::m_DETECTORELEMENT_INDEX
size_type m_DETECTORELEMENT_INDEX
Definition: MuonIdHelper.h:264
IdentifierField::get_previous
bool get_previous(element_type current, element_type &previous) const
Returns false if previous/next is at end of range, or not possible.
Definition: IdentifierField.cxx:106
MuonIdHelper::const_id_iterator
std::vector< Identifier >::const_iterator const_id_iterator
Definition: MuonIdHelper.h:143
MuonIdHelper::m_tec_impl
IdDictFieldImplementation m_tec_impl
Definition: MuonIdHelper.h:292
Identifier::value_type
unsigned long long value_type
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:27
MuonIdHelper::get_next_in_eta
int get_next_in_eta(const IdentifierHash &id, IdentifierHash &next) const
Definition: MuonIdHelper.cxx:514
AtlasDetectorID::is_stgc
bool is_stgc(Identifier id) const
Definition: AtlasDetectorID.h:919
MuonIdHelper::m_channel_vec
id_vec m_channel_vec
Definition: MuonIdHelper.h:276
MuonIdHelper::init_channel_hashes
int init_channel_hashes()
Definition: MuonIdHelper.cxx:444
MuonIdHelper::idVector
const std::vector< Identifier > & idVector() const
the id's
Definition: MuonIdHelper.cxx:758
MuonIdHelper::NOT_VALID_HASH
static constexpr int NOT_VALID_HASH
Definition: MuonIdHelper.h:227
CaloCondBlobAlgs_fillNoiseFromASCII.fields
fields
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:105
IdDictField
Definition: IdDictField.h:15
MultiRange::cardinality
size_type cardinality() const
Computes a possible cardinality from all ranges.
Definition: MultiRange.cxx:82
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:159
MuonIdHelper::module_begin
const_id_iterator module_begin() const
Iterators over full set of ids.
Definition: MuonIdHelper.cxx:760
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
ExpandedIdentifier::element_type
int element_type
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:106
MuonIdHelper::m_isForward
std::set< int > m_isForward
Definition: MuonIdHelper.h:335
MuonIdHelper::get_compact_id
int get_compact_id(const ExpandedIdentifier &id, Identifier &compact_id, const IdContext *context) const
Definition: MuonIdHelper.cxx:204
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
MuonIdHelper::m_PHI_INDEX
size_type m_PHI_INDEX
Definition: MuonIdHelper.h:261
MuonIdHelper::validTechnology
bool validTechnology(int technology) const
Definition: MuonIdHelper.cxx:775
MuonIdHelper::technology_context
IdContext technology_context() const
access to IdContext's which define which levels or fields are contained in the Muon id
Definition: MuonIdHelper.cxx:732
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:52
MuonIdHelper::isInitialized
bool isInitialized() const
Definition: MuonIdHelper.cxx:876
AtlasDetectorID::is_mdt
bool is_mdt(Identifier id) const
Definition: AtlasDetectorID.h:854
MuonIdHelper::m_CHANNEL_INDEX
size_type m_CHANNEL_INDEX
Definition: MuonIdHelper.h:265
MuonIdHelper::BAD_NAME
static const std::string BAD_NAME
Definition: MuonIdHelper.h:224
MuonIdHelper::channel_hash_max
size_type channel_hash_max() const
Definition: MuonIdHelper.cxx:756
Identifier
Definition: IdentifierFieldParser.cxx:14
MuonIdHelper::m_dict
const IdDictDictionary * m_dict
Definition: MuonIdHelper.h:266