14#ifndef CALOIDENTIFIER_LAREM_BASE_ID_H
15#define CALOIDENTIFIER_LAREM_BASE_ID_H
42 const std::string&
group,
61 int eta,
int phi,
bool checks )
const;
72 int eta,
int phi,
bool checks )
const;
82 using id_range = std::ranges::subrange<id_iterator>;
298 const std::string& group_name);
321 std::vector<IdentifierHash>& neighbourList)
const;
374 int& neighbourIndex,
IdentifierHash* neighbList,
unsigned int& nBiggerCell)
const;
377 int& neighbourIndex,
IdentifierHash* neighbList,
unsigned int& nBiggerCell)
const;
380 const double& gEta,
const float& gPhi,
const double& absEta,
384 const double& gEta,
const float& gPhi,
const double& absEta,
388 const double& gEta,
const float& gPhi,
const double& absEta,
392 const double& gEta,
const float& gPhi,
const double& absEta,
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.
const std::string & group() const
Group name for this helper.
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).
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 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.
int get_prevInEta(const LArEM_region *emRegion, const unsigned int &index, const short int &nPhi, const float &gPhi, const unsigned int &minHash, int &neighbourIndex, IdentifierHash *neighbList, unsigned int &nBiggerCell) const
const std::vector< Identifier > & channel_ids() const
provide access to channel id vector, accessed via hash
int region(const Identifier id) const
return region according to :
IdentifierHash channel_hash_binary_search(Identifier channelId) const
create hash id from channel id – method NOT optimised, please use channel_hash() above
Identifier region_id(const Identifier channelId) const
allows to know in which region is a channel/cell – valid for both kinds of channels
std::ranges::subrange< id_iterator > id_range
Type for range over identifiers.
std::vector< unsigned > m_cells
int eta(const Identifier id) const
return eta according to :
int eta_max(const Identifier regId) const
max value of eta index (-999 == failure)
id_range reg_range() const
Range over set of Region Identifiers.
Identifier region_id(const ExpandedIdentifier &exp_id) const
Build a cell identifier from an expanded identifier.
LArEM_Base_ID(const LArEM_Base_ID &)
size_type m_SAMPLING_INDEX
int phi_max(const Identifier regId) const
max value of phi index (-999 == failure)
int eta_min(const Identifier regId) const
min value of eta index (-999 == failure)
id_range em_range() const
Range over full set of EM Identifiers.
bool is_em_endcap_outer(const Identifier id) const
test if the id belongs to the EM Endcap outer wheel
void region_id_checks(int barrel_ec, int sampling, int region) const
bool is_supercell(const Identifier id) const
Test if the identifier represents a supercell.
Identifier channel_id(const Identifier regionId, int eta, int phi, bool checks) const
IdDictFieldImplementation m_em_impl
int get_nextInSamp(const LArEM_region *emRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, const double &gEta, const float &gPhi, const double &absEta, int &neighbourIndex, IdentifierHash *neighbList) const
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
IdDictFieldImplementation m_phi_impl
IdDictFieldImplementation m_sampling_impl
IdDictFieldImplementation m_region_impl
Identifier channel_id(const Identifier regionId, int eta, int phi) const
allows to build a cell id starting from a region id (e.g.
int get_prevInSamp(const LArEM_region *emRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, const double &gEta, const float &gPhi, const double &absEta, int &neighbourIndex, IdentifierHash *neighbList) const
size_type m_em_region_index
int initialize_base_from_dictionary(const IdDictMgr &dict_mgr, const std::string &group_name)
initialization from the identifier dictionary
std::vector< LArEM_region * > m_vecOfRegions
static int get_nextInPhi(const LArEM_region *emRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, int &neighbourIndex, IdentifierHash *neighbList)
int get_nextInEta(const LArEM_region *emRegion, const unsigned int &index, const short int &nPhi, const float &gPhi, const unsigned int &maxHash, int &neighbourIndex, IdentifierHash *neighbList, unsigned int &nBiggerCell) const
Identifier channel_id(int barrel_ec, int sampling, int region, int eta, int phi) const
build a cell identifier
int get_prevInSubdet(const LArEM_region *emRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, const double &gEta, const float &gPhi, const double &absEta, int &neighbourIndex, IdentifierHash *neighbList) const
int phi(const Identifier id) const
return phi according to :
IdDictFieldImplementation m_lar_impl
id_iterator em_begin() const
begin iterator over full set of EM Identifiers
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 phi_min_init(const Identifier regId) const
std::vector< Identifier >::const_iterator id_iterator
Type for iterators over identifiers.
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
MultiRange m_full_em_range
static int get_prevInPhi(const LArEM_region *emRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, int &neighbourIndex, IdentifierHash *neighbList)
IdDictFieldImplementation m_bec_impl
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
Identifier::size_type size_type
bool is_em_endcap_inner(const Identifier id) const
test if the id belongs to the EM Endcap inner wheel
MultiRange m_full_region_range
LArEM_Base_ID & operator=(const LArEM_Base_ID &)
Identifier channel_id(const ExpandedIdentifier &exp_id) const
Build a cell identifier from an expanded identifier.
Identifier region_id(int barrel_ec, int sampling, int region) const
build a region identifier
std::vector< int > m_vecOfPhiMin
std::vector< HashCalc > m_hash_calcs
IdDictFieldImplementation m_slar_impl
void channel_id_checks(int barrel_ec, int sampling, int region, int eta, int phi) const
id_iterator reg_end() const
end iterator over set of Region Identifiers
Identifier region_id(int barrel_ec, int sampling, int region, bool checks) const
Identifier channel_id(int barrel_ec, int sampling, int region, int eta, int phi, bool checks) const
IdDictFieldImplementation m_bec_reg_impl
bool twoSymSides() const
True if the + and - sides of the calorimeter are identical (true layout).
IdDictFieldImplementation m_eta_impl
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,...
int barrel_ec(const Identifier id) const
return barrel_ec according to :
int sampling(const Identifier id) const
return sampling according to :
int get_nextInSubdet(const LArEM_region *emRegion, const unsigned int &index, const short int &nPhi, const unsigned int &minHash, const double &gEta, const float &gPhi, const double &absEta, int &neighbourIndex, IdentifierHash *neighbList) const
id_iterator em_end() const
end iterator over full set of EM Identifiers
id_iterator reg_begin() const
begin iterator over set of Region Identifiers
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
int initLevelsFromDict(const std::string &group_name)
LArEM_Base_ID(const std::string &name, const std::string &group, bool supercell)
Constructor.
This class provides an interface to deal with regions in the neighbours finding.
A MultiRange combines several Ranges.