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