9#ifndef HGTD_IDENTIFIER_HGTD_ID_H
10#define HGTD_IDENTIFIER_HGTD_ID_H
13#include "Identifier/Identifier.h"
185 Identifier::diff_type offset)
const;
418inline Identifier::diff_type
421 Identifier::diff_type tval =
static_cast<Identifier::diff_type
>(target.get_compact() >>
base_bit());
422 Identifier::diff_type bval =
static_cast<Identifier::diff_type
>(
base.get_compact() >>
base_bit());
423 return (tval - bval);
429 Identifier::diff_type offset)
const
431 Identifier::value_type bval =
base.get_compact() >>
base_bit();
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
bool m_do_checks
Flag for subclasses to know whether or not to perform checks.
int hgtd_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 is an Identifier helper class for the HGTD subdetector.
hash_vec m_next_phi_wafer_vec
hash_vec::const_iterator hash_vec_it
int get_next_in_phi(const IdentifierHash &id, IdentifierHash &next) const
Next wafer hash in phi (return == 0 for neighbor found)
int eta_module(const Identifier &id) const
size_type m_ETA_MODULE_INDEX
void pixel_id_checks(int endcap, int layer, int phi_module, int eta_module, int phi_index, int eta_index) const
std::string m_padInModuleColumn
size_type m_PHI_INDEX_INDEX
IdDictFieldImplementation m_layer_impl
hash_vec m_prev_eta_wafer_vec
int eta_index(const Identifier &id) const
Identifier wafer_id(int endcap, int layer, int phi_module, int eta_module) const
For a single crystal.
void wafer_id_checks(int endcap, int layer, int phi_module, int eta_module) const
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const
Create compact id from hash id (return == 0 for OK)
void set_useNewIdentifierScheme(bool switchIntoNewIdentifier)
int get_next_in_eta(const IdentifierHash &id, IdentifierHash &next) const
Next wafer hash in eta (return == 0 for neighbor found)
int phi_module_max(const Identifier &id) const
Identifier pixel_id(int endcap, int layer, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
Identifier::diff_type calc_offset(const Identifier &base, const Identifier &target) const
Calculate a channel offset between the two identifiers.
Identifier::size_type size_type
size_type wafer_hash_max() const
int get_prev_in_phi(const IdentifierHash &id, IdentifierHash &prev) const
Previous wafer hash in phi (return == 0 for neighbor found)
MultiRange::const_identifier_factory const_expanded_id_iterator
hash_vec m_next_eta_wafer_vec
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
int phi_index(const Identifier &id) const
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
Initialization from the identifier dictionary.
MultiRange m_full_wafer_range
size_type m_PHI_MODULE_INDEX
IdContext pixel_context() const
const_id_iterator wafer_end() const
IdDictFieldImplementation m_phi_index_impl
std::vector< unsigned short > hash_vec
int eta_index_max(const Identifier &id) const
IdContext wafer_context() const
int phi_index_max(const Identifier &id) const
id_vec::const_iterator id_vec_it
size_type m_hgtd_region_index
int eta_module_max(const Identifier &id) const
const_id_iterator wafer_begin() const
Iterators over full set of ids. Wafer iterator is sorted.
size_type m_ETA_INDEX_INDEX
std::string m_moduleInLayer_Or_Row
const IdDictDictionary * m_dict
size_type pixel_hash_max() const
int layer_max(const Identifier &id) const
Max/Min values for each field (error returns -999)
int get_prev_in_eta(const IdentifierHash &id, IdentifierHash &prev) const
Previous wafer hash in eta (return == 0 for neighbor found)
const_expanded_id_iterator pixel_end() const
int layer(const Identifier &id) const
IdDictFieldImplementation m_phi_mod_impl
std::vector< Identifier > id_vec
Identifier pixel_id_offset(const Identifier &base, Identifier::diff_type offset) const
Create an identifier with a given base and channel offset.
void test_wafer_packing() const
Tests of packing.
IdDictFieldImplementation m_eta_index_impl
bool get_useNewIdentifierScheme() const
int endcap(const Identifier &id) const
Values of different levels (failure returns 0)
void get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context=0) const
Create expanded id from compact id (return == 0 for OK)
size_type m_wafer_hash_max
const_expanded_id_iterator pixel_begin() const
For pixel ids, only expanded id iterators are available.
std::vector< Identifier >::const_iterator const_id_iterator
IdDictFieldImplementation m_hgtd_impl
MultiRange m_full_pixel_range
IdDictFieldImplementation m_indet_impl
bool m_useNewIdentifierScheme
std::string m_padInModuleRow
IdDictFieldImplementation m_ec_impl
int base_bit() const
Return the lowest bit position used in the channel id.
hash_vec m_prev_phi_wafer_vec
std::string m_moduleInRow
IdDictFieldImplementation m_eta_mod_impl
int eta_module_min(const Identifier &id) const
bool is_phi_module_max(const Identifier &id) const
To check for when phi wrap around may be needed.
size_type m_pixel_hash_max
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const
Create hash id from compact id (return == 0 for OK)
int phi_module(const Identifier &id) const
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.