5#ifndef INDETIDENTIFIER_TRT_ID_H
6#define INDETIDENTIFIER_TRT_ID_H
20#include "Identifier/Identifier.h"
361 typedef std::pair<unsigned int, unsigned int>
intPair;
712 unsigned int hcIndex = 0;
718 unsigned int index = lw * 32 + sl;
723 std::cout <<
"straw_hash: index > barrel_index size - " <<
index
727 unsigned int index = lw;
732 std::cout <<
"straw_hash: index > endcap_index size - " <<
index
751 std::cout <<
"straw_hash: hc index > hcCalc size - " << hcIndex
783 ATH_MSG_ERROR(
" Please use 'trt_id->is_valid()' if a layout test is needed. ");
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...
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.
This is an Identifier helper class for the TRT subdetector.
void barrel_ec_id_checks(int barrel_ec) const
size_type m_straw_layer_hash_max
int phi_module(const Identifier &id) const
std::vector< intPair > m_hash_calcs_barrel_indexes
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
IdDictFieldImplementation m_str_lay_impl
int straw_max(const Identifier &id) const
MultiRange::const_identifier_factory const_expanded_id_iterator
const_id_iterator module_begin() const
Iterators over full set of module ids. Module ids are sorted.
size_type m_PHI_MODULE_INDEX
MultiRange m_full_straw_layer_range
size_type straw_layer_hash_max() const
std::vector< intPair > m_hash_calcs_endcap_indexes
const_expanded_id_iterator straw_begin() const
For straw ids, only expanded id iterators are available.
IdentifierHash module_hash(Identifier module_id) const
module hash from id - optimized
IdContext straw_context() const
straw id
std::pair< unsigned int, unsigned int > intPair
IdDictFieldImplementation m_indet_impl
IdDictFieldImplementation m_phi_mod_impl
const_id_iterator module_end() const
IdDictFieldImplementation m_straw_impl
IdDictFieldImplementation m_trt_impl
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)
size_type m_BARREL_EC_INDEX
size_type m_module_hash_max
void layer_id_checks(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
std::map< IdentifierHash, HashCalc > hashCalcMap
MultiRange m_full_module_range
void test_trt_ids()
Tests of packing.
bool is_barrel(const Identifier &id) const
Test for barrel.
void invalidMessage() const
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:
int straw_layer_max(const Identifier &id) const
Max values for each field (-999 == failure)
std::vector< Identifier > hash_vec
size_type m_trt_region_index
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
IdentifierHash straw_layer_hash(Identifier straw_layer_id) const
straw_layer hash from id - optimized
Identifier module_id(int barrel_ec, int phi_module, int layer_or_wheel) const
For an individual module phi sector.
const IdDictDictionary * m_dict
MultiRange m_full_straw_range
IdContext straw_layer_context() const
straw_layer id
void module_id_checks(int barrel_ec, int phi_module, int layer_or_wheel) const
int get_straw_layer_hash_calc(const ExpandedIdentifier &id, IdentifierHash &hash_id) const
Special method for timing tests.
size_type straw_hash_max() const
size_type m_STRAW_LAYER_INDEX
const_id_iterator straw_layer_end() const
Identifier::size_type size_type
int layer_or_wheel(const Identifier &id) const
IdContext module_context() const
module id
IdentifierHash straw_hash(Identifier straw_id) const
straw hash from id - optimized
int straw(const Identifier &id) const
size_type m_LAYER_OR_WHEEL_INDEX
IdDictFieldImplementation m_lay_wheel_impl
IdContext barrel_context() const
barrel_ec id
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override final
Set the IdDictionary.
std::vector< HashCalc > m_hash_calcs
size_type m_straw_hash_max
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)
const_expanded_id_iterator straw_end() const
IdentifierHash straw_hash_bin(Identifier straw_id) const
void reset_straw_hash_vector()
IdDictFieldImplementation m_bec_impl
std::vector< Identifier >::const_iterator const_id_iterator
void straw_id_checks(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
size_type module_hash_max() const
Range::field m_barrel_field
const_id_iterator straw_layer_begin() const
Iterators over full set of straw_layer ids. Straw_layer ids are sorted.
int straw_layer(const Identifier &id) const
hash_vec::const_iterator hash_vec_it
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.
hash_vec m_straw_layer_vec
void get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context=0) const
Identifier barrel_ec_id(int barrel_ec) const
For +/-barrel or +/-endcap id.