62 for (
unsigned int i = 0; i < (*zoneRange).size(); ++i) {
63 const Range& range = (*zoneRange)[i];
64 if (range.match(expId)) {
66 if (not eta_field.
empty()) {
95 for (
unsigned int i = 0; i < (*zoneRange).size(); ++i) {
96 const Range& range = (*zoneRange)[i];
97 if (range.match(expId)) {
99 if (not eta_field.
empty()) {
123 for (
unsigned int i = 0; i < (*zoneRange).size(); ++i) {
124 const Range& range = (*zoneRange)[i];
125 if (range.match(expId)) {
127 if (not phi_field.
empty()) {
156 for (
unsigned int i = 0; i < (*zoneRange).size(); ++i) {
157 const Range& range = (*zoneRange)[i];
158 if (range.match(expId)) {
160 if (not phi_field.
empty()) {
180 ATH_MSG_INFO(
"Request to reinitialize not satisfied - tags have not changed");
195 ATH_MSG_ERROR(
" initialize_from_dict - cannot access Calorimeter dictionary ");
205 if (
m_dict->get_label_value(
"subdet",
"Calorimeter", caloValue))
207 ATH_MSG_ERROR(
"Could not get value for label 'Calorimeter' of field 'subdet' in dictionary "
212 int lardmCaloValue = -1;
214 if (
m_dict->get_label_value(
"DetZside",
"negative_DMLar_side", lardmCaloValue))
216 ATH_MSG_ERROR(
"Could not get value for label 'negative_DMLar_side' of field 'DetZside' in dictionary "
221 int tiledmCaloValue = -1;
223 if (
m_dict->get_label_value(
"DetZside",
"negative_DMTile_side", tiledmCaloValue))
225 ATH_MSG_ERROR(
"Could not get value for label 'negative_DMTile_side' of field 'DetZside' in dictionary "
238 reg_id.
add(caloValue);
239 reg_id.
add(lardmCaloValue);
246 reg_id2.
add(caloValue);
247 reg_id2.
add(tiledmCaloValue);
287 int size = (1 << bits);
425 std::string errorMessage =
"CaloDM_ID::lar_region_id() result is not OK: ID, range = "
438 std::string errorMessage =
"CaloDM_ID::tile_region_id() result is not OK: ID, range = "
454 std::string errorMessage =
"CaloDM_ID::lar_zone_id() result is not OK: ID, range = "
468 std::string errorMessage =
"CaloDM_ID::tile_zone_id() result is not OK: ID, range = "
483 std::string errorMessage =
"CaloDM_ID::zone_id(regionId) result is not OK: ID= "
492 std::string errorMessage =
"CaloDM_ID::zone_id(regionId) result is not OK: ID, range = "
498 std::string errorMessage =
"CaloDM_ID::zone_id(regionId) result is not OK: ID, range = "
511 std::stringstream strm;
513 ATH_MSG_ERROR(
"initLevelsFromDict - dictionary NOT initialized ");
535 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find lardm region ");
547 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'subdet' field ");
551 field =
m_dict->find_field(
"DetZside") ;
558 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'DetZside' field ");
562 field =
m_dict->find_field(
"DMvalue") ;
569 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'DMvalue' field ");
574 field =
m_dict->find_field(
"samplingvalue") ;
581 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'samplingvalue' field ");
585 field =
m_dict->find_field(
"DMregion") ;
592 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'DMregion' field ");
596 field =
m_dict->find_field(
"DMEta") ;
602 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'DMEta' field ");
606 field =
m_dict->find_field(
"phivalue") ;
613 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'phivalue' field ");
630 ATH_MSG_DEBUG(
"decode index and bit fields for each level: ");
647 std::stringstream strm;
652 unsigned int nids = 0;
653 std::set<Identifier> ids;
657 auto first = rit.
begin();
658 auto last = rit.
end();
659 for (; first != last; ++first) {
667 if(!(ids.insert(zon_id)).second)
670 <<
" duplicated id for lardm id. nids= " << nids
679 <<
" set size NOT EQUAL to hash max. size " << ids.size()
685 std::set<Identifier>::const_iterator first = ids.begin();
686 std::set<Identifier>::const_iterator last = ids.end();
700 auto first = rit.
begin();
701 auto last = rit.
end();
702 for (; first != last; ++first) {
709 if(!(ids.insert(reg_id)).second)
712 <<
" duplicated id for region id. nids= " << nids
721 <<
" set size NOT EQUAL to region hash max. size " << ids.size()
743 std::stringstream strm;
748 unsigned int nids = 0;
749 std::set<Identifier> ids;
753 auto first = rit.
begin();
754 auto last = rit.
end();
755 for (; first != last; ++first) {
774 if(!(ids.insert(zon_id)).second)
777 <<
" duplicated id for tiledm id. nids= " << nids
786 <<
" set size NOT EQUAL to hash max. size " << ids.size()
792 std::set<Identifier>::const_iterator first = ids.begin();
793 std::set<Identifier>::const_iterator last = ids.end();
807 auto first = rit.
begin();
808 auto last = rit.
end();
809 for (; first != last; ++first) {
816 if(!(ids.insert(reg_id)).second)
819 <<
" duplicated id for region id. nids= " << nids
828 <<
" set size NOT EQUAL to region hash max. size " << ids.size()
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_WARNING(x)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
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.
int calo_field_value() const
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
ExpandedIdentifier calo_exp(void) const
AtlasDetectorID(const std::string &name, const std::string &group)
small class holding the starting hash value, the min eta and the number of phi bins of each region
size_type m_DETZSIDE_INDEX
size_type m_SAMPLING_INDEX
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_zone_id(IdentifierHash lar_zone_hash_id) const
create a lar zone id from hash id
MultiRange m_full_tile_zone_range
bool is_tile(const Identifier &zoneId) const
to disentangle between LAr and Tile dead material
void lar_region_id_checks(int pos_neg_z, int dmat, int sampling, int region) const
size_type m_lar_zone_hash_max
IdDictFieldImplementation m_pnz_reg_impl
int eta_min(const Identifier &id) const
min value of eta index (-999 == failure)
int sampling(const Identifier &id) const
return sampling according to :
IdDictFieldImplementation m_eta_impl
IdentifierHash lar_zone_hash(Identifier LArZoneId) const
create a lar hash id from zone id
std::vector< Identifier > m_tile_zone_vec
size_type m_lar_region_hash_max
IdDictFieldImplementation m_calo_impl
std::vector< Identifier > m_lar_region_vec
std::vector< HashCalc > m_tile_hash_calcs
int eta(const Identifier &id) const
return eta
int dmat(const Identifier &id) const
return DMtype according to :
IdDictFieldImplementation m_calodm_impl
size_type m_calodm_region_index
int pos_neg_z(const Identifier &id) const
return pos_neg_z according to :
int phi_max(const Identifier &id) const
max value of phi index (-999 == failure)
int phi(const Identifier &id) const
return phi
MultiRange m_full_tile_region_range
IdDictFieldImplementation m_phi_impl
void zone_id_checks(const Identifier ®ionId, int eta, int phi) const
std::vector< HashCalc > m_lar_hash_calcs
IdentifierHash tile_zone_hash(Identifier TileZoneId) const
create a tile hash id from zone id
IdDictFieldImplementation m_region_impl
void tile_region_id_checks(int pos_neg_z, int dmat, int sampling, int region) const
size_type m_tile_region_hash_max
bool is_lar(const Identifier &zoneId) const
to disentangle between LAr and Tile dead material
size_type m_tile_zone_hash_max
const IdDictDictionary * m_dict
int phi_min(const Identifier &id) const
min value of phi index (-999 == failure)
IdContext region_context() const
access to IdContext's which define which levels of fields are contained in a region id
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
void tile_zone_id_checks(int pos_neg_z, int dat, int sampling, int region, int eta, int phi) const
MultiRange m_full_lar_zone_range
IdentifierHash tile_zone_hash_binary_search(Identifier zoneId) const
IdContext zone_context() const
access to IdContext's which define which levels of fields are contained in a zone id
Identifier lar_region_id(IdentifierHash lar_region_hash_id) const
create a lar region id from hash id
void lar_zone_id_checks(int pos_neg_z, int dat, int sampling, int region, int eta, int phi) const
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
IdDictFieldImplementation m_dmat_impl
std::vector< Identifier > m_lar_zone_vec
std::vector< Identifier > m_tile_region_vec
Identifier region_id(int pos_neg_z, int dmat, int sampling, int region) const
build a region identifier valid for both LAr and Tiles
IdentifierHash lar_zone_hash_binary_search(Identifier zoneId) const
IdDictFieldImplementation m_sampling_impl
Identifier tile_zone_id(IdentifierHash tile_zone_hash_id) const
create a tile zone id from hash id
MultiRange m_full_lar_region_range
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 eta_max(const Identifier &id) const
max value of eta index (-999 == failure)
Exception class for Calo Identifiers.
ConstRangeIterator end() const
ConstRangeIterator begin() const
void add(element_type value)
Append a value into a new field.
void clear()
Erase all fields.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
size_type end_index() const
Identifier::size_type size_type
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
element_type get_minimum() const
Query the values.
bool empty() const
If true, this field does not have any constraints, and may hold any value representable by element_ty...
element_type get_maximum() const
This is a "hash" representation of an Identifier.
A MultiRange combines several Ranges.
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
std::string strformat(const char *fmt,...)
return a std::string according to a format fmt and varargs