5#ifndef CALOIDENTIFIER_LARFCAL_BASE_ID_H
6#define CALOIDENTIFIER_LARFCAL_BASE_ID_H
25 const std::string&
group,
42 int eta,
int phi,
bool checks )
const ;
53 int eta,
int phi,
bool checks)
const ;
70 using id_range = std::ranges::subrange<id_iterator>;
127 std::vector<IdentifierHash>& neighbourList)
const;
133 const std::string& group_name);
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Base class to factor out code common among Calo ID helpers.
std::vector< size_t > vec
const std::string & group() const
Group name for this helper.
Identifier channel_id(IdentifierHash hashId) const
Return the channel (cell) Identifier for a given hash code (no checking).
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.
const std::string & name() const
Return the name for this helper.
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.
id_range fcal_range() const
Range over full set of FCAL Identifiers.
int eta_max(const Identifier regId) const
max value of eta index (-999 == failure)
int phi_max(const Identifier regId) const
max value of phi index (-999 == failure)
id_iterator mod_end() const
end iterator over set of module Identifiers
IdDictFieldImplementation m_slar_impl
int phi_min_init(const Identifier regId) const
int init_neighbours_3d_prev(const std::string &filename)
Identifier module_id(const Identifier id) const
allows to know in which region is a channel/cell – valid for both kinds of channels
IdDictFieldImplementation m_pn_impl
int init_neighbours_3d_next(const std::string &filename)
Identifier channel_id(int pos_neg, int module, int eta, int phi, bool checks) const
Identifier::size_type size_type
int eta(const Identifier id) const
eta [0,63] module 1 ; [0,31] module 2 ; [0,15] module 3
Identifier module_id(IdentifierHash module_hash_id) const
create module id from hash id
Identifier module_id(const ExpandedIdentifier &exp_id) const
module identifier for a channel from ExpandedIdentifier
IdDictFieldImplementation m_fcal_impl
int init_neighbours_from_file(const std::string &filename, std::vector< std::set< IdentifierHash > > &vec)
IdDictFieldImplementation m_eta_impl
size_type module_hash_max() const
region hash table max size
IdDictFieldImplementation m_module_impl
bool is_supercell(const Identifier id) const
Test if the identifier represents a supercell.
virtual int initialize_base_from_dictionary(const IdDictMgr &dict_mgr, const std::string &group_name)
initialization from the identifier dictionary
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_begin() const
begin iterator over set of module Identifiers
std::vector< std::set< IdentifierHash > > m_neighbours_3d_next_vec
int init_neighbours(const IdDictMgr &dict_mgr)
Identifier channel_id(const Identifier moduleId, int eta, int phi, bool checks) const
LArFCAL_Base_ID(const LArFCAL_Base_ID &)
id_iterator fcal_end() const
end iterator over full set of Fcal Identifiers for channels
int eta_min(const Identifier regId) const
min value of eta index (-999 == failure)
id_iterator fcal_begin() const
begin iterator over full set of Fcal Identifiers for channels
id_range mod_range() const
Range over full set of FCAL modules.
Identifier channel_id(int pos_neg, int module, int eta, int phi) const
build a cell identifier for a channel
int phi(const Identifier id) const
phi [0,15]
int init_neighbours_2d(const std::string &filename)
void module_id_checks(int pos_neg, int module) const
std::vector< std::set< IdentifierHash > > m_neighbours_3d_prev_vec
Identifier channel_id(const Identifier moduleId, int eta, int phi) const
allows to build a channel id starting from a module id (e.g.
std::vector< short int > m_vecOfPhiMin
IdDictFieldImplementation m_pn_mod_impl
IdDictFieldImplementation m_phi_impl
IdContext module_context() const
context for modules – method kept for backward compatibility.
int initLevelsFromDict(const std::string &group_name)
std::ranges::subrange< id_iterator > id_range
Type for range over identifiers.
size_type m_fcal_region_index
std::vector< std::set< IdentifierHash > > m_neighbours_2d_vec
Identifier channel_id(const ExpandedIdentifier &exp_id) const
cell identifier for a channel from ExpandedIdentifier
int pos_neg(const Identifier id) const
pos_neg : +/- 2 (A/C side)
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
void channel_id_checks(int pos_neg, int module, int eta, int phi) const
MultiRange m_full_module_range
const std::vector< Identifier > & channel_ids() const
provide acces to channel id vector, accessed via hash
MultiRange m_full_channel_range
Identifier module_id(int pos_neg, int module) const
build a module identifier for a channel
LArFCAL_Base_ID & operator=(const LArFCAL_Base_ID &)
IdDictFieldImplementation m_lar_impl
Identifier module_id(int pos_neg, int module, bool checks) const
std::vector< Identifier >::const_iterator id_iterator
Type for iterators over identifiers.
LArFCAL_Base_ID(const std::string &name, const std::string &group, bool supercell)
virtual int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded Identifier from Identifier (return == 0 for OK)
IdentifierHash module_hash(Identifier module_id) const
create hash id from module id
IdentifierHash channel_hash_binary_search(Identifier channelId) const
create hash id from channel id – method NOT optimised, please use channel_hash() above
A MultiRange combines several Ranges.