|
ATLAS Offline Software
|
Go to the documentation of this file.
20 ATH_MSG_INFO(
"Request to reinitialize not satisfied - tags have not changed");
35 ATH_MSG_ERROR(
" initialize_from_dict - cannot access MuonSpectrometer dictionary ");
47 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'multiLayer' field ");
55 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'tubeLayer' field ");
63 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'tube' field ");
84 ATH_MSG_DEBUG(
" MDT decode index and bit fields for each level: " << std::endl
102 if (atlasDict->
get_label_value(
"subdet",
"MuonSpectrometer", muonField)) {
103 ATH_MSG_ERROR(
"Could not get value for label 'MuonSpectrometer' of field "
104 <<
"'subdet' in dictionary " << atlasDict->
m_name);
114 if (muon_range.
size() > 0) {
115 ATH_MSG_INFO(
"MultiRange built successfully to Technology: "
116 <<
"MultiRange size is " << muon_range.
size());
124 detectorElement_region.
add(muonField);
125 Range detectorElement_prefix;
127 if (muon_detectorElement_range.
size() > 0) {
128 ATH_MSG_INFO(
"MultiRange built successfully to detector element: "
129 <<
"Multilayer MultiRange size is " << muon_detectorElement_range.
size());
131 ATH_MSG_ERROR(
"Muon MDT detector element MultiRange is empty");
137 mdt_region.
add(muonField);
140 if (muon_channel_range.
size() > 0) {
142 <<
"MultiRange size is " << muon_channel_range.
size());
157 for (
int i = 0;
i < (
int)muon_range.
size(); ++
i) {
163 ATH_MSG_DEBUG(
"module field size is " << (
int)
range.cardinality() <<
" field index = " <<
i);
168 for (
int j = 0; j < (
int)muon_detectorElement_range.
size(); ++j) {
169 const Range&
range = muon_detectorElement_range[j];
174 ATH_MSG_DEBUG(
"detector element field size is " << (
int)
range.cardinality() <<
" field index = " << j);
179 for (
int k = 0;
k < (
int)muon_channel_range.
size(); ++
k) {
185 ATH_MSG_DEBUG(
"channel field size is " << (
int)
range.cardinality() <<
" field index = " <<
k);
200 ATH_MSG_ERROR(
"MDT MultiRange ID is empty for detector elements");
217 assert (not station_f.
empty() &&
229 assert (not station_f.
empty() &&
247 ATH_MSG_INFO(
"Initializing MDT hash indices for finding neighbors ... ");
257 if (
range.match(expId)) {
259 if (not channel_field.
empty()) {
271 ATH_MSG_ERROR(
"No maximum number of MDT tubes was retrieved");
284 for (
unsigned int i = 0;
i < hash_max; ++
i) {
295 for (
unsigned int i = 0;
i < hash_max; ++
i) {
352 }
catch (
const std::out_of_range&) {
isValid =
false; }
361 for (
const auto & expId: rit) {
421 int resultMax = -999;
423 IdContext eta_context(expId, 0, field_index);
426 for (
const Range*
range : ranges_by_station.at (station)) {
427 if (
range->match(expId)) {
429 if (not
field.empty()) {
432 if (not
field.empty()) {
438 return std::make_pair (resultMin, resultMax);
452 std::tuple<int, int, int, int>
467 if (
range->match(expIdEta)) {
469 if (not eta_field.
empty()) {
473 if (not eta_field.
empty()) {
478 if (
range->match(expIdPhi)) {
480 if (not phi_field.
empty()) {
484 if (not phi_field.
empty()) {
503 if (
range->match(expId)) {
505 if (not multilayer_field.
empty()) {
550 if (tb < tubeMin || tb >
tubeMax) {
592 if (stationEta < stationEtaMin || stationEta >
stationEtaMax) {
598 if (stationPhi < stationPhiMin || stationPhi >
stationPhiMax) {
611 if (multilayer < multilayerMin || multilayer >
multilayerMax) {
618 if (tubeLayer < tubeLayerMin || tubeLayer >
tubeLayerMax) {
623 if (tube < tubeMin || tube >
tubeMax) {
646 }
catch (
const std::out_of_range&) {
isValid =
false; }
680 }
catch (
const std::out_of_range&) {
isValid =
false; }
705 }
catch (
const std::out_of_range&) {
isValid =
false; }
bool isBMG(const Identifier &id) const
is this a BMG chamber
int multilayer(const Identifier &id) const
Access to components of the ID.
bool validStation(int stationName, int technology) const
int stationNameIndex(const std::string &name) const
bool validElement(const Identifier &id) const
constexpr uint8_t stationPhi
station Phi 1 to 8
MultiRange build_multirange() const
Get MultiRange for full dictionary.
IdDictFieldImplementation m_lay_impl
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
static int stationEtaMin(bool barrel)
Access to min and max of level ranges.
int numberOfMultilayers(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
IdContext channel_context() const
id for channel
Scalar eta() const
pseudorapidity method
bool is_mdt(const Identifier &id) const
size_type detectorElement_hash_max() const
void add(const Range &range)
element_type get_minimum() const
Query the values.
static constexpr unsigned s_etaDim
IdDictFieldImplementation m_sta_impl
std::array< unsigned int, s_modHash > m_module_hashes
void add(element_type value)
Append a value into a new field.
void pack(int value, Identifier &id) const
int tubeLayer(const Identifier &id) const
element_type get_maximum() const
int stationName(const Identifier &id) const
IdDictFieldImplementation m_phi_impl
std::pair< int, int > multilayerMinMax(const Identifier &id) const
int unpack(Identifier id) const
Identifier manipulation methods.
MultiRange m_full_channel_range
size_type m_TUBELAYER_INDEX
std::array< unsigned int, s_detDim > m_detectorElement_hashes
unsigned int moduleHashIdx(const Identifier &id) const
std::pair< int, int > findMinMax(const Identifier &id, const size_type field_index, const ranges_by_station_t &ranges_by_station) const
IdDictField * find_field(const std::string &name) const
bool measuresPhi(const Identifier &id) const override
always false for MDTs
static int multilayerMax()
void reset(Identifier &id) const
std::pair< int, int > tubeMinMax(const Identifier &id) const
static constexpr unsigned s_phiDim
static int multilayerMin()
std::pair< int, int > tubeLayerMinMax(const Identifier &id) const
Identifier::size_type size_type
static int tubeLayerMax()
IdDictGroup * find_group(const std::string &group_name) const
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
int mdt_field_value() const
static int stationEtaMax(bool barrel)
int channel(const Identifier &id) const override
std::vector< IdDictRegion * > m_regions
int tube(const Identifier &id) const
MultiRange m_full_detectorElement_range
bool validChannel(const Identifier &id, int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
static constexpr unsigned s_mlDim
MultiRange m_full_module_range
std::tuple< int, int, int, int > stationEtaPhiMinMax(const Identifier &id) const
int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
Create expanded id from compact id (return == 0 for OK)
std::pair< int, int > stationEtaMinMax(const Identifier &id) const
const std::vector< IdDictRegion * > & regions()
IdDictFieldImplementation m_eta_impl
IdDictFieldImplementation m_muon_impl
int nStationNames() const
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
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
int get_label_value(const std::string &field, const std::string &label, int &value) const
const std::string & stationNameString(const int &index) const
std::pair< int, int > stationPhiMinMax(const Identifier &id) const
unsigned int detEleHashIdx(const Identifier &id) const
A MultiRange combines several Ranges.
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
ranges_by_station_t m_module_ranges_by_station
id_vec m_detectorElement_vec
int stationEta(const Identifier &id) const
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
size_type module_hash_max() const
the maximum hash value
bool isBME(const Identifier &id) const
is this a BME chamber
IdDictFieldImplementation m_tub_impl
virtual int init_detectorElement_hashes()
bool valid(const Identifier &id) const
Public validation of levels.
Identifier elementID(int stationName, int stationEta, int stationPhi) const
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
size_type m_TECHNOLOGY_INDEX
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const override
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
static int stationPhiMax()
IdDictFieldImplementation m_tec_impl
Identifier multilayerID(const Identifier &channeldID) const
unsigned long long value_type
int gasGap(const Identifier &id) const override
the gas-gap function for the MDT's returns the tube layer
IdDictFieldImplementation m_mla_impl
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override
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...
std::vector< std::vector< const Range * > > ranges_by_station_t
static int stationPhiMin()
int mdtTechnology() const
Utility methods.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
std::vector< IdDictFieldImplementation > m_implementation
ranges_by_station_t m_channel_ranges_by_station
IdContext technology_context() const
access to IdContext's which define which levels or fields are contained in the Muon id
static int tubeLayerMin()
bool isStNameInTech(const std::string &stationName) const override
The valid element checks converted the identifier to a stationName string in order to assess whether ...
Identifier parentID(const Identifier &id) const
get parent id from channel id
void idChannels(const Identifier &id, std::vector< Identifier > &vect) const
size_type m_CHANNEL_INDEX
const IdDictDictionary * m_dict