|
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 ");
44 ATH_MSG_DEBUG(
"initLevelsFromDict - there are no sTGC entries in the dictionary! ");
52 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'stgcMultilayer' field ");
60 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'stgcGasGap' field ");
68 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'channelType' field ");
76 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'channel' field ");
100 ATH_MSG_DEBUG(
" sTGC decode index and bit fields for each level: " << std::endl
118 if (atlasDict->
get_label_value(
"subdet",
"MuonSpectrometer", muonField)) {
119 ATH_MSG_ERROR(
"Could not get value for label 'MuonSpectrometer' of field 'subdet' in dictionary " << atlasDict->
m_name);
128 if (muon_range.
size() > 0) {
129 ATH_MSG_INFO(
"MultiRange built successfully to Technology: "
130 <<
"MultiRange size is " << muon_range.
size());
132 ATH_MSG_ERROR(
"Muon sTGC detector element MultiRange is empty");
137 detectorElement_region.
add(muonField);
138 Range detectorElement_prefix;
140 if (muon_detectorElement_range.
size() > 0) {
141 ATH_MSG_INFO(
"MultiRange built successfully to detector element: "
142 <<
"Multilayer MultiRange size is " << muon_detectorElement_range.
size());
144 ATH_MSG_ERROR(
"Muon sTGC detector element MultiRange is empty");
149 stgc_region.
add(muonField);
152 if (muon_channel_range.
size() > 0) {
153 ATH_MSG_INFO(
"MultiRange built successfully to channel: "
154 <<
"MultiRange size is " << muon_channel_range.
size());
156 ATH_MSG_ERROR(
"Muon sTGC detector MultiRange is empty for channels");
164 for (
int i = 0;
i < (
int)muon_range.
size(); ++
i) {
175 for (
int j = 0; j < (
int)muon_detectorElement_range.
size(); ++j) {
176 const Range&
range = muon_detectorElement_range[j];
181 ATH_MSG_DEBUG(
"detector element field size is " << (
int)
range.cardinality() <<
" field index = " << j);
186 for (
int j = 0; j < (
int)muon_channel_range.
size(); ++j) {
192 ATH_MSG_DEBUG(
"channel field size is " << (
int)
range.cardinality() <<
" field index = " << j);
205 ATH_MSG_ERROR(
"sTGC MultiRange ID is empty for detector elements");
236 ATH_MSG_INFO(
"Initializing sTGC hash indices for finding neighbors ... ");
258 for (
unsigned int i = 0;
i < hash_max; ++
i) {
269 for (
unsigned int i = 0;
i < hash_max; ++
i) {
316 }
catch (
const std::out_of_range&) {
isValid =
false; }
391 for (
const auto & expId:rit) {
406 if (
range.match(expId)) {
408 if (not eta_field.
empty()) {
430 if (
range.match(expId)) {
432 if (not eta_field.
empty()) {
450 if (
range.match(expId)) {
467 if (
range.match(expId)) {
484 if (
range.match(expId)) {
486 if (not multilayer_field.
empty()) {
487 int multilayermax = multilayer_field.
get_maximum();
504 if (
range.match(expId)) {
506 if (not multilayer_field.
empty()) {
507 int multilayermin = multilayer_field.
get_minimum();
528 if (
range.match(expId)) {
530 if (not multilayer_field.
empty()) {
531 int multilayermax = multilayer_field.
get_maximum();
548 if (
range.match(expId)) {
550 if (not gasgap_field.
empty()) {
571 if (
range.match(expId)) {
588 if (
range.match(expId)) {
590 if (not channeltype_field.
empty()) {
591 int channeltypemin = channeltype_field.
get_minimum();
612 if (
range.match(expId)) {
614 if (not channeltype_field.
empty()) {
615 int channeltypemax = channeltype_field.
get_maximum();
632 if (
range.match(expId)) {
634 if (not channel_field.
empty()) {
656 if (
range.match(expId)) {
658 if (not channel_field.
empty()) {
672 if (ChannelType ==
Pad) {
682 if (ChannelType ==
Pad) {
718 if (channeltype ==
Pad) {
721 if (PadEta < PadEtaMin || PadEta >
PadEtaMax) {
725 if (PadPhi < PadPhiMin || PadPhi >
PadPhiMax) {
782 int channelType,
int channel)
const {
807 if (PadEta < PadEtaMin || PadEta >
PadEtaMax) {
811 if (PadPhi < PadPhiMin || PadPhi >
PadPhiMax) {
821 int channelType,
int padEta,
int padPhi)
const {
841 <<
" for given padEta=" <<
padEta <<
" and padPhi=" <<
padPhi);
844 if (padEta < PadEtaMin || padEta >
PadEtaMax) {
848 if (padPhi < PadPhiMin || padPhi >
PadPhiMax) {
871 }
catch (
const std::out_of_range&) {
isValid =
false; }
908 }
catch (
const std::out_of_range&) {
isValid =
false; }
913 int channelType,
int channel)
const {
935 }
catch (
const std::out_of_range&) {
isValid =
false; }
963 int padPhi,
bool&
isValid)
const {
969 }
catch (
const std::out_of_range&) {
isValid =
false; }
974 int channelType,
int padEta,
int padPhi)
const {
979 int channelType,
int padEta,
int padPhi,
bool&
isValid)
const {
1001 }
catch (
const std::out_of_range&) {
isValid =
false; }
bool validStation(int stationName, int technology) const
int stationNameIndex(const std::string &name) const
int multilayer(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.
std::array< unsigned int, s_detHashDim > m_detectorElement_hashes
IdDictFieldImplementation m_mplet_impl
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
unsigned int detEleHashIdx(const Identifier &id) const
Identifier32::value_type Channel
std::string show_to_string(void) const
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
int muon_field_value() const
IdContext channel_context() const
id for channel
bool LargeSector(int stationName) const
Scalar eta() const
pseudorapidity method
static int stationPhiMin()
unsigned int m_stationShift
Minimal station index found.
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const
size_type detectorElement_hash_max() const
void add(const Range &range)
element_type get_minimum() const
Query the values.
bool measuresPhi(const Identifier &id) const override
returns measuresPhi
IdDictFieldImplementation m_sta_impl
static constexpr unsigned int s_etaDim
-3, -2, -1, 1, 2, 3
void add(element_type value)
Append a value into a new field.
void pack(int value, Identifier &id) const
static int multilayerMin()
element_type get_maximum() const
int numberOfMultilayers(const Identifier &id) const
int stgc_field_value() const
int stationName(const Identifier &id) const
IdDictFieldImplementation m_phi_impl
int unpack(Identifier id) const
Identifier manipulation methods.
MultiRange m_full_channel_range
@ u
Enums for curvilinear frames.
IdDictField * find_field(const std::string &name) const
void reset(Identifier &id) const
bool is_stgc(const Identifier &id) const
static int stationEtaMin()
IdDictGroup * find_group(const std::string &group_name) const
IdDictFieldImplementation m_typ_impl
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
int channel(const Identifier &id) const override
static int stationPhiMax()
static constexpr unsigned int s_mlDim
2 multilayer
bool validElement(const Identifier &id) const
static int channelTypeMax()
int gasGap(const Identifier &id) const override
get the hashes
std::vector< IdDictRegion * > m_regions
MultiRange m_full_detectorElement_range
static int stationEtaMax()
MultiRange m_full_module_range
void idChannels(const Identifier &id, std::vector< Identifier > &vect) 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)
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.
std::array< unsigned int, s_modHashDim > m_module_hashes
int stationPhi(const Identifier &id) const
size_type m_CHANNELTYPE_INDEX
int stgcTechnology() 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
static int multilayerMax()
A MultiRange combines several Ranges.
Identifier padID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int padEta, int padPhi) const
bool valid(const Identifier &id) const
id_vec m_detectorElement_vec
IdDictFieldImplementation m_cha_impl
int stationEta(const Identifier &id) const
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const override
Identifier parentID(const Identifier &id) const
size_type module_hash_max() const
the maximum hash value
static constexpr unsigned int s_phiDim
8 phi station
bool validChannel(const Identifier &id, int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const
IdDictFieldImplementation m_gap_impl
virtual int init_detectorElement_hashes()
Identifier elementID(int stationName, int stationEta, int stationPhi) const
int padPhi(const Identifier &id) 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
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
bool isStNameInTech(const std::string &stationName) const override
The valid element checks converted the identifier to a stationName string in order to assess whether ...
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 channelTypeMin()
bool SmallSector(int stationName) const
IdDictFieldImplementation m_tec_impl
Identifier multilayerID(const Identifier &channeldID) const
int padEta(const Identifier &id) const
unsigned long long value_type
Identifier febID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType) const
unsigned int moduleHashIdx(const Identifier &id) 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...
Identifier hvID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, bool isInnerQ1) const
int channelType(const Identifier &id) const
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
std::vector< IdDictFieldImplementation > m_implementation
IdContext technology_context() const
access to IdContext's which define which levels or fields are contained in the Muon id
size_type m_CHANNEL_INDEX
const IdDictDictionary * m_dict