ATLAS Offline Software
TRT_ID.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef INDETIDENTIFIER_TRT_ID_H
6 #define INDETIDENTIFIER_TRT_ID_H
7 
19 //<<<<<< INCLUDES >>>>>>
20 
22 #include "Identifier/Identifier.h"
24 #include "Identifier/MultiRange.h"
25 #include "Identifier/IdHelper.h"
27 #include "AthenaKernel/CLASS_DEF.h"
28 
29 #include <algorithm>
30 #include <string>
31 #include <map>
32 #include <cassert>
33 
34 
35 class IdDictDictionary;
36 
83 class TRT_ID final: public AtlasDetectorID
84 {
85 public:
87 
89  typedef std::vector<Identifier>::const_iterator const_id_iterator;
92 
94 
95  TRT_ID(void);
96  ~TRT_ID(void);
98 
100 
101  bool is_valid() const;
103 
105 
106  Identifier barrel_ec_id(int barrel_ec) const;
108  Identifier barrel_ec_id(int barrel_ec, bool checks) const;
109 
112  int phi_module,
113  int layer_or_wheel) const;
115  int phi_module,
116  int layer_or_wheel,
117  bool checks) const;
118 
121 
124  int phi_module,
125  int layer_or_wheel,
126  int straw_layer) const;
128  int phi_module,
129  int layer_or_wheel,
130  int straw_layer,
131  bool checks) const;
132 
135 
138  int straw_layer) const;
140  int straw_layer,
141  bool checks) const;
142 
144  Identifier layer_id(const Identifier& straw_id) const;
145 
148  int phi_module,
149  int layer_or_wheel,
150  int straw_layer,
151  int straw) const;
153  int phi_module,
154  int layer_or_wheel,
155  int straw_layer,
156  int straw,
157  bool checks) const;
158 
160  int straw_layer,
161  int straw) const;
163  int straw_layer,
164  int straw,
165  bool checks) const;
166 
168  int straw) const;
170  int straw,
171  bool checks) const;
172 
177 
179 
180  void init_straw_hash_vector(void);
183  void reset_straw_hash_vector(void);
185 
187 
188  size_type module_hash_max(void) const;
189  size_type straw_layer_hash_max(void) const;
190  size_type straw_hash_max(void) const;
192 
193 
195 
196  const_id_iterator module_begin(void) const;
198  const_id_iterator module_end(void) const;
207 
209 
212 
214  IdentifierHash straw_layer_hash(Identifier straw_layer_id) const;
215 
218 
220  bool is_barrel(const Identifier& id) const;
221 
223  int barrel_ec(const Identifier& id) const;
224  int phi_module(const Identifier& id) const;
225  int layer_or_wheel(const Identifier& id) const;
226  int straw_layer(const Identifier& id) const;
227  int straw(const Identifier& id) const;
228 
230  int straw_layer_max(const Identifier& id) const;
231  int straw_max(const Identifier& id) const;
233 
234 
236 
237  IdContext barrel_context(void) const;
240  IdContext module_context(void) const;
242  IdContext straw_layer_context(void) const;
244  IdContext straw_context(void) const;
246 
247 
249 
250  virtual int get_id(const IdentifierHash& hash_id,
252  Identifier& id,
253  const IdContext* context = 0) const override final;
254 
256  virtual int get_hash(const Identifier& id,
257  IdentifierHash& hash_id,
258  const IdContext* context = 0) const override final;
260 
262 
263 
267 
268 
269 
271  virtual int initialize_from_dictionary(const IdDictMgr& dict_mgr) override final;
272 
275  IdentifierHash& hash_id) const;
276 
277 
280  ExpandedIdentifier& exp_id,
281  const IdContext* context = 0) const;
282 
284  void test_trt_ids(void);
286 
287 
290  };
291 private:
292  typedef std::vector<Identifier> hash_vec;
293  typedef hash_vec::const_iterator hash_vec_it;
294 
295  enum VALUES {
296  BARREL_VALUE = 1
297  };
298 
299  void barrel_ec_id_checks(int barrel_ec) const;
300  void module_id_checks(int barrel_ec,
301  int phi_module,
302  int layer_or_wheel) const;
303  void straw_id_checks(int barrel_ec,
304  int phi_module,
305  int layer_or_wheel,
306  int straw_layer,
307  int straw) const;
308  void layer_id_checks(int barrel_ec,
309  int phi_module,
310  int layer_or_wheel,
311  int straw_layer) const;
312 
313  int initLevelsFromDict(void);
314 
315  void init_hashes(void);
316  // Private access only for hash from binary search - must have
317  // done init_straw_hashes for this to work
319 
320  // print out the invalid message
321  void invalidMessage() const;
322 
343 
344  class HashCalc
345  {
346  public:
348  m_hash(0),
349  m_deltaPhi(0),
350  m_layerMin(0),
351  m_strLayerMin(0),
352  m_nStrawLayers(0),
353  m_nstraws(0)
354  {}
361  };
362 
363  typedef std::pair<unsigned int, unsigned int> intPair;
364  typedef std::map<IdentifierHash, HashCalc> hashCalcMap;
365  std::vector<HashCalc> m_hash_calcs;
366  std::vector<intPair> m_hash_calcs_barrel_indexes;
367  std::vector<intPair> m_hash_calcs_endcap_indexes;
368 
376 };
377 
378 
379 
381 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>>
383 
384 //using the macros below we can assign an identifier (and a version)
385 //This is required and checked at compile time when you try to record/retrieve
386 CLASS_DEF(TRT_ID, 2518, 1)
387 
388 
389 //----------------------------------------------------------------------------
390 inline bool
391 TRT_ID::is_valid() const {
392  return(m_is_valid);
393 }
394 
395 //----------------------------------------------------------------------------
396 inline Identifier
397 TRT_ID::barrel_ec_id(int barrel_ec, bool checks) const {
398  // Check if TRT_ID is valid for this layout
399  if (!m_is_valid) invalidMessage();
400 
401  // Build identifier
403 
404  // Pack fields independently
408 
409  if (checks) {
411  }
412 
413  return result;
414 }
415 
416 inline Identifier
417 TRT_ID::barrel_ec_id(int barrel_ec) const {
418  return barrel_ec_id(barrel_ec, do_checks());
419 }
420 
421 //----------------------------------------------------------------------------
422 inline Identifier
423 TRT_ID::module_id(int barrel_ec,
424  int phi_module,
425  int layer_or_wheel,
426  bool checks) const {
427  // Check if TRT_ID is valid for this layout
428  if (!m_is_valid) invalidMessage();
429 
430  // Build identifier
432 
433  // Pack fields independently
439 
440  if (checks) {
442  }
443 
444  return result;
445 }
446 
447 inline Identifier
448 TRT_ID::module_id(int barrel_ec,
449  int phi_module,
450  int layer_or_wheel) const {
452 }
453 
454 //----------------------------------------------------------------------------
455 inline Identifier
456 TRT_ID::module_id(IdentifierHash module_hash) const {
457  // Check if TRT_ID is valid for this layout
458  if (!m_is_valid) invalidMessage();
459 
460  return(m_module_vec[module_hash]);
461 }
462 
463 //----------------------------------------------------------------------------
464 inline Identifier TRT_ID::layer_id(IdentifierHash layer_hash) const {
465  // Check if TRT_ID is valid for this layout
466  if (!m_is_valid) invalidMessage();
467 
468  return(m_straw_layer_vec[layer_hash]);
469 }
470 
471 //----------------------------------------------------------------------------
472 inline Identifier
473 TRT_ID::layer_id(int barrel_ec,
474  int phi_module,
475  int layer_or_wheel,
476  int straw_layer,
477  bool checks) const {
478  // Check if TRT_ID is valid for this layout
479  if (!m_is_valid) invalidMessage();
480 
481  // Build identifier
483 
484  // Pack fields independently
491 
492  if (checks) {
494  }
495 
496  return result;
497 }
498 
499 inline Identifier
500 TRT_ID::layer_id(int barrel_ec,
501  int phi_module,
502  int layer_or_wheel,
503  int straw_layer) const {
505  do_checks());
506 }
507 
508 //----------------------------------------------------------------------------
509 inline Identifier
510 TRT_ID::layer_id(const Identifier& module_id,
511  int straw_layer,
512  bool checks) const {
513  // Check if TRT_ID is valid for this layout
514  if (!m_is_valid) invalidMessage();
515 
516  // Build identifier
518 
519  // Reset field and then pack it
522 
523  if (checks) {
527  straw_layer);
528  }
529  return result;
530 }
531 
532 inline Identifier
533 TRT_ID::layer_id(const Identifier& module_id,
534  int straw_layer) const {
536 }
537 
538 //----------------------------------------------------------------------------
539 inline Identifier
540 TRT_ID::layer_id(const Identifier& straw_id) const {
541  // Check if TRT_ID is valid for this layout
542  if (!m_is_valid) invalidMessage();
543 
545  // Reset the straw field
547  return(result);
548 }
549 
550 //----------------------------------------------------------------------------
551 inline Identifier
552 TRT_ID::straw_id(int barrel_ec,
553  int phi_module,
554  int layer_or_wheel,
555  int straw_layer,
556  int straw,
557  bool checks) const {
558  // Check if TRT_ID is valid for this layout
559  if (!m_is_valid) invalidMessage();
560 
561  // Build identifier
563 
564  // Pack fields independently
572 
573  if (checks) {
575  }
576 
577  return result;
578 }
579 
580 inline Identifier
581 TRT_ID::straw_id(int barrel_ec,
582  int phi_module,
583  int layer_or_wheel,
584  int straw_layer,
585  int straw) const {
587  do_checks());
588 }
589 
590 //----------------------------------------------------------------------------
591 inline Identifier
593  // Check if TRT_ID is valid for this layout
594  if (!m_is_valid) invalidMessage();
595 
597  if (m_STRAW_INDEX < id.fields()) {
599  id[m_PHI_MODULE_INDEX],
602  id[m_STRAW_INDEX]);
603  }
604  return(result);
605 }
606 
607 //----------------------------------------------------------------------------
608 inline Identifier
609 TRT_ID::straw_id(const Identifier& module_id,
610  int straw_layer,
611  int straw,
612  bool checks) const {
613  // Check if TRT_ID is valid for this layout
614  if (!m_is_valid) invalidMessage();
615 
616  // Build identifier
618 
619  // Reset fields and then pack them
624 
625  if (checks) {
629  straw_layer,
630  straw);
631  }
632  return result;
633 }
634 
635 inline Identifier
636 TRT_ID::straw_id(const Identifier& module_id,
637  int straw_layer,
638  int straw) const {
640 }
641 
642 //----------------------------------------------------------------------------
643 inline Identifier
644 TRT_ID::straw_id(const Identifier& layer_id,
645  int straw,
646  bool checks) const {
647  // Check if TRT_ID is valid for this layout
648  if (!m_is_valid) invalidMessage();
649 
650  // Build identifier
652 
653  // Reset field and then pack it
656 
657  if (checks) {
662  straw);
663  }
664  return result;
665 }
666 
667 inline Identifier
668 TRT_ID::straw_id(const Identifier& layer_id,
669  int straw) const {
670  return straw_id(layer_id, straw, do_checks());
671 }
672 
673 //----------------------------------------------------------------------------
674 inline Identifier
675 TRT_ID::straw_id(IdentifierHash straw_hash) const {
676  // Check if TRT_ID is valid for this layout
677  if (!m_is_valid) invalidMessage();
678 
679 
680  // Access id from vector ONLY if the vector has been initialized
681  // (done via init_straw_hash_vector();
682  // and reset by reset_straw_hash_vector();
683  if (straw_hash < m_straw_vec.size()) {
684  return(m_straw_vec[straw_hash]);
685  }
686  // Else return invalid id
688  return(result); // return hash in invalid state
689 }
690 
691 //----------------------------------------------------------------------------
692 inline IdContext
694  // Check if TRT_ID is valid for this layout
695  if (!m_is_valid) invalidMessage();
696 
698  return(IdContext(id, 0, m_BARREL_EC_INDEX));
699 }
700 
701 //----------------------------------------------------------------------------
702 inline IdContext
704  // Check if TRT_ID is valid for this layout
705  if (!m_is_valid) invalidMessage();
706 
708  return(IdContext(id, 0, m_LAYER_OR_WHEEL_INDEX));
709 }
710 
711 //----------------------------------------------------------------------------
712 inline IdContext
714  // Check if TRT_ID is valid for this layout
715  if (!m_is_valid) invalidMessage();
716 
718  return(IdContext(id, 0, m_STRAW_LAYER_INDEX));
719 }
720 
721 //----------------------------------------------------------------------------
722 inline IdContext
724  // Check if TRT_ID is valid for this layout
725  if (!m_is_valid) invalidMessage();
726 
728  return(IdContext(id, 0, m_STRAW_INDEX));
729 }
730 
731 //----------------------------------------------------------------------------
733  // Check if TRT_ID is valid for this layout
734  if (!m_is_valid) invalidMessage();
735 
736  hash_vec_it it = std::lower_bound(m_module_vec.begin(),
737  m_module_vec.end(),
738  module_id);
739  // Require that module_id matches the one in vector
740  if (it != m_module_vec.end() && module_id == (*it)) {
741  return(it - m_module_vec.begin());
742  }
744  return(result); // return hash in invalid state
745 }
746 
747 //----------------------------------------------------------------------------
748 inline
750 TRT_ID::straw_layer_hash(Identifier straw_layer_id) const {
751  // Check if TRT_ID is valid for this layout
752  if (!m_is_valid) invalidMessage();
753 
754  hash_vec_it it = std::lower_bound(m_straw_layer_vec.begin(),
755  m_straw_layer_vec.end(),
756  straw_layer_id);
757  // Require that straw_layer_id matches the one in vector
758  if (it != m_straw_layer_vec.end() && straw_layer_id == (*it)) {
759  return(it - m_straw_layer_vec.begin());
760  }
762  return(result); // return hash in invalid state
763 }
764 
765 //----------------------------------------------------------------------------
766 inline
769 //TRT_ID::straw_hash (Identifier straw_id, bool debug) const
770 {
771  // Check if TRT_ID is valid for this layout
772  if (!m_is_valid) invalidMessage();
773 
774  // Get index into hashCalc vector
775  unsigned int hcIndex = 0;
776  int be = barrel_ec(straw_id);
777  int lw = layer_or_wheel(straw_id);
778  int sl = straw_layer(straw_id);
779 
780  if (is_barrel(straw_id)) {
781  unsigned int index = lw * 32 + sl;
782  if (index < m_hash_calcs_barrel_indexes.size()) {
783  hcIndex = (be < 0) ? m_hash_calcs_barrel_indexes[index].first :
784  m_hash_calcs_barrel_indexes[index].second;
785  } else {
786  std::cout << "straw_hash: index > barrel_index size - " << index
787  << " " << m_hash_calcs_barrel_indexes.size() << std::endl;
788  }
789  } else {
790  unsigned int index = lw;
791  if (index < m_hash_calcs_endcap_indexes.size()) {
792  hcIndex = (be < 0) ? m_hash_calcs_endcap_indexes[index].first :
793  m_hash_calcs_endcap_indexes[index].second;
794  } else {
795  std::cout << "straw_hash: index > endcap_index size - " << index
796  << " " << m_hash_calcs_endcap_indexes.size() << std::endl;
797  }
798  }
799 
800 
801 
803  if (hcIndex < m_hash_calcs.size()) {
804  const HashCalc& hc = m_hash_calcs[hcIndex];
805  result = hc.m_hash +
806  phi_module(straw_id) * hc.m_deltaPhi +
807  (lw - hc.m_layerMin) * hc.m_nStrawLayers +
808  (sl - hc.m_strLayerMin) * hc.m_nstraws +
809  straw(straw_id);
810 
811 
812  return(result);
813  } else {
814  std::cout << "straw_hash: hc index > hcCalc size - " << hcIndex
815  << " " << m_hash_calcs.size() << std::endl;
816  }
817  return(result);
818 }
819 
820 //----------------------------------------------------------------------------
821 inline
824  // Check if TRT_ID is valid for this layout
825  if (!m_is_valid) invalidMessage();
826 
827  hash_vec_it it = std::lower_bound(m_straw_vec.begin(),
828  m_straw_vec.end(),
829  straw_id);
830 
831 
832 
833  if (it != m_straw_vec.end()) {
834  return(it - m_straw_vec.begin());
835  }
837  return(result); // return hash in invalid state
838 }
839 
840 //----------------------------------------------------------------------------
841 inline
842 void
844  MsgStream log(m_msgSvc, "TRT_ID");
845 
846  if (m_msgSvc) {
847  log << MSG::ERROR << " TRT_ID is NOT valid for this layout. " << endmsg;
848  log << MSG::ERROR << " Please use 'trt_id->is_valid()' if a layout test is needed. " << endmsg;
849  } else {
850  std::cout << " ERROR TRT_ID is NOT valid for this layout. " << std::endl;
851  std::cout << " ERROR Please use 'trt_id->is_valid()' if a layout test is needed. " << std::endl;
852  }
853 }
854 
855 //----------------------------------------------------------------------------
856 inline bool
857 TRT_ID::is_barrel(const Identifier& id) const {
858  // Check if TRT_ID is valid for this layout
859  if (!m_is_valid) invalidMessage();
860 
861  return(m_barrel_field.match(m_bec_impl.unpack(id)));
862 }
863 
864 //----------------------------------------------------------------------------
865 inline int
866 TRT_ID::barrel_ec(const Identifier& id) const {
867  // Check if TRT_ID is valid for this layout
868  if (!m_is_valid) invalidMessage();
869 
870  return(m_bec_impl.unpack(id));
871 }
872 
873 //----------------------------------------------------------------------------
874 inline int
875 TRT_ID::phi_module(const Identifier& id) const {
876  // Check if TRT_ID is valid for this layout
877  if (!m_is_valid) invalidMessage();
878 
879  return(m_phi_mod_impl.unpack(id));
880 }
881 
882 //----------------------------------------------------------------------------
883 inline int
885  // Check if TRT_ID is valid for this layout
886  if (!m_is_valid) invalidMessage();
887 
888  return(m_lay_wheel_impl.unpack(id));
889 }
890 
891 //----------------------------------------------------------------------------
892 inline int
893 TRT_ID::straw_layer(const Identifier& id) const {
894  // Check if TRT_ID is valid for this layout
895  if (!m_is_valid) invalidMessage();
896 
897  return(m_str_lay_impl.unpack(id));
898 }
899 
900 //----------------------------------------------------------------------------
901 inline int
902 TRT_ID::straw(const Identifier& id) const {
903  // Check if TRT_ID is valid for this layout
904  if (!m_is_valid) invalidMessage();
905 
906  return(m_straw_impl.unpack(id));
907 }
908 
909 //----------------------------------------------------------------------------
910 inline TRT_ID::size_type
912  // Check if TRT_ID is valid for this layout
913  if (!m_is_valid) invalidMessage();
914 
915  return m_module_hash_max;
916 }
917 
918 //----------------------------------------------------------------------------
919 inline TRT_ID::size_type
921  // Check if TRT_ID is valid for this layout
922  if (!m_is_valid) invalidMessage();
923 
924  return m_straw_layer_hash_max;
925 }
926 
927 //----------------------------------------------------------------------------
928 inline TRT_ID::size_type
930  // Check if TRT_ID is valid for this layout
931  if (!m_is_valid) invalidMessage();
932 
933  return m_straw_hash_max;
934 }
935 
936 //----------------------------------------------------------------------------
938  // Check if TRT_ID is valid for this layout
939  if (!m_is_valid) invalidMessage();
940 
941  return(m_module_vec.begin());
942 }
943 
944 //----------------------------------------------------------------------------
946  // Check if TRT_ID is valid for this layout
947  if (!m_is_valid) invalidMessage();
948 
949  return(m_module_vec.end());
950 }
951 
952 //----------------------------------------------------------------------------
954  // Check if TRT_ID is valid for this layout
955  if (!m_is_valid) invalidMessage();
956 
957  return(m_straw_layer_vec.begin());
958 }
959 
960 //----------------------------------------------------------------------------
962  // Check if TRT_ID is valid for this layout
963  if (!m_is_valid) invalidMessage();
964 
965  return(m_straw_layer_vec.end());
966 }
967 
968 //----------------------------------------------------------------------------
970  // Check if TRT_ID is valid for this layout
971  if (!m_is_valid) invalidMessage();
972 
974 }
975 
976 //----------------------------------------------------------------------------
978  // Check if TRT_ID is valid for this layout
979  if (!m_is_valid) invalidMessage();
980 
982 }
983 
984 #endif // INDETIDENTIFIER_TRT_ID_H
TRT_ID::m_bec_impl
IdDictFieldImplementation m_bec_impl
Definition: TRT_ID.h:371
TRT_ID::test_trt_ids
void test_trt_ids(void)
Tests of packing.
Definition: TRT_ID.cxx:1015
TRT_ID::m_is_valid
bool m_is_valid
Definition: TRT_ID.h:323
AtlasDetectorID::indet_field_value
int indet_field_value() const
Provide efficient access to individual field values, for subclass idhelpers.
Definition: AtlasDetectorID.h:611
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
TRT_ID::m_LAYER_OR_WHEEL_INDEX
size_type m_LAYER_OR_WHEEL_INDEX
Definition: TRT_ID.h:329
TRT_ID::m_full_straw_range
MultiRange m_full_straw_range
Definition: TRT_ID.h:333
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:500
TRT_ID::m_trt_region_index
size_type m_trt_region_index
Definition: TRT_ID.h:324
TRT::Hit::straw
@ straw
Definition: HitInfo.h:82
TRT_ID::barrel_context
IdContext barrel_context(void) const
barrel_ec id
Definition: TRT_ID.h:693
TRT_ID::m_hash_calcs
std::vector< HashCalc > m_hash_calcs
Definition: TRT_ID.h:365
TRT_ID::m_PHI_MODULE_INDEX
size_type m_PHI_MODULE_INDEX
Definition: TRT_ID.h:328
TRT_ID::module_id_checks
void module_id_checks(int barrel_ec, int phi_module, int layer_or_wheel) const
Definition: TRT_ID.cxx:71
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:996
TRT_ID::hash_vec_it
hash_vec::const_iterator hash_vec_it
Definition: TRT_ID.h:293
TRT_ID::m_full_straw_layer_range
MultiRange m_full_straw_layer_range
Definition: TRT_ID.h:334
TRT_ID::m_STRAW_LAYER_INDEX
size_type m_STRAW_LAYER_INDEX
Definition: TRT_ID.h:330
TRT_ID::reset_straw_hash_vector
void reset_straw_hash_vector(void)
Definition: TRT_ID.cxx:630
TRT_ID::initLevelsFromDict
int initLevelsFromDict(void)
Definition: TRT_ID.cxx:708
TRT_ID::m_phi_mod_impl
IdDictFieldImplementation m_phi_mod_impl
Definition: TRT_ID.h:372
TRT_ID::straw_hash
IdentifierHash straw_hash(Identifier straw_id) const
straw hash from id - optimized
Definition: TRT_ID.h:768
MultiRange::factory_begin
identifier_factory factory_begin()
Definition: MultiRange.cxx:112
TRT_ID::BARREL_VALUE
@ BARREL_VALUE
Definition: TRT_ID.h:296
TRT_ID::module_context
IdContext module_context(void) const
module id
Definition: TRT_ID.h:703
index
Definition: index.py:1
TRT_ID::m_straw_layer_vec
hash_vec m_straw_layer_vec
Definition: TRT_ID.h:341
TRT_ID::HashCalc::m_deltaPhi
size_type m_deltaPhi
Definition: TRT_ID.h:356
MultiRange::factory_end
identifier_factory factory_end()
Definition: MultiRange.cxx:124
python.LumiCalcWorking.lw
lw
Definition: LumiCalcWorking.py:112
TRT_ID::straw_layer_hash_max
size_type straw_layer_hash_max(void) const
Definition: TRT_ID.h:920
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:884
TRT_ID::barrel_ec_id_checks
void barrel_ec_id_checks(int barrel_ec) const
Definition: TRT_ID.cxx:48
skel.it
it
Definition: skel.GENtoEVGEN.py:396
TRT_ID::m_BARREL_EC_INDEX
size_type m_BARREL_EC_INDEX
Definition: TRT_ID.h:327
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
TRT_ID::m_trt_impl
IdDictFieldImplementation m_trt_impl
Definition: TRT_ID.h:370
IdDictFieldImplementation::pack
void pack(int value, Identifier &id) const
Definition: IdDictFieldImplementation.h:174
TRT_ID::is_valid
bool is_valid() const
Definition: TRT_ID.h:391
AtlasDetectorID::m_msgSvc
IMessageSvc * m_msgSvc
pointer to the message service
Definition: AtlasDetectorID.h:368
TRT_ID::VALUES
VALUES
Definition: TRT_ID.h:295
IdHelper.h
TRT_ID::barrel_ec_id
Identifier barrel_ec_id(int barrel_ec) const
For +/-barrel or +/-endcap id.
Definition: TRT_ID.h:417
TRT_ID::const_id_iterator
std::vector< Identifier >::const_iterator const_id_iterator
Definition: TRT_ID.h:89
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
AtlasDetectorID::trt_field_value
int trt_field_value() const
Definition: AtlasDetectorID.h:632
TRT_ID::m_TRT_INDEX
size_type m_TRT_INDEX
Definition: TRT_ID.h:326
TRT_ID::m_straw_hash_max
size_type m_straw_hash_max
Definition: TRT_ID.h:338
IdDictFieldImplementation::unpack
int unpack(Identifier id) const
Identifier manipulation methods.
Definition: IdDictFieldImplementation.h:148
TRT_ID::m_str_lay_impl
IdDictFieldImplementation m_str_lay_impl
Definition: TRT_ID.h:374
TRT_ID::module_begin
const_id_iterator module_begin(void) const
Iterators over full set of module ids. Module ids are sorted.
Definition: TRT_ID.h:937
TRT_ID::m_dict
const IdDictDictionary * m_dict
Definition: TRT_ID.h:332
TRT_ID::straw_layer_end
const_id_iterator straw_layer_end(void) const
Definition: TRT_ID.h:961
TRT_ID::init_straw_hash_vector
void init_straw_hash_vector(void)
The init will use up ~2 MB of memory, so one should do init, use straw_id and then reset.
Definition: TRT_ID.cxx:635
TRT_ID::HashCalc::m_layerMin
size_type m_layerMin
Definition: TRT_ID.h:357
TRT_ID::module_hash
IdentifierHash module_hash(Identifier module_id) const
module hash from id - optimized
Definition: TRT_ID.h:732
TRT_ID::HashCalc::m_nStrawLayers
size_type m_nStrawLayers
Definition: TRT_ID.h:359
TRT_ID::hashCalcMap
std::map< IdentifierHash, HashCalc > hashCalcMap
Definition: TRT_ID.h:364
TRT_ID::m_hash_calcs_barrel_indexes
std::vector< intPair > m_hash_calcs_barrel_indexes
Definition: TRT_ID.h:366
IdDictFieldImplementation::reset
void reset(Identifier &id) const
Definition: IdDictFieldImplementation.h:184
AtlasDetectorID::size_type
Identifier::size_type size_type
Definition: AtlasDetectorID.h:384
TRT_ID::m_STRAW_INDEX
size_type m_STRAW_INDEX
Definition: TRT_ID.h:331
TRT_ID::HashCalc::m_nstraws
size_type m_nstraws
Definition: TRT_ID.h:360
IdentifierField::match
bool match(element_type value) const
The basic match operation.
Definition: IdentifierField.cxx:70
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
IdDictMgr
Definition: IdDictDefs.h:32
TRT_ID::module_end
const_id_iterator module_end(void) const
Definition: TRT_ID.h:945
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:892
TRT_ID::straw
int straw(const Identifier &id) const
Definition: TRT_ID.h:902
TRT_ID::m_module_hash_max
size_type m_module_hash_max
Definition: TRT_ID.h:336
TRT_ID::module_hash_max
size_type module_hash_max(void) const
Definition: TRT_ID.h:911
TRT_ID::straw_context
IdContext straw_context(void) const
straw id
Definition: TRT_ID.h:723
TRT_ID::NUMBER_OF_EC_MODULES
@ NUMBER_OF_EC_MODULES
Definition: TRT_ID.h:289
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:941
TRT_ID::m_INDET_INDEX
size_type m_INDET_INDEX
Definition: TRT_ID.h:325
MultiRange::const_identifier_factory
Definition: MultiRange.h:52
TRT_ID::straw_hash_bin
IdentifierHash straw_hash_bin(Identifier straw_id) const
Definition: TRT_ID.h:823
TRT_ID::m_straw_layer_hash_max
size_type m_straw_layer_hash_max
Definition: TRT_ID.h:337
TRT_ID::straw_layer_context
IdContext straw_layer_context(void) const
straw_layer id
Definition: TRT_ID.h:713
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:97
TRT_ID::size_type
Identifier::size_type size_type
Definition: TRT_ID.h:88
TRT_ID::m_indet_impl
IdDictFieldImplementation m_indet_impl
Definition: TRT_ID.h:369
TRT_ID::m_straw_vec
hash_vec m_straw_vec
Definition: TRT_ID.h:342
TRT_ID::HashCalc
Definition: TRT_ID.h:345
TRT_ID::get_expanded_id
void get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context=0) const
Definition: TRT_ID.cxx:923
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:866
TRT_ID::straw_layer
int straw_layer(const Identifier &id) const
Definition: TRT_ID.h:893
TRT_ID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override final
Set the IdDictionary.
Definition: TRT_ID.cxx:153
TRT_ID::layer_or_wheel
int layer_or_wheel(const Identifier &id) const
Definition: TRT_ID.h:884
TRT_ID::intPair
std::pair< unsigned int, unsigned int > intPair
Definition: TRT_ID.h:363
TRT_ID::m_module_vec
hash_vec m_module_vec
Definition: TRT_ID.h:340
TRT_ID::~TRT_ID
~TRT_ID(void)
TRT_ID::straw_layer_max
int straw_layer_max(const Identifier &id) const
Max values for each field (-999 == failure)
Definition: TRT_ID.cxx:975
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:367
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
IdentifierHash.h
TRT_ID::HashCalc::HashCalc
HashCalc()
Definition: TRT_ID.h:347
TRT_ID::TRT_ID
TRT_ID(void)
Definition: TRT_ID.cxx:26
TRT_ID::straw_end
const_expanded_id_iterator straw_end(void) const
Definition: TRT_ID.h:977
TRT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: TRT_ID.h:875
MultiRange.h
IdDictDictionary
Definition: IdDictDefs.h:97
IdDictFieldImplementation.h
TRT_ID::m_full_module_range
MultiRange m_full_module_range
Definition: TRT_ID.h:335
TRT_ID::m_straw_impl
IdDictFieldImplementation m_straw_impl
Definition: TRT_ID.h:375
TRT_ID
Definition: TRT_ID.h:84
TRT_ID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel.
Definition: TRT_ID.h:857
TRT_ID::straw_hash_max
size_type straw_hash_max(void) const
Definition: TRT_ID.h:929
TRT_ID::MODULE_RANGE
MODULE_RANGE
Definition: TRT_ID.h:288
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:64
DeMoScan.first
bool first
Definition: DeMoScan.py:536
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:125
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
IdentifierField
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
Definition: IdentifierField.h:21
TRT_ID::m_lay_wheel_impl
IdDictFieldImplementation m_lay_wheel_impl
Definition: TRT_ID.h:373
TRT_ID::HashCalc::m_hash
IdentifierHash m_hash
Definition: TRT_ID.h:355
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:843
TRT_ID::straw_begin
const_expanded_id_iterator straw_begin(void) const
For straw ids, only expanded id iterators are available.
Definition: TRT_ID.h:969
TRT_ID::straw_layer_begin
const_id_iterator straw_layer_begin(void) const
Iterators over full set of straw_layer ids. Straw_layer ids are sorted.
Definition: TRT_ID.h:953
TRT_ID::m_barrel_field
Range::field m_barrel_field
Definition: TRT_ID.h:339
CaloCondBlobAlgs_fillNoiseFromASCII.fields
fields
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:106
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::hash_vec
std::vector< Identifier > hash_vec
Definition: TRT_ID.h:292
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:728
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
TRT_ID::init_hashes
void init_hashes(void)
Definition: TRT_ID.cxx:347
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:90
TRT_ID::HashCalc::m_strLayerMin
size_type m_strLayerMin
Definition: TRT_ID.h:358
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
TRT_ID::straw_layer_hash
IdentifierHash straw_layer_hash(Identifier straw_layer_id) const
straw_layer hash from id - optimized
Definition: TRT_ID.h:750
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:448
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:581
Identifier
Definition: IdentifierFieldParser.cxx:14