87 ATH_MSG_DEBUG(
"Request to reinitialize not satisfied - tags have not changed");
123 std::string neighbourFile;
125 neighbourFile = dict_mgr.
find_metadata(
"FULLATLASNEIGHBORS");
129 neighbourFile =
"SuperCaloNeighborsSuperCells-April2014.dat";
131 if (neighbourFile.empty())
throw std::runtime_error(
"CaloCell_ID: Cannot find the CaloNeighbour file name");
132 ATH_MSG_DEBUG(
"Initializing Super3D Neighbors from file " << neighbourFile);
142 int calo_sampl = (int)
Unknown;
145 calo_sampl =
m_emHelper->sampling(
id)+(int)PreSamplerB;
147 else if (
m_emHelper->is_em_endcap_outer(
id)) {
148 calo_sampl =
m_emHelper->sampling(
id)+(int)PreSamplerE;
150 else if (
m_emHelper->is_em_endcap_inner(
id)) {
151 calo_sampl =
m_emHelper->sampling(
id)+(int)EME1;
155 calo_sampl =
m_hecHelper->sampling(
id) + (int) HEC0;
163 calo_sampl =
m_fcalHelper->module(
id) - 1 + (int) FCAL0;
191 std::vector<IdentifierHash>& neighbourList)
const
220 neighbourList.resize(0);
224 unsigned int shift = caloHashId - subHash;
225 int neighbourIndex = neighbourList.size();
227 if (neighbourIndex > 0) {
229 for (
int iN = 0 ; iN <neighbourIndex ; ++iN) {
230 neighbourList[iN] += shift;
254 std::ostringstream s1;
256 s1 << (this->
pos_neg(
id) == 0 ?
"/C-SIDE" :
"/A-SIDE");
258 s1 <<
"/SECTION " << this->
section(
id) <<
"/SIDE " << this->
side(
id)
259 <<
"/MODULE " << this->module(
id) <<
"/TOWER " << this->
tower(
id)
260 <<
"/SAMPLE " << this->
sample(
id);
263 s1 <<
"/REGION " << this->
region(
id) <<
"/IETA " << this->
eta(
id)
264 <<
"/iPHI " << this->
phi(
id);
275 return m_emHelper->show_to_string (
id, context, sep);
277 return m_hecHelper->show_to_string (
id, context, sep);
284 return "Unable to decode id";
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Helper base class for offline cell identifiers.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
int register_dict_tag(const IdDictMgr &dict_mgr, const std::string &dict_name)
Register the file and tag names for a particular IdDict dictionary.
AtlasDetectorID(const std::string &name, const std::string &group)
std::string show_to_string(const Identifier id, const IdContext *context=0, char sep='.') const
std::string cell_name(const Identifier id) const
Returns the cell-location in a human readable form.
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
CaloNeighbours * m_caloNeighbours
std::array< size_type, NSUBCALO > m_reg_max
int section(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
std::vector< Identifier > m_cell_vec
std::array< size_type, NSUBCALO > m_reg_min
int side(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
int get_neighbours(const IdentifierHash caloHash, const LArNeighbours::neighbourOption &option, std::vector< IdentifierHash > &neighbourList) const
access to hashes for neighbours return == 0 for neighbours found
std::array< const CaloIDHelper *, NSUBCALO > m_helpers
const LArHEC_Base_ID * m_hecHelper
bool is_minifcal(const Identifier id) const
test if the id belongs to the MiniFCAL
const LArFCAL_Base_ID * fcal_idHelper() const
access to FCAL idHelper
size_type m_region_hash_max
const LArHEC_Base_ID * hec_idHelper() const
access to HEC idHelper
const Tile_Base_ID * tile_idHelper() const
access to Tile idHelper
int sample(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
const LArEM_Base_ID * em_idHelper() const
access to EM idHelper
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
std::array< size_type, NSUBCALO > m_cell_max
const LArMiniFCAL_ID * minifcal_idHelper() const
access to MiniFCAL idHelper
const LArFCAL_Base_ID * m_fcalHelper
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
const Tile_Base_ID * m_tileHelper
bool is_em(const Identifier id) const
test if the id belongs to LArEM
IdentifierHash subcalo_cell_hash(const Identifier cellId, int &subCalo) const
create hash id from 'global' cell id
CaloCell_Base_ID(const std::string &name, const LArEM_Base_ID *em_id, const LArHEC_Base_ID *hec_id, const LArFCAL_Base_ID *fcal_id, const LArMiniFCAL_ID *minifcal_id, const Tile_Base_ID *tile_id, bool supercell)
enumeration of samplings (i.e.layers) separately for various sub calorimeters
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
std::array< size_type, NSUBCALO > m_cell_min
int tower(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
size_type m_cell_hash_max
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
const LArEM_Base_ID * m_emHelper
std::vector< Identifier > m_region_vec
const LArMiniFCAL_ID * m_minifcalHelper
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
static std::string getSamplingName(CaloSample theSample)
Returns a string (name) for each CaloSampling.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
const std::string & find_metadata(const std::string &name) const
Access to meta data, name/value pairs.
This is a "hash" representation of an Identifier.
This class factors out code common between LArEM_ID and LArEM_SuperCell_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 = prevInPhi,...
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,...
This class factors out code common between LArEM_ID and LArEM_SuperCell_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 = prevInPhi,...
Helper class for LArMiniFCAL offline identifiers.
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,...
This class factors out code common between TileID and Tile_SuperCell_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 = prevInPhi,...