|
ATLAS Offline Software
|
Go to the documentation of this file.
23 ATH_MSG_INFO(
"Request to reinitialize not satisfied - tags have not changed");
38 ATH_MSG_ERROR(
" initialize_from_dict - cannot access MuonSpectrometer dictionary ");
47 ATH_MSG_DEBUG(
"initLevelsFromDict - there are no MM entries in the dictionary! ");
55 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'mmMultilayer' field ");
63 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'mmGasGap' field ");
71 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find mmChannel' field ");
94 ATH_MSG_DEBUG(
" MicroMegas decode index and bit fields for each level: " << std::endl
112 if (atlasDict->
get_label_value(
"subdet",
"MuonSpectrometer", muonField)) {
113 ATH_MSG_ERROR(
"Could not get value for label 'MuonSpectrometer' of field 'subdet' in dictionary " << atlasDict->
m_name);
122 if (muon_range.
size() > 0) {
123 ATH_MSG_INFO(
"MultiRange built successfully to Technology: "
124 <<
"MultiRange size is " << muon_range.
size());
131 detectorElement_region.
add(muonField);
132 Range detectorElement_prefix;
134 if (muon_detectorElement_range.
size() > 0) {
135 ATH_MSG_INFO(
"MultiRange built successfully to detector element: "
136 <<
"Multilayer MultiRange size is " << muon_detectorElement_range.
size());
138 ATH_MSG_ERROR(
"Muon MicroMegas detector element MultiRange is empty");
143 mm_region.
add(muonField);
146 if (muon_channel_range.
size() > 0) {
147 ATH_MSG_INFO(
"MultiRange built successfully to channel: "
148 <<
"MultiRange size is " << muon_channel_range.
size());
158 for (
int i = 0;
i < (
int)muon_range.
size(); ++
i) {
169 for (
int j = 0; j < (
int)muon_detectorElement_range.
size(); ++j) {
170 const Range&
range = muon_detectorElement_range[j];
175 ATH_MSG_DEBUG(
"detector element field size is " << (
int)
range.cardinality() <<
" field index = " << j);
180 for (
int j = 0; j < (
int)muon_channel_range.
size(); ++j) {
186 ATH_MSG_DEBUG(
"channel field size is " << (
int)
range.cardinality() <<
" field index = " << j);
193 ATH_MSG_ERROR(
"MicroMegas MultiRange ID is empty for modules");
199 ATH_MSG_ERROR(
"MicroMegas MultiRange ID is empty for detector elements");
205 ATH_MSG_ERROR(
"MicroMegas MultiRange ID is empty for channels");
210 ATH_MSG_INFO(
"Initializing MicroMegas hash indices ... ");
216 ATH_MSG_INFO(
"Initializing MicroMegas hash indices for finding neighbors ... ");
239 for (
unsigned int i = 0;
i < hash_max; ++
i) {
250 for (
unsigned int i = 0;
i < hash_max; ++
i) {
296 }
catch (
const std::out_of_range&) {
isValid =
false; }
301 int pcbNb = std::abs(
stationEta)==1 ? pcb : pcb-5;
302 return (pcbNb-1)*1024+1;
338 return radiusNb*512+1;
378 for (
const auto & expId : rit) {
393 if (
range.match(expId)) {
395 if (not eta_field.
empty()) {
417 if (
range.match(expId)) {
419 if (not eta_field.
empty()) {
437 if (
range.match(expId)) {
454 if (
range.match(expId)) {
471 if (
range.match(expId)) {
473 if (not multilayer_field.
empty()) {
474 int multilayermax = multilayer_field.
get_maximum();
491 if (
range.match(expId)) {
493 if (not multilayer_field.
empty()) {
494 int multilayermin = multilayer_field.
get_minimum();
515 if (
range.match(expId)) {
517 if (not multilayer_field.
empty()) {
518 int multilayermax = multilayer_field.
get_maximum();
535 if (
range.match(expId)) {
537 if (not gasgap_field.
empty()) {
558 if (
range.match(expId)) {
575 if (
range.match(expId)) {
577 if (not channel_field.
empty()) {
599 if (
range.match(expId)) {
601 if (not channel_field.
empty()) {
721 }
catch (
const std::out_of_range&) {
isValid =
false; }
755 }
catch (
const std::out_of_range&) {
isValid =
false; }
781 }
catch (
const std::out_of_range&) {
isValid =
false; }
821 if ((ml == 1 && gg > 2) || (ml == 2 && gg < 3))
isStereo =
true;
bool validStation(int stationName, int technology) const
static constexpr unsigned int s_etaDim
-2, -1 , 1, 2
int stationNameIndex(const std::string &name) const
static int stationPhiMin()
constexpr uint8_t stationPhi
station Phi 1 to 8
MultiRange build_multirange() const
Get MultiRange for full dictionary.
int mm_field_value() const
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override
Scalar phi() const
phi method
bool measuresPhi(const Identifier &id) const override
virtual void setMessageSvc(IMessageSvc *msgSvc) override
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
singleton-like access to IMessageSvc via open function and helper
static int stationPhiMax()
static constexpr unsigned int s_mlDim
2 multilayer
std::string show_to_string(void) const
int muon_field_value() const
static int getFirstPcbChnl(int stationEta, int pcb)
IdContext channel_context() const
id for channel
Scalar eta() const
pseudorapidity method
size_type detectorElement_hash_max() const
void add(const Range &range)
bool validElement(const Identifier &id) const
element_type get_minimum() const
Query the values.
IdDictFieldImplementation m_sta_impl
Identifier febID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius) const
void add(element_type value)
Append a value into a new field.
bool isStNameInTech(const std::string &stationName) const override
The valid element checks converted the identifier to a stationName string in order to assess whether ...
void pack(int value, Identifier &id) const
element_type get_maximum() const
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const override
int stationName(const Identifier &id) const
IdDictFieldImplementation m_phi_impl
bool SmallSector(int stationName) const
int unpack(Identifier id) const
Identifier manipulation methods.
MultiRange m_full_channel_range
unsigned int detEleHashIdx(const Identifier &id) const
@ u
Enums for curvilinear frames.
IMessageSvc * getMessageSvc(bool quiet=false)
IdDictField * find_field(const std::string &name) const
int multilayer(const Identifier &id) const
void reset(Identifier &id) const
IdDictFieldImplementation m_gap_impl
Identifier multilayerID(const Identifier &channeldID) const
IdDictGroup * find_group(const std::string &group_name) const
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
IdDictFieldImplementation m_mplet_impl
static int multilayerMax()
std::vector< IdDictRegion * > m_regions
MultiRange m_full_detectorElement_range
IdDictFieldImplementation m_cha_impl
MultiRange m_full_module_range
std::array< unsigned int, s_detHashDim > m_detectorElement_hashes
int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
Create expanded id from compact id (return == 0 for OK)
bool is_mm(const Identifier &id) const
const std::vector< IdDictRegion * > & regions()
IdDictFieldImplementation m_eta_impl
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.
unsigned int moduleHashIdx(const Identifier &id) const
int stationPhi(const Identifier &id) const
int mmTechnology() const
Utility methods.
int get_label_value(const std::string &field, const std::string &label, int &value) const
const std::string & stationNameString(const int &index) const
Identifier elementID(int stationName, int stationEta, int stationPhi) const
A MultiRange combines several Ranges.
Identifier parentID(const Identifier &id) const
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
virtual int init_detectorElement_hashes()
static int stationEtaMin()
static constexpr unsigned int s_phiDim
8 phi station
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
size_type m_TECHNOLOGY_INDEX
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
void resetAndSet(const IdDictFieldImplementation &dict, const int new_val, Identifier &id) const
Identifier pcbID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb) const
bool LargeSector(int stationName) const
size_type m_DETECTORELEMENT_INDEX
static int stationEtaMax()
IdDictFieldImplementation m_tec_impl
unsigned long long value_type
static int getFirstRadiusChnl(int stationEta, int pcb)
bool validChannel(const Identifier &id, int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
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...
void idChannels(const Identifier &id, std::vector< Identifier > &vect) const
bool valid(const Identifier &id) const
std::array< unsigned int, s_modHashDim > m_module_hashes
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
bool isStereo(const Identifier &id) const
unsigned int m_stationShift
Minimal station index found.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
std::vector< IdDictFieldImplementation > m_implementation
static int multilayerMin()
IdContext technology_context() const
access to IdContext's which define which levels or fields are contained in the Muon id
static int sectorType(const std::string &stationName, int stationEta)
int numberOfMultilayers(const Identifier &id) const
size_type m_CHANNEL_INDEX
const IdDictDictionary * m_dict