13#ifndef CALOIDENTIFIER_CALOIDHELPER_H
14#define CALOIDENTIFIER_CALOIDHELPER_H
18#include "Identifier/Identifier.h"
44 using id_range = std::ranges::subrange<id_iterator>;
81 const std::string&
type,
98 const std::set<Identifier>&
ids,
138 const std::vector<Identifier>&
ids()
const;
275 const std::string&
name()
const;
285 int initialize_base_from_dictionary (
const IdDictMgr& dict_mgr,
286 const std::string& dict_name);
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
const std::string & group() const
Group name for this helper.
AtlasDetectorID(const std::string &name, const std::string &group)
Manage a list of identifiers.
IdContext context() const
Return the context for this group.
IdentifierHash hash(Identifier id) const
Look up the hash code corresponding to an Identifier.
Identifier id(IdentifierHash hashId) const
Return the identifier for a given hash code (no checking).
const std::vector< Identifier > & ids() const
Return a vector of all Identifiers for this group.
id_iterator end() const
Return an end iterator over the group's Identifiers.
id_iterator begin() const
Return a begin iterator over the group's Identifiers.
size_type m_end_index
Ending index for this group's context.
size_type end_index() const
Return the ending index of the context for this group.
std::vector< Identifier > m_id_vec
List of Identifiers for this group.
int init(T &parent, const std::string &type, const MultiRange &full_range, Identifier(T::*idfunc)(const ExpandedIdentifier &) const, size_type end_index)
Initialize.
id_range range() const
Return an iterator range over the group's Identifiers.
int get_hash(Identifier id, IdentifierHash &hash_id) const
Look up the hash code corresponding to an Identifier.
size_type hash_max() const
Return one more than the largest hash code.
float phi0(const IdentifierHash regHash) const
Return the minimum phi of region, or NOT_VALID.
const HashGroup & regions() const
Return the HashGroup for regions.
IdentifierHash region_hash(Identifier regionId) const
Convert a connected region Identifier to a hash code.
float eta0(const IdentifierHash regHash) const
Return the minimum eta of region, or NOT_VALID.
const std::vector< const IdDictRegion * > & dictRegions() const
Return the vector of IdDictRegion, accessed via region hash.
float etaGranularity(const IdentifierHash regHash) const
Return the eta granularity of a region, or NOT_VALID.
Identifier channel_id(IdentifierHash hashId) const
Return the channel (cell) Identifier for a given hash code (no checking).
size_type region_hash_max() const
One more than the largest region hash code.
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const
Convert a hash code to an Identifier for either channels or regions, depending on the context.
virtual int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const =0
Create an expanded Identifier from an Identifier.
IdContext region_context() const
Return the context for regions.
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const
Convert an Identifier to a hash code for either channels or regions, depending on the context.
IdentifierHash channel_hash(Identifier channelId) const
Convert a connected channel (cell) Identifier to a hash code.
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
*List of c IdDictRegion objects std::vector< const IdDictRegion * > m_vecOfDictRegions
*Group of region Identifiers HashGroup m_regions
IdContext channel_context() const
Return the context for channels (cells).
CaloIDHelper(const std::string &name, const std::string &group)
Constructor.
Identifier::size_type size_type
std::vector< Identifier >::const_iterator id_iterator
Type for iterators over identifiers.
Identifier region_id(IdentifierHash hashId) const
Return the region Identifier for a given hash code (no checking).
int fill_vec_of_dict_regions(const std::string &group_name="")
Do basic initialization of the helper.
float phiGranularity(const IdentifierHash regHash) const
Return the phi granularity of a region, or NOT_VALID.
const std::string & name() const
Return the name for this helper.
const HashGroup & channels() const
Return the HashGroup for channels (cells).
*Name of this helper std::string m_name
std::ranges::subrange< id_iterator > id_range
Type for range over identifiers.
*The dictionary for this helper const IdDictDictionary * m_dict
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
This is a "hash" representation of an Identifier.
A MultiRange combines several Ranges.