ATLAS Offline Software
MuonIdHelper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
9 
10 const std::string MuonIdHelper::BAD_NAME = "UNKNOWN";
11 
12 MuonIdHelper::MuonIdHelper(const std::string& logName) :
13  AtlasDetectorID(logName.empty() ? "MuonIdHelper" : logName) {
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 
186  if (0 == end) {
187  result = 0;
188  } else if (0 == begin) {
190  result = m_dict->unpack(compact_id, empty, end, id);
191  } else {
192  // Non-zero prefix - we assume that the prefix contains
193  // the IdDet level
194  result = m_dict->unpack(compact_id, context->prefix_id(), end, id);
195  }
196  }
197  return result;
198 }
199 
200 int MuonIdHelper::get_compact_id(const ExpandedIdentifier& id, Identifier& compact_id, const IdContext* context) const {
201  // Get compact for all fields provided
202  int result = 1;
203  compact_id = (Identifier::value_type)0;
204  int exp_id[10];
205 
206  for (size_t i = 0; i < id.fields(); i++) exp_id[i] = id[i];
207 
208  if (m_dict && id.fields() > 0) {
209  size_t begin = (context) ? context->begin_index() : 0;
210  size_t end = (context) ? context->end_index() : id.fields() - 1;
211  result = m_dict->pack32(exp_id, begin, end, m_GROUP_INDEX, compact_id);
212  // result = m_dict->pack32(id, begin, end, compact_id);
213  }
214  return (result);
215 }
216 
217 int MuonIdHelper::get_hash_calc(const Identifier& compact_id, IdentifierHash& hash_id, const IdContext* context) const {
218  // Get the hash code from vec (for wafers only).
219  hash_id = UINT_MAX;
220  size_t begin = (context) ? context->begin_index() : 0;
221  size_t end = (context) ? context->end_index() : 0;
222 
223  if (0 == begin) {
224  // No hashes yet for ids with prefixes
225  if (m_MODULE_INDEX == end) {
226  return get_module_hash(compact_id, hash_id);
227  } else if (m_DETECTORELEMENT_INDEX == end) {
228  return get_detectorElement_hash(compact_id, hash_id);
229  } else if (m_CHANNEL_INDEX == end) {
230  id_vec_it it = std::lower_bound(m_channel_vec.begin(), m_channel_vec.end(), compact_id);
231  if ((it != m_channel_vec.end()) && (*it == compact_id)) {
232  hash_id = it - m_channel_vec.begin();
233  return 0;
234  }
235  }
236  }
237  ATH_MSG_WARNING("MuonIdHelper::get_hash_calc(): Could not determine hash for identifier " << compact_id.get_compact());
238  return 1;
239 }
240 
242  if (!m_dict) {
243  ATH_MSG_ERROR(" initLevelsFromDict - dictionary NOT initialized ");
244  return 1;
245  }
246 
247  // Find out which identifier field corresponds to each level. Use
248  // names to find each field/leve.
249 
250  m_MUON_INDEX = 999;
251  m_NAME_INDEX = 999;
252  m_ETA_INDEX = 999;
253  m_PHI_INDEX = 999;
254  m_CHANNEL_INDEX = 999;
255 
256  // Save index to stations for unpacking
259  ATH_MSG_ERROR("initLevelsFromDict - unable to find a muon station index: id, reg"
260  << " " << std::string(id) << " " << m_station_region_index);
261 
262  return 1;
263  }
264 
265  // Find a Muon region
266  IdDictField* field = m_dict->find_field("subdet");
267  if (field) {
268  m_MUON_INDEX = field->m_index;
269  } else {
270  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'subdet' field ");
271  return 1;
272  }
273  field = m_dict->find_field("stationName");
274  if (field) {
275  m_NAME_INDEX = field->m_index;
276 
277  if (m_stationIdxToNameMap.empty()) {
278  // we only need to fill the vectors and sets once
279  for (size_t i = 0; i < field->get_label_number(); i++) {
280  std::string name = field->get_label(i);
281  int index = (int)field->get_label_value(name);
286  // all chambers starting with B are in the barrel except the BEE chambers
287  if ('B' == name[0]) {
288  if (name[1] != 'E')
289  m_isBarrel.insert(index);
290  else
291  m_isSmall.insert(index); // BEE is in the small sector
292  if ('G' == name[2] || 'F' == name[2]) { m_isSmall.insert(index); }
293  } else if ('F' == name[2]) {
294  m_isForward.insert(index);
295  }
296  if ('S' == name[2]) { m_isSmall.insert(index); }
297  }
298  }
299 
300  } else {
301  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'stationName' field ");
302  return 1;
303  }
304  field = m_dict->find_field("stationEta");
305  if (field) {
306  m_ETA_INDEX = field->m_index;
307  } else {
308  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'stationEta' field ");
309  return 1;
310  }
311  field = m_dict->find_field("stationPhi");
312  if (field) {
313  m_PHI_INDEX = field->m_index;
314  } else {
315  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'stationPhi' field ");
316  return 1;
317  }
318  field = m_dict->find_field("technology");
319  if (field) {
320  m_TECHNOLOGY_INDEX = field->m_index;
321 
322  if (m_technologyNameToIdxMap.empty()) {
323  for (size_t i = 0; i < field->get_label_number(); ++i) {
324  std::string name = field->get_label(i);
325  int index = (int)field->get_label_value(name);
329  }
330  }
331 
332  } else {
333  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'technology' field ");
334  return 1;
335  }
337 
338  // Set the field implementations down to the technology
342 
343  // m_stationNameField = m_dict->find_field ("stationName"); // Philipp
344  // m_technologyField = m_dict->find_field ("technology"); // Philipp
345  return 0;
346 }
347 
349  //
350  // create a vector(s) to retrieve the hashes for compact ids. For
351  // the moment, we implement a hash for modules
352  //
353 
354  // module hash
356  ATH_MSG_INFO("The element hash max is " << m_module_hash_max);
358  IdContext context = module_context();
359  unsigned int nids = 0;
360  std::set<Identifier> ids;
361  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
362  const Range& range = m_full_module_range[i];
364  for (const auto & expId:rit) {
365  Identifier id;
366  get_id(expId, id);
367  if (!(ids.insert(id)).second) {
368  ATH_MSG_ERROR("init_hashes "
369  << " Error: duplicated id for module id. nid " << (int)nids << " compact id " << id << " id ");
370  return 1;
371  }
372  nids++;
373  }
374  }
375  if (ids.size() != m_module_hash_max) {
376  ATH_MSG_ERROR("init_hashes "
377  << " Error: set size NOT EQUAL to element hash max. size " << ids.size() << " hash max " << m_module_hash_max);
378 
379  return 1;
380  }
381 
382  nids = 0;
383  std::set<Identifier>::const_iterator first = ids.begin();
384  std::set<Identifier>::const_iterator last = ids.end();
385  for (; first != last && nids < m_module_vec.size(); ++first) {
386  m_module_vec[nids] = (*first);
387  nids++;
388  }
389  // sort the vector of identifiers to be able to use std::lower_bound to find hashes
390  std::sort(m_module_vec.begin(), m_module_vec.end());
391  return 0;
392 }
393 
395  //
396  // create a vector(s) to retrieve the hashes for compact ids. For
397  // the moment, we implement a hash for readout channels
398  //
399 
400  // detector element hash
402  ATH_MSG_INFO("The detector element hash max is " << m_detectorElement_hash_max);
405  unsigned int nids = 0;
406  std::set<Identifier> ids;
407  for (unsigned int i = 0; i < m_full_detectorElement_range.size(); ++i) {
410  for (const auto & expId:rit) {
411  Identifier id;
412  get_id(expId, id);
413  if (!(ids.insert(id)).second) {
414  ATH_MSG_ERROR("init_detectorElement_hashes "
415  << " Error: duplicated id for channel id. nid " << nids << " compact id " << id << " id ");
416 
417  return 1;
418  }
419  nids++;
420  }
421  }
422  if (ids.size() != m_detectorElement_hash_max) {
423  ATH_MSG_ERROR("init_hashes "
424  << " Error: set size NOT EQUAL to hash max. size " << ids.size() << " hash max " << m_detectorElement_hash_max);
425  return 1;
426  }
427 
428  nids = 0;
429  std::set<Identifier>::const_iterator first = ids.begin();
430  std::set<Identifier>::const_iterator last = ids.end();
431  for (; first != last && nids < m_detectorElement_vec.size(); ++first) {
432  m_detectorElement_vec[nids] = (*first);
433  nids++;
434  }
435  // sort the vector of identifiers to be able to use std::lower_bound to find hashes
436  std::sort(m_detectorElement_vec.begin(), m_detectorElement_vec.end());
437  return 0;
438 }
439 
441  //
442  // create a vector(s) to retrieve the hashes for compact ids. For
443  // the moment, we implement a hash for readout channels
444  //
445 
446  // readout channel hash
448  ATH_MSG_INFO("The channel hash max is " << m_channel_hash_max);
450  IdContext context = channel_context();
451  unsigned int nids = 0;
452  std::set<Identifier> ids;
453  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
454  const Range& range = m_full_channel_range[i];
456  for (const auto & expId:rit) {
457  Identifier id;
458  get_id(expId, id);
459 
460  if (!(ids.insert(id)).second) {
461  ATH_MSG_ERROR("init_channel_hashes "
462  << " Error: duplicated id for channel id. nid " << nids << " compact id " << id << " id ");
463  return 1;
464  }
465  m_channel_vec[nids] = id;
466  nids++;
467  }
468  }
469  if (ids.size() != m_channel_hash_max) {
470  ATH_MSG_ERROR("init_hashes "
471  << " Error: set size NOT EQUAL to hash max. size " << ids.size() << " hash max " << m_channel_hash_max);
472 
473  return 1;
474  }
475  // sort the vector of identifiers to be able to use std::lower_bound to find hashes
476  std::sort(m_channel_vec.begin(), m_channel_vec.end());
477  return 0;
478 }
479 
481  unsigned short index = id;
482  if (index < m_prev_phi_module_vec.size()) {
483  if (m_prev_phi_module_vec[index] == NOT_VALID_HASH) return 1;
485  return 0;
486  }
487  return 1;
488 }
489 
491  unsigned short index = id;
492  if (index < m_next_phi_module_vec.size()) {
493  if (m_next_phi_module_vec[index] == NOT_VALID_HASH) return 1;
495  return 0;
496  }
497  return 1;
498 }
499 
501  unsigned short index = id;
502  if (index < m_prev_eta_module_vec.size()) {
503  if (m_prev_eta_module_vec[index] == NOT_VALID_HASH) return 1;
505  return 0;
506  }
507  return 1;
508 }
509 
511  unsigned short index = id;
512  if (index < m_next_eta_module_vec.size()) {
513  if (m_next_eta_module_vec[index] == NOT_VALID_HASH) return 1;
515  return 0;
516  }
517  return 1;
518 }
519 
521  //
522  // create a vector(s) to retrieve the hashes for compact ids for
523  // module neighbors.
524  //
525 
526  ATH_MSG_VERBOSE("MuonIdHelper::init_neighbors ");
531 
532  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
533  const Range& range = m_full_module_range[i];
534  const Range::field& phi_field = range[m_PHI_INDEX];
535  const Range::field& eta_field = range[m_ETA_INDEX];
537  for (const auto & id: rit) {
542  bool pphi = phi_field.get_previous(id[m_PHI_INDEX], previous_phi);
543  bool nphi = phi_field.get_next(id[m_PHI_INDEX], next_phi);
544  bool peta = eta_field.get_previous(id[m_ETA_INDEX], previous_eta);
545  bool neta = eta_field.get_next(id[m_ETA_INDEX], next_eta);
546 
547  Identifier compact_id;
548  IdContext wcontext = module_context();
549 
550  // First get primary hash id
551  IdentifierHash hash_id;
552  if (!get_compact_id(id, compact_id, &wcontext)) {
553  // forward to compact -> hash
554  if (get_hash(compact_id, hash_id, &wcontext)) {
555  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get hash, exp/compact "
556  << " " << std::hex << compact_id << std::dec << endmsg);
557  return 1;
558  }
559  } else {
560  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get compact, exp/compact ");
561  return 1;
562  }
563 
564  // index for the subsequent arrays
565  unsigned short index = hash_id;
566  assert(hash_id < m_prev_phi_module_vec.size());
567  assert(hash_id < m_next_phi_module_vec.size());
568  assert(hash_id < m_prev_eta_module_vec.size());
569  assert(hash_id < m_next_eta_module_vec.size());
570 
571  if (pphi) {
572  // Get previous phi hash id
573  ExpandedIdentifier expId = id;
574  expId[m_PHI_INDEX] = previous_phi;
575  if (!get_compact_id(expId, compact_id, &wcontext)) {
576  // forward to compact -> hash
577  if (get_hash(compact_id, hash_id, &wcontext)) {
578  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get previous phi hash, exp/compact "
579  << " " << std::hex << compact_id << std::dec);
580  return 1;
581  }
582  } else {
583  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get previous phi compact, exp/compact ");
584  return 1;
585  }
586  m_prev_phi_module_vec[index] = hash_id;
587  }
588 
589  if (nphi) {
590  // Get next phi hash id
591  ExpandedIdentifier expId = id;
592  expId[m_PHI_INDEX] = next_phi;
593  if (!get_compact_id(expId, compact_id, &wcontext)) {
594  // forward to compact -> hash
595  if (get_hash(compact_id, hash_id, &wcontext)) {
596  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get next phi hash, exp/compact "
597  << " " << std::hex << compact_id << std::dec);
598  return 1;
599  }
600  } else {
601  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get next phi compact, exp/compact ");
602  return 1;
603  }
604  m_next_phi_module_vec[index] = hash_id;
605  }
606 
607  if (peta) {
608  // Get previous eta hash id
609  ExpandedIdentifier expId = id;
610  expId[m_ETA_INDEX] = previous_eta;
611  if (!get_compact_id(expId, compact_id, &wcontext)) {
612  // forward to compact -> hash
613  if (get_hash(compact_id, hash_id, &wcontext)) {
614  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get previous eta hash, exp/compact "
615  << " " << std::hex << compact_id << std::dec);
616  return 1;
617  }
618  } else {
619  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get previous eta compact, exp/compact ");
620  return 1;
621  }
622  m_prev_eta_module_vec[index] = hash_id;
623  }
624 
625  if (neta) {
626  // Get next eta hash id
627  ExpandedIdentifier expId = id;
628  expId[m_ETA_INDEX] = next_eta;
629  if (!get_compact_id(expId, compact_id, &wcontext)) {
630  // forward to compact -> hash
631  if (get_hash(compact_id, hash_id, &wcontext)) {
632  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get next eta hash, exp/compact "
633  << " " << std::hex << compact_id << std::dec);
634  return 1;
635  }
636  } else {
637  ATH_MSG_ERROR(" MuonIdHelper::init_neighbors - unable to get next eta compact, exp/compact ");
638  return 1;
639  }
640  m_next_eta_module_vec[index] = hash_id;
641  }
642  }
643  }
644  ATH_MSG_VERBOSE("Finish init_neighors() ...");
645  return 0;
646 }
647 
649  if (m_dict) {
650  int nids = 0;
651  IdContext context = module_context();
653  const_id_iterator last = m_module_vec.end();
654  for (; first != last; ++first, ++nids) {
655  Identifier compact = (*first);
657  if (get_expanded_id(compact, id, &context)) {
658  ATH_MSG_ERROR("test_module_packing: Unable to get expanded id. Compact id " << compact);
659  continue;
660  }
661  Identifier new_compact;
662  if (get_compact_id(id, new_compact, &context)) {
663  ATH_MSG_ERROR("test_module_packing: Unable to get compact id. Expanded id " << std::string(id));
664  continue;
665  }
666  if (compact != new_compact) {
667  ATH_MSG_ERROR("test_module_packing: new and old compacts not equal "
668  << "New/old/expanded ids " << new_compact << " " << compact << " " << std::string(id));
669  continue;
670  }
671  }
672 
673  ATH_MSG_INFO("test_module_packing: Successful tested " << nids << " ids. ");
674  } else {
675  ATH_MSG_ERROR("Unable to test module is packing - no dictionary has been defined. ");
676  }
677 }
678 
679 void MuonIdHelper::test_id(const Identifier& id, const IdContext& context) const {
680  Identifier compact = id;
681  ExpandedIdentifier new_id;
682  if (get_expanded_id(compact, new_id, &context)) {
683  ATH_MSG_ERROR("Unable to get expanded id. Compact id " << compact);
684  return;
685  }
686  Identifier new_compact;
687  if (get_compact_id(new_id, new_compact, &context)) {
688  ATH_MSG_ERROR("Unable to get compact id. Expanded id " << show_to_string(id));
689  return;
690  }
691  if (compact != new_compact) {
692  ATH_MSG_ERROR("new and old compacts not equal. New/old/expanded ids " << new_compact << " " << compact << " "
693  << show_to_string(id));
694  return;
695  }
696 }
697 
698 // Prepend the station ID
699 
700 void MuonIdHelper::addStationID(Identifier& id, int stationName, int stationEta, int stationPhi, int technology) const {
701  ExpandedIdentifier exp_id;
702  IdContext muon_context(exp_id, 0, m_MUON_INDEX);
703  if (get_expanded_id(id, exp_id, &muon_context)) {
704  ATH_MSG_ERROR(" MUON_ID result is NOT ok. MUON id " << show_to_string(id) << " Fields not appended ");
705  } else {
706  exp_id << stationName << stationEta << stationPhi << technology;
707  get_id(exp_id, id); // Fill output
708  }
709 }
710 
712  std::string name = stationNameString(stationName(id));
713 
714  if ('I' == name[1] || '4' == name[1]) return 0;
715  if ('E' == name[1] || '1' == name[1]) return 1;
716  if ('M' == name[1] || '2' == name[1]) return 2;
717  if ('O' == name[1] || '3' == name[1]) return 3;
718  if (name == "CSS" || name == "CSL") return 0;
719  ATH_MSG_ERROR(" MuonId::stationRegion / id = " << show_to_string(id) << " stationnamestring = " << name);
720  return -1;
721 }
722 
723 /*******************************************************************************/
725 /*******************************************************************************/
728  return (IdContext(id, 0, m_TECHNOLOGY_INDEX));
729 }
730 /*******************************************************************************/
733  return (IdContext(id, 0, m_MODULE_INDEX));
734 }
735 /*******************************************************************************/
738  return (IdContext(id, 0, m_DETECTORELEMENT_INDEX));
739 }
740 /*******************************************************************************/
743  return (IdContext(id, 0, m_CHANNEL_INDEX));
744 }
745 /*******************************************************************************/
747 /*******************************************************************************/
749 /*******************************************************************************/
751 /*******************************************************************************/
752 const std::vector<Identifier>& MuonIdHelper::idVector(void) const { return m_module_vec; }
753 /*******************************************************************************/
755 /*******************************************************************************/
757 /*******************************************************************************/
759 /*******************************************************************************/
761 
763 /*******************************************************************************/
765 /*******************************************************************************/
766 // Check common station fields
769 bool MuonIdHelper::validTechnology(int technology) const {
771 }
772 
773 /*******************************************************************************/
776 }
777 /*******************************************************************************/
778 // Check if ID for muon system
779 bool MuonIdHelper::is_muon(const Identifier& id) const { return AtlasDetectorID::is_muon(id); }
780 /*******************************************************************************/
781 // Check if ID for MDT
782 bool MuonIdHelper::is_mdt(const Identifier& id) const { return AtlasDetectorID::is_mdt(id); }
783 /*******************************************************************************/
784 // Check if ID for CSC
785 bool MuonIdHelper::is_csc(const Identifier& id) const { return AtlasDetectorID::is_csc(id); }
786 /*******************************************************************************/
787 // Check if ID for RPC
788 bool MuonIdHelper::is_rpc(const Identifier& id) const { return AtlasDetectorID::is_rpc(id); }
789 /*******************************************************************************/
790 // Check if ID for TGC
791 bool MuonIdHelper::is_tgc(const Identifier& id) const { return AtlasDetectorID::is_tgc(id); }
792 /*******************************************************************************/
793 // Check if ID for sTGC
794 bool MuonIdHelper::is_stgc(const Identifier& id) const { return AtlasDetectorID::is_stgc(id); }
795 /*******************************************************************************/
796 // Check if ID for MicroMegas
797 bool MuonIdHelper::is_mm(const Identifier& id) const { return AtlasDetectorID::is_mm(id); }
798 /*******************************************************************************/
799 // Access to components of the ID
800 int MuonIdHelper::stationName(const Identifier& id) const {
801  int result = m_sta_impl.unpack(id);
802  return result;
803 }
804 /*******************************************************************************/
805 int MuonIdHelper::stationEta(const Identifier& id) const {
806  int result = m_eta_impl.unpack(id);
807  return result;
808 }
809 /*******************************************************************************/
810 int MuonIdHelper::stationPhi(const Identifier& id) const {
811  int result = m_phi_impl.unpack(id);
812  return result;
813 }
814 /*******************************************************************************/
815 int MuonIdHelper::technology(const Identifier& id) const {
816  int result = m_tec_impl.unpack(id);
817  return result;
818 }
819 /*******************************************************************************/
821 /*******************************************************************************/
823 /*******************************************************************************/
824 // Methods used by Moore
825 bool MuonIdHelper::isBarrel(const Identifier& id) const { return isBarrel(stationName(id)); }
826 /*******************************************************************************/
827 bool MuonIdHelper::isEndcap(const Identifier& id) const { return isEndcap(stationName(id)); }
828 /*******************************************************************************/
829 bool MuonIdHelper::isForward(const Identifier& id) const { return isForward(stationName(id)); }
830 /*******************************************************************************/
831 bool MuonIdHelper::isSmall(const Identifier& id) const { return isSmall(stationName(id)); }
832 /*******************************************************************************/
833 bool MuonIdHelper::isBarrel(const int& stationNameIndex) const { return (m_isBarrel.count(stationNameIndex) == 1); }
834 /*******************************************************************************/
835 bool MuonIdHelper::isEndcap(const int& stationNameIndex) const { return (m_isBarrel.count(stationNameIndex) == 0); }
836 /*******************************************************************************/
837 bool MuonIdHelper::isForward(const int& stationNameIndex) const { return (m_isForward.count(stationNameIndex) == 1); }
838 /*******************************************************************************/
839 bool MuonIdHelper::isSmall(const int& stationNameIndex) const { return (m_isSmall.count(stationNameIndex) == 1); }
840 /*******************************************************************************/
841 // Access to name and technology maps
842 int MuonIdHelper::stationNameIndex(const std::string& name) const {
843  std::map<std::string, int>::const_iterator itr = m_stationNameToIdxMap.find(name);
844  if (itr != m_stationNameToIdxMap.end()) return itr->second;
845  return -1;
846 }
847 /*******************************************************************************/
848 int MuonIdHelper::technologyIndex(const std::string& name) const {
849  std::map<std::string, int>::const_iterator itr = m_technologyNameToIdxMap.find(name);
850  if (itr != m_technologyNameToIdxMap.end()) return itr->second;
851  return -1;
852 }
853 /*******************************************************************************/
854 const std::string& MuonIdHelper::stationNameString(const int& index) const {
855  assert(index >= 0 && index <= stationNameIndexMax());
856  std::map<int, std::string>::const_iterator itr = m_stationIdxToNameMap.find(index);
857  if (itr != m_stationIdxToNameMap.end()) return itr->second;
858  return BAD_NAME;
859 }
860 /*******************************************************************************/
861 const std::string& MuonIdHelper::technologyString(const int& index) const {
862  assert(index >= 0 && index <= technologyNameIndexMax());
863  std::map<int, std::string>::const_iterator itr = m_technologyIdxToNameMap.find(index);
864  if (itr != m_technologyIdxToNameMap.end()) return itr->second;
865  return BAD_NAME;
866 }
867 /*******************************************************************************/
868 int MuonIdHelper::nStationNames() const { return (int)m_isSmall.size(); }
869 /*******************************************************************************/
870 bool MuonIdHelper::isInitialized() const { return m_init; }
871 /*******************************************************************************/
MuonIdHelper::is_muon
bool is_muon(const Identifier &id) const
Definition: MuonIdHelper.cxx:779
IdDictDictionary::find_region
IdDictRegion * find_region(const std::string &region_name) const
Definition: IdDictDictionary.cxx:101
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:480
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:767
MuonIdHelper::stationNameIndex
int stationNameIndex(const std::string &name) const
Definition: MuonIdHelper.cxx:842
MuonIdHelper::detectorElement_context
IdContext detectorElement_context() const
id for detector element
Definition: MuonIdHelper.cxx:736
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:299
AtlasDetectorID::is_rpc
bool is_rpc(Identifier id) const
Definition: AtlasDetectorID.h:875
MuonIdHelper::m_prev_eta_module_vec
hash_vec m_prev_eta_module_vec
Definition: MuonIdHelper.h:285
MuonIdHelper::initLevelsFromDict
int initLevelsFromDict()
Definition: MuonIdHelper.cxx:241
MuonIdHelper::test_id
void test_id(const Identifier &id, const IdContext &context) const
Definition: MuonIdHelper.cxx:679
MuonIdHelper::stationRegion
int stationRegion(const Identifier &id) const
Definition: MuonIdHelper.cxx:711
IdDictDictionary::unpack
int unpack(const Identifier &id, const ExpandedIdentifier &prefix, size_t index2, ExpandedIdentifier &unpackedId) const
Unpack the value_type id to an expanded Identifier, considering the provided prefix (result will incl...
Definition: IdDictDictionary.cxx:683
AtlasDetectorID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: AtlasDetectorID.cxx:320
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:758
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:788
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:848
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AtlasDetectorID::is_csc
bool is_csc(Identifier id) const
Definition: AtlasDetectorID.h:891
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
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:746
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MuonIdHelper::channel_context
IdContext channel_context() const
id for channel
Definition: MuonIdHelper.cxx:741
MuonIdHelper::is_mdt
bool is_mdt(const Identifier &id) const
Definition: MuonIdHelper.cxx:782
index
Definition: index.py:1
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:764
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:396
AtlasDetectorID::is_mm
bool is_mm(Identifier id) const
Definition: AtlasDetectorID.h:913
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:785
ExpandedIdentifier::fields
size_type fields() const
MuonIdHelper::technologyString
const std::string & technologyString(const int &index) const
Definition: MuonIdHelper.cxx:861
MuonIdHelper::module_end
const_id_iterator module_end() const
Definition: MuonIdHelper.cxx:756
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:800
MuonIdHelper::muon
Identifier muon() const
Definition: MuonIdHelper.cxx:724
MuonIdHelper::detectorElement_end
const_id_iterator detectorElement_end() const
Definition: MuonIdHelper.cxx:760
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
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:820
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
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:457
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictDictionary.cxx:45
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:68
IdDictRegion
Definition: IdDictRegion.h:20
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
MuonIdHelper::is_tgc
bool is_tgc(const Identifier &id) const
Definition: MuonIdHelper.cxx:791
MuonIdHelper::isSmall
bool isSmall(const Identifier &id) const
Definition: MuonIdHelper.cxx:831
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:794
MuonIdHelper::m_technologyIndexMax
int m_technologyIndexMax
Definition: MuonIdHelper.h:330
MuonIdHelper::m_stationIndexMax
int m_stationIndexMax
Definition: MuonIdHelper.h:325
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:700
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:902
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:500
MuonIdHelper::get_module_hash
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const
Definition: MuonIdHelper.cxx:99
IdDictDictionary::m_regions
std::vector< IdDictRegion * > m_regions
Definition: IdDictDictionary.h:235
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
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:829
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
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::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:797
MuonIdHelper::get_hash_calc
virtual int get_hash_calc(const Identifier &compact_id, IdentifierHash &hash_id, const IdContext *context) const
Definition: MuonIdHelper.cxx:217
MuonIdHelper::technologyNameIndexMax
int technologyNameIndexMax() const
Definition: MuonIdHelper.cxx:822
MuonIdHelper::m_eta_impl
IdDictFieldImplementation m_eta_impl
Definition: MuonIdHelper.h:290
MuonIdHelper::init_hashes
int init_hashes()
Definition: MuonIdHelper.cxx:348
MuonIdHelper::m_NAME_INDEX
size_type m_NAME_INDEX
Definition: MuonIdHelper.h:259
MuonIdHelper::MuonIdHelper
MuonIdHelper(const std::string &logName)
Definition: MuonIdHelper.cxx:12
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:868
MuonIdHelper::get_next_in_phi
int get_next_in_phi(const IdentifierHash &id, IdentifierHash &next) const
Definition: MuonIdHelper.cxx:490
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:266
Identifier::clear
void clear()
Reset to invalid state.
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:810
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictDictionary.cxx:73
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:854
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:520
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:227
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
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:825
AtlasDetectorID::muon_exp
ExpandedIdentifier muon_exp(void) const
Definition: AtlasDetectorID.h:506
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:805
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:748
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:827
MuonIdHelper::init_detectorElement_hashes
virtual int init_detectorElement_hashes()
Definition: MuonIdHelper.cxx:394
MuonIdHelper::m_station_region_index
size_type m_station_region_index
Definition: MuonIdHelper.h:256
DeMoScan.index
string index
Definition: DeMoScan.py:364
AtlasDetectorID::reinitialize
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
Definition: AtlasDetectorID.cxx:284
MuonIdHelper::m_TECHNOLOGY_INDEX
size_type m_TECHNOLOGY_INDEX
Definition: MuonIdHelper.h:262
AtlasDetectorID::is_muon
bool is_muon(Identifier id) const
Definition: AtlasDetectorID.h:701
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:574
MuonIdHelper::test_module_packing
void test_module_packing() const
Tests of packing.
Definition: MuonIdHelper.cxx:648
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:815
MultiRange::size
size_type size() const
Definition: MultiRange.cxx:70
AtlasDetectorID::muon
Identifier muon(void) const
Definition: AtlasDetectorID.cxx:54
DeMoScan.first
bool first
Definition: DeMoScan.py:536
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:762
MuonIdHelper::module_context
IdContext module_context() const
id for module
Definition: MuonIdHelper.cxx:731
IdentifierField
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
Definition: IdentifierField.h:21
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:510
AtlasDetectorID::is_stgc
bool is_stgc(Identifier id) const
Definition: AtlasDetectorID.h:924
MuonIdHelper::m_channel_vec
id_vec m_channel_vec
Definition: MuonIdHelper.h:276
MuonIdHelper::init_channel_hashes
int init_channel_hashes()
Definition: MuonIdHelper.cxx:440
MuonIdHelper::idVector
const std::vector< Identifier > & idVector() const
the id's
Definition: MuonIdHelper.cxx:752
MuonIdHelper::NOT_VALID_HASH
static constexpr int NOT_VALID_HASH
Definition: MuonIdHelper.h:227
CaloCondBlobAlgs_fillNoiseFromASCII.fields
fields
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:106
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: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
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:200
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
IdDictRegion::m_implementation
std::vector< IdDictFieldImplementation > m_implementation
Definition: IdDictRegion.h:42
MuonIdHelper::m_PHI_INDEX
size_type m_PHI_INDEX
Definition: MuonIdHelper.h:261
MuonIdHelper::validTechnology
bool validTechnology(int technology) const
Definition: MuonIdHelper.cxx:769
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:726
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
MuonIdHelper::isInitialized
bool isInitialized() const
Definition: MuonIdHelper.cxx:870
AtlasDetectorID::is_mdt
bool is_mdt(Identifier id) const
Definition: AtlasDetectorID.h:859
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:750
Identifier
Definition: IdentifierFieldParser.cxx:14
MuonIdHelper::m_dict
const IdDictDictionary * m_dict
Definition: MuonIdHelper.h:266