ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_ID.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef INDETIDENTIFIER_TRT_ID_H
6#define INDETIDENTIFIER_TRT_ID_H
18
20#include "Identifier/Identifier.h"
23#include "Identifier/IdHelper.h"
26
27#include <algorithm>
28#include <string>
29#include <map>
30#include <stdexcept>
31#include <cassert>
32#include <vector>
33
34
36
82
83class TRT_ID final: public AtlasDetectorID
84{
85public:
87
88 typedef Identifier::size_type size_type;
89 typedef std::vector<Identifier>::const_iterator const_id_iterator;
92
94
95 TRT_ID();
98
100
101 bool is_valid() const;
103
105
106
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
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
185
187
192
193
195
196
207
209
210
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
244 IdContext straw_context() const;
246
247
249
250
251 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();
286
287
291private:
292 typedef std::vector<Identifier> hash_vec;
293 typedef hash_vec::const_iterator hash_vec_it;
294
295 enum VALUES {
297 };
298
299 void barrel_ec_id_checks(int barrel_ec) const;
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();
314
315 void init_hashes();
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 //compose errMsg used in exception
323 std::string errMsg(const std::string & txt, unsigned v, size_t limit) const;
324 //
345
364
365 typedef std::pair<unsigned int, unsigned int> intPair;
366 typedef std::map<IdentifierHash, HashCalc> hashCalcMap;
367 std::vector<HashCalc> m_hash_calcs;
368 std::vector<intPair> m_hash_calcs_barrel_indexes;
369 std::vector<intPair> m_hash_calcs_endcap_indexes;
370
378};
379
380
381
382//using the macros below we can assign an identifier (and a version)
383//This is required and checked at compile time when you try to record/retrieve
384CLASS_DEF(TRT_ID, 2518, 1)
385inline std::string
386TRT_ID::errMsg(const std::string & txt, unsigned v, size_t lim) const {
387 return txt + std::to_string(v) + " " + std::to_string(lim);
388
389}
390
391//----------------------------------------------------------------------------
392inline bool
394 return(m_is_valid);
395}
396
397//----------------------------------------------------------------------------
398inline Identifier
399TRT_ID::barrel_ec_id(int barrel_ec, bool checks) const {
400 // Check if TRT_ID is valid for this layout
402
403 // Build identifier
404 Identifier result((Identifier::value_type) 0);
405
406 // Pack fields independently
407 m_indet_impl.pack(indet_field_value(), result);
408 m_trt_impl.pack(trt_field_value(), result);
409 m_bec_impl.pack(barrel_ec, result);
410
411 if (checks) {
413 }
414
415 return result;
416}
417
418inline Identifier
422
423//----------------------------------------------------------------------------
424inline Identifier
426 int phi_module,
427 int layer_or_wheel,
428 bool checks) const {
429 // Check if TRT_ID is valid for this layout
431
432 // Build identifier
433 Identifier result((Identifier::value_type) 0);
434
435 // Pack fields independently
436 m_indet_impl.pack(indet_field_value(), result);
437 m_trt_impl.pack(trt_field_value(), result);
438 m_bec_impl.pack(barrel_ec, result);
439 m_phi_mod_impl.pack(phi_module, result);
440 m_lay_wheel_impl.pack(layer_or_wheel, result);
441
442 if (checks) {
444 }
445
446 return result;
447}
448
449inline Identifier
455
456//----------------------------------------------------------------------------
457inline Identifier
459 // Check if TRT_ID is valid for this layout
461
462 return(m_module_vec[module_hash]);
463}
464
465//----------------------------------------------------------------------------
467 // Check if TRT_ID is valid for this layout
469
470 return(m_straw_layer_vec[layer_hash]);
471}
472
473//----------------------------------------------------------------------------
474inline Identifier
476 int phi_module,
477 int layer_or_wheel,
478 int straw_layer,
479 bool checks) const {
480 // Check if TRT_ID is valid for this layout
482
483 // Build identifier
484 Identifier result((Identifier::value_type) 0);
485
486 // Pack fields independently
487 m_indet_impl.pack(indet_field_value(), result);
488 m_trt_impl.pack(trt_field_value(), result);
489 m_bec_impl.pack(barrel_ec, result);
490 m_phi_mod_impl.pack(phi_module, result);
491 m_lay_wheel_impl.pack(layer_or_wheel, result);
492 m_str_lay_impl.pack(straw_layer, result);
493
494 if (checks) {
496 }
497
498 return result;
499}
500
501inline Identifier
509
510//----------------------------------------------------------------------------
511inline Identifier
513 int straw_layer,
514 bool checks) const {
515 // Check if TRT_ID is valid for this layout
517
518 // Build identifier
519 Identifier result(module_id);
520
521 // Reset field and then pack it
522 m_str_lay_impl.reset(result);
523 m_str_lay_impl.pack(straw_layer, result);
524
525 if (checks) {
530 }
531 return result;
532}
533
534inline Identifier
539
540//----------------------------------------------------------------------------
541inline Identifier
543 // Check if TRT_ID is valid for this layout
545
546 Identifier result(straw_id);
547 // Reset the straw field
548 m_straw_impl.reset(result);
549 return(result);
550}
551
552//----------------------------------------------------------------------------
553inline Identifier
555 int phi_module,
556 int layer_or_wheel,
557 int straw_layer,
558 int straw,
559 bool checks) const {
560 // Check if TRT_ID is valid for this layout
562
563 // Build identifier
564 Identifier result((Identifier::value_type) 0);
565
566 // Pack fields independently
567 m_indet_impl.pack(indet_field_value(), result);
568 m_trt_impl.pack(trt_field_value(), result);
569 m_bec_impl.pack(barrel_ec, result);
570 m_phi_mod_impl.pack(phi_module, result);
571 m_lay_wheel_impl.pack(layer_or_wheel, result);
572 m_str_lay_impl.pack(straw_layer, result);
573 m_straw_impl.pack(straw, result);
574
575 if (checks) {
577 }
578
579 return result;
580}
581
582inline Identifier
584 int phi_module,
585 int layer_or_wheel,
586 int straw_layer,
587 int straw) const {
589 do_checks());
590}
591
592//----------------------------------------------------------------------------
593inline Identifier
595 int straw_layer,
596 int straw,
597 bool checks) const {
598 // Check if TRT_ID is valid for this layout
600
601 // Build identifier
602 Identifier result(module_id);
603
604 // Reset fields and then pack them
605 m_str_lay_impl.reset(result);
606 m_straw_impl.reset(result);
607 m_str_lay_impl.pack(straw_layer, result);
608 m_straw_impl.pack(straw, result);
609
610 if (checks) {
615 straw);
616 }
617 return result;
618}
619
620inline Identifier
622 int straw_layer,
623 int straw) const {
625}
626
627//----------------------------------------------------------------------------
628inline Identifier
630 int straw,
631 bool checks) const {
632 // Check if TRT_ID is valid for this layout
634
635 // Build identifier
636 Identifier result(layer_id);
637
638 // Reset field and then pack it
639 m_straw_impl.reset(result);
640 m_straw_impl.pack(straw, result);
641
642 if (checks) {
647 straw);
648 }
649 return result;
650}
651
652inline Identifier
654 int straw) const {
655 return straw_id(layer_id, straw, do_checks());
656}
657
658//----------------------------------------------------------------------------
659inline Identifier
661 // Check if TRT_ID is valid for this layout
663
664
665 // Access id from vector ONLY if the vector has been initialized
666 // (done via init_straw_hash_vector();
667 // and reset by reset_straw_hash_vector();
668 if (straw_hash < m_straw_vec.size()) {
669 return(m_straw_vec[straw_hash]);
670 }
671 // Else return invalid id
672 Identifier result;
673 return(result); // return hash in invalid state
674}
675
676//----------------------------------------------------------------------------
678 // Check if TRT_ID is valid for this layout
680
681 hash_vec_it it = std::lower_bound(m_module_vec.begin(),
682 m_module_vec.end(),
683 module_id);
684 // Require that module_id matches the one in vector
685 if (it != m_module_vec.end() && module_id == (*it)) {
686 return(it - m_module_vec.begin());
687 }
688 IdentifierHash result;
689 return(result); // return hash in invalid state
690}
691
692//----------------------------------------------------------------------------
693inline
696 // Check if TRT_ID is valid for this layout
698
699 hash_vec_it it = std::lower_bound(m_straw_layer_vec.begin(),
700 m_straw_layer_vec.end(),
701 straw_layer_id);
702 // Require that straw_layer_id matches the one in vector
703 if (it != m_straw_layer_vec.end() && straw_layer_id == (*it)) {
704 return(it - m_straw_layer_vec.begin());
705 }
706 IdentifierHash result;
707 return(result); // return hash in invalid state
708}
709
710//----------------------------------------------------------------------------
711inline
714
715 // Check if TRT_ID is valid for this layout
717
718 // Get index into hashCalc vector
719 unsigned int hcIndex = 0;
720 int be = barrel_ec(straw_id);
721 int lw = layer_or_wheel(straw_id);
722 int sl = straw_layer(straw_id);
723
724 if (is_barrel(straw_id)) { //barrel
725 unsigned int index = lw * 32 + sl;
726 if (index >= m_hash_calcs_barrel_indexes.size()) [[unlikely]]{
727 throw std::out_of_range(errMsg("straw_hash: index > barrel_index size - ", index, m_hash_calcs_barrel_indexes.size()));
728 }
729 hcIndex = (be < 0) ? m_hash_calcs_barrel_indexes[index].first : m_hash_calcs_barrel_indexes[index].second;
730 } else { //endcap
731 unsigned int index = lw;
732 if (index >= m_hash_calcs_endcap_indexes.size()) [[unlikely]] {
733 throw std::out_of_range(errMsg("straw_hash: index > endcap_index size - ", index, m_hash_calcs_endcap_indexes.size()));
734 }
735 hcIndex = (be < 0) ? m_hash_calcs_endcap_indexes[index].first : m_hash_calcs_endcap_indexes[index].second;
736 }
737 //
738 if (hcIndex>= m_hash_calcs.size())[[unlikely]]{
739 throw std::out_of_range(errMsg("straw_hash: hc index > hcCalc size - ", hcIndex, m_hash_calcs.size()));
740 }
741 //last resort
742 IdentifierHash result;
743 const HashCalc& hc = m_hash_calcs[hcIndex];
744 result = hc.m_hash +
746 (lw - hc.m_layerMin) * hc.m_nStrawLayers +
747 (sl - hc.m_strLayerMin) * hc.m_nstraws +
749 return(result);
750}
751
752//----------------------------------------------------------------------------
753inline
756 // Check if TRT_ID is valid for this layout
758
759 hash_vec_it it = std::lower_bound(m_straw_vec.begin(),
760 m_straw_vec.end(),
761 straw_id);
762
763
764
765 if (it != m_straw_vec.end()) {
766 return(it - m_straw_vec.begin());
767 }
768 IdentifierHash result;
769 return(result); // return hash in invalid state
770}
771
772//----------------------------------------------------------------------------
773inline
774void
776
777 ATH_MSG_ERROR(" TRT_ID is NOT valid for this layout. ");
778 ATH_MSG_ERROR(" Please use 'trt_id->is_valid()' if a layout test is needed. ");
779}
780
781//----------------------------------------------------------------------------
782inline bool
784 // Check if TRT_ID is valid for this layout
786
787 return(m_barrel_field.match(m_bec_impl.unpack(id)));
788}
789
790//----------------------------------------------------------------------------
791inline int
793 // Check if TRT_ID is valid for this layout
795
796 return(m_bec_impl.unpack(id));
797}
798
799//----------------------------------------------------------------------------
800inline int
802 // Check if TRT_ID is valid for this layout
804
805 return(m_phi_mod_impl.unpack(id));
806}
807
808//----------------------------------------------------------------------------
809inline int
811 // Check if TRT_ID is valid for this layout
813
814 return(m_lay_wheel_impl.unpack(id));
815}
816
817//----------------------------------------------------------------------------
818inline int
820 // Check if TRT_ID is valid for this layout
822
823 return(m_str_lay_impl.unpack(id));
824}
825
826//----------------------------------------------------------------------------
827inline int
828TRT_ID::straw(const Identifier& id) const {
829 // Check if TRT_ID is valid for this layout
831
832 return(m_straw_impl.unpack(id));
833}
834
835//----------------------------------------------------------------------------
838 // Check if TRT_ID is valid for this layout
840
841 return m_module_hash_max;
842}
843
844//----------------------------------------------------------------------------
847 // Check if TRT_ID is valid for this layout
849
851}
852
853//----------------------------------------------------------------------------
856 // Check if TRT_ID is valid for this layout
858
859 return m_straw_hash_max;
860}
861
862//----------------------------------------------------------------------------
864 // Check if TRT_ID is valid for this layout
866
867 return(m_module_vec.begin());
868}
869
870//----------------------------------------------------------------------------
872 // Check if TRT_ID is valid for this layout
874
875 return(m_module_vec.end());
876}
877
878//----------------------------------------------------------------------------
880 // Check if TRT_ID is valid for this layout
882
883 return(m_straw_layer_vec.begin());
884}
885
886//----------------------------------------------------------------------------
888 // Check if TRT_ID is valid for this layout
890
891 return(m_straw_layer_vec.end());
892}
893
894//----------------------------------------------------------------------------
896 // Check if TRT_ID is valid for this layout
898
899 return(m_full_straw_range.factory_begin());
900}
901
902//----------------------------------------------------------------------------
904 // Check if TRT_ID is valid for this layout
906
907 return(m_full_straw_range.factory_end());
908}
909
910#endif // INDETIDENTIFIER_TRT_ID_H
#define ATH_MSG_ERROR(x)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
virtual bool do_checks(void) const override
Checks are performed by default in debug compilation and NOT in optimized compilation.
int trt_field_value() const
AtlasDetectorID(const std::string &name, const std::string &group)
int indet_field_value() const
Provide efficient access to individual field values, for subclass idhelpers.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition IdContext.h:26
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
This is a "hash" representation of an Identifier.
A MultiRange combines several Ranges.
Definition MultiRange.h:17
size_type m_nstraws
Definition TRT_ID.h:362
size_type m_strLayerMin
Definition TRT_ID.h:360
IdentifierHash m_hash
Definition TRT_ID.h:357
size_type m_layerMin
Definition TRT_ID.h:359
size_type m_deltaPhi
Definition TRT_ID.h:358
size_type m_nStrawLayers
Definition TRT_ID.h:361
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:84
std::string errMsg(const std::string &txt, unsigned v, size_t limit) const
Definition TRT_ID.h:386
void barrel_ec_id_checks(int barrel_ec) const
Definition TRT_ID.cxx:48
size_type m_straw_layer_hash_max
Definition TRT_ID.h:339
int phi_module(const Identifier &id) const
Definition TRT_ID.h:801
std::vector< intPair > m_hash_calcs_barrel_indexes
Definition TRT_ID.h:368
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:502
IdDictFieldImplementation m_str_lay_impl
Definition TRT_ID.h:376
MODULE_RANGE
Definition TRT_ID.h:288
@ NUMBER_OF_EC_MODULES
Definition TRT_ID.h:289
int straw_max(const Identifier &id) const
Definition TRT_ID.cxx:758
MultiRange::const_identifier_factory const_expanded_id_iterator
Definition TRT_ID.h:90
const_id_iterator module_begin() const
Iterators over full set of module ids. Module ids are sorted.
Definition TRT_ID.h:863
size_type m_PHI_MODULE_INDEX
Definition TRT_ID.h:330
MultiRange m_full_straw_layer_range
Definition TRT_ID.h:336
size_type straw_layer_hash_max() const
Definition TRT_ID.h:846
std::vector< intPair > m_hash_calcs_endcap_indexes
Definition TRT_ID.h:369
hash_vec m_module_vec
Definition TRT_ID.h:342
TRT_ID()
Definition TRT_ID.cxx:25
const_expanded_id_iterator straw_begin() const
For straw ids, only expanded id iterators are available.
Definition TRT_ID.h:895
IdentifierHash module_hash(Identifier module_id) const
module hash from id - optimized
Definition TRT_ID.h:677
void init_hashes()
Definition TRT_ID.cxx:243
IdContext straw_context() const
straw id
Definition TRT_ID.cxx:952
std::pair< unsigned int, unsigned int > intPair
Definition TRT_ID.h:365
IdDictFieldImplementation m_indet_impl
Definition TRT_ID.h:371
@ BARREL_VALUE
Definition TRT_ID.h:296
IdDictFieldImplementation m_phi_mod_impl
Definition TRT_ID.h:374
const_id_iterator module_end() const
Definition TRT_ID.h:871
IdDictFieldImplementation m_straw_impl
Definition TRT_ID.h:377
IdDictFieldImplementation m_trt_impl
Definition TRT_ID.h:372
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:703
size_type m_BARREL_EC_INDEX
Definition TRT_ID.h:329
size_type m_module_hash_max
Definition TRT_ID.h:338
void layer_id_checks(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
Definition TRT_ID.cxx:104
std::map< IdentifierHash, HashCalc > hashCalcMap
Definition TRT_ID.h:366
MultiRange m_full_module_range
Definition TRT_ID.h:337
void test_trt_ids()
Tests of packing.
Definition TRT_ID.cxx:777
bool is_barrel(const Identifier &id) const
Test for barrel.
Definition TRT_ID.h:783
void invalidMessage() const
Definition TRT_ID.h:775
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:583
int straw_layer_max(const Identifier &id) const
Max values for each field (-999 == failure)
Definition TRT_ID.cxx:737
std::vector< Identifier > hash_vec
Definition TRT_ID.h:292
size_type m_trt_region_index
Definition TRT_ID.h:326
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition TRT_ID.h:792
size_type m_TRT_INDEX
Definition TRT_ID.h:328
IdentifierHash straw_layer_hash(Identifier straw_layer_id) const
straw_layer hash from id - optimized
Definition TRT_ID.h:695
Identifier module_id(int barrel_ec, int phi_module, int layer_or_wheel) const
For an individual module phi sector.
Definition TRT_ID.h:450
size_type m_STRAW_INDEX
Definition TRT_ID.h:333
hash_vec m_straw_vec
Definition TRT_ID.h:344
const IdDictDictionary * m_dict
Definition TRT_ID.h:334
MultiRange m_full_straw_range
Definition TRT_ID.h:335
bool is_valid() const
Definition TRT_ID.h:393
IdContext straw_layer_context() const
straw_layer id
Definition TRT_ID.cxx:942
void module_id_checks(int barrel_ec, int phi_module, int layer_or_wheel) const
Definition TRT_ID.cxx:64
int get_straw_layer_hash_calc(const ExpandedIdentifier &id, IdentifierHash &hash_id) const
Special method for timing tests.
Definition TRT_ID.cxx:646
size_type straw_hash_max() const
Definition TRT_ID.h:855
size_type m_STRAW_LAYER_INDEX
Definition TRT_ID.h:332
const_id_iterator straw_layer_end() const
Definition TRT_ID.h:887
Identifier::size_type size_type
Definition TRT_ID.h:88
int layer_or_wheel(const Identifier &id) const
Definition TRT_ID.h:810
IdContext module_context() const
module id
Definition TRT_ID.cxx:932
IdentifierHash straw_hash(Identifier straw_id) const
straw hash from id - optimized
Definition TRT_ID.h:713
int straw(const Identifier &id) const
Definition TRT_ID.h:828
int initLevelsFromDict()
Definition TRT_ID.cxx:529
size_type m_LAYER_OR_WHEEL_INDEX
Definition TRT_ID.h:331
IdDictFieldImplementation m_lay_wheel_impl
Definition TRT_ID.h:375
IdContext barrel_context() const
barrel_ec id
Definition TRT_ID.cxx:922
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override final
Set the IdDictionary.
Definition TRT_ID.cxx:126
size_type m_INDET_INDEX
Definition TRT_ID.h:327
std::vector< HashCalc > m_hash_calcs
Definition TRT_ID.h:367
bool m_is_valid
Definition TRT_ID.h:325
size_type m_straw_hash_max
Definition TRT_ID.h:340
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:654
const_expanded_id_iterator straw_end() const
Definition TRT_ID.h:903
IdentifierHash straw_hash_bin(Identifier straw_id) const
Definition TRT_ID.h:755
void reset_straw_hash_vector()
Definition TRT_ID.cxx:474
IdDictFieldImplementation m_bec_impl
Definition TRT_ID.h:373
std::vector< Identifier >::const_iterator const_id_iterator
Definition TRT_ID.h:89
void straw_id_checks(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Definition TRT_ID.cxx:83
size_type module_hash_max() const
Definition TRT_ID.h:837
Range::field m_barrel_field
Definition TRT_ID.h:341
const_id_iterator straw_layer_begin() const
Iterators over full set of straw_layer ids. Straw_layer ids are sorted.
Definition TRT_ID.h:879
int straw_layer(const Identifier &id) const
Definition TRT_ID.h:819
hash_vec::const_iterator hash_vec_it
Definition TRT_ID.h:293
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:479
hash_vec m_straw_layer_vec
Definition TRT_ID.h:343
void get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context=0) const
Definition TRT_ID.cxx:685
Identifier barrel_ec_id(int barrel_ec) const
For +/-barrel or +/-endcap id.
Definition TRT_ID.h:419
Definition index.py:1
STL namespace.
#define unlikely(x)