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