58 for (
unsigned int i = 0; i < (*zoneRange).size(); ++i) {
59 const Range& range = (*zoneRange)[i];
60 if (range.match(expId)) {
62 if (not eta_field.
empty()) {
68 if (etamin < result) result = etamin;
91 for (
unsigned int i = 0; i < (*zoneRange).size(); ++i) {
92 const Range& range = (*zoneRange)[i];
93 if (range.match(expId)) {
95 if (not eta_field.
empty()) {
97 if (result < etamax) result = etamax;
119 for (
unsigned int i = 0; i < (*zoneRange).size(); ++i) {
120 const Range& range = (*zoneRange)[i];
121 if (range.match(expId)) {
123 if (not phi_field.
empty()) {
125 if (-999 == result) {
129 if (phimin < result) result = phimin;
152 for (
unsigned int i = 0; i < (*zoneRange).size(); ++i) {
153 const Range& range = (*zoneRange)[i];
154 if (range.match(expId)) {
156 if (not phi_field.
empty()) {
158 if (result < phimax) result = phimax;
176 ATH_MSG_INFO(
"Request to reinitialize not satisfied - tags have not changed");
191 ATH_MSG_ERROR(
" initialize_from_dict - cannot access Calorimeter dictionary ");
201 if (
m_dict->get_label_value(
"subdet",
"Calorimeter", caloValue))
203 ATH_MSG_ERROR(
"Could not get value for label 'Calorimeter' of field 'subdet' in dictionary "
208 int lardmCaloValue = -1;
210 if (
m_dict->get_label_value(
"DetZside",
"negative_DMLar_side", lardmCaloValue))
212 ATH_MSG_ERROR(
"Could not get value for label 'negative_DMLar_side' of field 'DetZside' in dictionary "
217 int tiledmCaloValue = -1;
219 if (
m_dict->get_label_value(
"DetZside",
"negative_DMTile_side", tiledmCaloValue))
221 ATH_MSG_ERROR(
"Could not get value for label 'negative_DMTile_side' of field 'DetZside' in dictionary "
234 reg_id.
add(caloValue);
235 reg_id.
add(lardmCaloValue);
242 reg_id2.
add(caloValue);
243 reg_id2.
add(tiledmCaloValue);
283 int size = (1 << bits);
390 if(context && context->end_index() >=
m_ETA_INDEX) {
421 std::string errorMessage =
"CaloDM_ID::lar_region_id() result is not OK: ID, range = "
434 std::string errorMessage =
"CaloDM_ID::tile_region_id() result is not OK: ID, range = "
450 std::string errorMessage =
"CaloDM_ID::lar_zone_id() result is not OK: ID, range = "
464 std::string errorMessage =
"CaloDM_ID::tile_zone_id() result is not OK: ID, range = "
479 std::string errorMessage =
"CaloDM_ID::zone_id(regionId) result is not OK: ID= "
488 std::string errorMessage =
"CaloDM_ID::zone_id(regionId) result is not OK: ID, range = "
494 std::string errorMessage =
"CaloDM_ID::zone_id(regionId) result is not OK: ID, range = "
507 std::stringstream strm;
509 ATH_MSG_ERROR(
"initLevelsFromDict - dictionary NOT initialized ");
531 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find lardm region ");
543 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'subdet' field ");
547 field =
m_dict->find_field(
"DetZside") ;
554 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'DetZside' field ");
558 field =
m_dict->find_field(
"DMvalue") ;
565 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'DMvalue' field ");
570 field =
m_dict->find_field(
"samplingvalue") ;
577 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'samplingvalue' field ");
581 field =
m_dict->find_field(
"DMregion") ;
588 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'DMregion' field ");
592 field =
m_dict->find_field(
"DMEta") ;
598 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'DMEta' field ");
602 field =
m_dict->find_field(
"phivalue") ;
609 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'phivalue' field ");
626 ATH_MSG_DEBUG(
"decode index and bit fields for each level: ");
643 std::stringstream strm;
648 unsigned int nids = 0;
649 std::set<Identifier> ids;
653 auto first = rit.
begin();
654 auto last = rit.
end();
655 for (; first != last; ++first) {
663 if(!(ids.insert(zon_id)).second)
666 <<
" duplicated id for lardm id. nids= " << nids
675 <<
" set size NOT EQUAL to hash max. size " << ids.size()
681 std::set<Identifier>::const_iterator first = ids.begin();
682 std::set<Identifier>::const_iterator last = ids.end();
696 auto first = rit.
begin();
697 auto last = rit.
end();
698 for (; first != last; ++first) {
705 if(!(ids.insert(reg_id)).second)
708 <<
" duplicated id for region id. nids= " << nids
717 <<
" set size NOT EQUAL to region hash max. size " << ids.size()
739 std::stringstream strm;
744 unsigned int nids = 0;
745 std::set<Identifier> ids;
749 auto first = rit.
begin();
750 auto last = rit.
end();
751 for (; first != last; ++first) {
770 if(!(ids.insert(zon_id)).second)
773 <<
" duplicated id for tiledm id. nids= " << nids
782 <<
" set size NOT EQUAL to hash max. size " << ids.size()
788 std::set<Identifier>::const_iterator first = ids.begin();
789 std::set<Identifier>::const_iterator last = ids.end();
803 auto first = rit.
begin();
804 auto last = rit.
end();
805 for (; first != last; ++first) {
812 if(!(ids.insert(reg_id)).second)
815 <<
" duplicated id for region id. nids= " << nids
824 <<
" set size NOT EQUAL to region hash max. size " << ids.size()
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_INFO(x,...)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
size_t size() const
Number of registered mappings.
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...
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.