ATLAS Offline Software
AtlasDetectorID.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  Detector Description
7  -----------------------------------------
8 ***************************************************************************/
9 
11 #include "AtlasDetectorIDHelper.h"
13 #include "IdDict/IdDictField.h"
14 #include "IdDict/IdDictLabel.h"
15 #include "IdDict/IdDictMgr.h"
16 #include "IdDict/IdDictRange.h"
17 #include "IdDict/IdDictRegion.h"
18 #include <stdio.h>
19 #include <assert.h>
20 #include <format>
21 
23  const std::string& group)
24  : AthMessaging(name),
25  m_group (group)
26 {
27 }
29  if(m_helper) delete m_helper;
30 }
31 
32 const std::string& AtlasDetectorID::group() const
33 {
34  return m_group;
35 }
36 
38  return Identifier{};
39 }
41  return Identifier{};
42 }
44  return Identifier{};
45 }
47  return Identifier{};
48 }
50  return Identifier{};
51 }
53  return Identifier{};
54 }
56  Identifier result{0};
57  // Pack field
59  return result;
60 }
61 
63  Identifier result{0};
64  // Pack field
66  return result;
67 }
68 
70  Identifier result{0};
71  // Pack field
73  return result;
74 }
75 
77  Identifier result{0};
78  // Pack field
80  return result;
81 }
82 
84  Identifier result{0};
85  // Pack field
87  return result;
88 }
89 
91  Identifier result{0};
92  // Pack field
95  return result;
96 }
97 
99  Identifier result{0};
100  // Pack field
103  return result;
104 }
105 
107  Identifier result{0};
108  // Pack field
111  return result;
112 }
113 
115  Identifier result{0};
116  // Pack field
119  return result;
120 }
121 
123  Identifier result{0};
124  // Pack field
127  return result;
128 }
129 
131  Identifier result{0};
132  // Pack field
135  return result;
136 }
137 
139  Identifier result{0};
140  // Pack field
143  return result;
144 }
145 
147  Identifier result{0};
148  // Pack field
151  return result;
152 }
153 
155  Identifier result{0};
156  // Pack field
159  return result;
160 }
161 
163  Identifier result{0};
164  // Pack field
167  return result;
168 }
169 
171  Identifier result{0};
172  // Pack field
175  return result;
176 }
179  ExpandedIdentifier id{};
180  return IdContext{id, 0, m_DET_INDEX};
181 }
182 
185  ExpandedIdentifier id{};
186  return IdContext{id, 0, m_SUBDET_INDEX};
187 }
188 
189 int AtlasDetectorID::get_id(const IdentifierHash & /*hash_id*/,
190  Identifier & /*id*/,
191  const IdContext * /*context*/) const {
192  return 0;
193 }
194 
196  IdentifierHash & /*hash_id*/,
197  const IdContext * /*context*/) const {
198  return 0;
199 }
200 
202  const std::string &dict_name) {
203  // Register version of dictionary dict_name
204 
205  // Access dictionary by name
206  IdDictDictionary *dict = dict_mgr.find_dictionary(dict_name);
207  if (!dict) {
208  ATH_MSG_ERROR(__func__<<":"<<__LINE__<<" No dictionary found");
209  return 1;
210 
211  }
212  // Add in dict name, file name and version
213  m_dict_names.push_back(dict_name);
214  m_file_names.push_back(dict->file_name());
215  m_dict_tags.push_back(dict->dict_tag());
216  return 0;
217 }
218 
222  // If no tag has been registered, then reinitialize
223  if (m_dict_tags.size() == 0){
224  return true;
225  }
226  // If no dict names have been registered, then reinitialize
227  if (m_dict_names.size() == 0){
228  return true;
229  }
230  // Loop over dict names and check version tags
231  if (m_dict_names.size() != m_dict_tags.size()) {
232  ATH_MSG_ERROR("reinitialize: dict names and tags vectors not the same length ");
233  ATH_MSG_ERROR("names: " << m_dict_names.size() << " tags: " << m_dict_tags.size());
234  }
235  for (unsigned int i = 0; i < m_dict_names.size(); ++i) {
236  // Access dictionary by name
237  IdDictDictionary *dict = dict_mgr.find_dictionary(m_dict_names[i]);
238  if (!dict) {
239  ATH_MSG_ERROR("reinitialize: could not find dict - " << m_dict_names[i]);
240  return false;
241  }
242  if (m_dict_tags[i] != dict->dict_tag()) {
243  // Remove all memory of versions
244  m_dict_names.clear();
245  m_dict_tags.clear();
246  m_file_names.clear();
247  return true;
248  }
249  }
250 
251  // Tags match - don't reinitialize
252  return false;
253 }
254 
256 
257  // Register version of ATLAS dictionary
258  if (register_dict_tag(dict_mgr, "ATLAS")){
259  ATH_MSG_ERROR(__func__<<":"<<__LINE__<<" - Failed to register dict tag");
260  return 1;
261  }
262  // Initialize helper, needed for init of AtlasDetectorID
263  if (!m_helper) {
264  m_helper = std::make_unique<AtlasDetectorIDHelper>().release();
265  }
266 
267  if (m_helper->initialize_from_dictionary(dict_mgr)){
268  ATH_MSG_ERROR(__func__<<":"<<__LINE__<<" - Initialization from dictionary failed.");
269  return 1;
270  }
271  // Initialize level indices and id values from dicts
272  if (initLevelsFromDict(dict_mgr)) {
273  ATH_MSG_ERROR(__func__<<":"<<__LINE__<<" - Level initialization from dictionary failed.");
274  return 1;
275  }
277  ATH_MSG_DEBUG("initialize_from_dictionary - OK");
278  return 0;
279 }
280 
282  return m_dict_version;
283 }
285  return id.fields() > 0 && id[0] == m_INDET_ID;
286 }
288  return id.fields() > 0 && id[0] == m_LAR_ID;
289 }
291  return id.fields() > 0 && id[0] == m_TILE_ID;
292 }
294  return id.fields() > 0 && id[0] == m_MUON_ID;
295 }
297  return id.fields() > 0 && id[0] == m_CALO_ID;
298 }
300  return is_indet(id) && id.fields() > 1 && id[1] == m_PIXEL_ID;
301 }
302 
304  return is_indet(id) && id.fields() > 1 && id[1] == m_SCT_ID;
305 }
307  return is_indet(id) && id.fields() > 1;
308 }
310  return is_indet(id) && id.fields() > 1 && id[1] == m_HGTD_ID;
311 }
313  return is_indet(id) && id.fields() > 1 && id[1] == m_LUMI_ID;
314 }
316  return is_lumi(id) && id.fields() > 2 && id[2] == m_LUMI_PLR_ID;
317 }
318 
320  return is_lar(id) && id.fields() > 1 && std::abs(id[1]) == m_LAR_EM_ID;
321 }
323  return is_lar(id) && id.fields() > 1 && std::abs(id[1]) == m_LAR_HEC_ID;
324 }
325 
327  return is_lar(id) && id.fields() > 1 && std::abs(id[1]) == m_LAR_FCAL_ID;
328 }
329 
331  return is_lar_fcal(id) && id.fields() > 3 &&std::abs(id[3]) == 0;
332 }
333 
335  return id.fields() > 4 && id[0] == m_MUON_ID && id[4] == m_MDT_ID;
336 }
337 
339  return id.fields() > 4 && id[0] == m_MUON_ID && id[4] == m_CSC_ID;
340 }
341 
343  return id.fields() > 4 && id[0] == m_MUON_ID && id[4] == m_RPC_ID;
344 }
345 
347  return id.fields() > 4 && id[0] == m_MUON_ID && id[4] == m_TGC_ID;
348 }
349 
351  return id.fields() > 4 && id[0] == m_MUON_ID && id[4] == m_STGC_ID;
352 }
353 
355  return id.fields() > 4 && id[0] == m_MUON_ID && id[4] == m_MM_ID;
356 }
357 
358 // Short print out of any identifier:
359 void AtlasDetectorID::show(const Identifier id, const IdContext *context, char sep) const {
360  ATH_MSG_INFO(show_to_string(id, context, sep));
361 }
362 
363 // or provide the printout in string form
364 std::string
365 AtlasDetectorID::show_to_string(const Identifier id, const IdContext *context, char sep) const {
366  // Do a generic printout of identifier
367 
368  std::string result("Unable to decode id");
369  unsigned int max_index = (context) ? context->end_index() : 999;
370 
371  if (!id.is_valid()) {
372  return "[INVALID]";
373  }
374 
376  return result;
377 
378  // Find the dictionary to use:
379  IdDictDictionary *dict{nullptr};
380  ExpandedIdentifier expId{};
381  ExpandedIdentifier prefix{}; // default is null prefix
382  Identifier compact = id;
383 
384  if (is_indet(id)) {
385  dict = m_indet_dict;
386  } else if (is_lar(id)) {
387  dict = m_lar_dict;
388  } else if (is_tile(id)) {
389  dict = m_tile_dict;
390  } else if (is_muon(id)) {
391  dict = m_muon_dict;
392  } else if (is_lvl1_trig_towers(id) || is_lvl1_online(id) ||
393  is_lar_dm(id) || is_tile_dm(id)) {
394  dict = m_calo_dict;
395  } else if (is_forward(id)) {
396  dict = m_fwd_dict;
397  }
398 
399  if (!dict) {
400  ATH_MSG_WARNING(__func__<<" No detector type associated to id "<<id);
401  return result;
402  }
403  if (dict->unpack(m_group, compact, prefix, max_index, expId)) {
404  return result;
405  }
406 
407  bool first = true;
408  result = "";
409  if ('.' == sep)
410  result = "[";
411  for (unsigned int i = 0; i < expId.fields(); ++i) {
412  if (first)
413  first = false;
414  else
415  result += sep;
416  result += std::format("{}", expId[i]);
417  }
418  if ('.' == sep)
419  result += "]";
420  return result;
421 }
422 
423 void AtlasDetectorID::print(Identifier id, const IdContext *context) const {
424  ATH_MSG_INFO(print_to_string(id, context));
425 }
426 
428  const IdContext *context) const {
429  // Print out for any Atlas identifier
430  std::string result;
432 
433  // Do a generic printout of identifier from dictionary
434  unsigned int max_index = (context) ? context->end_index() : 999;
435 
436  // Find the dictionary to use:
437  IdDictDictionary *dict{nullptr};
438  ExpandedIdentifier expId;
439  ExpandedIdentifier prefix; // default is null prefix
440  Identifier compact = id;
441 
442  if (is_indet(id)) {
443  dict = m_indet_dict;
444  } else if (is_lar(id)) {
445  dict = m_lar_dict;
446  } else if (is_tile(id)) {
447  dict = m_tile_dict;
448  } else if (is_muon(id)) {
449  dict = m_muon_dict;
450  } else if (is_lvl1_trig_towers(id) || is_lvl1_online(id) ||
451  is_lar_dm(id) || is_tile_dm(id)) {
452  dict = m_calo_dict;
453  } else if (is_forward(id)) {
454  dict = m_fwd_dict;
455  }
456 
457  if (!dict) {
458  ATH_MSG_WARNING(__func__<<":"<<__LINE__<<" No dictionary could be associated to "<<id);
459  return result;
460  }
461  if (dict->unpack(m_group, compact, prefix, max_index," ", result)) {
462  return result;
463  }
464  }
465  return result;
466 }
467 const std::vector<std::string> & AtlasDetectorID::dict_names() const {
468  return m_dict_names;
469 }
470 const std::vector<std::string>& AtlasDetectorID::file_names() const {
471  return m_file_names;
472 }
473 const std::vector<std::string> & AtlasDetectorID::dict_tags() const {
474  return m_dict_tags;
475 }
477  return m_do_checks;
478 }
479 void AtlasDetectorID::set_do_checks(bool do_checks) {
481 }
482 
484  return m_do_neighbours;
485 }
486 
487 void AtlasDetectorID::set_do_neighbours(bool do_neighbours) {
489 }
490 
492  m_msgSvc = msgSvc;
493 }
494 
496  m_quiet = quiet;
497 }
498 
499 void AtlasDetectorID::setDictVersion(const IdDictMgr &dict_mgr, const std::string &name) {
500  const IdDictDictionary *dict = dict_mgr.find_dictionary(name);
501  m_dict_version = dict->version();
502 }
503 
504 std::string AtlasDetectorID::to_range(const ExpandedIdentifier &id) const {
505 
506  // Build a string from the contents of an identifier
507  int fields = id.fields();
508  std::string result("");
509  for (int i = 0; i < fields; ++i) {
510  if (i > 0) {
511  result += '/'; // add '/' only if NOT last one
512  }
513  result += std::format("{}", id[i]);
514  }
515  return result;
516 }
517 
519 
520  // Set do_checks flag
521  if (dict_mgr.do_checks())
522  m_do_checks = true;
523  // Set do_neighbours flag
524  if (!dict_mgr.do_neighbours())
525  m_do_neighbours = false;
526 
527 
528  IdDictField *field{nullptr};
529 
530  // Find out from the dictionary the detector and subdetector
531  // levels and id values
532  m_DET_INDEX = 999;
533  m_SUBDET_INDEX = 999;
534  m_MUON_SUBDET_INDEX = 999;
535  m_INDET_ID = -1;
536  m_LAR_ID = -1;
537  m_TILE_ID = -1;
538  m_MUON_ID = -1;
539  m_PIXEL_ID = -1;
540  m_SCT_ID = -1;
541  m_TRT_ID = -1;
542  m_HGTD_ID = -1;
543  m_FWD_ID = -1;
544  m_ALFA_ID = -1;
545  m_BCM_ID = -1;
546  m_LUCID_ID = -1;
547  m_ZDC_ID = -1;
548  m_LAR_EM_ID = -1;
549  m_LAR_HEC_ID = -1;
550  m_LAR_FCAL_ID = -1;
552  m_MDT_ID = -1;
553  m_CSC_ID = -1;
554  m_RPC_ID = -1;
555  m_TGC_ID = -1;
556  m_STGC_ID = -1;
557  m_MM_ID = -1;
558 
559  // Save generic dict for top levels
560  IdDictDictionary *top_dict {nullptr};
561 
562  auto assignSystemId = [this, &field](const std::string& systemName,
563  int& idToAssign,
564  bool mandatory = true) ->bool {
565  IdDictLabel *label = field->find_label(systemName);
566  if (label && label->valued()){
567  idToAssign = label->value();
568  ATH_MSG_VERBOSE("Assign system "<<systemName<<" to "<<idToAssign<<".");
569  return true;
570  } else if (label) {
571  ATH_MSG_ERROR("initLevelsFromDict - label "<<systemName<<" does NOT have a value ");
572  return false;
573  }
574  if (mandatory) {
575  ATH_MSG_ERROR("initLevelsFromDict - unable to find '"<<systemName<<"' label");
576  return false;
577  }
578  ATH_MSG_DEBUG("initLevelsFromDict - unable to find '"<<systemName<<"' label");
579  return true;
580  };
581  // Get det ids
582 
583  // Initialize ids for InDet subdet
584  m_indet_dict = dict_mgr.find_dictionary("InnerDetector");
585  if (!m_indet_dict) {
586  ATH_MSG_WARNING("initLevelsFromDict - cannot access InnerDetector dictionary");
587  } else {
588  // Found InDet dict
589  top_dict = m_indet_dict; // save as top_dict
590  // Check if this is High Luminosity LHC layout
591  // should just use std::string::contains once that is available... (C++23)
592  std::string versionString = m_indet_dict->version();
593  m_isHighLuminosityLHC = (versionString.find("ITk") != std::string::npos || versionString.find("P2-RUN4") != std::string::npos);
594 
595  // Get InDet subdets
596  field = m_indet_dict->find_field("part");
597  if (!field) {
598  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'part' field for InnerDetector dictionary");
599  return 1;
600  }
601 
602  if (!assignSystemId("Pixel", m_PIXEL_ID)) {
603  return 1;
604  }
605  if (!assignSystemId("SCT", m_SCT_ID)) {
606  return 1;
607  }
608  if (!assignSystemId("TRT", m_TRT_ID, !m_isHighLuminosityLHC)) {
609  return 1;
610  }
611  if (m_isHighLuminosityLHC) {
612  if (!assignSystemId("LuminosityDetectors", m_LUMI_ID, versionString.find("PLR") != std::string::npos ||
613  versionString.find("P2-RUN4") != std::string::npos)) {
614  return 1;
615  }
616  if (!assignSystemId("HGTD", m_HGTD_ID)){
617  return 1;
618  }
619  }
620  }
621  // Initialize ids for Forward dets
622  m_fwd_dict = dict_mgr.find_dictionary("ForwardDetectors");
623  if (!m_fwd_dict) {
624  ATH_MSG_WARNING("initLevelsFromDict - cannot access ForwardDetectors dictionary");
625  } else {
626 
627  // Found ForwardDetectors dict
628 
629  if (!top_dict){
630  top_dict = m_fwd_dict; // save as top_dict
631  }
632  // Get Forward subdets
633 
634  field = m_fwd_dict->find_field("part");
635  if (!field) {
636  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'part' field for ForwardDetectors dictionary");
637  return 1;
638  }
639  if (!assignSystemId("ALFA", m_ALFA_ID)) {
640  return 1;
641  }
642  if (!assignSystemId("BCM", m_BCM_ID)) {
643  return 1;
644  }
645  if (!assignSystemId("LUCID", m_LUCID_ID)) {
646  return 1;
647  }
648  if (!assignSystemId("ZDC", m_ZDC_ID)) {
649  return 1;
650  }
651  }
652 
653  // Initialize ids for LAr detectors
654  m_lar_dict = dict_mgr.find_dictionary("LArCalorimeter");
655  if (!m_lar_dict) {
656  ATH_MSG_WARNING("initLevelsFromDict - cannot access LArCalorimeter dictionary");
657  } else {
658  // Found LAr dict
659 
660  if (!top_dict) {
661  top_dict = m_lar_dict; // save as top_dict
662  }
663  field = m_lar_dict->find_field("part");
664  if (!field) {
665  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'part' field for LArCalorimeter dictionary");
666  return 1;
667  }
668  if (!assignSystemId("LArEM", m_LAR_EM_ID)) {
669  return 1;
670  }
671  if (!assignSystemId("LArHEC", m_LAR_HEC_ID)) {
672  return 1;
673  }
674  if (!assignSystemId("LArFCAL", m_LAR_FCAL_ID)) {
675  return 1;
676  }
677  field = m_lar_dict->find_field("module");
678  if (field) {
679  m_LAR_FCAL_MODULE_INDEX = field->index();
680  } else {
681  ATH_MSG_DEBUG("initLevelsFromDict - unable to find 'module' field for miniFCAL");
682  }
683  }
684 
685  // Initialize ids for Tile calo
686  m_tile_dict = dict_mgr.find_dictionary("TileCalorimeter");
687  if (!m_tile_dict) {
688  ATH_MSG_WARNING("initLevelsFromDict - cannot access TileCalorimeter dictionary");
689  } else {
690  // File Tile
691  if (!top_dict)
692  top_dict = m_tile_dict; // save as top_dict
693  }
694 
695  // Initialize ids for Muon detectors
696  m_muon_dict = dict_mgr.find_dictionary("MuonSpectrometer");
697  if (!m_muon_dict) {
698  ATH_MSG_WARNING("initLevelsFromDict - cannot access MuonSpectrometer dictionary");
699  } else {
700  // Found muon dict
701  if (!top_dict){
702  top_dict = m_muon_dict; // save as top_dict
703  }
704  /*
705  During initialisation from the dictionary we parse the
706  information which muon stationName belongs to which muon
707  subsystem. This information is not entirely encoded in the
708  identifiers however it is frequently tested during
709  reconstruction. In order to speed up these checks this info
710  is now stored locally into m_muon_tech_bits.
711  P.Fleischmann 04.04.2013
712  */
713  if (m_muon_tech_bits.empty()) {
714  // we only need to load this once
715  field = m_muon_dict->find_field("stationName");
716  if (!field) {
717  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'stationName' field for MuonSpectrometer dictionary");
718  return 1;
719  }
720 
721  size_type nStationNames = field->get_label_number();
722  std::string stationNameString{};
723 
724  // first check for the maximum value assigned to any stationName
725  int stationNameIndex{};
726  int maxStationNameIndex{-1};
727  for (size_type i = 0; i < nStationNames; ++i) {
728  // in case no individual values are given,
729  // the order inside the dictionary is used
730  const IdDictLabel& label = field->label(i);
731  stationNameIndex = label.valued() ? label.value() : i;
732 
733  maxStationNameIndex = std::max(maxStationNameIndex, stationNameIndex);
734  }
735 
736  // the vector may contain gaps (value=0) in case of jumps
737  // in the values
738  m_muon_tech_bits.resize(maxStationNameIndex + 1);
739 
740  // loop over all stationNames and search for associations
741  // to technology
742  for (size_type i = 0; i < nStationNames; ++i) {
743  const IdDictLabel& label = field->label(i);
744  stationNameString = label.name();
745  // in case no individual values are given,
746  // the order inside the dictionary is used
747  stationNameIndex = label.valued() ? label.value() : i;
748  // next loop over all regions to look for
749  // stationName <-> technology associations
750  bool found{false}, stationNameFound{false}, technologyFound{false};
751  std::string techLabel{};
752  size_t nregions = m_muon_dict->n_regions();
753  for (size_type j = 0; j < nregions; ++j) {
754  const IdDictRegion& region = m_muon_dict->region(j);
755  // loop over all entries of a region to look for
756  // stationName and technology information
757  stationNameFound = technologyFound = false;
758  size_t nentries = region.n_entries();
759  for (size_type k = 0; k < nentries; ++k) {
760  const IdDictRange *range =
761  dynamic_cast<const IdDictRange *>(&region.entry(k));
762  if (!range) {
763  continue;
764  }
765 
766  if (range->field_name() == "stationName") {
767 
768  if (range->label() == stationNameString) {
769  // we found a region containing the current stationName
770  stationNameFound = true;
771  continue;
772  } else {
773  // we found a region containing a different stationName,
774  // let's skip
775  break;
776  }
777  } else if (range->field_name() == "technology") {
778  technologyFound = true;
779  techLabel = range->label();
780  }
781 
782  if (!stationNameFound || !technologyFound) {
783  continue;
784  }
785 
786  // we found a stationName <-> technology association
787  if (techLabel == "MDT") {
788  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasMDT;
789  } else if (techLabel == "RPC") {
790  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasRPC;
791  } else if (techLabel == "CSC") {
792  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasCSC;
793  } else if (techLabel == "TGC"){
794  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasTGC;
795  } else if (techLabel == "MM") {
796  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasMM;
797  } else if (techLabel == "STGC") {
798  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasSTGC;
799  } else {
800  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fUndefined;
801  }
802  found = true;
803  break;
804  } // end of loop overregion entries
805 
806  if (found) {
807  // no need to continue to look for this stationName,
808  // since each stationName must be uniquely associated
809  // to a technology, except for MDT/PRC
810  break;
811  }
812 
813  } // end of loop over regions
814 
815  } // end of loop over stationNames
816  }
817  // end of filling stationName <-> technology associations
818 
819  field = m_muon_dict->find_field("technology");
820  if (field) {
821  m_MUON_SUBDET_INDEX = field->index();
822  }
823  else {
824  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'technology' field for MuonSpectrometer dictionary");
825  return 1;
826  }
827 
828  if (!assignSystemId("MDT", m_MDT_ID)) {
829  return 1;
830  }
831  if (!assignSystemId("RPC", m_RPC_ID)) {
832  return 1;
833  }
834  if (!assignSystemId("TGC", m_TGC_ID)) {
835  return 1;
836  }
837  if (!assignSystemId("STGC", m_STGC_ID, false)) {
838  return 1;
839  }
840  if (!assignSystemId("MM", m_MM_ID, false)) {
841  return 1;
842  }
843  if (!assignSystemId("CSC", m_CSC_ID, false)) {
844  return 1;
845  }
846  }
847 
848  // Initialize id for Calo and fields for lvl1 and dead material
849  m_calo_dict = dict_mgr.find_dictionary("Calorimeter");
850  if (!m_calo_dict) {
851  ATH_MSG_WARNING("initLevelsFromDict - Warning cannot access Calorimeter dictionary");
852  } else {
853  // Found calo dict
854  if (!top_dict) {
855  top_dict = m_calo_dict; // save as top_dict
856  }
857  // Set lvl1 field for is_lvl1_trig_towers
858  int value{0};
860  // negative half
861  if (m_calo_dict->get_label_value("DetZside", "negative_lvl1_side", value)) {
862  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'negative_lvl1_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
863  return 1;
864  }
866  // positive half
867  if (m_calo_dict->get_label_value("DetZside", "positive_lvl1_side", value)) {
868  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'positive_lvl1_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
869  return 1;
870  }
872  // Set lar dead material field for is_lar_dm
874  // negative half
875  if (m_calo_dict->get_label_value("DetZside", "negative_DMLar_side", value)) {
876  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'negative_DMLar_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
877  return 1;
878  }
880  // positive half
881  if (m_calo_dict->get_label_value("DetZside", "positive_DMLar_side", value)) {
882  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'positive_DMLar_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
883  return 1;
884  }
886 
887  // Set tile dead material field for is_tile_dm
889  // negative half
890  if (m_calo_dict->get_label_value("DetZside", "negative_DMTile_side", value)) {
891  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'negative_DMTile_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
892  return 1;
893  }
895  // positive half
896  if (m_calo_dict->get_label_value("DetZside", "positive_DMTile_side", value)) {
897  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'positive_DMTile_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
898  return 1;
899  }
901 
902  // Set lvl1 field for is_lvl1_online
904  if (m_calo_dict->get_label_value("DetZside", "no_side", value)) {
905  ATH_MSG_DEBUG("initLevelsFromDict - Could not get value for label 'no_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
906  } else {
908  }
909  }
910 
911  // set det/subdet indices
912  if (top_dict){
913 
914  field = top_dict->find_field("subdet");
915  if (field) {
916  m_DET_INDEX = field->index();
917  } else {
918  ATH_MSG_ERROR("initLevelsFromDict - - unable to find 'subdet' field from dict "
919  << top_dict->name());
920  return 1;
921  }
922 
923  if (!assignSystemId("InnerDetector", m_INDET_ID)) {
924  return 1;
925  }
926  if (!assignSystemId("ForwardDetectors", m_FWD_ID)) {
927  return 1;
928  }
929  if (!assignSystemId("LArCalorimeter", m_LAR_ID)) {
930  return 1;
931  }
932  if (!assignSystemId("TileCalorimeter", m_TILE_ID)) {
933  return 1;
934  }
935 
936  if (!assignSystemId("MuonSpectrometer", m_MUON_ID)) {
937  return 1;
938  }
939  if (!assignSystemId("Calorimeter", m_CALO_ID)) {
940  return 1;
941  }
942  // Get name of next level
943  std::string name{};
944  if (top_dict->name() == "InnerDetector") {
945  name = "part";
946  } else if (top_dict->name() == "Calorimeter") {
947  name = "DetZside";
948  } else if (top_dict->name() == "LArCalorimeter") {
949  name = "part";
950  } else if (top_dict->name() == "MuonSpectrometer") {
951  name = "stationName";
952  } else if (top_dict->name() == "TileCalorimeter") {
953  name = "section";
954  } else if (top_dict->name() == "ForwardDetectors") {
955  name = "part";
956  }
957  // While we're here, save the index to the sub-detector level
958  // ("part" for InDet)
959  field = top_dict->find_field(name);
960  if (field) {
961  m_SUBDET_INDEX = field->index();
962  }
963  else {
964  ATH_MSG_ERROR("initLevelsFromDict - unable to find field " << name << " from dict "<< top_dict->name());
965  return 1;
966  }
967  } else {
968  ATH_MSG_ERROR("initLevelsFromDict - no top dictionary defined");
969  return 1;
970  }
971 
972  // Set the field implementations
973 
974  size_type region_index = m_helper->pixel_region_index();
975  if (m_indet_dict && AtlasDetectorIDHelper::UNDEFINED != region_index) {
976 
977  const IdDictRegion& region = m_indet_dict->region(region_index);
978 
979  // Detector
981 
982  // Add on extra values to assure that one has a value per
983  // bit. This is needed to avoid an overflow decoding error
984  // when a pixel channel id is decoded
985  if (not m_det_impl.ored_field().isEnumerated()) {
986  ATH_MSG_ERROR("initLevelsFromDict - ERROR det implementation is not enumerated: "
988  return 1;
989  }
990 
991  size_type bits = m_det_impl.bits();
992  size_type nvalues = static_cast<size_type>(1) << bits;
994  size_type max = det.get_maximum();
995  for (size_type i = det.get_values().size(); i < nvalues; ++i) {
996  ++max;
997  det.add_value(max);
998  }
999  // Replace ored field with modified one
1001  ATH_MSG_VERBOSE("set extra bits "<< m_det_impl.show_to_string());
1002 
1003  // InDet part
1005  }
1006 
1007  // Calo side: LVL1, LAr & Tile DeadMat
1008  region_index = m_helper->lvl1_region_index();
1009  if (m_calo_dict && AtlasDetectorIDHelper::UNDEFINED != region_index) {
1010  const IdDictRegion& region = m_calo_dict->region(region_index);
1012  }
1013 
1014  // LAr part
1015  region_index = m_helper->lar_em_region_index();
1016  if (m_lar_dict && AtlasDetectorIDHelper::UNDEFINED != region_index) {
1017  const IdDictRegion& region = m_lar_dict->region(region_index);
1019  }
1020 
1021  // LAr part
1022  region_index = m_helper->lar_fcal_region_index();
1023  if (m_lar_dict && AtlasDetectorIDHelper::UNDEFINED != region_index &&
1024  m_LAR_FCAL_MODULE_INDEX != 999) {
1025  const IdDictRegion& region = m_lar_dict->region(region_index);
1027  }
1028 
1029  // Muon station name
1030  region_index = m_helper->mdt_region_index();
1031  if (m_muon_dict && AtlasDetectorIDHelper::UNDEFINED != region_index) {
1032  const IdDictRegion& region = m_muon_dict->region(region_index);
1034  // Muon MDT
1036  // Muon RPC
1037  region_index = m_helper->rpc_region_index();
1038  if (AtlasDetectorIDHelper::UNDEFINED != region_index) {
1039  const IdDictRegion& rpc_region = m_muon_dict->region(region_index);
1041  }
1042  }
1043  return 0;
1044 }
IdDictRange.h
IdDictMgr.h
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:755
AtlasDetectorID::m_muon_dict
IdDictDictionary * m_muon_dict
Definition: AtlasDetectorID.h:440
AtlasDetectorID::indet_field_value
int indet_field_value() const
Provide efficient access to individual field values, for subclass idhelpers.
Definition: AtlasDetectorID.h:606
AtlasDetectorID::is_forward
bool is_forward(Identifier id) const
Definition: AtlasDetectorID.h:930
AtlasDetectorID::is_rpc
bool is_rpc(Identifier id) const
Definition: AtlasDetectorID.h:870
AtlasDetectorID::m_muon_tech_bits
std::vector< unsigned int > m_muon_tech_bits
Definition: AtlasDetectorID.h:455
AtlasDetectorID::m_LUMI_ID
int m_LUMI_ID
Definition: AtlasDetectorID.h:412
AtlasDetectorID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: AtlasDetectorID.cxx:255
AtlasDetectorIDHelper::lar_fcal_region_index
size_type lar_fcal_region_index() const
Definition: AtlasDetectorIDHelper.h:47
AtlasDetectorID::lumi
Identifier lumi(void) const
Definition: AtlasDetectorID.cxx:122
AtlasDetectorID::tile_dm
Identifier tile_dm(void) const
Definition: AtlasDetectorID.cxx:154
get_generator_info.result
result
Definition: get_generator_info.py:21
AtlasDetectorID::m_indet_part_impl
IdDictFieldImplementation m_indet_part_impl
Definition: AtlasDetectorID.h:445
IdDictLabel.h
AtlasDetectorID::m_helper
AtlasDetectorIDHelper * m_helper
Definition: AtlasDetectorID.h:443
vtune_athena.format
format
Definition: vtune_athena.py:14
AtlasDetectorID::setMessageSvc
virtual void setMessageSvc(IMessageSvc *msgSvc) override
Definition: AtlasDetectorID.cxx:491
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
IdDictDictionary::version
const std::string & version() const
Dictionary version.
Definition: IdDictDictionary.h:341
AtlasDetectorID::is_lar_fcal
bool is_lar_fcal(Identifier id) const
Definition: AtlasDetectorID.h:834
AtlasDetectorID::mm
Identifier mm(void) const
Definition: AtlasDetectorID.cxx:52
IdDictFieldImplementation::show_to_string
std::string show_to_string(void) const
Definition: IdDictFieldImplementation.cxx:32
AtlasDetectorID::is_lar
bool is_lar(Identifier id) const
Definition: AtlasDetectorID.h:684
AtlasDetDescr::fUndefined
@ fUndefined
Definition: AtlasDetTechnology.h:30
AtlasDetectorID::muon_field_value
int muon_field_value() const
Definition: AtlasDetectorID.h:615
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:765
AtlasDetectorID::m_TRT_ID
int m_TRT_ID
Definition: AtlasDetectorID.h:410
quiet
bool quiet
Definition: TrigGlobEffCorrValidation.cxx:190
AtlasDetectorID::lar_fcal
Identifier lar_fcal(void) const
Definition: AtlasDetectorID.cxx:170
IdDictDictionary::region
const IdDictRegion & region(size_t i) const
Region at index i.
Definition: IdDictDictionary.h:350
AtlasDetectorID::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: AtlasDetectorID.cxx:189
AtlasDetectorID::AtlasDetectorID
AtlasDetectorID(const std::string &name, const std::string &group)
Definition: AtlasDetectorID.cxx:22
AtlasDetectorIDHelper::lvl1_region_index
size_type lvl1_region_index() const
Definition: AtlasDetectorIDHelper.h:50
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
IdDictDictionary.h
AtlasDetectorID::m_HGTD_ID
int m_HGTD_ID
Definition: AtlasDetectorID.h:411
IdContext::end_index
size_type end_index() const
Definition: IdContext.h:46
AtlasDetectorID::calo_field_value
int calo_field_value() const
Definition: AtlasDetectorID.h:618
AtlasDetectorID::stgc
Identifier stgc(void) const
Definition: AtlasDetectorID.cxx:49
AtlasDetectorID::lar_dm
Identifier lar_dm(void) const
Definition: AtlasDetectorID.cxx:146
AtlasDetectorID::is_mm
bool is_mm(Identifier id) const
Definition: AtlasDetectorID.h:908
AtlasDetectorID::mdt
Identifier mdt(void) const
Definition: AtlasDetectorID.cxx:37
AtlasDetectorID::set_do_checks
virtual void set_do_checks(bool do_checks) override
Definition: AtlasDetectorID.cxx:479
IdentifierField::clear
void clear()
Set methods.
Definition: IdentifierField.cxx:224
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
IdDictFieldImplementation::pack
void pack(int value, Identifier &id) const
Definition: IdDictFieldImplementation.h:173
AtlasDetectorID::m_tile_dict
IdDictDictionary * m_tile_dict
Definition: AtlasDetectorID.h:439
AtlasDetectorIDHelper::pixel_region_index
size_type pixel_region_index() const
Definition: AtlasDetectorIDHelper.h:32
athena.value
value
Definition: athena.py:124
AtlasDetectorID::m_msgSvc
IMessageSvc * m_msgSvc
pointer to the message service
Definition: AtlasDetectorID.h:369
AtlasDetectorID::m_dict_version
std::string m_dict_version
Definition: AtlasDetectorID.h:398
AtlasDetectorID::lar_em
Identifier lar_em(void) const
Definition: AtlasDetectorID.cxx:130
AtlasDetectorID::m_do_checks
bool m_do_checks
Flag for subclasses to know whether or not to perform checks.
Definition: AtlasDetectorID.h:363
AtlasDetectorID::is_trt
bool is_trt(Identifier id) const
Definition: AtlasDetectorID.h:777
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
AtlasDetectorID::m_MUON_SUBDET_INDEX
size_type m_MUON_SUBDET_INDEX
Definition: AtlasDetectorID.h:402
IdDictDictionary::name
const std::string & name() const
Dictionary name.
Definition: IdDictDictionary.h:332
AtlasDetectorID::tgc
Identifier tgc(void) const
Definition: AtlasDetectorID.cxx:46
AtlasDetectorID::m_LAR_FCAL_MODULE_INDEX
int m_LAR_FCAL_MODULE_INDEX
Definition: AtlasDetectorID.h:417
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
AtlasDetectorID::indet
Identifier indet(void) const
Detector systems:
Definition: AtlasDetectorID.cxx:55
AtlasDetectorID::m_ZDC_ID
int m_ZDC_ID
Definition: AtlasDetectorID.h:428
AtlasDetectorID::m_STGC_ID
int m_STGC_ID
Definition: AtlasDetectorID.h:422
AtlasDetectorID::lar_field_value
int lar_field_value() const
Definition: AtlasDetectorID.h:609
IdDictDictionary::file_name
const std::string & file_name() const
Access to file name.
Definition: IdDictDictionary.h:367
AtlasDetectorID::do_neighbours
virtual bool do_neighbours(void) const override
Neighbour initialization is performed by default One can switch or query this mode for any idHelper w...
Definition: AtlasDetectorID.cxx:483
AtlasDetectorID::detsystem_context
IdContext detsystem_context(void) const
IdContext (indicates id length) for detector systems.
Definition: AtlasDetectorID.cxx:178
AtlasDetectorIDHelper::UNDEFINED
@ UNDEFINED
Definition: AtlasDetectorIDHelper.h:20
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictDictionary.cxx:47
AtlasDetectorID::lar_hec
Identifier lar_hec(void) const
Definition: AtlasDetectorID.cxx:162
AtlasDetectorIDHelper::mdt_region_index
size_type mdt_region_index() const
Definition: AtlasDetectorIDHelper.h:59
AtlasDetectorID::is_lvl1_trig_towers
bool is_lvl1_trig_towers(Identifier id) const
Definition: AtlasDetectorID.h:708
AtlasDetectorID::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: AtlasDetectorID.cxx:195
IdDictRegion
Definition: IdDictRegion.h:20
AtlasDetectorID::dictionaryVersion
virtual std::string dictionaryVersion(void) const override
Definition: AtlasDetectorID.cxx:281
AtlasDetectorID::m_LAR_ID
int m_LAR_ID
Definition: AtlasDetectorID.h:404
AtlasDetectorID::m_do_neighbours
bool m_do_neighbours
Flag for subclasses to know whether or not to perform neighbour initialization.
Definition: AtlasDetectorID.h:366
AtlasDetectorID::set_quiet
void set_quiet(bool quiet)
Set flag for suppressing informational output.
Definition: AtlasDetectorID.cxx:495
AtlasDetectorID::m_INDET_ID
int m_INDET_ID
Definition: AtlasDetectorID.h:403
AtlasDetectorID::size_type
Identifier::size_type size_type
Definition: AtlasDetectorID.h:385
AtlasDetectorID::m_LUMI_PLR_ID
int m_LUMI_PLR_ID
Definition: AtlasDetectorID.h:413
IdDictLabel
Definition: IdDictLabel.h:10
IdDictRegion::implementation
const IdDictFieldImplementation & implementation(size_t i) const
Definition: IdDictRegion.cxx:34
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
IdDictMgr
Definition: IdDictMgr.h:15
AtlasDetectorID::m_tile_dm_field
Range::field m_tile_dm_field
Definition: AtlasDetectorID.h:435
AtlasDetectorID::hgtd
Identifier hgtd(void) const
Definition: AtlasDetectorID.cxx:114
AtlasDetectorID::lar
Identifier lar(void) const
Definition: AtlasDetectorID.cxx:62
PlotCalibFromCool.nentries
nentries
Definition: PlotCalibFromCool.py:798
IdDictMgr::find_dictionary
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:124
AtlasDetectorID::dict_tags
const std::vector< std::string > & dict_tags(void) const
Version tags for subdet dictionaries.
Definition: AtlasDetectorID.cxx:473
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AtlasDetectorID::m_TILE_ID
int m_TILE_ID
Definition: AtlasDetectorID.h:405
AtlasDetectorID::set_do_neighbours
virtual void set_do_neighbours(bool do_neighbours) override
Definition: AtlasDetectorID.cxx:487
IdDictFieldImplementation::set_ored_field
void set_ored_field(const Range::field &ored_field)
Definition: IdDictFieldImplementation.h:259
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
AtlasDetectorID::m_group
std::string m_group
Group name.
Definition: AtlasDetectorID.h:359
AtlasDetectorID::m_calo_dict
IdDictDictionary * m_calo_dict
Definition: AtlasDetectorID.h:441
lumiFormat.i
int i
Definition: lumiFormat.py:85
AtlasDetectorID::file_names
const std::vector< std::string > & file_names(void) const
File names for subdet dictionaries.
Definition: AtlasDetectorID.cxx:470
AtlasDetectorID::is_plr
bool is_plr(Identifier id) const
AtlasDetectorID::m_is_initialized_from_dict
bool m_is_initialized_from_dict
Definition: AtlasDetectorID.h:399
AtlasDetectorID::m_lar_part_impl
IdDictFieldImplementation m_lar_part_impl
Definition: AtlasDetectorID.h:447
AtlasDetectorID::csc
Identifier csc(void) const
Definition: AtlasDetectorID.cxx:40
AtlasDetectorID::is_tgc
bool is_tgc(Identifier id) const
Definition: AtlasDetectorID.h:897
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AtlasDetectorID::m_muon_mdt_impl
IdDictFieldImplementation m_muon_mdt_impl
Definition: AtlasDetectorID.h:450
AtlasDetectorID::m_lar_fcal_module_impl
IdDictFieldImplementation m_lar_fcal_module_impl
Definition: AtlasDetectorID.h:448
add-xsec-uncert-quadrature-N.label
label
Definition: add-xsec-uncert-quadrature-N.py:104
AtlasDetectorID::is_tile_dm
bool is_tile_dm(Identifier id) const
Definition: AtlasDetectorID.h:743
AtlasDetectorID::m_LAR_EM_ID
int m_LAR_EM_ID
Definition: AtlasDetectorID.h:414
AtlasDetectorID::m_isHighLuminosityLHC
bool m_isHighLuminosityLHC
Definition: AtlasDetectorID.h:430
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
AtlasDetectorID::calo
Identifier calo(void) const
Definition: AtlasDetectorID.cxx:83
AtlasDetectorID::m_fwd_dict
IdDictDictionary * m_fwd_dict
Definition: AtlasDetectorID.h:442
AtlasDetectorID::is_tile
bool is_tile(Identifier id) const
Definition: AtlasDetectorID.h:690
AtlasDetectorID::is_lar_hec
bool is_lar_hec(Identifier id) const
Definition: AtlasDetectorID.h:824
AtlasDetectorID::group
const std::string & group() const
Group name for this helper.
Definition: AtlasDetectorID.cxx:32
AtlasDetectorID::tile
Identifier tile(void) const
Definition: AtlasDetectorID.cxx:69
AtlasDetectorID::m_TGC_ID
int m_TGC_ID
Definition: AtlasDetectorID.h:421
AtlasDetectorIDHelper::initialize_from_dictionary
int initialize_from_dictionary(const IdDictMgr &dict_mgr)
Initialization from the identifier dictionary.
Definition: AtlasDetectorIDHelper.cxx:19
AtlasDetectorID::m_CSC_ID
int m_CSC_ID
Definition: AtlasDetectorID.h:419
IdDictFieldImplementation::ored_field
const Range::field & ored_field() const
Definition: IdDictFieldImplementation.h:196
AtlasDetectorID::m_lvl1_onl_field
Range::field m_lvl1_onl_field
Definition: AtlasDetectorID.h:433
IdDictMgr::do_neighbours
bool do_neighbours() const
Check whether or not to init neighbours.
Definition: IdDictMgr.cxx:77
AtlasDetectorID::m_quiet
bool m_quiet
If true, suppress DEBUG/INFO messages.
Definition: AtlasDetectorID.h:372
AtlasDetectorID::m_LAR_HEC_ID
int m_LAR_HEC_ID
Definition: AtlasDetectorID.h:415
IdentifierField::isEnumerated
bool isEnumerated() const
Definition: IdentifierField.h:185
AtlasDetectorID::m_muon_rpc_impl
IdDictFieldImplementation m_muon_rpc_impl
Definition: AtlasDetectorID.h:451
AtlasDetDescr::fAtlasMM
@ fAtlasMM
Definition: AtlasDetTechnology.h:54
AtlasDetectorID::m_SCT_ID
int m_SCT_ID
Definition: AtlasDetectorID.h:409
AtlasDetDescr::fAtlasSTGC
@ fAtlasSTGC
Definition: AtlasDetTechnology.h:53
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:201
AtlasDetectorID::m_LAR_FCAL_ID
int m_LAR_FCAL_ID
Definition: AtlasDetectorID.h:416
AtlasDetectorID::is_calo
bool is_calo(Identifier id) const
Definition: AtlasDetectorID.h:702
AtlasDetectorID::m_MM_ID
int m_MM_ID
Definition: AtlasDetectorID.h:423
AtlasDetectorID::m_DET_INDEX
size_type m_DET_INDEX
Definition: AtlasDetectorID.h:400
AtlasDetectorID::tile_field_value
int tile_field_value() const
Definition: AtlasDetectorID.h:612
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictDictionary.cxx:75
AtlasDetectorIDHelper.h
grepfile.sep
sep
Definition: grepfile.py:38
AtlasDetectorID::print_to_string
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:427
IdDictRegion::entry
const IdDictRegionEntry & entry(size_t i) const
Definition: IdDictRegion.h:280
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
AtlasDetectorID::is_lar_minifcal
bool is_lar_minifcal(Identifier id) const
Definition: AtlasDetectorID.h:844
AtlasDetectorID::m_indet_dict
IdDictDictionary * m_indet_dict
Definition: AtlasDetectorID.h:437
AtlasDetectorID::show
void show(Identifier id, const IdContext *context=0, char sep='.') const
Short print out of any identifier (optionally provide separation character - default is '.
Definition: AtlasDetectorID.cxx:359
AtlasDetectorID::m_calo_side_impl
IdDictFieldImplementation m_calo_side_impl
Definition: AtlasDetectorID.h:446
AtlasDetectorID::is_indet
bool is_indet(Identifier id) const
Definition: AtlasDetectorID.h:678
AtlasDetectorID::dict_names
const std::vector< std::string > & dict_names(void) const
Dictionary names.
Definition: AtlasDetectorID.cxx:467
AtlasDetectorID::m_dict_names
std::vector< std::string > m_dict_names
List of dictionary names used by this helper.
Definition: AtlasDetectorID.h:376
AtlasDetectorID::m_lar_dm_field
Range::field m_lar_dm_field
Definition: AtlasDetectorID.h:434
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
AtlasDetectorIDHelper::lar_em_region_index
size_type lar_em_region_index() const
Definition: AtlasDetectorIDHelper.h:41
AtlasDetectorID::setDictVersion
virtual void setDictVersion(const IdDictMgr &dict_mgr, const std::string &name) override
Definition: AtlasDetectorID.cxx:499
AtlasDetectorID::m_muon_station_name_impl
IdDictFieldImplementation m_muon_station_name_impl
Definition: AtlasDetectorID.h:449
AtlasDetectorID::m_MDT_ID
int m_MDT_ID
Definition: AtlasDetectorID.h:418
IdDictDictionary
Definition: IdDictDictionary.h:30
AtlasDetectorID::m_RPC_ID
int m_RPC_ID
Definition: AtlasDetectorID.h:420
AtlasDetectorID::print
void print(Identifier id, const IdContext *context=0) const
Expanded print out of any identifier.
Definition: AtlasDetectorID.cxx:423
IdDictRange
Definition: IdDictRange.h:18
AtlasDetectorID::lar_lvl1
Identifier lar_lvl1(void) const
Definition: AtlasDetectorID.cxx:138
AtlasDetectorID::trt
Identifier trt(void) const
Definition: AtlasDetectorID.cxx:106
AtlasDetDescr::fAtlasRPC
@ fAtlasRPC
Definition: AtlasDetTechnology.h:51
AtlasDetectorID::pixel
Identifier pixel(void) const
Definition: AtlasDetectorID.cxx:90
AtlasDetectorID::~AtlasDetectorID
virtual ~AtlasDetectorID()
Definition: AtlasDetectorID.cxx:28
AtlasDetectorID::is_lumi
bool is_lumi(Identifier id) const
Definition: AtlasDetectorID.h:801
AtlasDetectorID::reinitialize
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
Definition: AtlasDetectorID.cxx:221
IdDictField.h
AtlasDetectorID::is_lar_dm
bool is_lar_dm(Identifier id) const
LAr/Tile dead material:
Definition: AtlasDetectorID.h:731
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
AtlasDetectorID::is_muon
bool is_muon(Identifier id) const
Definition: AtlasDetectorID.h:696
AtlasDetectorID::m_det_impl
IdDictFieldImplementation m_det_impl
Definition: AtlasDetectorID.h:444
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:365
AtlasDetectorIDHelper::rpc_region_index
size_type rpc_region_index() const
Definition: AtlasDetectorIDHelper.h:65
IdDictDictionary::dict_tag
const std::string & dict_tag() const
Access to the dictionary tag.
Definition: IdDictDictionary.h:374
AtlasDetectorID::m_file_names
std::vector< std::string > m_file_names
List of dictionary file names used by this helper.
Definition: AtlasDetectorID.h:379
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AtlasDetDescr::fAtlasCSC
@ fAtlasCSC
Definition: AtlasDetTechnology.h:50
DeMoScan.first
bool first
Definition: DeMoScan.py:534
AtlasDetectorID::muon
Identifier muon(void) const
Definition: AtlasDetectorID.cxx:76
AtlasDetDescr::fAtlasMDT
@ fAtlasMDT
Definition: AtlasDetTechnology.h:49
IdentifierField
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
Definition: IdentifierField.h:83
AtlasDetectorID::m_CALO_ID
int m_CALO_ID
Definition: AtlasDetectorID.h:407
AtlasDetectorID::m_ALFA_ID
int m_ALFA_ID
Definition: AtlasDetectorID.h:425
AtlasDetectorID::m_MUON_ID
int m_MUON_ID
Definition: AtlasDetectorID.h:406
IdDictMgr::do_checks
bool do_checks() const
Check whether or not to do checks for ids.
Definition: IdDictMgr.cxx:64
AtlasDetectorID::m_lar_dict
IdDictDictionary * m_lar_dict
Definition: AtlasDetectorID.h:438
IdDictRegion::n_entries
size_t n_entries() const
Definition: IdDictRegion.h:273
AtlasDetectorID::m_PIXEL_ID
int m_PIXEL_ID
Definition: AtlasDetectorID.h:408
AtlasDetectorID::is_lvl1_online
bool is_lvl1_online(Identifier id) const
Definition: AtlasDetectorID.h:719
AtlasDetectorID::is_stgc
bool is_stgc(Identifier id) const
Definition: AtlasDetectorID.h:919
IdDictRegion.h
AtlasDetDescr::fAtlasTGC
@ fAtlasTGC
Definition: AtlasDetTechnology.h:52
CaloCondBlobAlgs_fillNoiseFromASCII.fields
fields
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:105
IdDictField
Definition: IdDictField.h:15
AtlasDetectorID::sct
Identifier sct(void) const
Definition: AtlasDetectorID.cxx:98
IdDictDictionary::n_regions
size_t n_regions() const
Number of contained regions.
Definition: IdDictDictionary.h:359
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
AtlasDetectorID::m_BCM_ID
int m_BCM_ID
Definition: AtlasDetectorID.h:426
AtlasDetectorID::initLevelsFromDict
int initLevelsFromDict(const IdDictMgr &dict_mgr)
Definition: AtlasDetectorID.cxx:518
AtlasDetectorID::subdet_context
IdContext subdet_context(void) const
IdContext (indicates id length) for sub-detector.
Definition: AtlasDetectorID.cxx:184
AtlasDetectorID::do_checks
virtual bool do_checks(void) const override
Checks are performed by default in debug compilation and NOT in optimized compilation.
Definition: AtlasDetectorID.cxx:476
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
AtlasDetectorID::m_dict_tags
std::vector< std::string > m_dict_tags
List of dictionary versions used by this helper.
Definition: AtlasDetectorID.h:382
AtlasDetectorID::m_SUBDET_INDEX
size_type m_SUBDET_INDEX
Definition: AtlasDetectorID.h:401
AtlasDetectorID::is_lar_em
bool is_lar_em(Identifier id) const
Definition: AtlasDetectorID.h:813
IdentifierField::add_value
void add_value(element_type value)
Definition: IdentifierField.cxx:250
AtlasDetectorID::m_FWD_ID
int m_FWD_ID
Definition: AtlasDetectorID.h:424
AtlasDetectorID::is_hgtd
bool is_hgtd(Identifier id) const
Definition: AtlasDetectorID.h:789
AtlasDetectorID::is_mdt
bool is_mdt(Identifier id) const
Definition: AtlasDetectorID.h:854
AtlasDetectorID::m_lvl1_field
Range::field m_lvl1_field
Definition: AtlasDetectorID.h:432
fitman.k
k
Definition: fitman.py:528
AtlasDetectorID::rpc
Identifier rpc(void) const
Definition: AtlasDetectorID.cxx:43
AtlasDetectorID::to_range
std::string to_range(const ExpandedIdentifier &id) const
Definition: AtlasDetectorID.cxx:504
AtlasDetectorID::m_LUCID_ID
int m_LUCID_ID
Definition: AtlasDetectorID.h:427
IdDictFieldImplementation::bits
size_type bits() const
Definition: IdDictFieldImplementation.h:202
Identifier
Definition: IdentifierFieldParser.cxx:14