ATLAS Offline Software
TRT_ID.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef INDETIDENTIFIER_TRT_ID_H
6 #define INDETIDENTIFIER_TRT_ID_H
7 
20 #include "Identifier/Identifier.h"
22 #include "Identifier/MultiRange.h"
23 #include "Identifier/IdHelper.h"
25 #include "AthenaKernel/CLASS_DEF.h"
26 
27 #include <algorithm>
28 #include <string>
29 #include <map>
30 #include <cassert>
31 
32 
33 class IdDictDictionary;
34 
82 {
83 public:
85 
87  typedef std::vector<Identifier>::const_iterator const_id_iterator;
90 
92 
93  TRT_ID();
96 
98 
99  bool is_valid() const;
101 
103 
104  Identifier barrel_ec_id(int barrel_ec) const;
106  Identifier barrel_ec_id(int barrel_ec, bool checks) const;
107 
110  int phi_module,
111  int layer_or_wheel) const;
113  int phi_module,
114  int layer_or_wheel,
115  bool checks) const;
116 
119 
122  int phi_module,
123  int layer_or_wheel,
124  int straw_layer) const;
126  int phi_module,
127  int layer_or_wheel,
128  int straw_layer,
129  bool checks) const;
130 
133 
136  int straw_layer) const;
138  int straw_layer,
139  bool checks) const;
140 
142  Identifier layer_id(const Identifier& straw_id) const;
143 
146  int phi_module,
147  int layer_or_wheel,
148  int straw_layer,
149  int straw) const;
151  int phi_module,
152  int layer_or_wheel,
153  int straw_layer,
154  int straw,
155  bool checks) const;
156 
158  int straw_layer,
159  int straw) const;
161  int straw_layer,
162  int straw,
163  bool checks) const;
164 
166  int straw) const;
168  int straw,
169  bool checks) const;
170 
175 
177 
178  void init_straw_hash_vector();
183 
185 
186  size_type module_hash_max() const;
188  size_type straw_hash_max() const;
190 
191 
193 
205 
207 
210 
212  IdentifierHash straw_layer_hash(Identifier straw_layer_id) const;
213 
216 
218  bool is_barrel(const Identifier& id) const;
219 
221  int barrel_ec(const Identifier& id) const;
222  int phi_module(const Identifier& id) const;
223  int layer_or_wheel(const Identifier& id) const;
224  int straw_layer(const Identifier& id) const;
225  int straw(const Identifier& id) const;
226 
228  int straw_layer_max(const Identifier& id) const;
229  int straw_max(const Identifier& id) const;
231 
232 
234 
235  IdContext barrel_context() const;
238  IdContext module_context() const;
242  IdContext straw_context() const;
244 
245 
247 
248  virtual int get_id(const IdentifierHash& hash_id,
250  Identifier& id,
251  const IdContext* context = 0) const override final;
252 
254  virtual int get_hash(const Identifier& id,
255  IdentifierHash& hash_id,
256  const IdContext* context = 0) const override final;
258 
260 
261 
265 
266 
267 
269  virtual int initialize_from_dictionary(const IdDictMgr& dict_mgr) override final;
270 
273  IdentifierHash& hash_id) const;
274 
275 
278  ExpandedIdentifier& exp_id,
279  const IdContext* context = 0) const;
280 
282  void test_trt_ids();
284 
285 
288  };
289 private:
290  typedef std::vector<Identifier> hash_vec;
291  typedef hash_vec::const_iterator hash_vec_it;
292 
293  enum VALUES {
294  BARREL_VALUE = 1
295  };
296 
297  void barrel_ec_id_checks(int barrel_ec) const;
298  void module_id_checks(int barrel_ec,
299  int phi_module,
300  int layer_or_wheel) const;
301  void straw_id_checks(int barrel_ec,
302  int phi_module,
303  int layer_or_wheel,
304  int straw_layer,
305  int straw) const;
306  void layer_id_checks(int barrel_ec,
307  int phi_module,
308  int layer_or_wheel,
309  int straw_layer) const;
310 
311  int initLevelsFromDict();
312 
313  void init_hashes();
314  // Private access only for hash from binary search - must have
315  // done init_straw_hashes for this to work
317 
318  // print out the invalid message
319  void invalidMessage() const;
320 
341 
342  class HashCalc
343  {
344  public:
346  m_hash(0),
347  m_deltaPhi(0),
348  m_layerMin(0),
349  m_strLayerMin(0),
350  m_nStrawLayers(0),
351  m_nstraws(0)
352  {}
359  };
360 
361  typedef std::pair<unsigned int, unsigned int> intPair;
362  typedef std::map<IdentifierHash, HashCalc> hashCalcMap;
363  std::vector<HashCalc> m_hash_calcs;
364  std::vector<intPair> m_hash_calcs_barrel_indexes;
365  std::vector<intPair> m_hash_calcs_endcap_indexes;
366 
374 };
375 
376 
377 
378 //using the macros below we can assign an identifier (and a version)
379 //This is required and checked at compile time when you try to record/retrieve
380 CLASS_DEF(TRT_ID, 2518, 1)
381 
382 
383 //----------------------------------------------------------------------------
384 inline bool
385 TRT_ID::is_valid() const {
386  return(m_is_valid);
387 }
388 
389 //----------------------------------------------------------------------------
390 inline Identifier
391 TRT_ID::barrel_ec_id(int barrel_ec, bool checks) const {
392  // Check if TRT_ID is valid for this layout
393  if (!m_is_valid) invalidMessage();
394 
395  // Build identifier
397 
398  // Pack fields independently
402 
403  if (checks) {
405  }
406 
407  return result;
408 }
409 
410 inline Identifier
411 TRT_ID::barrel_ec_id(int barrel_ec) const {
412  return barrel_ec_id(barrel_ec, do_checks());
413 }
414 
415 //----------------------------------------------------------------------------
416 inline Identifier
417 TRT_ID::module_id(int barrel_ec,
418  int phi_module,
419  int layer_or_wheel,
420  bool checks) const {
421  // Check if TRT_ID is valid for this layout
422  if (!m_is_valid) invalidMessage();
423 
424  // Build identifier
426 
427  // Pack fields independently
433 
434  if (checks) {
436  }
437 
438  return result;
439 }
440 
441 inline Identifier
442 TRT_ID::module_id(int barrel_ec,
443  int phi_module,
444  int layer_or_wheel) const {
446 }
447 
448 //----------------------------------------------------------------------------
449 inline Identifier
450 TRT_ID::module_id(IdentifierHash module_hash) const {
451  // Check if TRT_ID is valid for this layout
452  if (!m_is_valid) invalidMessage();
453 
454  return(m_module_vec[module_hash]);
455 }
456 
457 //----------------------------------------------------------------------------
458 inline Identifier TRT_ID::layer_id(IdentifierHash layer_hash) const {
459  // Check if TRT_ID is valid for this layout
460  if (!m_is_valid) invalidMessage();
461 
462  return(m_straw_layer_vec[layer_hash]);
463 }
464 
465 //----------------------------------------------------------------------------
466 inline Identifier
467 TRT_ID::layer_id(int barrel_ec,
468  int phi_module,
469  int layer_or_wheel,
470  int straw_layer,
471  bool checks) const {
472  // Check if TRT_ID is valid for this layout
473  if (!m_is_valid) invalidMessage();
474 
475  // Build identifier
477 
478  // Pack fields independently
485 
486  if (checks) {
488  }
489 
490  return result;
491 }
492 
493 inline Identifier
494 TRT_ID::layer_id(int barrel_ec,
495  int phi_module,
496  int layer_or_wheel,
497  int straw_layer) const {
499  do_checks());
500 }
501 
502 //----------------------------------------------------------------------------
503 inline Identifier
504 TRT_ID::layer_id(const Identifier& module_id,
505  int straw_layer,
506  bool checks) const {
507  // Check if TRT_ID is valid for this layout
508  if (!m_is_valid) invalidMessage();
509 
510  // Build identifier
512 
513  // Reset field and then pack it
516 
517  if (checks) {
521  straw_layer);
522  }
523  return result;
524 }
525 
526 inline Identifier
527 TRT_ID::layer_id(const Identifier& module_id,
528  int straw_layer) const {
530 }
531 
532 //----------------------------------------------------------------------------
533 inline Identifier
534 TRT_ID::layer_id(const Identifier& straw_id) const {
535  // Check if TRT_ID is valid for this layout
536  if (!m_is_valid) invalidMessage();
537 
539  // Reset the straw field
541  return(result);
542 }
543 
544 //----------------------------------------------------------------------------
545 inline Identifier
546 TRT_ID::straw_id(int barrel_ec,
547  int phi_module,
548  int layer_or_wheel,
549  int straw_layer,
550  int straw,
551  bool checks) const {
552  // Check if TRT_ID is valid for this layout
553  if (!m_is_valid) invalidMessage();
554 
555  // Build identifier
557 
558  // Pack fields independently
566 
567  if (checks) {
569  }
570 
571  return result;
572 }
573 
574 inline Identifier
575 TRT_ID::straw_id(int barrel_ec,
576  int phi_module,
577  int layer_or_wheel,
578  int straw_layer,
579  int straw) const {
581  do_checks());
582 }
583 
584 //----------------------------------------------------------------------------
585 inline Identifier
587  // Check if TRT_ID is valid for this layout
588  if (!m_is_valid) invalidMessage();
589 
591  if (m_STRAW_INDEX < id.fields()) {
593  id[m_PHI_MODULE_INDEX],
596  id[m_STRAW_INDEX]);
597  }
598  return(result);
599 }
600 
601 //----------------------------------------------------------------------------
602 inline Identifier
603 TRT_ID::straw_id(const Identifier& module_id,
604  int straw_layer,
605  int straw,
606  bool checks) const {
607  // Check if TRT_ID is valid for this layout
608  if (!m_is_valid) invalidMessage();
609 
610  // Build identifier
612 
613  // Reset fields and then pack them
618 
619  if (checks) {
623  straw_layer,
624  straw);
625  }
626  return result;
627 }
628 
629 inline Identifier
630 TRT_ID::straw_id(const Identifier& module_id,
631  int straw_layer,
632  int straw) const {
634 }
635 
636 //----------------------------------------------------------------------------
637 inline Identifier
638 TRT_ID::straw_id(const Identifier& layer_id,
639  int straw,
640  bool checks) const {
641  // Check if TRT_ID is valid for this layout
642  if (!m_is_valid) invalidMessage();
643 
644  // Build identifier
646 
647  // Reset field and then pack it
650 
651  if (checks) {
656  straw);
657  }
658  return result;
659 }
660 
661 inline Identifier
662 TRT_ID::straw_id(const Identifier& layer_id,
663  int straw) const {
664  return straw_id(layer_id, straw, do_checks());
665 }
666 
667 //----------------------------------------------------------------------------
668 inline Identifier
669 TRT_ID::straw_id(IdentifierHash straw_hash) const {
670  // Check if TRT_ID is valid for this layout
671  if (!m_is_valid) invalidMessage();
672 
673 
674  // Access id from vector ONLY if the vector has been initialized
675  // (done via init_straw_hash_vector();
676  // and reset by reset_straw_hash_vector();
677  if (straw_hash < m_straw_vec.size()) {
678  return(m_straw_vec[straw_hash]);
679  }
680  // Else return invalid id
682  return(result); // return hash in invalid state
683 }
684 
685 //----------------------------------------------------------------------------
686 inline IdContext
688  // Check if TRT_ID is valid for this layout
689  if (!m_is_valid) invalidMessage();
690 
692  return(IdContext(id, 0, m_BARREL_EC_INDEX));
693 }
694 
695 //----------------------------------------------------------------------------
696 inline IdContext
698  // Check if TRT_ID is valid for this layout
699  if (!m_is_valid) invalidMessage();
700 
702  return(IdContext(id, 0, m_LAYER_OR_WHEEL_INDEX));
703 }
704 
705 //----------------------------------------------------------------------------
706 inline IdContext
708  // Check if TRT_ID is valid for this layout
709  if (!m_is_valid) invalidMessage();
710 
712  return(IdContext(id, 0, m_STRAW_LAYER_INDEX));
713 }
714 
715 //----------------------------------------------------------------------------
716 inline IdContext
718  // Check if TRT_ID is valid for this layout
719  if (!m_is_valid) invalidMessage();
720 
722  return(IdContext(id, 0, m_STRAW_INDEX));
723 }
724 
725 //----------------------------------------------------------------------------
727  // Check if TRT_ID is valid for this layout
728  if (!m_is_valid) invalidMessage();
729 
730  hash_vec_it it = std::lower_bound(m_module_vec.begin(),
731  m_module_vec.end(),
732  module_id);
733  // Require that module_id matches the one in vector
734  if (it != m_module_vec.end() && module_id == (*it)) {
735  return(it - m_module_vec.begin());
736  }
738  return(result); // return hash in invalid state
739 }
740 
741 //----------------------------------------------------------------------------
742 inline
744 TRT_ID::straw_layer_hash(Identifier straw_layer_id) const {
745  // Check if TRT_ID is valid for this layout
746  if (!m_is_valid) invalidMessage();
747 
748  hash_vec_it it = std::lower_bound(m_straw_layer_vec.begin(),
749  m_straw_layer_vec.end(),
750  straw_layer_id);
751  // Require that straw_layer_id matches the one in vector
752  if (it != m_straw_layer_vec.end() && straw_layer_id == (*it)) {
753  return(it - m_straw_layer_vec.begin());
754  }
756  return(result); // return hash in invalid state
757 }
758 
759 //----------------------------------------------------------------------------
760 inline
763 //TRT_ID::straw_hash (Identifier straw_id, bool debug) const
764 {
765  // Check if TRT_ID is valid for this layout
766  if (!m_is_valid) invalidMessage();
767 
768  // Get index into hashCalc vector
769  unsigned int hcIndex = 0;
770  int be = barrel_ec(straw_id);
771  int lw = layer_or_wheel(straw_id);
772  int sl = straw_layer(straw_id);
773 
774  if (is_barrel(straw_id)) {
775  unsigned int index = lw * 32 + sl;
776  if (index < m_hash_calcs_barrel_indexes.size()) {
777  hcIndex = (be < 0) ? m_hash_calcs_barrel_indexes[index].first :
778  m_hash_calcs_barrel_indexes[index].second;
779  } else {
780  std::cout << "straw_hash: index > barrel_index size - " << index
781  << " " << m_hash_calcs_barrel_indexes.size() << std::endl;
782  }
783  } else {
784  unsigned int index = lw;
785  if (index < m_hash_calcs_endcap_indexes.size()) {
786  hcIndex = (be < 0) ? m_hash_calcs_endcap_indexes[index].first :
787  m_hash_calcs_endcap_indexes[index].second;
788  } else {
789  std::cout << "straw_hash: index > endcap_index size - " << index
790  << " " << m_hash_calcs_endcap_indexes.size() << std::endl;
791  }
792  }
793 
794 
795 
797  if (hcIndex < m_hash_calcs.size()) {
798  const HashCalc& hc = m_hash_calcs[hcIndex];
799  result = hc.m_hash +
800  phi_module(straw_id) * hc.m_deltaPhi +
801  (lw - hc.m_layerMin) * hc.m_nStrawLayers +
802  (sl - hc.m_strLayerMin) * hc.m_nstraws +
803  straw(straw_id);
804 
805 
806  return(result);
807  } else {
808  std::cout << "straw_hash: hc index > hcCalc size - " << hcIndex
809  << " " << m_hash_calcs.size() << std::endl;
810  }
811  return(result);
812 }
813 
814 //----------------------------------------------------------------------------
815 inline
818  // Check if TRT_ID is valid for this layout
819  if (!m_is_valid) invalidMessage();
820 
821  hash_vec_it it = std::lower_bound(m_straw_vec.begin(),
822  m_straw_vec.end(),
823  straw_id);
824 
825 
826 
827  if (it != m_straw_vec.end()) {
828  return(it - m_straw_vec.begin());
829  }
831  return(result); // return hash in invalid state
832 }
833 
834 //----------------------------------------------------------------------------
835 inline
836 void
838  MsgStream log(m_msgSvc, "TRT_ID");
839 
840  if (m_msgSvc) {
841  log << MSG::ERROR << " TRT_ID is NOT valid for this layout. " << endmsg;
842  log << MSG::ERROR << " Please use 'trt_id->is_valid()' if a layout test is needed. " << endmsg;
843  } else {
844  std::cout << " ERROR TRT_ID is NOT valid for this layout. " << std::endl;
845  std::cout << " ERROR Please use 'trt_id->is_valid()' if a layout test is needed. " << std::endl;
846  }
847 }
848 
849 //----------------------------------------------------------------------------
850 inline bool
851 TRT_ID::is_barrel(const Identifier& id) const {
852  // Check if TRT_ID is valid for this layout
853  if (!m_is_valid) invalidMessage();
854 
855  return(m_barrel_field.match(m_bec_impl.unpack(id)));
856 }
857 
858 //----------------------------------------------------------------------------
859 inline int
860 TRT_ID::barrel_ec(const Identifier& id) const {
861  // Check if TRT_ID is valid for this layout
862  if (!m_is_valid) invalidMessage();
863 
864  return(m_bec_impl.unpack(id));
865 }
866 
867 //----------------------------------------------------------------------------
868 inline int
869 TRT_ID::phi_module(const Identifier& id) const {
870  // Check if TRT_ID is valid for this layout
871  if (!m_is_valid) invalidMessage();
872 
873  return(m_phi_mod_impl.unpack(id));
874 }
875 
876 //----------------------------------------------------------------------------
877 inline int
879  // Check if TRT_ID is valid for this layout
880  if (!m_is_valid) invalidMessage();
881 
882  return(m_lay_wheel_impl.unpack(id));
883 }
884 
885 //----------------------------------------------------------------------------
886 inline int
887 TRT_ID::straw_layer(const Identifier& id) const {
888  // Check if TRT_ID is valid for this layout
889  if (!m_is_valid) invalidMessage();
890 
891  return(m_str_lay_impl.unpack(id));
892 }
893 
894 //----------------------------------------------------------------------------
895 inline int
896 TRT_ID::straw(const Identifier& id) const {
897  // Check if TRT_ID is valid for this layout
898  if (!m_is_valid) invalidMessage();
899 
900  return(m_straw_impl.unpack(id));
901 }
902 
903 //----------------------------------------------------------------------------
904 inline TRT_ID::size_type
906  // Check if TRT_ID is valid for this layout
907  if (!m_is_valid) invalidMessage();
908 
909  return m_module_hash_max;
910 }
911 
912 //----------------------------------------------------------------------------
913 inline TRT_ID::size_type
915  // Check if TRT_ID is valid for this layout
916  if (!m_is_valid) invalidMessage();
917 
918  return m_straw_layer_hash_max;
919 }
920 
921 //----------------------------------------------------------------------------
922 inline TRT_ID::size_type
924  // Check if TRT_ID is valid for this layout
925  if (!m_is_valid) invalidMessage();
926 
927  return m_straw_hash_max;
928 }
929 
930 //----------------------------------------------------------------------------
932  // Check if TRT_ID is valid for this layout
933  if (!m_is_valid) invalidMessage();
934 
935  return(m_module_vec.begin());
936 }
937 
938 //----------------------------------------------------------------------------
940  // Check if TRT_ID is valid for this layout
941  if (!m_is_valid) invalidMessage();
942 
943  return(m_module_vec.end());
944 }
945 
946 //----------------------------------------------------------------------------
948  // Check if TRT_ID is valid for this layout
949  if (!m_is_valid) invalidMessage();
950 
951  return(m_straw_layer_vec.begin());
952 }
953 
954 //----------------------------------------------------------------------------
956  // Check if TRT_ID is valid for this layout
957  if (!m_is_valid) invalidMessage();
958 
959  return(m_straw_layer_vec.end());
960 }
961 
962 //----------------------------------------------------------------------------
964  // Check if TRT_ID is valid for this layout
965  if (!m_is_valid) invalidMessage();
966 
968 }
969 
970 //----------------------------------------------------------------------------
972  // Check if TRT_ID is valid for this layout
973  if (!m_is_valid) invalidMessage();
974 
976 }
977 
978 #endif // INDETIDENTIFIER_TRT_ID_H
TRT_ID::m_bec_impl
IdDictFieldImplementation m_bec_impl
Definition: TRT_ID.h:369
TRT_ID::m_is_valid
bool m_is_valid
Definition: TRT_ID.h:321
AtlasDetectorID::indet_field_value
int indet_field_value() const
Provide efficient access to individual field values, for subclass idhelpers.
Definition: AtlasDetectorID.h:606
TRT_ID::m_LAYER_OR_WHEEL_INDEX
size_type m_LAYER_OR_WHEEL_INDEX
Definition: TRT_ID.h:327
TRT_ID::m_full_straw_range
MultiRange m_full_straw_range
Definition: TRT_ID.h:331
TRT_ID::layer_id
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
Definition: TRT_ID.h:494
TRT_ID::m_trt_region_index
size_type m_trt_region_index
Definition: TRT_ID.h:322
TRT::Hit::straw
@ straw
Definition: HitInfo.h:82
TRT_ID::m_hash_calcs
std::vector< HashCalc > m_hash_calcs
Definition: TRT_ID.h:363
TRT_ID::m_PHI_MODULE_INDEX
size_type m_PHI_MODULE_INDEX
Definition: TRT_ID.h:326
TRT_ID::module_id_checks
void module_id_checks(int barrel_ec, int phi_module, int layer_or_wheel) const
Definition: TRT_ID.cxx:68
get_generator_info.result
result
Definition: get_generator_info.py:21
TRT_ID::straw_max
int straw_max(const Identifier &id) const
Definition: TRT_ID.cxx:806
TRT_ID::hash_vec_it
hash_vec::const_iterator hash_vec_it
Definition: TRT_ID.h:291
TRT_ID::m_full_straw_layer_range
MultiRange m_full_straw_layer_range
Definition: TRT_ID.h:332
TRT_ID::init_straw_hash_vector
void init_straw_hash_vector()
The init will use up ~2 MB of memory, so one should do init, use straw_id and then reset.
Definition: TRT_ID.cxx:511
TRT_ID::init_hashes
void init_hashes()
Definition: TRT_ID.cxx:264
TRT_ID::m_STRAW_LAYER_INDEX
size_type m_STRAW_LAYER_INDEX
Definition: TRT_ID.h:328
TRT_ID::m_phi_mod_impl
IdDictFieldImplementation m_phi_mod_impl
Definition: TRT_ID.h:370
TRT_ID::straw_hash
IdentifierHash straw_hash(Identifier straw_id) const
straw hash from id - optimized
Definition: TRT_ID.h:762
MultiRange::factory_begin
identifier_factory factory_begin()
Definition: MultiRange.cxx:112
TRT_ID::BARREL_VALUE
@ BARREL_VALUE
Definition: TRT_ID.h:294
index
Definition: index.py:1
TRT_ID::m_straw_layer_vec
hash_vec m_straw_layer_vec
Definition: TRT_ID.h:339
TRT_ID::HashCalc::m_deltaPhi
size_type m_deltaPhi
Definition: TRT_ID.h:354
MultiRange::factory_end
identifier_factory factory_end()
Definition: MultiRange.cxx:124
python.LumiCalcWorking.lw
lw
Definition: LumiCalcWorking.py:111
TRT_ID::get_straw_layer_hash_calc
int get_straw_layer_hash_calc(const ExpandedIdentifier &id, IdentifierHash &hash_id) const
Special method for timing tests.
Definition: TRT_ID.cxx:694
TRT_ID::barrel_ec_id_checks
void barrel_ec_id_checks(int barrel_ec) const
Definition: TRT_ID.cxx:51
TRT_ID::straw_layer_end
const_id_iterator straw_layer_end() const
Definition: TRT_ID.h:955
TRT_ID::straw_layer_begin
const_id_iterator straw_layer_begin() const
Iterators over full set of straw_layer ids. Straw_layer ids are sorted.
Definition: TRT_ID.h:947
skel.it
it
Definition: skel.GENtoEVGEN.py:407
python.SystemOfUnits.second
float second
Definition: SystemOfUnits.py:135
TRT_ID::module_end
const_id_iterator module_end() const
Definition: TRT_ID.h:939
TRT_ID::m_BARREL_EC_INDEX
size_type m_BARREL_EC_INDEX
Definition: TRT_ID.h:325
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
TRT_ID::m_trt_impl
IdDictFieldImplementation m_trt_impl
Definition: TRT_ID.h:368
IdDictFieldImplementation::pack
void pack(int value, Identifier &id) const
Definition: IdDictFieldImplementation.h:173
TRT_ID::is_valid
bool is_valid() const
Definition: TRT_ID.h:385
AtlasDetectorID::m_msgSvc
IMessageSvc * m_msgSvc
pointer to the message service
Definition: AtlasDetectorID.h:369
TRT_ID::VALUES
VALUES
Definition: TRT_ID.h:293
IdHelper.h
TRT_ID::barrel_ec_id
Identifier barrel_ec_id(int barrel_ec) const
For +/-barrel or +/-endcap id.
Definition: TRT_ID.h:411
TRT_ID::const_id_iterator
std::vector< Identifier >::const_iterator const_id_iterator
Definition: TRT_ID.h:87
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
AtlasDetectorID::trt_field_value
int trt_field_value() const
Definition: AtlasDetectorID.h:627
TRT_ID::m_TRT_INDEX
size_type m_TRT_INDEX
Definition: TRT_ID.h:324
TRT_ID::m_straw_hash_max
size_type m_straw_hash_max
Definition: TRT_ID.h:336
IdDictFieldImplementation::unpack
int unpack(Identifier id) const
Identifier manipulation methods.
Definition: IdDictFieldImplementation.h:147
TRT_ID::m_str_lay_impl
IdDictFieldImplementation m_str_lay_impl
Definition: TRT_ID.h:372
TRT_ID::m_dict
const IdDictDictionary * m_dict
Definition: TRT_ID.h:330
TRT_ID::~TRT_ID
~TRT_ID()
TRT_ID::HashCalc::m_layerMin
size_type m_layerMin
Definition: TRT_ID.h:355
TRT_ID::module_hash
IdentifierHash module_hash(Identifier module_id) const
module hash from id - optimized
Definition: TRT_ID.h:726
TRT_ID::HashCalc::m_nStrawLayers
size_type m_nStrawLayers
Definition: TRT_ID.h:357
TRT_ID::hashCalcMap
std::map< IdentifierHash, HashCalc > hashCalcMap
Definition: TRT_ID.h:362
TRT_ID::m_hash_calcs_barrel_indexes
std::vector< intPair > m_hash_calcs_barrel_indexes
Definition: TRT_ID.h:364
TRT_ID::barrel_context
IdContext barrel_context() const
barrel_ec id
Definition: TRT_ID.h:687
IdDictFieldImplementation::reset
void reset(Identifier &id) const
Definition: IdDictFieldImplementation.h:183
AtlasDetectorID::size_type
Identifier::size_type size_type
Definition: AtlasDetectorID.h:385
TRT_ID::m_STRAW_INDEX
size_type m_STRAW_INDEX
Definition: TRT_ID.h:329
TRT_ID::HashCalc::m_nstraws
size_type m_nstraws
Definition: TRT_ID.h:358
IdentifierField::match
bool match(element_type value) const
The basic match operation Given a value, test to see if it satisfies the constraints for this field.
Definition: IdentifierField.cxx:71
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
IdDictMgr
Definition: IdDictMgr.h:14
TRT_ID::get_id
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override final
Create compact id from hash id (return == 0 for OK)
Definition: TRT_ID.cxx:702
TRT_ID::straw
int straw(const Identifier &id) const
Definition: TRT_ID.h:896
TRT_ID::m_module_hash_max
size_type m_module_hash_max
Definition: TRT_ID.h:334
TRT_ID::NUMBER_OF_EC_MODULES
@ NUMBER_OF_EC_MODULES
Definition: TRT_ID.h:287
TRT_ID::get_hash
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const override final
Create hash id from compact id (return == 0 for OK)
Definition: TRT_ID.cxx:751
TRT_ID::m_INDET_INDEX
size_type m_INDET_INDEX
Definition: TRT_ID.h:323
MultiRange::const_identifier_factory
Definition: MultiRange.h:52
TRT_ID::module_context
IdContext module_context() const
module id
Definition: TRT_ID.h:697
TRT_ID::straw_hash_bin
IdentifierHash straw_hash_bin(Identifier straw_id) const
Definition: TRT_ID.h:817
TRT_ID::m_straw_layer_hash_max
size_type m_straw_layer_hash_max
Definition: TRT_ID.h:335
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TRT_ID::straw_id_checks
void straw_id_checks(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Definition: TRT_ID.cxx:88
TRT_ID::TRT_ID
TRT_ID()
Definition: TRT_ID.cxx:28
TRT_ID::size_type
Identifier::size_type size_type
Definition: TRT_ID.h:86
TRT_ID::m_indet_impl
IdDictFieldImplementation m_indet_impl
Definition: TRT_ID.h:367
TRT_ID::m_straw_vec
hash_vec m_straw_vec
Definition: TRT_ID.h:340
TRT_ID::HashCalc
Definition: TRT_ID.h:343
TRT_ID::get_expanded_id
void get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context=0) const
Definition: TRT_ID.cxx:733
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:860
TRT_ID::straw_layer
int straw_layer(const Identifier &id) const
Definition: TRT_ID.h:887
TRT_ID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override final
Set the IdDictionary.
Definition: TRT_ID.cxx:133
TRT_ID::layer_or_wheel
int layer_or_wheel(const Identifier &id) const
Definition: TRT_ID.h:878
columnar::final
CM final
Definition: ColumnAccessor.h:106
TRT_ID::intPair
std::pair< unsigned int, unsigned int > intPair
Definition: TRT_ID.h:361
TRT_ID::m_module_vec
hash_vec m_module_vec
Definition: TRT_ID.h:338
TRT_ID::module_hash_max
size_type module_hash_max() const
Definition: TRT_ID.h:905
TRT_ID::straw_layer_max
int straw_layer_max(const Identifier &id) const
Max values for each field (-999 == failure)
Definition: TRT_ID.cxx:785
MultiRange
A MultiRange combines several Ranges.
Definition: MultiRange.h:17
TRT_ID::m_hash_calcs_endcap_indexes
std::vector< intPair > m_hash_calcs_endcap_indexes
Definition: TRT_ID.h:365
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
TRT_ID::straw_layer_context
IdContext straw_layer_context() const
straw_layer id
Definition: TRT_ID.h:707
IdentifierHash.h
TRT_ID::HashCalc::HashCalc
HashCalc()
Definition: TRT_ID.h:345
TRT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: TRT_ID.h:869
MultiRange.h
TRT_ID::test_trt_ids
void test_trt_ids()
Tests of packing.
Definition: TRT_ID.cxx:825
IdDictDictionary
Definition: IdDictDictionary.h:30
TRT_ID::straw_hash_max
size_type straw_hash_max() const
Definition: TRT_ID.h:923
IdDictFieldImplementation.h
TRT_ID::m_full_module_range
MultiRange m_full_module_range
Definition: TRT_ID.h:333
TRT_ID::straw_context
IdContext straw_context() const
straw id
Definition: TRT_ID.h:717
TRT_ID::m_straw_impl
IdDictFieldImplementation m_straw_impl
Definition: TRT_ID.h:373
TRT_ID
Definition: TRT_ID.h:82
TRT_ID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel.
Definition: TRT_ID.h:851
TRT_ID::initLevelsFromDict
int initLevelsFromDict()
Definition: TRT_ID.cxx:566
TRT_ID::MODULE_RANGE
MODULE_RANGE
Definition: TRT_ID.h:286
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
DeMoScan.first
bool first
Definition: DeMoScan.py:534
TRT_ID::layer_id_checks
void layer_id_checks(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
Definition: TRT_ID.cxx:110
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
IdentifierField
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
Definition: IdentifierField.h:83
TRT_ID::m_lay_wheel_impl
IdDictFieldImplementation m_lay_wheel_impl
Definition: TRT_ID.h:371
TRT_ID::HashCalc::m_hash
IdentifierHash m_hash
Definition: TRT_ID.h:353
TRT_ID::reset_straw_hash_vector
void reset_straw_hash_vector()
Definition: TRT_ID.cxx:506
Identifier::value_type
unsigned long long value_type
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:27
TRT_ID::invalidMessage
void invalidMessage() const
Definition: TRT_ID.h:837
TRT_ID::m_barrel_field
Range::field m_barrel_field
Definition: TRT_ID.h:337
CaloCondBlobAlgs_fillNoiseFromASCII.fields
fields
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:105
TRT_ID::module_begin
const_id_iterator module_begin() const
Iterators over full set of module ids. Module ids are sorted.
Definition: TRT_ID.h:931
Identifier::size_type
unsigned long long size_type
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:29
IdDictFieldImplementation
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
Definition: IdDictFieldImplementation.h:58
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
TRT_ID::straw_layer_hash_max
size_type straw_layer_hash_max() const
Definition: TRT_ID.h:914
TRT_ID::hash_vec
std::vector< Identifier > hash_vec
Definition: TRT_ID.h:290
AtlasDetectorID::do_checks
virtual bool do_checks(void) const override
Checks are performed by default in debug compilation and NOT in optimized compilation.
Definition: AtlasDetectorID.cxx:476
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
PlotCalibFromCool.be
be
Definition: PlotCalibFromCool.py:398
CLASS_DEF.h
macros to associate a CLID to a type
TRT_ID::const_expanded_id_iterator
MultiRange::const_identifier_factory const_expanded_id_iterator
Definition: TRT_ID.h:88
TRT_ID::straw_end
const_expanded_id_iterator straw_end() const
Definition: TRT_ID.h:971
TRT_ID::HashCalc::m_strLayerMin
size_type m_strLayerMin
Definition: TRT_ID.h:356
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:52
TRT_ID::straw_layer_hash
IdentifierHash straw_layer_hash(Identifier straw_layer_id) const
straw_layer hash from id - optimized
Definition: TRT_ID.h:744
TRT_ID::module_id
Identifier module_id(int barrel_ec, int phi_module, int layer_or_wheel) const
For an individual module phi sector.
Definition: TRT_ID.h:442
TRT_ID::straw_id
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw:
Definition: TRT_ID.h:575
TRT_ID::straw_begin
const_expanded_id_iterator straw_begin() const
For straw ids, only expanded id iterators are available.
Definition: TRT_ID.h:963
Identifier
Definition: IdentifierFieldParser.cxx:14