 |
ATLAS Offline Software
|
Go to the documentation of this file.
21 ATH_MSG_INFO(
"Request to reinitialize not satisfied - tags have not changed");
35 ATH_MSG_ERROR(
" initialize_from_dict - cannot access MuonSpectrometer dictionary ");
46 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'doubletR' field ");
54 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'doubletZ' field ");
62 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'doubletPhi' field ");
70 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'rpcGasGap' field ");
78 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'rpcMeasuresPhi' field ");
86 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'rpcStrip' field ");
113 ATH_MSG_DEBUG(
" RPC decode index and bit fields for each level: " << std::endl
133 if (atlasDict->
get_label_value(
"subdet",
"MuonSpectrometer", muonField)) {
134 ATH_MSG_ERROR(
"Could not get value for label 'MuonSpectrometer' of field 'subdet' in dictionary " << atlasDict->
name());
144 if (muon_range.
size() > 0) {
145 ATH_MSG_INFO(
"MultiRange built successfully to doubletR: "
146 <<
"MultiRange size is " << muon_range.
size());
154 detectorElement_region.
add(muonField);
155 Range detectorElement_prefix;
157 if (muon_detectorElement_range.
size() > 0) {
158 ATH_MSG_INFO(
"MultiRange built successfully to detectorElement: "
159 <<
"DetectorElement MultiRange size is " << muon_detectorElement_range.
size());
161 ATH_MSG_ERROR(
"Muon RPC ReadoutElement MultiRange is empty");
167 rpc_region.
add(muonField);
171 if (muon_channel_range.
size() > 0) {
172 ATH_MSG_INFO(
"MultiRange built successfully to rpcStrip: "
173 <<
"MultiRange size is " << muon_channel_range.
size());
184 for (
int i = 0;
i < (
int)muon_range.
size(); ++
i) {
195 for (
int j = 0; j < (
int)muon_detectorElement_range.
size(); ++j) {
196 const Range&
range = muon_detectorElement_range[j];
201 ATH_MSG_DEBUG(
"detectorElement field size is " << (
int)
range.cardinality() <<
" field index = " << j);
206 for (
int j = 0; j < (
int)muon_channel_range.
size(); ++j) {
212 ATH_MSG_DEBUG(
"channel field size is " << (
int)
range.cardinality() <<
" field index = " << j);
227 ATH_MSG_ERROR(
"MDT MultiRange ID is empty for detector elements");
246 ATH_MSG_INFO(
"Initializing RPC hash indices for finding neighbors ... ");
256 if (
range.match(expId)) {
258 if (not gap_field.
empty()) {
270 ATH_MSG_ERROR(
"No maximum number of RPC gas gaps was retrieved");
281 for (
unsigned int i = 0;
i < hash_max; ++
i) {
287 for (
unsigned int i = 0;
i < hash_max; ++
i) {
300 hash_id = itr->second;
319 hash_id = itr->second;
329 for (
const auto & expId:rit) {
345 if (
range.match(expId)) {
347 if (not eta_field.
empty()) {
363 if (
range.match(expId)) {
365 if (not eta_field.
empty()) {
381 if (
range.match(expId)) {
397 if (
range.match(expId)) {
413 if (
range.match(expId)) {
429 if (
range.match(expId)) {
445 if (
range.match(expId)) {
461 if (
range.match(expId)) {
477 if (
range.match(expId)) {
493 if (
range.match(expId)) {
509 if (
range.match(expId)) {
525 if (
range.match(expId)) {
541 if (
range.match(expId)) {
557 if (
range.match(expId)) {
573 if (
range.match(expId)) {
589 if (
range.match(expId)) {
768 unsigned int nids = 0;
769 std::set<Identifier>
ids;
773 for (
const auto & expId:rit) {
778 if (!
ids.insert(doubletZ_id).second)
780 <<
"Please check the dictionary for possible duplication for " <<
id);
781 }
else if (!
ids.insert(
id).second) {
783 <<
" Error: duplicated id for detector element id. nid " << (
int)nids
784 <<
" doubletPhi ID " <<
id);
815 }
catch (
const std::out_of_range&) {
isValid =
false; }
837 }
catch (
const std::out_of_range&) {
isValid =
false; }
844 int measuresPhi)
const {
860 int measuresPhi,
bool&
isValid)
const {
865 }
catch (
const std::out_of_range&) {
isValid =
false; }
886 }
catch (
const std::out_of_range&) {
isValid =
false; }
912 }
catch (
const std::out_of_range&) {
isValid =
false; }
932 }
catch (
const std::out_of_range&) {
isValid =
false; }
937 int measuresPhi,
int strip)
const {
954 int measuresPhi,
int strip,
bool&
isValid)
const {
960 }
catch (
const std::out_of_range&) {
isValid =
false; }
989 }
catch (
const std::out_of_range&) {
isValid =
false; }
1035 }
catch (
const std::out_of_range&) {
isValid =
false; }
1051 }
catch (
const std::out_of_range&) {
isValid =
false; }
1145 if (std::abs(
eta) != 4 && dZ != 3) {
1150 return (dZ == 3 && dP == 2) ||
1151 (std::abs(
eta) == 4 && dZ !=1 && dR != 2 && dP == 2);
IdDictFieldImplementation m_mea_impl
bool validStation(int stationName, int technology) const
int stationNameIndex(const std::string &name) const
IdContext detectorElement_context() const
id for detector element
Identifier parentID(const Identifier &id) const
constexpr uint8_t stationPhi
station Phi 1 to 8
MultiRange build_multirange() const
Get MultiRange for full dictionary.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
bool is_rpc(const Identifier &id) const
Scalar phi() const
phi method
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)
int technologyIndex(const std::string &name) const
std::string show_to_string(void) const
int muon_field_value() const
Identifier elementID(int stationName, int stationEta, int stationPhi, int doubletR) const
Scalar eta() const
pseudorapidity method
bool validChannel(const Identifier &id, int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
int doubletZ(const Identifier &id) const
const IdDictRegion & region(size_t i) const
Region at index i.
size_type detectorElement_hash_max() const
void add(const Range &range)
IdDictFieldImplementation m_dbr_impl
element_type get_minimum() const
Query the values.
size_type m_detectorElement_hash_max
IdDictFieldImplementation m_sta_impl
static int stationPhiMin()
void add(element_type value)
Append a value into a new field.
int rpc_field_value() const
bool measuresPhi(const Identifier &id) const override
void pack(int value, Identifier &id) const
bool isExtraDetElId(const Identifier &id) const
element_type get_maximum() const
static int doubletPhiMax()
IdDictFieldImplementation m_dbp_impl
Identifier padID(const Identifier &elementID, int doubletZ, int doubletPhi) const
int stationName(const Identifier &id) const
const std::string & name() const
Dictionary name.
#define ATH_MSG_VERBOSE(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
IdDictFieldImplementation m_phi_impl
IdDictFieldImplementation m_gap_impl
int unpack(Identifier id) const
Identifier manipulation methods.
MultiRange m_full_channel_range
IdDictField * find_field(const std::string &name) const
static int doubletPhiMin()
int gasGap(const Identifier &id) const override
get the hashes
void reset(Identifier &id) const
static int stationPhiMax()
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const override
const IdDictFieldImplementation & implementation(size_t i) const
IdDictGroup * find_group(const std::string &group_name) const
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
size_type m_DOUBLETR_INDEX
size_type m_MEASURESPHI_INDEX
int doubletR(const Identifier &id) const
bool empty() const
If true, this field does not have any constraints, and may hold any value representable by element_ty...
std::unordered_map< Identifier, unsigned int > m_detectorElement_hashes
std::unordered_map< Identifier, unsigned int > m_module_hashes
static int measuresPhiMin()
Identifier panelID(const Identifier &padID, int gasGap, int measuresPhi) const
MultiRange m_full_detectorElement_range
int strip(const Identifier &id) const
MultiRange m_full_module_range
IdDictFieldImplementation m_dbz_impl
int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
Create expanded id from compact id (return == 0 for OK)
static int measuresPhiMax()
const std::vector< IdDictRegion * > & regions()
IdDictFieldImplementation m_eta_impl
void idChannels(const Identifier &id, std::vector< Identifier > &vect) const
size_type m_DOUBLETPHI_INDEX
IdDictFieldImplementation m_muon_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.
int stationPhi(const Identifier &id) const
int channel(const Identifier &id) const override
int get_label_value(const std::string &field, const std::string &label, int &value) const
const std::string & stationNameString(const int &index) const
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
A MultiRange combines several Ranges.
id_vec m_detectorElement_vec
Identifier gapID(const Identifier &padID, int gasGap) const
bool valid(const Identifier &id) const
static int stationEtaMax()
int stationEta(const Identifier &id) const
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
virtual int init_detectorElement_hashes() override
size_type module_hash_max() const
the maximum hash value
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
size_type m_TECHNOLOGY_INDEX
bool validElement(const Identifier &id) const
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
void resetAndSet(const IdDictFieldImplementation &dict, const int new_val, Identifier &id) const
size_type m_DETECTORELEMENT_INDEX
Identifier doubletZID(const Identifier &id) const
IdDictFieldImplementation m_tec_impl
unsigned long long value_type
constexpr uint8_t stationEta
1 to 3
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
IdDictFieldImplementation m_str_impl
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
static int stationEtaMin()
size_type m_DOUBLETZ_INDEX
bool validPad(const Identifier &id) const
int rpcTechnology() const
Utility methods.
int doubletPhi(const Identifier &id) const
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override
bool isStNameInTech(const std::string &stationName) const override
The valid element checks converted the identifier to a stationName string in order to assess whether ...
size_type m_CHANNEL_INDEX
const IdDictDictionary * m_dict