|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef INDETIDENTIFIER_SCT_ID_H
6 #define INDETIDENTIFIER_SCT_ID_H
21 #include "Identifier/Identifier.h"
246 std::array<IdentifierHash, 5>
250 std::array<IdentifierHash, 5>
359 std::array<size_t, NUM_INDICES>
m_indices{0,1,2,3,4,5,6,7,999};
400 m_indet_impl.pack(indet_field_value(),
result);
401 m_sct_impl.pack(sct_field_value(),
result);
402 m_bec_impl.pack(barrel_ec,
result);
403 m_lay_disk_impl.pack(layer_disk,
result);
404 m_phi_mod_impl.pack(phi_module,
result);
405 m_eta_mod_impl.pack(eta_module,
result);
409 wafer_id_checks(barrel_ec, layer_disk, phi_module, eta_module, 0);
419 int eta_module)
const {
771 if (
index < vectorOfHashes.size()) {
772 return vectorOfHashes[
index];
777 #endif // INDETIDENTIFIER_SCT_ID_H
MultiRange m_full_wafer_range
int indet_field_value() const
Provide efficient access to individual field values, for subclass idhelpers.
IdContext strip_context(void) const
int get_next_in_phi(const IdentifierHash &id, IdentifierHash &next) const
Next wafer hash in phi (return == 0 for neighbor found)
int base_bit(void) const
Return the lowest bit position used in the channel id.
IdDictFieldImplementation m_eta_mod_impl
hash_vec m_prev_phi_wafer_vec
hash_vec::const_iterator hash_vec_it
const_expanded_id_iterator strip_begin(void) const
For strip ids, only expanded id iterators are available.
int get_prev_in_phi(const IdentifierHash &id, IdentifierHash &prev) const
Previous wafer hash in phi (return == 0 for neighbor found)
const_expanded_id_iterator strip_end(void) const
IdDictFieldImplementation m_side_impl
size_type m_wafer_hash_max
Identifier idForCheck(const Identifier &id) const
size_type m_sct_region_index
const_id_iterator wafer_begin(void) const
Iterators over full set of ids. Wafer iterator is sorted.
int eta_module_max(const Identifier &id) const
void pack(int value, Identifier &id) const
hash_vec m_prev_eta_wafer_vec
std::vector< Identifier >::const_iterator const_id_iterator
bool m_do_checks
Flag for subclasses to know whether or not to perform checks.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int phi_module(const Identifier &id) const
bool const RAWDATA *ch2 const
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override final
Initialization from the identifier dictionary.
size_type strip_hash_max(void) const
int phi_module_max(const Identifier &id) const
IdDictFieldImplementation m_sct_impl
int unpack(Identifier id) const
Identifier manipulation methods.
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)
id_vec::const_iterator id_vec_it
Identifier module_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
IdDictFieldImplementation m_indet_impl
HelperType
enum class for eventual final derived types of this class
std::array< std::function< IdentifierHash(const IdentifierHash &)>, 5 > m_neighboursByEta
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)
void reset(Identifier &id) const
const std::array< std::function< IdentifierHash(const IdentifierHash &)>, 5 > & neighbour_calls_by_eta() const
return functions to give neighbours in order: opposite, eta minus, eta plus, phi minus,...
Identifier::size_type size_type
hash_vec m_next_eta_wafer_vec
MultiRange m_full_strip_range
bool match(element_type value) const
The basic match operation.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
IdDictFieldImplementation m_strip_impl
Identifier::diff_type calc_offset(const Identifier &base, const Identifier &target) const
Calculate a channel offset between the two identifiers.
Range::field m_barrel_field
hash_vec m_next_phi_wafer_vec
virtual ~SCT_ID(void)=default
int initLevelsFromDict(void)
IdDictFieldImplementation m_row_impl
IdDictFieldImplementation m_phi_mod_impl
int row(const Identifier &id) const
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)
Identifier::size_type size_type
IdDictFieldImplementation m_lay_disk_impl
IdDictFieldImplementation m_bec_impl
IdContext wafer_context(void) const
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
int get_other_side(const IdentifierHash &id, IdentifierHash &other) const
Wafer hash on other side.
IdentifierHash nextInSequence(const IdentifierHash &id, const hash_vec &vectorOfHashes) const
std::array< IdentifierHash, 5 > neighbours_by_phi(const IdentifierHash &idh) const
int sct_field_value() const
int eta_module_min(const Identifier &id) const
const IdDictDictionary * m_dict
A MultiRange combines several Ranges.
std::array< IdentifierHash, 5 > neighbours_by_eta(const IdentifierHash &idh) const
size_type wafer_hash_max(void) const
void localMessage(const std::string &msgTxt, const std::string &func, const MSG::Level &lvl) const
AtlasDetectorID::HelperType helper() const override final
This is an SCT_ID helper.
int layer_disk(const Identifier &id) const
void wafer_id_checks(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
std::vector< Identifier > id_vec
int layer_disk_max(const Identifier &id) const
Max/Min values for each field (-999 == failure)
bool is_eta_module_min(const Identifier &id) const
For the barrel.
int get_prev_in_eta(const IdentifierHash &id, IdentifierHash &prev) const
Previous wafer hash in eta (return == 0 for neighbor found)
int get_next_in_eta(const IdentifierHash &id, IdentifierHash &next) const
Next wafer hash in eta (return == 0 for neighbor found)
bool is_eta_module_max(const Identifier &id) const
For the barrel.
int getMaxField(const Identifier &id, const ExpandedIdIndices &fieldIndx) const
int strip(const Identifier &id) const
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
int eta_module(const Identifier &id) const
int strip_max(const Identifier &id) const
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
size_type m_strip_hash_max
std::array< size_t, NUM_INDICES > m_indices
unsigned long long value_type
int side(const Identifier &id) const
const_id_iterator wafer_end(void) const
bool is_phi_module_max(const Identifier &id) const
MultiRange::const_identifier_factory const_expanded_id_iterator
unsigned long long size_type
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual bool do_checks(void) const override
Checks are performed by default in debug compilation and NOT in optimized compilation.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
macros to associate a CLID to a type
void strip_id_checks(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
std::vector< IdentifierHash > hash_vec
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.
Identifier strip_id_offset(const Identifier &base, Identifier::diff_type offset) const
Create an identifier with a given base and channel offset.