![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/MsgStream.h"
24 m_calodm_region_index(0)
26 , m_DETZSIDE_INDEX(999)
28 , m_SAMPLING_INDEX(999)
33 , m_lar_zone_hash_max(0)
34 , m_lar_region_hash_max(0)
35 , m_tile_zone_hash_max(0)
36 , m_tile_region_hash_max(0)
58 for (
unsigned int i = 0;
i < (*zoneRange).size(); ++
i) {
60 if (
range.match(expId)) {
91 for (
unsigned int i = 0;
i < (*zoneRange).size(); ++
i) {
93 if (
range.match(expId)) {
119 for (
unsigned int i = 0;
i < (*zoneRange).size(); ++
i) {
121 if (
range.match(expId)) {
152 for (
unsigned int i = 0;
i < (*zoneRange).size(); ++
i) {
154 if (
range.match(expId)) {
174 std::string strg =
"initialize_from_dictionary";
179 std::cout << strg << std::endl;
181 std::stringstream strm;
185 if(
m_msgSvc)
log << MSG::INFO <<
"Request to reinitialize not satisfied - tags have not changed" <<
endmsg;
202 log << MSG::ERROR <<
" initialize_from_dict - cannot access Calorimeter dictionary " <<
endmsg;
206 std::cout <<
" CaloDM_ID::initialize_from_dict - cannot access Calorimeter dictionary "
222 log << MSG::ERROR <<
"Could not get value for label 'Calorimeter' of field 'subdet' in dictionary "
227 std::cout <<
"Could not get value for label 'Calorimeter' of field 'subdet' in dictionary "
234 int lardmCaloValue = -1;
240 log << MSG::ERROR <<
"Could not get value for label 'negative_DMLar_side' of field 'DetZside' in dictionary "
245 std::cout <<
"Could not get value for label 'negative_DMLar_side' of field 'DetZside' in dictionary "
252 int tiledmCaloValue = -1;
258 log << MSG::ERROR <<
"Could not get value for label 'negative_DMTile_side' of field 'DetZside' in dictionary "
264 std::cout <<
"Could not get value for label 'negative_DMTile_side' of field 'DetZside' in dictionary "
279 reg_id.
add(caloValue);
280 reg_id.
add(lardmCaloValue);
287 reg_id2.
add(caloValue);
288 reg_id2.
add(tiledmCaloValue);
305 std::cout <<
" CaloDM_ID::initialize_from_dict : "
347 int size = (1 << bits);
374 log << MSG::WARNING <<
" seting etamin to 0 because actual value not found for regId " <<
show_to_string(regId) <<
endmsg;
378 std::cout <<
"WARNING !!! seting etamin to 0 because actual value not found for regId " <<
show_to_string(regId) << std::endl;
392 log << MSG::WARNING <<
"min > " <<
size <<
" "
400 std::cout <<
"min > " <<
size <<
" "
416 log << MSG::ERROR <<
"lar zone ranges, id, hash, i = "
424 std::cout <<
" ***** Error ";
425 std::cout <<
"lar zone ranges, id, hash, i = "
446 log << MSG::WARNING <<
"seting etamin to 0 because actual value not found for regId " <<
show_to_string(regId) <<
endmsg;
450 std::cout <<
"WARNING !!! seting etamin to 0 because actual value not found for regId " <<
show_to_string(regId) << std::endl;
464 log << MSG::WARNING <<
"min > " <<
size <<
" "
472 std::cout <<
"min > " <<
size <<
" "
488 log << MSG::ERROR <<
"tile zone ranges, id, hash, i = "
496 std::cout <<
" ***** Error ";
497 std::cout <<
"tile zone ranges, id, hash, i = "
549 std::string errorMessage =
"CaloDM_ID::lar_region_id() result is not OK: ID, range = "
562 std::string errorMessage =
"CaloDM_ID::tile_region_id() result is not OK: ID, range = "
578 std::string errorMessage =
"CaloDM_ID::lar_zone_id() result is not OK: ID, range = "
592 std::string errorMessage =
"CaloDM_ID::tile_zone_id() result is not OK: ID, range = "
607 std::string errorMessage =
"CaloDM_ID::zone_id(regionId) result is not OK: ID= "
616 std::string errorMessage =
"CaloDM_ID::zone_id(regionId) result is not OK: ID, range = "
622 std::string errorMessage =
"CaloDM_ID::zone_id(regionId) result is not OK: ID, range = "
637 std::stringstream strm;
641 log << MSG::ERROR <<
"initLevelsFromDict - dictionary NOT initialized "
646 std::cout <<
"CaloDM_ID::initLevelsFromDict - dictionary NOT initialized "
672 log << MSG::ERROR <<
"initLevelsFromDict - unable to find lardm region " <<
endmsg;
676 std::cout <<
"CaloDM_ID::initLevelsFromDict - unable to find lardm region "
692 log << MSG::ERROR <<
"initLevelsFromDict - unable to find 'subdet' field "
697 std::cout <<
"CaloDM_ID::initLevelsFromDict - unable to find 'subdet' field "
712 log << MSG::ERROR <<
"initLevelsFromDict - unable to find 'DetZside' field "
717 std::cout <<
"CaloDM_ID::initLevelsFromDict - unable to find 'DetZside' field "
732 log << MSG::ERROR <<
"initLevelsFromDict - unable to find 'DMvalue' field "
737 std::cout <<
"CaloDM_ID::initLevelsFromDict - unable to find 'DMvalue' field "
753 log << MSG::ERROR <<
"initLevelsFromDict - unable to find 'samplingvalue' field "
758 std::cout <<
"CaloDM_ID::initLevelsFromDict - unable to find 'samplingvalue' field "
773 log << MSG::ERROR <<
"initLevelsFromDict - unable to find 'DMregion' field " <<
endmsg;
777 std::cout <<
"CaloDM_ID::initLevelsFromDict - unable to find 'DMregion' field "
793 log << MSG::ERROR <<
"initLevelsFromDict - unable to find 'DMEta' field "
798 std::cout <<
"CaloDM_ID::initLevelsFromDict - unable to find 'DMEta' field "
813 log << MSG::ERROR <<
"initLevelsFromDict - unable to find 'phivalue' field "
818 std::cout <<
"CaloDM_ID::initLevelsFromDict - unable to find 'phivalue' field "
867 std::cout <<
"decode index and bit fields for each level: " << std::endl;
887 std::stringstream strm;
892 unsigned int nids = 0;
893 std::set<Identifier>
ids;
906 if(!(
ids.insert(zon_id)).second)
910 log << MSG::ERROR <<
" init_lar_hashes "
911 <<
" duplicated id for lardm id. nids= " << nids
917 std::cout <<
" CaloDM_ID::init_lar_hashes "
918 <<
" Error: duplicated id for lardm id. nids= " << nids
921 std::cout << std::endl;
931 log << MSG::ERROR <<
" init_lar_hashes "
932 <<
" set size NOT EQUAL to hash max. size " <<
ids.size()
937 std::cout <<
" CaloDM_ID::init_lar_hashes "
938 <<
" Error: set size NOT EQUAL to hash max. size " <<
ids.size()
946 std::set<Identifier>::const_iterator
first =
ids.begin();
947 std::set<Identifier>::const_iterator last =
ids.end();
969 if(!(
ids.insert(reg_id)).second)
973 log << MSG::ERROR <<
" init_lar_hashes (regions) "
974 <<
" duplicated id for region id. nids= " << nids
980 std::cout <<
" CaloDM_ID::init_lar_hashes (regions) "
981 <<
" Error: duplicated id for region id. nids= " << nids
985 std::cout << std::endl;
995 log << MSG::ERROR <<
" init_lar_hashes "
996 <<
" set size NOT EQUAL to region hash max. size " <<
ids.size()
1001 std::cout <<
" CaloDM_ID::init_lar_hashes "
1002 <<
" Error: set size NOT EQUAL to region hash max. size " <<
ids.size()
1028 std::stringstream strm;
1033 unsigned int nids = 0;
1034 std::set<Identifier>
ids;
1058 if(!(
ids.insert(zon_id)).second)
1062 log << MSG::ERROR <<
" init_tile_hashes "
1063 <<
" duplicated id for tiledm id. nids= " << nids
1069 std::cout <<
" CaloDM_ID::init_tile_hashes "
1070 <<
" Error: duplicated id for tiledm id. nids= " << nids
1073 std::cout << std::endl;
1083 log << MSG::ERROR <<
" init_tile_hashes "
1084 <<
" set size NOT EQUAL to hash max. size " <<
ids.size()
1089 std::cout <<
" CaloDM_ID::init_tile_hashes "
1090 <<
" Error: set size NOT EQUAL to hash max. size " <<
ids.size()
1098 std::set<Identifier>::const_iterator
first =
ids.begin();
1099 std::set<Identifier>::const_iterator last =
ids.end();
1121 if(!(
ids.insert(reg_id)).second)
1125 log << MSG::ERROR <<
" init_tile_hashes (regions) "
1126 <<
" duplicated id for region id. nids= " << nids
1132 std::cout <<
" CaloDM_ID::init_tile_hashes (regions) "
1133 <<
" Error: duplicated id for region id. nids= " << nids
1137 std::cout << std::endl;
1147 log << MSG::ERROR <<
" init_tile_hashes "
1148 <<
" set size NOT EQUAL to region hash max. size " <<
ids.size()
1153 std::cout <<
" CaloDM_ID::init_tile_hashes "
1154 <<
" Error: set size NOT EQUAL to region hash max. size " <<
ids.size()
IdDictRegion * find_region(const std::string ®ion_name) const
int phi_min(const Identifier &id) const
min value of phi index (-999 == failure)
MultiRange build_multirange() const
Get MultiRange for full dictionary.
IdContext region_context(void) const
access to IdContext's which define which levels of fields are contained in a region id
int dmat(const Identifier &id) const
return DMtype according to :
size_type m_SAMPLING_INDEX
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
MultiRange m_full_tile_region_range
Scalar phi() const
phi method
Exception class for Calo Identifiers.
std::string show_to_string(void) const
Scalar eta() const
pseudorapidity method
void tile_region_id_checks(int pos_neg_z, int dmat, int sampling, int region) const
size_type m_DETZSIDE_INDEX
Identifier tile_region_id(IdentifierHash tile_region_hash_id) const
create a tile region id from hash id
int region(const Identifier &id) const
return region according to :
int calo_field_value() const
Identifier tile_zone_id(IdentifierHash tile_zone_hash_id) const
create a tile zone id from hash id
void add(element_type value)
int eta_min(const Identifier &id) const
min value of eta index (-999 == failure)
size_type end_index(void) const
IdentifierHash lar_zone_hash_binary_search(Identifier zoneId) const
IMessageSvc * m_msgSvc
pointer to the message service
size_type m_lar_region_hash_max
const IdDictDictionary * m_dict
std::vector< Identifier > m_tile_zone_vec
int unpack(Identifier id) const
Identifier manipulation methods.
reg
globals -----------------------------------------------------------------—
std::vector< Identifier > m_lar_region_vec
IdDictField * find_field(const std::string &name) const
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
void lar_region_id_checks(int pos_neg_z, int dmat, int sampling, int region) const
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
MultiRange m_full_tile_zone_range
void set_bits(size_type bits, size_type bits_offset)
IdDictFieldImplementation m_calo_impl
MultiRange m_full_lar_region_range
IdContext zone_context(void) const
access to IdContext's which define which levels of fields are contained in a zone id
int pos_neg_z(const Identifier &id) const
return pos_neg_z according to :
size_type bits_offset() const
std::vector< HashCalc > m_lar_hash_calcs
std::vector< IdDictRegion * > m_regions
IdDictFieldImplementation m_eta_impl
bool is_lar(const Identifier &zoneId) const
to disentangle between LAr and Tile dead material
IdentifierHash tile_zone_hash(Identifier TileZoneId) const
create a tile hash id from zone id
std::vector< Identifier > m_lar_zone_vec
small class holding the starting hash value, the min eta and the number of phi bins of each region
bool m_quiet
If true, suppress DEBUG/INFO messages.
element_type get_minimum() const
IdDictFieldImplementation m_calodm_impl
size_type m_tile_region_hash_max
IdDictFieldImplementation m_phi_impl
int register_dict_tag(const IdDictMgr &dict_mgr, const std::string &dict_name)
Register the file and tag names for a particular IdDict dictionary.
IdDictFieldImplementation m_sampling_impl
size_type m_tile_zone_hash_max
int get_label_value(const std::string &field, const std::string &label, int &value) const
int eta_max(const Identifier &id) const
max value of eta index (-999 == failure)
Identifier region_id(int pos_neg_z, int dmat, int sampling, int region) const
build a region identifier valid for both LAr and Tiles
int init_lar_hashes(void)
A MultiRange combines several Ranges.
IdentifierHash tile_zone_hash_binary_search(Identifier zoneId) const
std::string strformat(const char *fmt,...)
return a std::string according to a format fmt and varargs
int sampling(const Identifier &id) const
return sampling according to :
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
ExpandedIdentifier calo_exp(void) const
int phi_max(const Identifier &id) const
max value of phi index (-999 == failure)
element_type get_maximum() const
MultiRange m_full_lar_zone_range
int match(const ExpandedIdentifier &id) const
Match an identifier.
IdentifierHash lar_zone_hash(Identifier LArZoneId) const
create a lar hash id from zone id
int eta(const Identifier &id) const
return eta
size_type m_calodm_region_index
IdDictFieldImplementation m_region_impl
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
void tile_zone_id_checks(int pos_neg_z, int dat, int sampling, int region, int eta, int phi) const
std::vector< HashCalc > m_tile_hash_calcs
IdDictFieldImplementation m_dmat_impl
Identifier lar_zone_id(IdentifierHash lar_zone_hash_id) const
create a lar zone id from hash id
int phi(const Identifier &id) const
return phi
void lar_zone_id_checks(int pos_neg_z, int dat, int sampling, int region, int eta, int phi) const
int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded Identifier from Identifier (return == 0 for OK)
Identifier lar_region_id(IdentifierHash lar_region_hash_id) const
create a lar region id from hash id
bool is_tile(const Identifier &zoneId) const
to disentangle between LAr and Tile dead material
size_type m_lar_zone_hash_max
int initLevelsFromDict(void)
This is the individual specification for the range of one ExpandedIdentifier field.
size_type cardinality() const
Computes a possible cardinality from all ranges.
Identifier zone_id(int pos_neg_z, int dat, int sampling, int region, int eta, int phi) const
build a zone identifier valid for both LAr and Tiles
IdDictFieldImplementation m_pnz_reg_impl
std::vector< Identifier > m_tile_region_vec
void zone_id_checks(const Identifier ®ionId, int eta, int phi) const
int init_tile_hashes(void)
Identifier::size_type size_type