5#ifndef LARMiniFCAL_ID_H
6#define LARMiniFCAL_ID_H
78 int eta,
int phi,
bool checks )
const ;
89 int eta,
int phi,
bool checks)
const ;
108 using id_range = std::ranges::subrange<id_iterator>;
125 const std::vector<Identifier>&
channel_ids()
const;
128 const std::vector<Identifier>&
module_ids()
const;
489inline int LArMiniFCAL_ID::module (
const Identifier id)
const
519 unsigned int index = modHash;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Base class to factor out code common among Calo ID helpers.
std::vector< size_t > vec
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
int lar_fcal_field_value() const
virtual bool do_checks(void) const override
Checks are performed by default in debug compilation and NOT in optimized compilation.
int lar_field_value() const
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.
id_range range() const
Return an iterator range over the group's Identifiers.
const HashGroup & regions() const
Return the HashGroup for regions.
IdentifierHash region_hash(Identifier regionId) const
Convert a connected region Identifier to a hash code.
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.
IdentifierHash channel_hash(Identifier channelId) const
Convert a connected channel (cell) Identifier to a hash code.
CaloIDHelper(const std::string &name, const std::string &group)
Constructor.
Identifier region_id(IdentifierHash hashId) const
Return the region Identifier for a given hash code (no checking).
const HashGroup & channels() const
Return the HashGroup for channels (cells).
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.
int unpack(Identifier id) const
Identifier manipulation methods.
This is a "hash" representation of an Identifier.
Helper class for LArMiniFCAL offline identifiers.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
IdDictFieldImplementation m_depth_impl
std::vector< short int > m_vecOfCellInfo
std::vector< Identifier >::const_iterator id_iterator
Type for iterators over identifiers.
void module_id_checks(int pos_neg, int module) const
id_iterator minifcal_end() const
end iterator over full set of Fcal Identifiers for channels
int eta_max(const Identifier regId) const
max value of eta index (-999 == failure)
int init_neighbors_from_file(const std::string &filename, std::vector< std::set< IdentifierHash > > &vec)
size_type module_hash_max() const
region hash table max size
IdDictFieldImplementation m_phi_impl
IdentifierHash module_hash(Identifier module_id) const
create hash id from module id
int get_neighbours(const IdentifierHash id, const LArNeighbours::neighbourOption &option, std::vector< IdentifierHash > &neighbourList) const
access to hashes for neighbours return == 0 for neighbours found option = all2D,...
id_iterator mod_end() const
end iterator over set of module Identifiers
int phi_max(const Identifier regId) const
max value of phi index (-999 == failure)
IdDictFieldImplementation m_module_impl
id_iterator minifcal_begin() const
begin iterator over full set of Fcal Identifiers for channels
MultiRange m_full_depth_range
int depth(const Identifier id) const
depth [0,3]
bool is_initialized() const
check whether LArMiniFCAL ID helper has been initialized - returns false if description is not availa...
MultiRange m_full_module_range
IdDictFieldImplementation m_pn_mod_impl
IdentifierHash channel_hash_binary_search(Identifier channelId) const
create hash id from channel id – method NOT optimised, please use channel_hash() above
IdDictFieldImplementation m_pn_impl
int pos_neg(const Identifier id) const
pos_neg : +/- 2 (A/C side)
int eta_min(const Identifier regId) const
min value of eta index (-999 == failure)
IdentifierHash channel_hash(Identifier channelId) const
Convert a connected channel (cell) Identifier to a hash code.
IdDictFieldImplementation m_lar_impl
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
bool is_supercell(const Identifier channelId) const
std::vector< short int > m_vecOfPhiMin
const std::vector< Identifier > & module_ids() const
provide access to module id vector, accessed via hash
id_range mod_range() const
range over set of module Identifiers
int init_neighbors_3d_next(const std::string &filename)
MultiRange m_full_channel_range
std::ranges::subrange< id_iterator > id_range
Type for range over identifiers.
size_type m_MiniFCAL_INDEX
int eta(const Identifier id) const
eta [0,63] module 1 ; [0,31] module 2 ; [0,15] module 3
IdContext module_context() const
context for modules – method kept for backward compatibility.
virtual int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded Identifier from Identifier (return == 0 for OK)
size_type m_fcal_region_index
IdDictFieldImplementation m_fcal_impl
IdDictFieldImplementation m_eta_impl
int phi_min_init(const Identifier regId) const
id_range minifcal_range() const
range over full set of Fcal Identifiers for channels
void channel_id_checks(int pos_neg, int module, int depth, int eta, int phi) const
std::vector< std::set< IdentifierHash > > m_neighbors_2d_vec
const std::vector< Identifier > & channel_ids() const
provide access to channel id vector, accessed via hash
Identifier channel_id(const ExpandedIdentifier &exp_id) const
cell identifier for a channel from ExpandedIdentifier
int phi(const Identifier id) const
phi [0,15]
Identifier::size_type size_type
int init_neighbors(const IdDictMgr &dict_mgr)
Identifier module_id(const ExpandedIdentifier &exp_id) const
module identifier for a channel from ExpandedIdentifier
int init_neighbors_3d_prev(const std::string &filename)
int init_neighbors_2d(const std::string &filename)
id_iterator mod_begin() const
begin iterator over set of module Identifiers
std::vector< std::set< IdentifierHash > > m_neighbors_3d_next_vec
std::vector< std::set< IdentifierHash > > m_neighbors_3d_prev_vec
A MultiRange combines several Ranges.
std::string depth
tag string for intendation