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 
493 void AtlasDetectorID::setDictVersion(const IdDictMgr &dict_mgr, const std::string &name) {
494  const IdDictDictionary *dict = dict_mgr.find_dictionary(name);
495  m_dict_version = dict->version();
496 }
497 
498 std::string AtlasDetectorID::to_range(const ExpandedIdentifier &id) const {
499 
500  // Build a string from the contents of an identifier
501  int fields = id.fields();
502  std::string result("");
503  for (int i = 0; i < fields; ++i) {
504  if (i > 0) {
505  result += '/'; // add '/' only if NOT last one
506  }
507  result += std::format("{}", id[i]);
508  }
509  return result;
510 }
511 
513 
514  // Set do_checks flag
515  if (dict_mgr.do_checks())
516  m_do_checks = true;
517  // Set do_neighbours flag
518  if (!dict_mgr.do_neighbours())
519  m_do_neighbours = false;
520 
521 
522  const IdDictField *field{nullptr};
523 
524  // Find out from the dictionary the detector and subdetector
525  // levels and id values
526  m_DET_INDEX = 999;
527  m_SUBDET_INDEX = 999;
528  m_MUON_SUBDET_INDEX = 999;
529  m_INDET_ID = -1;
530  m_LAR_ID = -1;
531  m_TILE_ID = -1;
532  m_MUON_ID = -1;
533  m_PIXEL_ID = -1;
534  m_SCT_ID = -1;
535  m_TRT_ID = -1;
536  m_HGTD_ID = -1;
537  m_FWD_ID = -1;
538  m_ALFA_ID = -1;
539  m_BCM_ID = -1;
540  m_LUCID_ID = -1;
541  m_ZDC_ID = -1;
542  m_LAR_EM_ID = -1;
543  m_LAR_HEC_ID = -1;
544  m_LAR_FCAL_ID = -1;
546  m_MDT_ID = -1;
547  m_CSC_ID = -1;
548  m_RPC_ID = -1;
549  m_TGC_ID = -1;
550  m_STGC_ID = -1;
551  m_MM_ID = -1;
552 
553  // Save generic dict for top levels
554  const IdDictDictionary *top_dict {nullptr};
555 
556  auto assignSystemId = [this, &field](const std::string& systemName,
557  int& idToAssign,
558  bool mandatory = true) ->bool {
559  const IdDictLabel *label = field->find_label(systemName);
560  if (label && label->valued()){
561  idToAssign = label->value();
562  ATH_MSG_VERBOSE("Assign system "<<systemName<<" to "<<idToAssign<<".");
563  return true;
564  } else if (label) {
565  ATH_MSG_ERROR("initLevelsFromDict - label "<<systemName<<" does NOT have a value ");
566  return false;
567  }
568  if (mandatory) {
569  ATH_MSG_ERROR("initLevelsFromDict - unable to find '"<<systemName<<"' label");
570  return false;
571  }
572  ATH_MSG_DEBUG("initLevelsFromDict - unable to find '"<<systemName<<"' label");
573  return true;
574  };
575  // Get det ids
576 
577  // Initialize ids for InDet subdet
578  m_indet_dict = dict_mgr.find_dictionary("InnerDetector");
579  if (!m_indet_dict) {
580  ATH_MSG_WARNING("initLevelsFromDict - cannot access InnerDetector dictionary");
581  } else {
582  // Found InDet dict
583  top_dict = m_indet_dict; // save as top_dict
584  // Check if this is High Luminosity LHC layout
585  // should just use std::string::contains once that is available... (C++23)
586  std::string versionString = m_indet_dict->version();
587  m_isHighLuminosityLHC = (versionString.find("ITk") != std::string::npos || versionString.find("P2-RUN4") != std::string::npos);
588 
589  // Get InDet subdets
590  field = m_indet_dict->find_field("part");
591  if (!field) {
592  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'part' field for InnerDetector dictionary");
593  return 1;
594  }
595 
596  if (!assignSystemId("Pixel", m_PIXEL_ID)) {
597  return 1;
598  }
599  if (!assignSystemId("SCT", m_SCT_ID)) {
600  return 1;
601  }
602  if (!assignSystemId("TRT", m_TRT_ID, !m_isHighLuminosityLHC)) {
603  return 1;
604  }
605  if (m_isHighLuminosityLHC) {
606  if (!assignSystemId("LuminosityDetectors", m_LUMI_ID, versionString.find("PLR") != std::string::npos ||
607  versionString.find("P2-RUN4") != std::string::npos)) {
608  return 1;
609  }
610  if (!assignSystemId("HGTD", m_HGTD_ID)){
611  return 1;
612  }
613  }
614  }
615  // Initialize ids for Forward dets
616  m_fwd_dict = dict_mgr.find_dictionary("ForwardDetectors");
617  if (!m_fwd_dict) {
618  ATH_MSG_WARNING("initLevelsFromDict - cannot access ForwardDetectors dictionary");
619  } else {
620 
621  // Found ForwardDetectors dict
622 
623  if (!top_dict){
624  top_dict = m_fwd_dict; // save as top_dict
625  }
626  // Get Forward subdets
627 
628  field = m_fwd_dict->find_field("part");
629  if (!field) {
630  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'part' field for ForwardDetectors dictionary");
631  return 1;
632  }
633  if (!assignSystemId("ALFA", m_ALFA_ID)) {
634  return 1;
635  }
636  if (!assignSystemId("BCM", m_BCM_ID)) {
637  return 1;
638  }
639  if (!assignSystemId("LUCID", m_LUCID_ID)) {
640  return 1;
641  }
642  if (!assignSystemId("ZDC", m_ZDC_ID)) {
643  return 1;
644  }
645  }
646 
647  // Initialize ids for LAr detectors
648  m_lar_dict = dict_mgr.find_dictionary("LArCalorimeter");
649  if (!m_lar_dict) {
650  ATH_MSG_WARNING("initLevelsFromDict - cannot access LArCalorimeter dictionary");
651  } else {
652  // Found LAr dict
653 
654  if (!top_dict) {
655  top_dict = m_lar_dict; // save as top_dict
656  }
657  field = m_lar_dict->find_field("part");
658  if (!field) {
659  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'part' field for LArCalorimeter dictionary");
660  return 1;
661  }
662  if (!assignSystemId("LArEM", m_LAR_EM_ID)) {
663  return 1;
664  }
665  if (!assignSystemId("LArHEC", m_LAR_HEC_ID)) {
666  return 1;
667  }
668  if (!assignSystemId("LArFCAL", m_LAR_FCAL_ID)) {
669  return 1;
670  }
671  field = m_lar_dict->find_field("module");
672  if (field) {
673  m_LAR_FCAL_MODULE_INDEX = field->index();
674  } else {
675  ATH_MSG_DEBUG("initLevelsFromDict - unable to find 'module' field for miniFCAL");
676  }
677  }
678 
679  // Initialize ids for Tile calo
680  m_tile_dict = dict_mgr.find_dictionary("TileCalorimeter");
681  if (!m_tile_dict) {
682  ATH_MSG_WARNING("initLevelsFromDict - cannot access TileCalorimeter dictionary");
683  } else {
684  // File Tile
685  if (!top_dict)
686  top_dict = m_tile_dict; // save as top_dict
687  }
688 
689  // Initialize ids for Muon detectors
690  m_muon_dict = dict_mgr.find_dictionary("MuonSpectrometer");
691  if (!m_muon_dict) {
692  ATH_MSG_WARNING("initLevelsFromDict - cannot access MuonSpectrometer dictionary");
693  } else {
694  // Found muon dict
695  if (!top_dict){
696  top_dict = m_muon_dict; // save as top_dict
697  }
698  /*
699  During initialisation from the dictionary we parse the
700  information which muon stationName belongs to which muon
701  subsystem. This information is not entirely encoded in the
702  identifiers however it is frequently tested during
703  reconstruction. In order to speed up these checks this info
704  is now stored locally into m_muon_tech_bits.
705  P.Fleischmann 04.04.2013
706  */
707  if (m_muon_tech_bits.empty()) {
708  // we only need to load this once
709  field = m_muon_dict->find_field("stationName");
710  if (!field) {
711  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'stationName' field for MuonSpectrometer dictionary");
712  return 1;
713  }
714 
715  size_type nStationNames = field->get_label_number();
716  std::string stationNameString{};
717 
718  // first check for the maximum value assigned to any stationName
719  int stationNameIndex{};
720  int maxStationNameIndex{-1};
721  for (size_type i = 0; i < nStationNames; ++i) {
722  // in case no individual values are given,
723  // the order inside the dictionary is used
724  const IdDictLabel& label = field->label(i);
725  stationNameIndex = label.valued() ? label.value() : i;
726 
727  maxStationNameIndex = std::max(maxStationNameIndex, stationNameIndex);
728  }
729 
730  // the vector may contain gaps (value=0) in case of jumps
731  // in the values
732  m_muon_tech_bits.resize(maxStationNameIndex + 1);
733 
734  // loop over all stationNames and search for associations
735  // to technology
736  for (size_type i = 0; i < nStationNames; ++i) {
737  const IdDictLabel& label = field->label(i);
738  stationNameString = label.name();
739  // in case no individual values are given,
740  // the order inside the dictionary is used
741  stationNameIndex = label.valued() ? label.value() : i;
742  // next loop over all regions to look for
743  // stationName <-> technology associations
744  bool found{false}, stationNameFound{false}, technologyFound{false};
745  std::string techLabel{};
746  size_t nregions = m_muon_dict->n_regions();
747  for (size_type j = 0; j < nregions; ++j) {
748  const IdDictRegion& region = m_muon_dict->region(j);
749  // loop over all entries of a region to look for
750  // stationName and technology information
751  stationNameFound = technologyFound = false;
752  size_t nentries = region.n_entries();
753  for (size_type k = 0; k < nentries; ++k) {
754  const IdDictRange *range =
755  dynamic_cast<const IdDictRange *>(&region.entry(k));
756  if (!range) {
757  continue;
758  }
759 
760  if (range->field_name() == "stationName") {
761 
762  if (range->label() == stationNameString) {
763  // we found a region containing the current stationName
764  stationNameFound = true;
765  continue;
766  } else {
767  // we found a region containing a different stationName,
768  // let's skip
769  break;
770  }
771  } else if (range->field_name() == "technology") {
772  technologyFound = true;
773  techLabel = range->label();
774  }
775 
776  if (!stationNameFound || !technologyFound) {
777  continue;
778  }
779 
780  // we found a stationName <-> technology association
781  if (techLabel == "MDT") {
782  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasMDT;
783  } else if (techLabel == "RPC") {
784  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasRPC;
785  } else if (techLabel == "CSC") {
786  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasCSC;
787  } else if (techLabel == "TGC"){
788  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasTGC;
789  } else if (techLabel == "MM") {
790  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasMM;
791  } else if (techLabel == "STGC") {
792  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fAtlasSTGC;
793  } else {
794  m_muon_tech_bits[stationNameIndex] = AtlasDetDescr::fUndefined;
795  }
796  found = true;
797  break;
798  } // end of loop overregion entries
799 
800  if (found) {
801  // no need to continue to look for this stationName,
802  // since each stationName must be uniquely associated
803  // to a technology, except for MDT/PRC
804  break;
805  }
806 
807  } // end of loop over regions
808 
809  } // end of loop over stationNames
810  }
811  // end of filling stationName <-> technology associations
812 
813  field = m_muon_dict->find_field("technology");
814  if (field) {
815  m_MUON_SUBDET_INDEX = field->index();
816  }
817  else {
818  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'technology' field for MuonSpectrometer dictionary");
819  return 1;
820  }
821 
822  if (!assignSystemId("MDT", m_MDT_ID)) {
823  return 1;
824  }
825  if (!assignSystemId("RPC", m_RPC_ID)) {
826  return 1;
827  }
828  if (!assignSystemId("TGC", m_TGC_ID)) {
829  return 1;
830  }
831  if (!assignSystemId("STGC", m_STGC_ID, false)) {
832  return 1;
833  }
834  if (!assignSystemId("MM", m_MM_ID, false)) {
835  return 1;
836  }
837  if (!assignSystemId("CSC", m_CSC_ID, false)) {
838  return 1;
839  }
840  }
841 
842  // Initialize id for Calo and fields for lvl1 and dead material
843  m_calo_dict = dict_mgr.find_dictionary("Calorimeter");
844  if (!m_calo_dict) {
845  ATH_MSG_WARNING("initLevelsFromDict - Warning cannot access Calorimeter dictionary");
846  } else {
847  // Found calo dict
848  if (!top_dict) {
849  top_dict = m_calo_dict; // save as top_dict
850  }
851  // Set lvl1 field for is_lvl1_trig_towers
852  int value{0};
854  // negative half
855  if (m_calo_dict->get_label_value("DetZside", "negative_lvl1_side", value)) {
856  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'negative_lvl1_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
857  return 1;
858  }
860  // positive half
861  if (m_calo_dict->get_label_value("DetZside", "positive_lvl1_side", value)) {
862  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'positive_lvl1_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
863  return 1;
864  }
866  // Set lar dead material field for is_lar_dm
868  // negative half
869  if (m_calo_dict->get_label_value("DetZside", "negative_DMLar_side", value)) {
870  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'negative_DMLar_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
871  return 1;
872  }
874  // positive half
875  if (m_calo_dict->get_label_value("DetZside", "positive_DMLar_side", value)) {
876  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'positive_DMLar_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
877  return 1;
878  }
880 
881  // Set tile dead material field for is_tile_dm
883  // negative half
884  if (m_calo_dict->get_label_value("DetZside", "negative_DMTile_side", value)) {
885  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'negative_DMTile_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
886  return 1;
887  }
889  // positive half
890  if (m_calo_dict->get_label_value("DetZside", "positive_DMTile_side", value)) {
891  ATH_MSG_ERROR("initLevelsFromDict - Could not get value for label 'positive_DMTile_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
892  return 1;
893  }
895 
896  // Set lvl1 field for is_lvl1_online
898  if (m_calo_dict->get_label_value("DetZside", "no_side", value)) {
899  ATH_MSG_DEBUG("initLevelsFromDict - Could not get value for label 'no_side' of field 'DetZside' in dictionary " << m_calo_dict->name());
900  } else {
902  }
903  }
904 
905  // set det/subdet indices
906  if (top_dict){
907 
908  field = top_dict->find_field("subdet");
909  if (field) {
910  m_DET_INDEX = field->index();
911  } else {
912  ATH_MSG_ERROR("initLevelsFromDict - - unable to find 'subdet' field from dict "
913  << top_dict->name());
914  return 1;
915  }
916 
917  if (!assignSystemId("InnerDetector", m_INDET_ID)) {
918  return 1;
919  }
920  if (!assignSystemId("ForwardDetectors", m_FWD_ID)) {
921  return 1;
922  }
923  if (!assignSystemId("LArCalorimeter", m_LAR_ID)) {
924  return 1;
925  }
926  if (!assignSystemId("TileCalorimeter", m_TILE_ID)) {
927  return 1;
928  }
929 
930  if (!assignSystemId("MuonSpectrometer", m_MUON_ID)) {
931  return 1;
932  }
933  if (!assignSystemId("Calorimeter", m_CALO_ID)) {
934  return 1;
935  }
936  // Get name of next level
937  std::string name{};
938  if (top_dict->name() == "InnerDetector") {
939  name = "part";
940  } else if (top_dict->name() == "Calorimeter") {
941  name = "DetZside";
942  } else if (top_dict->name() == "LArCalorimeter") {
943  name = "part";
944  } else if (top_dict->name() == "MuonSpectrometer") {
945  name = "stationName";
946  } else if (top_dict->name() == "TileCalorimeter") {
947  name = "section";
948  } else if (top_dict->name() == "ForwardDetectors") {
949  name = "part";
950  }
951  // While we're here, save the index to the sub-detector level
952  // ("part" for InDet)
953  field = top_dict->find_field(name);
954  if (field) {
955  m_SUBDET_INDEX = field->index();
956  }
957  else {
958  ATH_MSG_ERROR("initLevelsFromDict - unable to find field " << name << " from dict "<< top_dict->name());
959  return 1;
960  }
961  } else {
962  ATH_MSG_ERROR("initLevelsFromDict - no top dictionary defined");
963  return 1;
964  }
965 
966  // Set the field implementations
967 
968  size_type region_index = m_helper->pixel_region_index();
969  if (m_indet_dict && AtlasDetectorIDHelper::UNDEFINED != region_index) {
970 
971  const IdDictRegion& region = m_indet_dict->region(region_index);
972 
973  // Detector
975 
976  // Add on extra values to assure that one has a value per
977  // bit. This is needed to avoid an overflow decoding error
978  // when a pixel channel id is decoded
979  if (not m_det_impl.ored_field().isEnumerated()) {
980  ATH_MSG_ERROR("initLevelsFromDict - ERROR det implementation is not enumerated: "
982  return 1;
983  }
984 
985  size_type bits = m_det_impl.bits();
986  size_type nvalues = static_cast<size_type>(1) << bits;
988  size_type max = det.get_maximum();
989  for (size_type i = det.get_values().size(); i < nvalues; ++i) {
990  ++max;
991  det.add_value(max);
992  }
993  // Replace ored field with modified one
995  ATH_MSG_VERBOSE("set extra bits "<< m_det_impl.show_to_string());
996 
997  // InDet part
999  }
1000 
1001  // Calo side: LVL1, LAr & Tile DeadMat
1002  region_index = m_helper->lvl1_region_index();
1003  if (m_calo_dict && AtlasDetectorIDHelper::UNDEFINED != region_index) {
1004  const IdDictRegion& region = m_calo_dict->region(region_index);
1006  }
1007 
1008  // LAr part
1009  region_index = m_helper->lar_em_region_index();
1010  if (m_lar_dict && AtlasDetectorIDHelper::UNDEFINED != region_index) {
1011  const IdDictRegion& region = m_lar_dict->region(region_index);
1013  }
1014 
1015  // LAr part
1016  region_index = m_helper->lar_fcal_region_index();
1017  if (m_lar_dict && AtlasDetectorIDHelper::UNDEFINED != region_index &&
1018  m_LAR_FCAL_MODULE_INDEX != 999) {
1019  const IdDictRegion& region = m_lar_dict->region(region_index);
1021  }
1022 
1023  // Muon station name
1024  region_index = m_helper->mdt_region_index();
1025  if (m_muon_dict && AtlasDetectorIDHelper::UNDEFINED != region_index) {
1026  const IdDictRegion& region = m_muon_dict->region(region_index);
1028  // Muon MDT
1030  // Muon RPC
1031  region_index = m_helper->rpc_region_index();
1032  if (AtlasDetectorIDHelper::UNDEFINED != region_index) {
1033  const IdDictRegion& rpc_region = m_muon_dict->region(region_index);
1035  }
1036  }
1037  return 0;
1038 }
1039 
1040 
1043 {
1045  return (result << m_INDET_ID);
1046 }
1047 
1050 {
1052  return (result << m_LAR_ID);
1053 }
1054 
1057 {
1059  return (result << m_TILE_ID);
1060 }
1061 
1064 {
1066  return (result << m_MUON_ID);
1067 }
1068 
1071 {
1073  return (result << m_CALO_ID);
1074 }
1075 
1078 {
1080  return (result << m_FWD_ID);
1081 }
1082 
1085 {
1087  return (result << m_PIXEL_ID);
1088 }
1089 
1092 {
1094  return (result << m_SCT_ID);
1095 }
1096 
1099 {
1101  return (result << m_TRT_ID);
1102 }
1103 
1106 {
1108  return (result << m_HGTD_ID);
1109 }
1110 
1113 {
1115  return (result << m_LUMI_ID);
1116 }
1117 
1120 {
1122  return (result << m_LAR_EM_ID);
1123 }
1124 
1127 {
1129  return (result << m_LAR_HEC_ID);
1130 }
1131 
1134 {
1136  return (result << m_LAR_FCAL_ID);
1137 }
1138 
1141 {
1143  return (result << m_ALFA_ID);
1144 }
1145 
1148 {
1150  return (result << m_BCM_ID);
1151 }
1152 
1155 {
1157  return (result << m_LUCID_ID);
1158 }
1159 
1162 {
1164  return (result << m_ZDC_ID);
1165 }
IdDictRange.h
IdDictMgr.h
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:613
AtlasDetectorID::indet_field_value
int indet_field_value() const
Provide efficient access to individual field values, for subclass idhelpers.
Definition: AtlasDetectorID.h:464
AtlasDetectorID::m_tile_dict
const IdDictDictionary * m_tile_dict
Definition: AtlasDetectorID.h:423
AtlasDetectorID::is_forward
bool is_forward(Identifier id) const
Definition: AtlasDetectorID.h:788
AtlasDetectorID::is_rpc
bool is_rpc(Identifier id) const
Definition: AtlasDetectorID.h:728
AtlasDetectorID::m_muon_tech_bits
std::vector< unsigned int > m_muon_tech_bits
Definition: AtlasDetectorID.h:439
AtlasDetectorID::m_LUMI_ID
int m_LUMI_ID
Definition: AtlasDetectorID.h:396
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:429
IdDictLabel.h
AtlasDetectorID::m_helper
AtlasDetectorIDHelper * m_helper
Definition: AtlasDetectorID.h:427
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AtlasDetectorID::is_csc
bool is_csc(Identifier id) const
Definition: AtlasDetectorID.h:744
IdDictDictionary::version
const std::string & version() const
Dictionary version.
Definition: IdDictDictionary.h:345
AtlasDetectorID::is_lar_fcal
bool is_lar_fcal(Identifier id) const
Definition: AtlasDetectorID.h:692
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:542
AtlasDetDescr::fUndefined
@ fUndefined
Definition: AtlasDetTechnology.h:30
AtlasDetectorID::muon_field_value
int muon_field_value() const
Definition: AtlasDetectorID.h:473
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:623
AtlasDetectorID::m_TRT_ID
int m_TRT_ID
Definition: AtlasDetectorID.h:394
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:354
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:1105
AtlasDetectorID::lucid_exp
ExpandedIdentifier lucid_exp(void) const
Definition: AtlasDetectorID.cxx:1154
IdDictDictionary.h
AtlasDetectorID::m_HGTD_ID
int m_HGTD_ID
Definition: AtlasDetectorID.h:395
IdContext::end_index
size_type end_index() const
Definition: IdContext.h:46
AtlasDetectorID::calo_field_value
int calo_field_value() const
Definition: AtlasDetectorID.h:476
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:766
AtlasDetectorID::mdt
Identifier mdt(void) const
Definition: AtlasDetectorID.cxx:39
IdDictDictionary::find_field
const IdDictField * find_field(const std::string &name) const
Definition: IdDictDictionary.cxx:47
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:178
AtlasDetectorIDHelper::pixel_region_index
size_type pixel_region_index() const
Definition: AtlasDetectorIDHelper.h:32
athena.value
value
Definition: athena.py:124
AtlasDetectorID::m_dict_version
std::string m_dict_version
Definition: AtlasDetectorID.h:382
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:354
ExpandedIdentifier.h
AtlasDetectorID::is_trt
bool is_trt(Identifier id) const
Definition: AtlasDetectorID.h:635
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
AtlasDetectorID::m_MUON_SUBDET_INDEX
size_type m_MUON_SUBDET_INDEX
Definition: AtlasDetectorID.h:386
IdDictDictionary::name
const std::string & name() const
Dictionary name.
Definition: IdDictDictionary.h:336
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:401
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:412
AtlasDetectorID::m_STGC_ID
int m_STGC_ID
Definition: AtlasDetectorID.h:406
AtlasDetectorID::lar_field_value
int lar_field_value() const
Definition: AtlasDetectorID.h:467
IdDictDictionary::file_name
const std::string & file_name() const
Access to file name.
Definition: IdDictDictionary.h:371
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:1056
AtlasDetectorIDHelper::UNDEFINED
@ UNDEFINED
Definition: AtlasDetectorIDHelper.h:20
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:566
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:21
AtlasDetectorID::dictionaryVersion
virtual std::string dictionaryVersion(void) const override
Definition: AtlasDetectorID.cxx:283
AtlasDetectorID::m_LAR_ID
int m_LAR_ID
Definition: AtlasDetectorID.h:388
AtlasDetectorID::m_do_neighbours
bool m_do_neighbours
Flag for subclasses to know whether or not to perform neighbour initialization.
Definition: AtlasDetectorID.h:357
AtlasDetectorID::m_INDET_ID
int m_INDET_ID
Definition: AtlasDetectorID.h:387
AtlasDetectorID::size_type
Identifier::size_type size_type
Definition: AtlasDetectorID.h:369
AtlasDetectorID::m_calo_dict
const IdDictDictionary * m_calo_dict
Definition: AtlasDetectorID.h:425
AtlasDetectorID::m_LUMI_PLR_ID
int m_LUMI_PLR_ID
Definition: AtlasDetectorID.h:397
IdDictLabel
Definition: IdDictLabel.h:10
IdDictRegion::implementation
const IdDictFieldImplementation & implementation(size_t i) const
Definition: IdDictRegion.cxx:38
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
IdDictMgr
Definition: IdDictMgr.h:16
AtlasDetectorID::m_tile_dm_field
Range::field m_tile_dm_field
Definition: AtlasDetectorID.h:419
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
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:389
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:264
AtlasDetectorID::m_group
std::string m_group
Group name.
Definition: AtlasDetectorID.h:350
AtlasDetectorID::m_lar_dict
const IdDictDictionary * m_lar_dict
Definition: AtlasDetectorID.h:422
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:383
AtlasDetectorID::m_lar_part_impl
IdDictFieldImplementation m_lar_part_impl
Definition: AtlasDetectorID.h:431
AtlasDetectorID::indet_exp
ExpandedIdentifier indet_exp(void) const
Detector systems:
Definition: AtlasDetectorID.cxx:1042
AtlasDetectorID::csc
Identifier csc(void) const
Definition: AtlasDetectorID.cxx:42
AtlasDetectorID::is_tgc
bool is_tgc(Identifier id) const
Definition: AtlasDetectorID.h:755
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:434
AtlasDetectorID::m_lar_fcal_module_impl
IdDictFieldImplementation m_lar_fcal_module_impl
Definition: AtlasDetectorID.h:432
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:601
AtlasDetectorID::m_LAR_EM_ID
int m_LAR_EM_ID
Definition: AtlasDetectorID.h:398
AtlasDetectorID::m_isHighLuminosityLHC
bool m_isHighLuminosityLHC
Definition: AtlasDetectorID.h:414
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:1161
AtlasDetectorID::alfa_exp
ExpandedIdentifier alfa_exp(void) const
Forward.
Definition: AtlasDetectorID.cxx:1140
AtlasDetectorID::is_tile
bool is_tile(Identifier id) const
Definition: AtlasDetectorID.h:548
AtlasDetectorID::is_lar_hec
bool is_lar_hec(Identifier id) const
Definition: AtlasDetectorID.h:682
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:1091
AtlasDetectorID::m_TGC_ID
int m_TGC_ID
Definition: AtlasDetectorID.h:405
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:1126
AtlasDetectorID::m_CSC_ID
int m_CSC_ID
Definition: AtlasDetectorID.h:403
IdDictFieldImplementation::ored_field
const Range::field & ored_field() const
Definition: IdDictFieldImplementation.h:201
AtlasDetectorID::m_lvl1_onl_field
Range::field m_lvl1_onl_field
Definition: AtlasDetectorID.h:417
AtlasDetectorID::lumi_exp
ExpandedIdentifier lumi_exp(void) const
Definition: AtlasDetectorID.cxx:1112
IdDictMgr::do_neighbours
bool do_neighbours() const
Check whether or not to init neighbours.
Definition: IdDictMgr.cxx:74
AtlasDetectorID::m_LAR_HEC_ID
int m_LAR_HEC_ID
Definition: AtlasDetectorID.h:399
IdentifierField::isEnumerated
bool isEnumerated() const
Definition: IdentifierField.h:185
AtlasDetectorID::m_muon_rpc_impl
IdDictFieldImplementation m_muon_rpc_impl
Definition: AtlasDetectorID.h:435
AtlasDetDescr::fAtlasMM
@ fAtlasMM
Definition: AtlasDetTechnology.h:54
AtlasDetectorID::m_SCT_ID
int m_SCT_ID
Definition: AtlasDetectorID.h:393
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:400
AtlasDetectorID::is_calo
bool is_calo(Identifier id) const
Definition: AtlasDetectorID.h:560
AtlasDetectorID::m_MM_ID
int m_MM_ID
Definition: AtlasDetectorID.h:407
AtlasDetectorID::m_DET_INDEX
size_type m_DET_INDEX
Definition: AtlasDetectorID.h:384
AtlasDetectorID::tile_field_value
int tile_field_value() const
Definition: AtlasDetectorID.h:470
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictDictionary.cxx:92
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:287
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:702
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:430
AtlasDetectorID::is_indet
bool is_indet(Identifier id) const
Definition: AtlasDetectorID.h:536
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:360
AtlasDetectorID::m_lar_dm_field
Range::field m_lar_dm_field
Definition: AtlasDetectorID.h:418
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:1063
AtlasDetectorID::setDictVersion
virtual void setDictVersion(const IdDictMgr &dict_mgr, const std::string &name) override
Definition: AtlasDetectorID.cxx:493
AtlasDetectorID::calo_exp
ExpandedIdentifier calo_exp(void) const
Definition: AtlasDetectorID.cxx:1070
AtlasDetectorID::fwd_exp
ExpandedIdentifier fwd_exp(void) const
Definition: AtlasDetectorID.cxx:1077
AtlasDetectorID::m_muon_station_name_impl
IdDictFieldImplementation m_muon_station_name_impl
Definition: AtlasDetectorID.h:433
AtlasDetectorID::m_MDT_ID
int m_MDT_ID
Definition: AtlasDetectorID.h:402
IdDictDictionary
Definition: IdDictDictionary.h:31
AtlasDetectorID::m_RPC_ID
int m_RPC_ID
Definition: AtlasDetectorID.h:404
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:424
AtlasDetectorID::is_lumi
bool is_lumi(Identifier id) const
Definition: AtlasDetectorID.h:659
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:589
IdDictMgr::find_dictionary
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:116
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
AtlasDetectorID::is_muon
bool is_muon(Identifier id) const
Definition: AtlasDetectorID.h:554
AtlasDetectorID::m_det_impl
IdDictFieldImplementation m_det_impl
Definition: AtlasDetectorID.h:428
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:378
AtlasDetectorID::lar_exp
ExpandedIdentifier lar_exp(void) const
Definition: AtlasDetectorID.cxx:1049
AtlasDetectorID::m_file_names
std::vector< std::string > m_file_names
List of dictionary file names used by this helper.
Definition: AtlasDetectorID.h:363
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:391
AtlasDetectorID::m_ALFA_ID
int m_ALFA_ID
Definition: AtlasDetectorID.h:409
AtlasDetectorID::trt_exp
ExpandedIdentifier trt_exp(void) const
Definition: AtlasDetectorID.cxx:1098
AtlasDetectorID::m_MUON_ID
int m_MUON_ID
Definition: AtlasDetectorID.h:390
IdDictMgr::do_checks
bool do_checks() const
Check whether or not to do checks for ids.
Definition: IdDictMgr.cxx:62
IdDictRegion::n_entries
size_t n_entries() const
Definition: IdDictRegion.h:280
AtlasDetectorID::m_PIXEL_ID
int m_PIXEL_ID
Definition: AtlasDetectorID.h:392
AtlasDetectorID::is_lvl1_online
bool is_lvl1_online(Identifier id) const
Definition: AtlasDetectorID.h:577
AtlasDetectorID::is_stgc
bool is_stgc(Identifier id) const
Definition: AtlasDetectorID.h:777
AtlasDetectorID::bcm_exp
ExpandedIdentifier bcm_exp(void) const
Definition: AtlasDetectorID.cxx:1147
AtlasDetectorID::lar_fcal_exp
ExpandedIdentifier lar_fcal_exp(void) const
Definition: AtlasDetectorID.cxx:1133
IdDictRegion.h
AtlasDetDescr::fAtlasTGC
@ fAtlasTGC
Definition: AtlasDetTechnology.h:52
CaloCondBlobAlgs_fillNoiseFromASCII.fields
fields
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:105
IdDictField
Definition: IdDictField.h:16
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:363
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:410
AtlasDetectorID::initLevelsFromDict
int initLevelsFromDict(const IdDictMgr &dict_mgr)
Definition: AtlasDetectorID.cxx:512
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:1084
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:366
AtlasDetectorID::m_SUBDET_INDEX
size_type m_SUBDET_INDEX
Definition: AtlasDetectorID.h:385
AtlasDetectorID::is_lar_em
bool is_lar_em(Identifier id) const
Definition: AtlasDetectorID.h:671
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:1119
AtlasDetectorID::m_FWD_ID
int m_FWD_ID
Definition: AtlasDetectorID.h:408
AtlasDetectorID::is_hgtd
bool is_hgtd(Identifier id) const
Definition: AtlasDetectorID.h:647
AtlasDetectorID::is_mdt
bool is_mdt(Identifier id) const
Definition: AtlasDetectorID.h:712
AtlasDetectorID::m_lvl1_field
Range::field m_lvl1_field
Definition: AtlasDetectorID.h:416
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:498
AtlasDetectorID::m_LUCID_ID
int m_LUCID_ID
Definition: AtlasDetectorID.h:411
AtlasDetectorID::m_indet_dict
const IdDictDictionary * m_indet_dict
Definition: AtlasDetectorID.h:421
AtlasDetectorID::m_fwd_dict
const IdDictDictionary * m_fwd_dict
Definition: AtlasDetectorID.h:426
IdDictFieldImplementation::bits
size_type bits() const
Definition: IdDictFieldImplementation.h:207
Identifier
Definition: IdentifierFieldParser.cxx:14