Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
16 ATH_MSG_INFO(
"Request to reinitialize not satisfied - tags have not changed");
30 ATH_MSG_ERROR(
" initialize_from_dict - cannot access MuonSpectrometer dictionary ");
41 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'doubletR' field ");
49 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'doubletZ' field ");
57 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'doubletPhi' field ");
65 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'rpcGasGap' field ");
73 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'rpcMeasuresPhi' field ");
81 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'rpcStrip' field ");
108 ATH_MSG_DEBUG(
" RPC decode index and bit fields for each level: " << std::endl
128 if (atlasDict->
get_label_value(
"subdet",
"MuonSpectrometer", muonField)) {
129 ATH_MSG_ERROR(
"Could not get value for label 'MuonSpectrometer' of field 'subdet' in dictionary " << atlasDict->
m_name);
139 if (muon_range.
size() > 0) {
140 ATH_MSG_INFO(
"MultiRange built successfully to doubletR: "
141 <<
"MultiRange size is " << muon_range.
size());
149 detectorElement_region.
add(muonField);
150 Range detectorElement_prefix;
152 if (muon_detectorElement_range.
size() > 0) {
153 ATH_MSG_INFO(
"MultiRange built successfully to detectorElement: "
154 <<
"DetectorElement MultiRange size is " << muon_detectorElement_range.
size());
156 ATH_MSG_ERROR(
"Muon RPC ReadoutElement MultiRange is empty");
162 rpc_region.
add(muonField);
166 if (muon_channel_range.
size() > 0) {
167 ATH_MSG_INFO(
"MultiRange built successfully to rpcStrip: "
168 <<
"MultiRange size is " << muon_channel_range.
size());
179 for (
int i = 0;
i < (
int)muon_range.
size(); ++
i) {
190 for (
int j = 0; j < (
int)muon_detectorElement_range.
size(); ++j) {
191 const Range&
range = muon_detectorElement_range[j];
196 ATH_MSG_DEBUG(
"detectorElement field size is " << (
int)
range.cardinality() <<
" field index = " << j);
201 for (
int j = 0; j < (
int)muon_channel_range.
size(); ++j) {
207 ATH_MSG_DEBUG(
"channel field size is " << (
int)
range.cardinality() <<
" field index = " << j);
222 ATH_MSG_ERROR(
"MDT MultiRange ID is empty for detector elements");
241 ATH_MSG_INFO(
"Initializing RPC hash indices for finding neighbors ... ");
251 if (
range.match(expId)) {
253 if (not gap_field.
empty()) {
265 ATH_MSG_ERROR(
"No maximum number of RPC gas gaps was retrieved");
276 for (
unsigned int i = 0;
i < hash_max; ++
i) {
282 for (
unsigned int i = 0;
i < hash_max; ++
i) {
295 hash_id = itr->second;
314 hash_id = itr->second;
324 for (
const auto & expId:rit) {
340 if (
range.match(expId)) {
342 if (not eta_field.
empty()) {
358 if (
range.match(expId)) {
360 if (not eta_field.
empty()) {
376 if (
range.match(expId)) {
392 if (
range.match(expId)) {
408 if (
range.match(expId)) {
424 if (
range.match(expId)) {
440 if (
range.match(expId)) {
456 if (
range.match(expId)) {
472 if (
range.match(expId)) {
488 if (
range.match(expId)) {
504 if (
range.match(expId)) {
520 if (
range.match(expId)) {
536 if (
range.match(expId)) {
552 if (
range.match(expId)) {
568 if (
range.match(expId)) {
584 if (
range.match(expId)) {
763 unsigned int nids = 0;
764 std::set<Identifier>
ids;
768 for (
const auto & expId:rit) {
773 if (!
ids.insert(doubletZ_id).second)
775 <<
"Please check the dictionary for possible duplication for " <<
id);
776 }
else if (!
ids.insert(
id).second) {
778 <<
" Error: duplicated id for detector element id. nid " << (
int)nids
779 <<
" doubletPhi ID " <<
id);
810 }
catch (
const std::out_of_range&) {
isValid =
false; }
832 }
catch (
const std::out_of_range&) {
isValid =
false; }
839 int measuresPhi)
const {
855 int measuresPhi,
bool&
isValid)
const {
860 }
catch (
const std::out_of_range&) {
isValid =
false; }
881 }
catch (
const std::out_of_range&) {
isValid =
false; }
907 }
catch (
const std::out_of_range&) {
isValid =
false; }
927 }
catch (
const std::out_of_range&) {
isValid =
false; }
932 int measuresPhi,
int strip)
const {
949 int measuresPhi,
int strip,
bool&
isValid)
const {
955 }
catch (
const std::out_of_range&) {
isValid =
false; }
984 }
catch (
const std::out_of_range&) {
isValid =
false; }
1030 }
catch (
const std::out_of_range&) {
isValid =
false; }
1046 }
catch (
const std::out_of_range&) {
isValid =
false; }
1140 if (std::abs(
eta) != 4 && dZ != 3) {
1145 return (dZ == 3 && dP == 2) ||
1146 (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
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
#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
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
std::unordered_map< Identifier, unsigned int > m_detectorElement_hashes
std::unordered_map< Identifier, unsigned int > m_module_hashes
static int measuresPhiMin()
std::vector< IdDictRegion * > m_regions
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()
std::vector< IdDictFieldImplementation > m_implementation
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