 |
ATLAS Offline Software
|
Go to the documentation of this file.
26 ATH_MSG_INFO(
"Request to reinitialize not satisfied - tags have not changed");
40 ATH_MSG_ERROR(
" initialize_from_dict - cannot access MuonSpectrometer dictionary ");
49 ATH_MSG_DEBUG(
"initLevelsFromDict - there are no sTGC entries in the dictionary! ");
57 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'stgcMultilayer' field ");
65 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'stgcGasGap' field ");
73 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'channelType' field ");
81 ATH_MSG_ERROR(
"initLevelsFromDict - unable to find 'channel' field ");
105 ATH_MSG_DEBUG(
" sTGC decode index and bit fields for each level: " << std::endl
123 if (atlasDict->
get_label_value(
"subdet",
"MuonSpectrometer", muonField)) {
124 ATH_MSG_ERROR(
"Could not get value for label 'MuonSpectrometer' of field 'subdet' in dictionary " << atlasDict->
name());
133 if (muon_range.
size() > 0) {
134 ATH_MSG_INFO(
"MultiRange built successfully to Technology: "
135 <<
"MultiRange size is " << muon_range.
size());
137 ATH_MSG_ERROR(
"Muon sTGC detector element MultiRange is empty");
142 detectorElement_region.
add(muonField);
143 Range detectorElement_prefix;
145 if (muon_detectorElement_range.
size() > 0) {
146 ATH_MSG_INFO(
"MultiRange built successfully to detector element: "
147 <<
"Multilayer MultiRange size is " << muon_detectorElement_range.
size());
149 ATH_MSG_ERROR(
"Muon sTGC detector element MultiRange is empty");
154 stgc_region.
add(muonField);
157 if (muon_channel_range.
size() > 0) {
158 ATH_MSG_INFO(
"MultiRange built successfully to channel: "
159 <<
"MultiRange size is " << muon_channel_range.
size());
161 ATH_MSG_ERROR(
"Muon sTGC detector MultiRange is empty for channels");
169 for (
int i = 0;
i < (
int)muon_range.
size(); ++
i) {
180 for (
int j = 0; j < (
int)muon_detectorElement_range.
size(); ++j) {
181 const Range&
range = muon_detectorElement_range[j];
186 ATH_MSG_DEBUG(
"detector element field size is " << (
int)
range.cardinality() <<
" field index = " << j);
191 for (
int j = 0; j < (
int)muon_channel_range.
size(); ++j) {
197 ATH_MSG_DEBUG(
"channel field size is " << (
int)
range.cardinality() <<
" field index = " << j);
210 ATH_MSG_ERROR(
"sTGC MultiRange ID is empty for detector elements");
241 ATH_MSG_INFO(
"Initializing sTGC hash indices for finding neighbors ... ");
263 for (
unsigned int i = 0;
i < hash_max; ++
i) {
274 for (
unsigned int i = 0;
i < hash_max; ++
i) {
321 }
catch (
const std::out_of_range&) {
isValid =
false; }
396 for (
const auto & expId:rit) {
411 if (
range.match(expId)) {
413 if (not eta_field.
empty()) {
435 if (
range.match(expId)) {
437 if (not eta_field.
empty()) {
455 if (
range.match(expId)) {
472 if (
range.match(expId)) {
489 if (
range.match(expId)) {
491 if (not multilayer_field.
empty()) {
492 int multilayermax = multilayer_field.
get_maximum();
509 if (
range.match(expId)) {
511 if (not multilayer_field.
empty()) {
512 int multilayermin = multilayer_field.
get_minimum();
533 if (
range.match(expId)) {
535 if (not multilayer_field.
empty()) {
536 int multilayermax = multilayer_field.
get_maximum();
553 if (
range.match(expId)) {
555 if (not gasgap_field.
empty()) {
576 if (
range.match(expId)) {
593 if (
range.match(expId)) {
595 if (not channeltype_field.
empty()) {
596 int channeltypemin = channeltype_field.
get_minimum();
617 if (
range.match(expId)) {
619 if (not channeltype_field.
empty()) {
620 int channeltypemax = channeltype_field.
get_maximum();
637 if (
range.match(expId)) {
639 if (not channel_field.
empty()) {
661 if (
range.match(expId)) {
663 if (not channel_field.
empty()) {
677 if (ChannelType ==
Pad) {
687 if (ChannelType ==
Pad) {
723 if (channeltype ==
Pad) {
726 if (PadEta < PadEtaMin || PadEta >
PadEtaMax) {
730 if (PadPhi < PadPhiMin || PadPhi >
PadPhiMax) {
787 int channelType,
int channel)
const {
812 if (PadEta < PadEtaMin || PadEta >
PadEtaMax) {
816 if (PadPhi < PadPhiMin || PadPhi >
PadPhiMax) {
826 int channelType,
int padEta,
int padPhi)
const {
846 <<
" for given padEta=" <<
padEta <<
" and padPhi=" <<
padPhi);
849 if (padEta < PadEtaMin || padEta >
PadEtaMax) {
853 if (padPhi < PadPhiMin || padPhi >
PadPhiMax) {
876 }
catch (
const std::out_of_range&) {
isValid =
false; }
913 }
catch (
const std::out_of_range&) {
isValid =
false; }
918 int channelType,
int channel)
const {
940 }
catch (
const std::out_of_range&) {
isValid =
false; }
968 int padPhi,
bool&
isValid)
const {
974 }
catch (
const std::out_of_range&) {
isValid =
false; }
979 int channelType,
int padEta,
int padPhi)
const {
984 int channelType,
int padEta,
int padPhi,
bool&
isValid)
const {
1006 }
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.
const IdDictRegion & region(size_t i) const
Region at index i.
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
const std::string & name() const
Dictionary name.
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
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
const IdDictFieldImplementation & implementation(size_t i) 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
bool empty() const
If true, this field does not have any constraints, and may hold any value representable by element_ty...
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
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...
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