|
ATLAS Offline Software
|
Go to the documentation of this file.
267 const std::string& dict_name)
273 if (!dict)
return(1);
294 ATH_MSG_ERROR(
"reinitialize: dict names and tags vectors not the same length ");
417 if (
id[1] ==
m_SCT_ID )
return(
true);
497 if ( abs(
id[3]) == 0 )
result =
true;
580 std::string
result(
"Unable to decode id");
581 unsigned int max_index = (context) ? context->
end_index() : 999;
615 if (!dict)
return (
result);
629 for (
unsigned int i = 0;
i < expId.
fields(); ++
i) {
632 sprintf (temp,
"%d", expId[
i]);
663 unsigned int max_index = (context) ? context->
end_index() : 999;
694 if (!dict)
return (
result);
708 const std::vector<std::string>&
715 const std::vector<std::string>&
722 const std::vector<std::string>&
777 sprintf( temp,
"%d",
id[
i]);
842 ATH_MSG_WARNING(
"initLevelsFromDict - cannot access InnerDetector dictionary");
853 m_isHighLuminosityLHC = (versionString.find(
"ITk") != std::string::npos || versionString.find(
"P2-RUN4") != std::string::npos);
859 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'part' field for InnerDetector dictionary");
865 if (
label->m_valued) {
869 ATH_MSG_ERROR(
"initLevelsFromDict - label Pixel does NOT have a value ");
874 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'Pixel' label");
880 if (
label->m_valued) {
884 ATH_MSG_ERROR(
"initLevelsFromDict - label SCT does NOT have a value");
889 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'SCT' label");
895 if (
label->m_valued) {
899 ATH_MSG_ERROR(
"initLevelsFromDict - label TRT does NOT have a value");
904 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'TRT' label");
909 if(versionString.find(
"PLR") != std::string::npos || versionString.find(
"P2-RUN4") != std::string::npos) {
910 label =
field->find_label(
"LuminosityDetectors");
912 if (
label->m_valued) {
916 ATH_MSG_ERROR(
"initLevelsFromDict - label LuminosityDetectors does NOT have a value");
921 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'LuminosityDetectors' label ");
928 if (
label->m_valued) {
932 ATH_MSG_ERROR(
"initLevelsFromDict - label HGTD does NOT have a value");
937 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'HGTD' label");
949 ATH_MSG_WARNING(
"initLevelsFromDict - cannot access ForwardDetectors dictionary");
961 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'part' field for ForwardDetectors dictionary");
967 if (
label->m_valued) {
971 ATH_MSG_ERROR(
"initLevelsFromDict - label ALFA does NOT have a value");
976 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'ALFA' label");
982 if (
label->m_valued) {
986 ATH_MSG_ERROR(
"initLevelsFromDict - label BCM does NOT have a value");
991 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'BCM' label");
996 if (
label->m_valued) {
1000 ATH_MSG_ERROR(
"initLevelsFromDict - label LUCID does NOT have a value");
1005 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'LUCID' label");
1010 if (
label->m_valued) {
1014 ATH_MSG_ERROR(
"initLevelsFromDict - label ZDC does NOT have a value");
1019 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'ZDC' label");
1027 ATH_MSG_WARNING(
"initLevelsFromDict - cannot access LArCalorimeter dictionary");
1036 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'part' field for LArCalorimeter dictionary");
1042 if (
label->m_valued) {
1046 ATH_MSG_ERROR(
"initLevelsFromDict - label LArEM does NOT have a value");
1051 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'LArEM' label");
1056 if (
label->m_valued) {
1060 ATH_MSG_ERROR(
"initLevelsFromDict - label LArHEC does NOT have a value");
1065 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'LArHEC' label");
1070 if (
label->m_valued) {
1074 ATH_MSG_ERROR(
"initLevelsFromDict - label LArFCAL does NOT have a value");
1079 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'LArFCAL' label");
1089 ATH_MSG_DEBUG(
"initLevelsFromDict - unable to find 'module' field for miniFCAL");
1100 ATH_MSG_WARNING(
"initLevelsFromDict - cannot access TileCalorimeter dictionary");
1112 ATH_MSG_WARNING(
"initLevelsFromDict - cannot access MuonSpectrometer dictionary");
1134 std::string stationNameString;
1135 std::vector<IdDictLabel*> stationNameLabels =
field->m_labels;
1138 int stationNameIndex;
1139 int maxStationNameIndex = -1;
1141 if (stationNameLabels[
i]->m_valued) {
1142 stationNameIndex = stationNameLabels[
i]->m_value;
1146 stationNameIndex = (
int)
i;
1148 if (stationNameIndex > maxStationNameIndex) {
1149 maxStationNameIndex = stationNameIndex;
1161 stationNameString = stationNameLabels[
i]->m_name;
1162 if (stationNameLabels[
i]->m_valued) {
1163 stationNameIndex = stationNameLabels[
i]->m_value;
1167 stationNameIndex = (
int)
i;
1173 bool stationNameFound =
false;
1174 bool technologyFound =
false;
1175 std::string techLabel;
1176 for (
size_type j = 0; j < muonRegions.size(); ++j) {
1182 stationNameFound =
false;
1183 technologyFound =
false;
1187 if (
range->m_field_name ==
"stationName") {
1189 if (
range->m_label == stationNameString) {
1191 stationNameFound =
true;
1199 }
else if (
range->m_field_name ==
"technology") {
1200 technologyFound =
true;
1201 techLabel =
range->m_label;
1204 if (stationNameFound && technologyFound) {
1206 if (techLabel ==
"MDT") {
1208 }
else if (techLabel ==
"RPC") {
1210 }
else if (techLabel ==
"CSC") {
1212 }
else if (techLabel ==
"TGC") {
1214 }
else if (techLabel ==
"MM") {
1216 }
else if (techLabel ==
"STGC") {
1241 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'stationName' field for MuonSpectrometer dictionary");
1252 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'technology' field for MuonSpectrometer dictionary");
1258 if (
label->m_valued) {
1262 ATH_MSG_ERROR(
"initLevelsFromDict - label MDT does NOT have a value");
1267 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'MDT' label");
1272 if (
label->m_valued) {
1276 ATH_MSG_ERROR(
"initLevelsFromDict - label RPC does NOT have a value");
1281 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'RPC' label");
1285 if (
label->m_valued) {
1289 ATH_MSG_ERROR(
"initLevelsFromDict - label TGC does NOT have a value");
1294 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'TGC' label");
1298 if (
label->m_valued) {
1302 ATH_MSG_ERROR(
"initLevelsFromDict - label STGC does NOT have a value");
1308 ATH_MSG_DEBUG(
"initLevelsFromDict - there are no sTGC entries in the dictionary!");
1313 if (
label->m_valued) {
1317 ATH_MSG_ERROR(
"initLevelsFromDict - label MM does NOT have a value");
1323 ATH_MSG_DEBUG(
"initLevelsFromDict - there are no MM entries in the dictionary!");
1328 if (
label->m_valued) {
1332 ATH_MSG_ERROR(
"initLevelsFromDict - label CSC does NOT have a value");
1337 ATH_MSG_DEBUG(
"initLevelsFromDict - there are no CSC entries in the dictionary!");
1345 ATH_MSG_ERROR(
"initLevelsFromDict - Warning cannot access Calorimeter dictionary");
1357 ATH_MSG_ERROR(
"initLevelsFromDict - Could not get value for label 'negative_lvl1_side' of field 'DetZside' in dictionary " <<
m_calo_dict->
m_name);
1363 ATH_MSG_ERROR(
"initLevelsFromDict - Could not get value for label 'positive_lvl1_side' of field 'DetZside' in dictionary " <<
m_calo_dict->
m_name);
1372 ATH_MSG_ERROR(
"initLevelsFromDict - Could not get value for label 'negative_DMLar_side' of field 'DetZside' in dictionary " <<
m_calo_dict->
m_name);
1378 ATH_MSG_ERROR(
"initLevelsFromDict - Could not get value for label 'positive_DMLar_side' of field 'DetZside' in dictionary " <<
m_calo_dict->
m_name);
1387 ATH_MSG_ERROR(
"initLevelsFromDict - Could not get value for label 'negative_DMTile_side' of field 'DetZside' in dictionary " <<
m_calo_dict->
m_name);
1393 ATH_MSG_ERROR(
"initLevelsFromDict - Could not get value for label 'positive_DMTile_side' of field 'DetZside' in dictionary " <<
m_calo_dict->
m_name);
1418 ATH_MSG_ERROR(
"initLevelsFromDict - - unable to find 'subdet' field from dict "
1426 if (
label->m_valued) {
1430 ATH_MSG_ERROR(
"initLevelsFromDict - label InnerDetector does NOT have a value");
1435 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'InnerDetector' label");
1440 label =
field->find_label(
"ForwardDetectors");
1442 if (
label->m_valued) {
1446 ATH_MSG_ERROR(
"initLevelsFromDict - label ForwardDetectors does NOT have a value");
1451 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'ForwardDetectors' label");
1459 if (
label->m_valued) {
1463 ATH_MSG_ERROR(
"initLevelsFromDict - label LArCalorimeter does NOT have a value");
1468 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'LArCalorimeter' label");
1473 label =
field->find_label(
"TileCalorimeter");
1475 if (
label->m_valued) {
1479 ATH_MSG_ERROR(
"initLevelsFromDict - label TileCalorimeter does NOT have a value");
1484 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'TileCalorimeter' label");
1489 label =
field->find_label(
"MuonSpectrometer");
1491 if (
label->m_valued) {
1495 ATH_MSG_ERROR(
"initLevelsFromDict - label MuonSpectrometer does NOT have a value");
1500 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'MuonSpectrometer' label");
1507 if (
label->m_valued) {
1511 ATH_MSG_ERROR(
"initLevelsFromDict - label Calorimeter does NOT have a value");
1516 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'Calorimeter' label");
1522 if (top_dict->
m_name ==
"InnerDetector") {
1525 else if (top_dict->
m_name ==
"Calorimeter") {
1528 else if (top_dict->
m_name ==
"LArCalorimeter") {
1531 else if (top_dict->
m_name ==
"MuonSpectrometer") {
1532 name =
"stationName";
1534 else if (top_dict->
m_name ==
"TileCalorimeter") {
1537 else if (top_dict->
m_name ==
"ForwardDetectors") {
1549 <<
name <<
" from dict "
1555 ATH_MSG_ERROR(
"initLevelsFromDict - no top dictionary defined");
1588 ATH_MSG_ERROR(
"initLevelsFromDict - ERROR det implementation is not enumerated: "
bool is_pixel(Identifier id) const
const std::string & dict_tag(void) const
Access to the dictionary tag.
IdDictDictionary * m_muon_dict
int indet_field_value() const
Provide efficient access to individual field values, for subclass idhelpers.
bool is_forward(Identifier id) const
bool is_rpc(Identifier id) const
std::vector< unsigned int > m_muon_tech_bits
int unpack(const Identifier &id, const ExpandedIdentifier &prefix, size_t index2, ExpandedIdentifier &unpackedId) const
Unpack the value_type id to an expanded Identifier, considering the provided prefix (result will incl...
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Identifier lumi(void) const
Identifier tile_dm(void) const
IdDictFieldImplementation m_indet_part_impl
AtlasDetectorIDHelper * m_helper
virtual void setMessageSvc(IMessageSvc *msgSvc) override
bool is_csc(Identifier id) const
bool is_lar_fcal(Identifier id) const
Identifier mm(void) const
std::string show_to_string(void) const
bool is_lar(Identifier id) const
int muon_field_value() const
bool is_sct(Identifier id) const
Identifier lar_fcal(void) const
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override
Create compact id from hash id (return == 0 for OK)
size_type end_index() const
int calo_field_value() const
Identifier stgc(void) const
Identifier lar_dm(void) const
bool is_mm(Identifier id) const
Identifier mdt(void) const
virtual void set_do_checks(bool do_checks) override
void pack(int value, Identifier &id) const
IdDictDictionary * m_tile_dict
IMessageSvc * m_msgSvc
pointer to the message service
std::string m_dict_version
Identifier lar_em(void) const
bool m_do_checks
Flag for subclasses to know whether or not to perform checks.
bool is_trt(Identifier id) const
size_type m_MUON_SUBDET_INDEX
Identifier tgc(void) const
int m_LAR_FCAL_MODULE_INDEX
Identifier indet(void) const
Detector systems:
int lar_field_value() const
virtual bool do_neighbours(void) const override
Neighbour initialization is performed by default One can switch or query this mode for any idHelper w...
IdContext detsystem_context(void) const
IdContext (indicates id length) for detector systems.
size_type mdt_region_index()
IdDictField * find_field(const std::string &name) const
Identifier lar_hec(void) const
bool is_lvl1_trig_towers(Identifier id) const
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const override
Create hash id from compact id (return == 0 for OK)
virtual std::string dictionaryVersion(void) const override
friend class AtlasDetectorIDHelper
bool m_do_neighbours
Flag for subclasses to know whether or not to perform neighbour initialization.
void set_quiet(bool quiet)
Set flag for suppressing informational output.
size_type rpc_region_index()
size_type lvl1_region_index()
Identifier::size_type size_type
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Range::field m_tile_dm_field
Identifier hgtd(void) const
Identifier lar(void) const
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
const std::vector< std::string > & dict_tags(void) const
Version tags for subdet dictionaries.
virtual void set_do_neighbours(bool do_neighbours) override
void set_ored_field(const Range::field &ored_field)
msgSvc
Provide convenience handles for various services.
IdDictDictionary * m_calo_dict
const std::vector< std::string > & file_names(void) const
File names for subdet dictionaries.
bool is_plr(Identifier id) const
bool m_is_initialized_from_dict
IdDictFieldImplementation m_lar_part_impl
Identifier csc(void) const
bool is_tgc(Identifier id) const
IdDictFieldImplementation m_muon_mdt_impl
IdDictFieldImplementation m_lar_fcal_module_impl
bool is_tile_dm(Identifier id) const
std::vector< IdDictRegion * > m_regions
bool m_isHighLuminosityLHC
Class to provide easy MsgStream access and capabilities.
Identifier calo(void) const
IdDictDictionary * m_fwd_dict
bool is_tile(Identifier id) const
bool is_lar_hec(Identifier id) const
Identifier tile(void) const
int initialize_from_dictionary(const IdDictMgr &dict_mgr, bool quiet)
Initialization from the identifier dictionary.
const Range::field & ored_field() const
Range::field m_lvl1_onl_field
size_type pixel_region_index()
bool do_neighbours() const
Check whether or not to init neighbours.
bool m_quiet
If true, suppress DEBUG/INFO messages.
bool isEnumerated() const
IdDictFieldImplementation m_muon_rpc_impl
std::vector< IdDictRegionEntry * > m_entries
int register_dict_tag(const IdDictMgr &dict_mgr, const std::string &dict_name)
Register the file and tag names for a particular IdDict dictionary.
bool is_calo(Identifier id) const
const std::string & file_name(void) const
Access to file name.
int tile_field_value() const
int get_label_value(const std::string &field, const std::string &label, int &value) const
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
bool is_lar_minifcal(Identifier id) const
IdDictDictionary * m_indet_dict
void show(Identifier id, const IdContext *context=0, char sep='.') const
Short print out of any identifier (optionally provide separation character - default is '.
IdDictFieldImplementation m_calo_side_impl
bool is_indet(Identifier id) const
const std::vector< std::string > & dict_names(void) const
Dictionary names.
std::vector< std::string > m_dict_names
List of dictionary names used by this helper.
Range::field m_lar_dm_field
virtual void setDictVersion(const IdDictMgr &dict_mgr, const std::string &name) override
IdDictFieldImplementation m_muon_station_name_impl
void print(Identifier id, const IdContext *context=0) const
Expanded print out of any identifier.
size_type lar_em_region_index()
Identifier lar_lvl1(void) const
Identifier trt(void) const
AtlasDetectorID(const std::string &name="AtlasDetectorID")
Identifier pixel(void) const
virtual ~AtlasDetectorID()
size_type lar_fcal_region_index()
bool is_lumi(Identifier id) const
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
bool is_lar_dm(Identifier id) const
LAr/Tile dead material:
bool is_muon(Identifier id) const
IdDictFieldImplementation m_det_impl
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
std::vector< std::string > m_file_names
List of dictionary file names used by this helper.
#define ATH_MSG_WARNING(x)
Identifier muon(void) const
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
bool do_checks() const
Check whether or not to do checks for ids.
IdDictDictionary * m_lar_dict
unsigned long long value_type
bool is_lvl1_online(Identifier id) const
bool is_stgc(Identifier id) const
Identifier sct(void) const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
int initLevelsFromDict(const IdDictMgr &dict_mgr)
IdContext subdet_context(void) const
IdContext (indicates id length) for sub-detector.
virtual bool do_checks(void) const override
Checks are performed by default in debug compilation and NOT in optimized compilation.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
std::vector< std::string > m_dict_tags
List of dictionary versions used by this helper.
std::vector< IdDictFieldImplementation > m_implementation
bool is_lar_em(Identifier id) const
void add_value(element_type value)
bool is_hgtd(Identifier id) const
bool is_mdt(Identifier id) const
Range::field m_lvl1_field
Identifier rpc(void) const
std::string to_range(const ExpandedIdentifier &id) const
std::vector< IdDictRegion * > m_all_regions