 |
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef CALOIDENTIFIER_CALOIDHELPER_H
14 #define CALOIDENTIFIER_CALOIDHELPER_H
18 #include "Identifier/Identifier.h"
22 #include "boost/range/iterator_range.hpp"
44 typedef boost::iterator_range<id_iterator>
id_range;
81 const std::string&
type,
100 const std::set<Identifier>&
ids,
141 const std::vector<Identifier>&
ids()
const;
278 const std::string&
name()
const;
293 const std::string& dict_name);
349 #endif // not CALOIDENTIFIER_CALOIDHELPER_H
std::string m_name
Name of this helper.
std::vector< Identifier > m_id_vec
List of Identifiers for this group.
size_type m_end_index
Ending index for this group's context.
IdContext channel_context() const
Return the context for channels (cells).
id_iterator end() const
Return an end iterator over the group's Identifiers.
id_range range() const
Return an iterator range over the group's Identifiers.
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
int fill_vec_of_dict_regions(const std::string &group_name="")
Initialize the list of detector regions.
int init(T &parent, const std::string &type, const MultiRange &full_range, Identifier(T::*idfunc)(const ExpandedIdentifier &) const, size_type end_index)
Initialize.
size_type end_index() const
Return the ending index of the context for this group.
IdContext region_context() const
Return the context for regions.
Identifier id(IdentifierHash hashId) const
Return the identifier for a given hash code (no checking).
id_iterator begin() const
Return a begin iterator over the group's Identifiers.
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.
Identifier region_id(IdentifierHash hashId) const
Return the region Identifier for a given hash code (no checking).
HashGroup & regions()
Return the HashGroup for regions. non-const.
int get_hash(Identifier id, IdentifierHash &hash_id) const
Look up the hash code corresponding to an Identifier.
CaloIDHelper(const std::string &name, const std::string &group)
Constructor.
const HashGroup & regions() const
Return the HashGroup for regions.
Identifier::size_type size_type
std::vector< const IdDictRegion * > m_vecOfDictRegions
List of IdDictRegion objects.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
size_type region_hash_max() const
One more than the largest region hash code.
float etaGranularity(const IdentifierHash regHash) const
Return the eta granularity of a region, or NOT_VALID.
const std::vector< Identifier > & ids() const
Return a vector of all Identifiers for this group.
HashGroup m_regions
Group of region Identifiers.
const IdDictDictionary * dict() const
Return the dictionary for this subdetector.
Base class to factor out code common among Calo ID helpers.
const std::string & group() const
Group name for this helper.
IdentifierHash hash(Identifier id) const
Look up the hash code corresponding to an Identifier.
int initialize_base_from_dictionary(const IdDictMgr &dict_mgr, const std::string &dict_name)
Do basic initialization of the helper.
A MultiRange combines several Ranges.
float eta0(const IdentifierHash regHash) const
Return the minimum eta of region, or NOT_VALID.
const std::string & name() const
Return the name for this helper.
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.
const IdDictDictionary * m_dict
The dictionary for this helper.
const HashGroup & channels() const
Return the HashGroup for channels (cells).
IMessageSvc * msgSvc()
Return the message service for this helper (may be null).
IdentifierHash channel_hash(Identifier channelId) const
Convert a connected channel (cell) Identifier to a hash code.
float phi0(const IdentifierHash regHash) const
Return the minimum phi of region, or NOT_VALID.
const std::vector< const IdDictRegion * > & dictRegions() const
Return the vector of IdDictRegion, accessed via region hash.
HashGroup m_channels
Group of channel (cell) Identifiers.
IdContext context() const
Return the context for this group.
HashGroup & channels()
Return the HashGroup for channels (cells). non-const.
float phiGranularity(const IdentifierHash regHash) const
Return the phi granularity of a region, or NOT_VALID.
virtual int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const =0
Create an expanded Identifier from an Identifier.
unsigned long long size_type
boost::iterator_range< id_iterator > id_range
Type for range over identifiers.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
std::vector< Identifier >::const_iterator id_iterator
Type for iterators over identifiers.
Manage a list of identifiers.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
IdentifierHash region_hash(Identifier regionId) const
Convert a connected region Identifier to a hash code.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
size_type hash_max() const
Return one more than the largest hash code.
Identifier channel_id(IdentifierHash hashId) const
Return the channel (cell) Identifier for a given hash code (no checking).