13#ifndef CALOIDENTIFIER_LARHEC_BASE_ID_H
14#define CALOIDENTIFIER_LARHEC_BASE_ID_H
40 const std::string&
group,
59 int eta,
int phi,
bool checks)
const;
77 int eta,
int phi_sector )
const;
88 int eta,
int phi,
bool checks)
const;
149 const std::string& group_name);
169 std::vector<IdentifierHash>& neighbourList)
const;
224 int& neighbourIndex,
IdentifierHash* neighbList,
unsigned int& nBiggerCell)
const;
227 int& neighbourIndex,
IdentifierHash* neighbList,
unsigned int& nBiggerCell)
const;
230 const double& absEta,
234 const double& absEta,
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Base class to factor out code common among Calo ID helpers.
macros to associate a CLID to a type
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).
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).
const std::string & name() const
Return the name for this helper.
std::ranges::subrange< id_iterator > id_range
Type for range over identifiers.
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.
IdDictFieldImplementation m_region_impl
id_iterator hec_end() const
end iterator over full set of Hec Identifiers for channels
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 = prevInPhi,...
IdDictFieldImplementation m_phi_impl
int initLevelsFromDict(const std::string &group_name)
int region(const Identifier id) const
return region [0,1]
LArHEC_Base_ID(const std::string &name, const std::string &group, bool supercell)
Constructor.
Identifier channel_id(const Identifier regionId, int eta, int phi, bool checks) const
int eta_min(const Identifier regId) const
min value of eta index (-999 == failure)
size_type m_SAMPLING_INDEX
id_iterator reg_begin() const
begin iterator over set of region Identifiers
Identifier channel_id(const Identifier regionId, int eta, int phi) const
allows to build a channel id starting from a region id (e.g.
static int get_prevInPhi(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, int &neighbourIndex, IdentifierHash *neighbList)
Identifier channel_id(const ExpandedIdentifier &exp_id) const
channel identifier for a channel from ExpandedIdentifier
int initialize_base_from_dictionary(const IdDictMgr &dict_mgr, const std::string &group_name)
initialization from the identifier dictionary
bool twoSymSides() const
True if the + and - sides of the calorimeter are identical (true layout).
Identifier region_id(int pos_neg, int sampling, int region) const
build a region identifier for a channel
int phi_min_init(const Identifier regId) const
void channel_id_checks(int pos_neg, int sampling, int region, int eta, int phi) const
static int get_nextInPhi(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, int &neighbourIndex, IdentifierHash *neighbList)
int phi_max(const Identifier regId) const
max value of phi index (-999 == failure)
id_range reg_range() const
Range over set of Region Identifiers.
void region_id_checks(int pos_neg, int sampling, int region) const
IdDictFieldImplementation m_hec_impl
Identifier region_id(const ExpandedIdentifier &exp_id) const
region identifier for a channel from ExpandedIdentifier
IdDictFieldImplementation m_slar_impl
IdDictFieldImplementation m_sampling_impl
std::vector< HashCalc > m_hash_calcs
Identifier region_id(int pos_neg, int sampling, int region, bool checks) const
int get_nextInSamp(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, const double &absEta, int &neighbourIndex, IdentifierHash *neighbList) const
MultiRange m_full_channel_range
std::vector< short int > m_vecOfPhiMin
int phi(const Identifier id) const
return phi[0,63] outer part [0,31] inner part
const std::vector< Identifier > & region_ids() const
provide access to region id vector, accessed via hash
IdDictFieldImplementation m_pn_impl
size_type m_hec_region_index
int get_prevInEta(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const float &gPhi, const unsigned int &minHash, int &neighbourIndex, IdentifierHash *neighbList, unsigned int &nBiggerCell) const
Identifier region_id(const Identifier channelId) const
allows to know in which region is a channel/cell – valid for both kinds of channels
int get_prevInSamp(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, const double &absEta, int &neighbourIndex, IdentifierHash *neighbList) const
IdDictFieldImplementation m_pn_reg_impl
id_iterator hec_begin() const
begin iterator over full set of Hec Identifiers for channels
MultiRange m_full_region_range
bool is_supercell(const Identifier id) const
Test if the identifier represents a supercell.
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
Identifier channel_id(int pos_neg, int sampling, int region, int eta, int phi) const
build a cell identifier for a channel
int eta(const Identifier id) const
return eta [0,9] outer part [0,3] inner part
int pos_neg(const Identifier id) const
return pos_neg -2 (C side) or 2 (A side)
int get_nextInEta(const LArHEC_region *hecRegion, const unsigned int &index, const short int &nPhi, const float &gPhi, const unsigned int &maxHash, int &neighbourIndex, IdentifierHash *neighbList, unsigned int &nBiggerCell) const
virtual int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded Identifier from Identifier (return == 0 for OK)
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)
id_range hec_range() const
Range over full set of HEC Identifiers.
const std::vector< Identifier > & channel_ids() const
provide access to channel id vector, accessed via hash
std::vector< short int > m_vecOfCellInfo
IdDictFieldImplementation m_lar_impl
std::vector< LArHEC_region * > m_vecOfRegions
int eta_max(const Identifier regId) const
max value of eta index (-999 == failure)
IdDictFieldImplementation m_eta_impl
Identifier channel_id(int pos_neg, int sampling, int region, int eta, int phi, bool checks) const
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
id_iterator reg_end() const
end iterator over set of region Identifiers
IdentifierHash channel_hash_binary_search(Identifier channelId) const
create hash id from channel id – method NOT optimised, please use channel_hash() above
This class provides an interface to deal with regions in the neighbours finding.
A MultiRange combines several Ranges.
A Range describes the possible ranges for the field values of an ExpandedIdentifier.