ATLAS Offline Software
RpcIdHelper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <iostream>
8 
9 // Initialize dictionary
11  int status = 0;
12 
13  // Check whether this helper should be reinitialized
14  if (!reinitialize(dict_mgr)) {
15  ATH_MSG_INFO("Request to reinitialize not satisfied - tags have not changed");
16  return (0);
17  } else {
18  ATH_MSG_DEBUG("(Re)initialize");
19  }
20 
21  // init base object
22  if (AtlasDetectorID::initialize_from_dictionary(dict_mgr)) return 1;
23 
24  // Register version of the MuonSpectrometer dictionary
25  if (register_dict_tag(dict_mgr, "MuonSpectrometer")) return 1;
26 
27  m_dict = dict_mgr.find_dictionary("MuonSpectrometer");
28  if (!m_dict) {
29  ATH_MSG_ERROR(" initialize_from_dict - cannot access MuonSpectrometer dictionary ");
30  return 1;
31  }
32 
33  // Initialize some of the field indices
34  if (initLevelsFromDict()) return 1;
35 
36  IdDictField* field = m_dict->find_field("doubletR");
37  if (field) {
38  m_DOUBLETR_INDEX = field->m_index;
39  } else {
40  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'doubletR' field ");
41  status = 1;
42  }
43 
44  field = m_dict->find_field("doubletZ");
45  if (field) {
46  m_DOUBLETZ_INDEX = field->m_index;
47  } else {
48  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'doubletZ' field ");
49  status = 1;
50  }
51 
52  field = m_dict->find_field("doubletPhi");
53  if (field) {
54  m_DOUBLETPHI_INDEX = field->m_index;
55  } else {
56  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'doubletPhi' field ");
57  status = 1;
58  }
59 
60  field = m_dict->find_field("rpcGasGap");
61  if (field) {
62  m_GASGAP_INDEX = field->m_index;
63  } else {
64  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'rpcGasGap' field ");
65  status = 1;
66  }
67 
68  field = m_dict->find_field("rpcMeasuresPhi");
69  if (field) {
70  m_MEASURESPHI_INDEX = field->m_index;
71  } else {
72  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'rpcMeasuresPhi' field ");
73  status = 1;
74  }
75 
76  field = m_dict->find_field("rpcStrip");
77  if (field) {
78  m_CHANNEL_INDEX = field->m_index;
79  } else {
80  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'rpcStrip' field ");
81  status = 1;
82  }
83 
84  // reinitialze the module context
87 
88  // save an index to the first region of rpc
89  IdDictGroup* rpcGroup = m_dict->find_group("rpc");
90  if (!rpcGroup) {
91  ATH_MSG_ERROR("Cannot find rpc group");
92  } else {
93  m_GROUP_INDEX = rpcGroup->regions()[0]->m_index;
94  }
95 
96  const IdDictRegion& region = *m_dict->m_regions[m_GROUP_INDEX];
106 
107  ATH_MSG_DEBUG(" RPC decode index and bit fields for each level: " << std::endl
108  << " muon " << m_muon_impl.show_to_string() << std::endl
109  << " station " << m_sta_impl.show_to_string() << std::endl
110  << " eta " << m_eta_impl.show_to_string() << std::endl
111  << " phi " << m_phi_impl.show_to_string() << std::endl
112  << " technology " << m_tec_impl.show_to_string() << std::endl
113  << " TR " << m_dbr_impl.show_to_string() << std::endl
114  << " TZ " << m_dbz_impl.show_to_string() << std::endl
115  << " TPHI " << m_dbp_impl.show_to_string() << std::endl
116  << " gas gap " << m_gap_impl.show_to_string() << std::endl
117  << " phi " << m_mea_impl.show_to_string() << std::endl
118  << " strip " << m_str_impl.show_to_string());
119 
120  //
121  // Build multirange for the valid set of identifiers
122  //
123 
124  // Find value for the field MuonSpectrometer
125  int muonField = -1;
126  const IdDictDictionary* atlasDict = dict_mgr.find_dictionary("ATLAS");
127  if (atlasDict->get_label_value("subdet", "MuonSpectrometer", muonField)) {
128  ATH_MSG_ERROR("Could not get value for label 'MuonSpectrometer' of field 'subdet' in dictionary " << atlasDict->m_name);
129  return 1;
130  }
131 
132  // Build MultiRange down to "doubletR" for all (muon) regions
134  region_id.add(muonField);
135  Range prefix;
136  MultiRange muon_range = m_dict->build_multirange(region_id, prefix, "doubletR");
137 
138  if (muon_range.size() > 0) {
139  ATH_MSG_INFO("MultiRange built successfully to doubletR: "
140  << "MultiRange size is " << muon_range.size());
141  } else {
142  ATH_MSG_ERROR("Muon MultiRange is empty");
143  }
144 
145  // Build MultiRange down to "detectorElement" for all mdt regions
146 
147  ExpandedIdentifier detectorElement_region;
148  detectorElement_region.add(muonField);
149  Range detectorElement_prefix;
150  MultiRange muon_detectorElement_range = m_dict->build_multirange(detectorElement_region, detectorElement_prefix, "doubletPhi");
151  if (muon_detectorElement_range.size() > 0) {
152  ATH_MSG_INFO("MultiRange built successfully to detectorElement: "
153  << "DetectorElement MultiRange size is " << muon_detectorElement_range.size());
154  } else {
155  ATH_MSG_ERROR("Muon RPC ReadoutElement MultiRange is empty");
156  return 1;
157  }
158 
159  // Build MultiRange down to "rpcStrip" for all rpc regions
160  ExpandedIdentifier rpc_region;
161  rpc_region.add(muonField);
162  Range rpc_prefix;
163  MultiRange muon_channel_range = m_dict->build_multirange(rpc_region, rpc_prefix, "rpcStrip");
164 
165  if (muon_channel_range.size() > 0) {
166  ATH_MSG_INFO("MultiRange built successfully to rpcStrip: "
167  << "MultiRange size is " << muon_channel_range.size());
168  } else {
169  ATH_MSG_ERROR("Muon RPC channel MultiRange is empty");
170  return 1;
171  }
172 
173  // build RPC module ranges
174  // Find the regions that have a "RPC doubletR field" and save them
175  int rpcField = -1;
176  status = m_dict->get_label_value("technology", "RPC", rpcField);
177 
178  for (int i = 0; i < (int)muon_range.size(); ++i) {
179  const Range& range = muon_range[i];
180  if (range.fields() > m_TECHNOLOGY_INDEX) {
182  if (field.match((ExpandedIdentifier::element_type)rpcField)) {
184  ATH_MSG_DEBUG("field size is " << (int)range.cardinality() << " field index = " << i);
185  }
186  }
187  }
188 
189  for (int j = 0; j < (int)muon_detectorElement_range.size(); ++j) {
190  const Range& range = muon_detectorElement_range[j];
191  if (range.fields() > m_TECHNOLOGY_INDEX) {
193  if (field.match((ExpandedIdentifier::element_type)rpcField)) {
195  ATH_MSG_DEBUG("detectorElement field size is " << (int)range.cardinality() << " field index = " << j);
196  }
197  }
198  }
199 
200  for (int j = 0; j < (int)muon_channel_range.size(); ++j) {
201  const Range& range = muon_channel_range[j];
202  if (range.fields() > m_TECHNOLOGY_INDEX) {
204  if (field.match((ExpandedIdentifier::element_type)rpcField)) {
206  ATH_MSG_DEBUG("channel field size is " << (int)range.cardinality() << " field index = " << j);
207  }
208  }
209  }
210 
211  // test to see that the multi range is not empty
212  if (m_full_module_range.size() == 0) {
213  ATH_MSG_ERROR("RPC MultiRange ID is empty for modules");
214  status = 1;
215  } else {
216  ATH_MSG_DEBUG(" full module range size is " << m_full_module_range.size());
217  }
218 
220  if (m_full_detectorElement_range.size() == 0) {
221  ATH_MSG_ERROR("MDT MultiRange ID is empty for detector elements");
222  status = 1;
223  }
224 
225  // test to see that the multi range is not empty
226  if (m_full_channel_range.size() == 0) {
227  ATH_MSG_ERROR("RPC MultiRange ID is empty for channels");
228  status = 1;
229  } else {
230  ATH_MSG_DEBUG(" full channel range size is " << m_full_channel_range.size());
231  }
232 
233  // Setup the hash tables for RPC
234  ATH_MSG_INFO("Initializing RPC hash indices ... ");
235  status = init_hashes();
236  status = init_detectorElement_hashes(); // doubletZ
238 
239  // Setup hash tables for finding neighbors
240  ATH_MSG_INFO("Initializing RPC hash indices for finding neighbors ... ");
242 
243  // retrieve the maximum number of gas gaps
244  ExpandedIdentifier expId;
245  IdContext gasGap_context(expId, 0, m_GASGAP_INDEX);
246  for (const auto& id : m_detectorElement_vec) { // channel Identifiers not filled for RPCs, thus using detector element ones
247  if (!get_expanded_id(id, expId, &gasGap_context)) {
248  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
249  const Range& range = m_full_channel_range[i];
250  if (range.match(expId)) {
251  const Range::field& gap_field = range[m_GASGAP_INDEX];
252  if (gap_field.has_maximum()) {
253  unsigned int max = (gap_field.get_maximum());
254  if (m_gasGapMax == UINT_MAX)
255  m_gasGapMax = max;
256  else if (max > m_gasGapMax)
257  m_gasGapMax = max;
258  }
259  }
260  }
261  }
262  }
263  if (m_gasGapMax == UINT_MAX) {
264  ATH_MSG_ERROR("No maximum number of RPC gas gaps was retrieved");
265  status = 1;
266  } else {
267  ATH_MSG_DEBUG(" Maximum number of RPC gas gaps is " << m_gasGapMax);
268  }
269  m_init = true;
270  return (status);
271 }
272 
274  unsigned int hash_max = module_hash_max();
275  for (unsigned int i = 0; i < hash_max; ++i) {
276  const Identifier& id = m_module_vec[i];
277  m_module_hashes[id] = i;
278  }
279 
280  hash_max = detectorElement_hash_max();
281  for (unsigned int i = 0; i < hash_max; ++i) {
282  const Identifier& id = m_detectorElement_vec[i];
284  }
285  return 0;
286 }
287 
289  const auto itr = m_module_hashes.find(parentID(id));
290  if (itr == m_module_hashes.end()) {
291  hash_id = IdentifierHash(-1);
292  return 1;
293  }
294  hash_id = itr->second;
295  return 0;
296 }
297 
299  Identifier detElId = id;
300  // Certain chambers require doublet Phi in hashing (See isExtraDetElId()) - do not reset m_dpb_impl in these cases
301  if (!isExtraDetElId(id)) {
302  m_dbp_impl.reset(detElId);
303  }
304  m_gap_impl.reset(detElId);
305  m_mea_impl.reset(detElId);
306  m_str_impl.reset(detElId);
307  auto itr = m_detectorElement_hashes.find(detElId);
308  if (itr == m_detectorElement_hashes.end()) {
309  ATH_MSG_VERBOSE("Cannot find a valid detector element hash for "<<print_to_string(id));
310  hash_id = IdentifierHash(-1);
311  return 1;
312  }
313  hash_id = itr->second;
314  return 0;
315 }
316 
317 void RpcIdHelper::idChannels(const Identifier& id, std::vector<Identifier>& vect) const {
318  vect.clear();
319  Identifier parent = parentID(id);
320  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
321  const Range& range = m_full_channel_range[i];
322  Range::const_identifier_factory first = range.factory_begin();
323  Range::const_identifier_factory last = range.factory_end();
324  for (; first != last; ++first) {
325  Identifier child;
326  get_id((*first), child);
327  if (parentID(child) == parent) vect.push_back(child);
328  }
329  }
330 }
331 
332 // Access to min and max of level ranges
333 
335  ExpandedIdentifier expId;
336  IdContext eta_context(expId, 0, m_ETA_INDEX);
337  if (!get_expanded_id(id, expId, &eta_context)) {
338  int result = -999;
339  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
340  const Range& range = m_full_module_range[i];
341  if (range.match(expId)) {
342  const Range::field& eta_field = range[m_ETA_INDEX];
343  if (eta_field.has_minimum()) {
344  int etamin = eta_field.get_minimum();
345  if (-999 == result) {
346  result = etamin;
347  } else {
348  if (etamin < result) result = etamin;
349  }
350  }
351  }
352  }
353  return (result);
354  }
355  return 999; // default
356 }
357 
359  ExpandedIdentifier expId;
360  IdContext eta_context(expId, 0, m_ETA_INDEX);
361  if (!get_expanded_id(id, expId, &eta_context)) {
362  int result = -999;
363  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
364  const Range& range = m_full_module_range[i];
365  if (range.match(expId)) {
366  const Range::field& eta_field = range[m_ETA_INDEX];
367  if (eta_field.has_maximum()) {
368  int etamax = eta_field.get_maximum();
369  if (result < etamax) result = etamax;
370  }
371  }
372  }
373  return (result);
374  }
375  return -999;
376 }
377 
379  ExpandedIdentifier expId;
380  IdContext phi_context(expId, 0, m_PHI_INDEX);
381  if (!get_expanded_id(id, expId, &phi_context)) {
382  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
383  const Range& range = m_full_module_range[i];
384  if (range.match(expId)) {
385  const Range::field& phi_field = range[m_PHI_INDEX];
386  if (phi_field.has_minimum()) { return (phi_field.get_minimum()); }
387  }
388  }
389  }
390  // Failed to find the min
391  return 999;
392 }
393 
395  ExpandedIdentifier expId;
396  IdContext phi_context(expId, 0, m_PHI_INDEX);
397  if (!get_expanded_id(id, expId, &phi_context)) {
398  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
399  const Range& range = m_full_module_range[i];
400  if (range.match(expId)) {
401  const Range::field& phi_field = range[m_PHI_INDEX];
402  if (phi_field.has_maximum()) { return (phi_field.get_maximum()); }
403  }
404  }
405  }
406  // Failed to find the max
407  return -999;
408 }
409 
410 int RpcIdHelper::doubletRMin(const Identifier& id) const {
411  ExpandedIdentifier expId;
412  IdContext doubletR_context(expId, 0, m_DOUBLETR_INDEX);
413  if (!get_expanded_id(id, expId, &doubletR_context)) {
414  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
415  const Range& range = m_full_module_range[i];
416  if (range.match(expId)) {
417  const Range::field& r_field = range[m_DOUBLETR_INDEX];
418  if (r_field.has_minimum()) { return (r_field.get_minimum()); }
419  }
420  }
421  }
422  // Failed to find the min
423  return 999;
424 }
425 
426 int RpcIdHelper::doubletRMax(const Identifier& id) const {
427  ExpandedIdentifier expId;
428  IdContext doubletR_context(expId, 0, m_DOUBLETR_INDEX);
429  if (!get_expanded_id(id, expId, &doubletR_context)) {
430  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
431  const Range& range = m_full_module_range[i];
432  if (range.match(expId)) {
433  const Range::field& r_field = range[m_DOUBLETR_INDEX];
434  if (r_field.has_maximum()) { return (r_field.get_maximum()); }
435  }
436  }
437  }
438  // Failed to find the max
439  return -999;
440 }
441 
442 int RpcIdHelper::doubletZMin(const Identifier& id) const {
443  ExpandedIdentifier expId;
444  IdContext doubletZ_context(expId, 0, m_DOUBLETZ_INDEX);
445  if (!get_expanded_id(id, expId, &doubletZ_context)) {
446  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
447  const Range& range = m_full_channel_range[i];
448  if (range.match(expId)) {
449  const Range::field& z_field = range[m_DOUBLETZ_INDEX];
450  if (z_field.has_minimum()) { return (z_field.get_minimum()); }
451  }
452  }
453  }
454  // Failed to find the min
455  return 999;
456 }
457 
458 int RpcIdHelper::doubletZMax(const Identifier& id) const {
459  ExpandedIdentifier expId;
460  IdContext doubletZ_context(expId, 0, m_DOUBLETZ_INDEX);
461  if (!get_expanded_id(id, expId, &doubletZ_context)) {
462  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
463  const Range& range = m_full_channel_range[i];
464  if (range.match(expId)) {
465  const Range::field& z_field = range[m_DOUBLETZ_INDEX];
466  if (z_field.has_maximum()) { return (z_field.get_maximum()); }
467  }
468  }
469  }
470  // Failed to find the max
471  return -999;
472 }
473 
475  ExpandedIdentifier expId;
476  IdContext doubletPhi_context(expId, 0, m_DOUBLETPHI_INDEX);
477  if (!get_expanded_id(id, expId, &doubletPhi_context)) {
478  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
479  const Range& range = m_full_channel_range[i];
480  if (range.match(expId)) {
481  const Range::field& dphi_field = range[m_DOUBLETPHI_INDEX];
482  if (dphi_field.has_minimum()) { return (dphi_field.get_minimum()); }
483  }
484  }
485  }
486  // Failed to find the min
487  return 999;
488 }
489 
491  ExpandedIdentifier expId;
492  IdContext doubletPhi_context(expId, 0, m_DOUBLETPHI_INDEX);
493  if (!get_expanded_id(id, expId, &doubletPhi_context)) {
494  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
495  const Range& range = m_full_channel_range[i];
496  if (range.match(expId)) {
497  const Range::field& dphi_field = range[m_DOUBLETPHI_INDEX];
498  if (dphi_field.has_maximum()) { return (dphi_field.get_maximum()); }
499  }
500  }
501  }
502  // Failed to find the max
503  return -999;
504 }
505 
506 int RpcIdHelper::gasGapMin(const Identifier& id) const {
507  ExpandedIdentifier expId;
508  IdContext gasGap_context(expId, 0, m_GASGAP_INDEX);
509  if (!get_expanded_id(id, expId, &gasGap_context)) {
510  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
511  const Range& range = m_full_channel_range[i];
512  if (range.match(expId)) {
513  const Range::field& gas_field = range[m_GASGAP_INDEX];
514  if (gas_field.has_minimum()) { return (gas_field.get_minimum()); }
515  }
516  }
517  }
518  // Failed to find the min
519  return 999;
520 }
521 
522 int RpcIdHelper::gasGapMax(const Identifier& id) const {
523  ExpandedIdentifier expId;
524  IdContext gasGap_context(expId, 0, m_GASGAP_INDEX);
525  if (!get_expanded_id(id, expId, &gasGap_context)) {
526  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
527  const Range& range = m_full_channel_range[i];
528  if (range.match(expId)) {
529  const Range::field& gap_field = range[m_GASGAP_INDEX];
530  if (gap_field.has_maximum()) { return (gap_field.get_maximum()); }
531  }
532  }
533  }
534  // Failed to find the max
535  return -999;
536 }
537 
539  ExpandedIdentifier expId;
540  IdContext measuresPhi_context(expId, 0, m_MEASURESPHI_INDEX);
541  if (!get_expanded_id(id, expId, &measuresPhi_context)) {
542  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
543  const Range& range = m_full_channel_range[i];
544  if (range.match(expId)) {
545  const Range::field& mphi_field = range[m_MEASURESPHI_INDEX];
546  if (mphi_field.has_minimum()) { return (mphi_field.get_minimum()); }
547  }
548  }
549  }
550  // Failed to find the min
551  return 999;
552 }
553 
555  ExpandedIdentifier expId;
556  IdContext measuresPhi_context(expId, 0, m_MEASURESPHI_INDEX);
557  if (!get_expanded_id(id, expId, &measuresPhi_context)) {
558  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
559  const Range& range = m_full_channel_range[i];
560  if (range.match(expId)) {
561  const Range::field& mphi_field = range[m_MEASURESPHI_INDEX];
562  if (mphi_field.has_maximum()) { return (mphi_field.get_maximum()); }
563  }
564  }
565  }
566  // Failed to find the max
567  return -999;
568 }
569 
570 int RpcIdHelper::stripMin(const Identifier& id) const {
571  ExpandedIdentifier expId;
572  IdContext strip_context(expId, 0, m_CHANNEL_INDEX);
573  if (!get_expanded_id(id, expId, &strip_context)) {
574  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
575  const Range& range = m_full_channel_range[i];
576  if (range.match(expId)) {
577  const Range::field& strip_field = range[m_CHANNEL_INDEX];
578  if (strip_field.has_minimum()) { return (strip_field.get_minimum()); }
579  }
580  }
581  }
582  // Failed to find the min
583  return 999;
584 }
585 
586 int RpcIdHelper::stripMax(const Identifier& id) const {
587  ExpandedIdentifier expId;
588  IdContext strip_context(expId, 0, m_CHANNEL_INDEX);
589  if (!get_expanded_id(id, expId, &strip_context)) {
590  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
591  const Range& range = m_full_channel_range[i];
592  if (range.match(expId)) {
593  const Range::field& strip_field = range[m_CHANNEL_INDEX];
594  if (strip_field.has_maximum()) { return (strip_field.get_maximum()); }
595  }
596  }
597  }
598  // Failed to find the max
599  return -999;
600 }
601 
602 // Public validation of levels
603 
604 bool RpcIdHelper::valid(const Identifier& id) const {
605  if (!validElement(id)) return false;
606 
607  int dbz = doubletZ(id);
608  if ((dbz < doubletZMin(id)) || (dbz > doubletZMax(id))) {
609  ATH_MSG_DEBUG("Invalid doubletZ=" << dbz << " doubletZMin=" << doubletZMin(id) << " doubletZMax=" << doubletZMax(id));
610  return false;
611  }
612 
613  int dbp = doubletPhi(id);
614  if ((dbp < doubletPhiMin(id)) || (dbp > doubletPhiMax(id))) {
615  ATH_MSG_DEBUG("Invalid doubletPhi=" << dbp << " doubletPhiMin=" << doubletPhiMin(id) << " doubletPhiMax=" << doubletPhiMax(id));
616  return false;
617  }
618 
619  int gasG = gasGap(id);
620  if ((gasG < gasGapMin(id)) || (gasG > gasGapMax(id))) {
621  ATH_MSG_DEBUG("Invalid gasGap=" << gasG << " gasGapMin=" << gasGapMin(id) << " gasGapMax=" << gasGapMax(id));
622  return false;
623  }
624 
625  int mPhi = measuresPhi(id);
626  if ((mPhi < measuresPhiMin(id)) || (mPhi > measuresPhiMax(id))) {
627  ATH_MSG_DEBUG("Invalid measuresPhi=" << mPhi << " measuresPhiMin=" << measuresPhiMin(id)
628  << " measuresPhiMax=" << measuresPhiMax(id));
629  return false;
630  }
631 
632  int str = strip(id);
633  if ((str < stripMin(id)) || (str > stripMax(id))) {
634  ATH_MSG_DEBUG("Invalid strip=" << str << " stripMin=" << stripMin(id) << " stripMax=" << stripMax(id));
635  return false;
636  }
637  return true;
638 }
639 bool RpcIdHelper::isStNameInTech(const std::string& stationName) const { return stationName[0] == 'B'; }
640 bool RpcIdHelper::validElement(const Identifier& id) const {
641  int station = stationName(id);
642  if (!validStation(station)) {
643  ATH_MSG_DEBUG("Invalid stationName=" << stationNameString(station));
644  return false;
645  }
646 
647  int eta = stationEta(id);
648  if (eta < stationEtaMin(id) || eta > stationEtaMax(id)) {
649  ATH_MSG_DEBUG("Invalid stationEta=" << eta << " for stationName=" << stationNameString(station)
650  << " stationEtaMin=" << stationEtaMin(id) << " stationEtaMax=" << stationEtaMax(id));
651  return false;
652  }
653 
654  int phi = stationPhi(id);
655  if ((phi < stationPhiMin(id)) || (phi > stationPhiMax(id))) {
656  ATH_MSG_DEBUG("Invalid stationPhi=" << phi << " for stationName=" << stationNameString(station)
657  << " stationPhiMin=" << stationPhiMin(id) << " stationPhiMax=" << stationPhiMax(id));
658  return false;
659  }
660 
661  int dbr = doubletR(id);
662  if ((dbr < doubletRMin(id)) || (dbr > doubletRMax(id))) {
663  ATH_MSG_DEBUG("Invalid doubletR=" << dbr << " for stationName=" << stationNameString(station) << " doubletRMin=" << doubletRMin(id)
664  << " doubletRMax=" << doubletRMax(id));
665  return false;
666  }
667  return true;
668 }
669 
670 bool RpcIdHelper::validPad(const Identifier& id) const {
671  if (!validElement(id)) return false;
672 
673  int dbz = doubletZ(id);
674  if ((dbz < doubletZMin(id)) || (dbz > doubletZMax(id))) {
675  ATH_MSG_DEBUG("Invalid doubletZ=" << dbz << " doubletZMin=" << doubletZMin(id) << " doubletZMax=" << doubletZMax(id));
676  return false;
677  }
678 
679  int dbp = doubletPhi(id);
680  if ((dbp < doubletPhiMin(id)) || (dbp > doubletPhiMax(id))) {
681  ATH_MSG_DEBUG("Invalid doubletPhi=" << dbp << " doubletPhiMin=" << doubletPhiMin(id) << " doubletPhiMax=" << doubletPhiMax(id));
682  return false;
683  }
684  return true;
685 }
686 
687 // Private validation of levels
688 
690  if (!validStation(stationName)) {
691  ATH_MSG_VERBOSE("Invalid stationName=" << stationNameString(stationName));
692  return false;
693  }
694  if (stationEta < stationEtaMin(id) || stationEta > stationEtaMax(id)) {
695  ATH_MSG_VERBOSE("Invalid stationEta=" << stationEta << " for stationName=" << stationNameString(stationName)
696  << " stationEtaMin=" << stationEtaMin(id) << " stationEtaMax=" << stationEtaMax(id));
697  return false;
698  }
699  if ((stationPhi < stationPhiMin(id)) || (stationPhi > stationPhiMax(id))) {
700  ATH_MSG_VERBOSE("Invalid stationPhi=" << stationPhi << " for stationName=" << stationNameString(stationName)
701  << " stationPhiMin=" << stationPhiMin(id) << " stationPhiMax=" << stationPhiMax(id));
702  return false;
703  }
704  if ((doubletR < doubletRMin(id)) || (doubletR > doubletRMax(id))) {
705  ATH_MSG_VERBOSE("Invalid doubletR=" << doubletR << " for stationName=" << stationNameString(stationName)
706  << " doubletRMin=" << doubletRMin(id) << " doubletRMax=" << doubletRMax(id));
707  return false;
708  }
709  return true;
710 }
711 
712 // Check values down to detector element level
713 
714 bool RpcIdHelper::validChannel(const Identifier& id, int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ,
715  int doubletPhi, int gasGap, int measuresPhi, int strip) const {
716  if (!validElement(id, stationName, stationEta, stationPhi, doubletR)) return false;
717 
718  if ((doubletZ < doubletZMin(id)) || (doubletZ > doubletZMax(id))) {
719  ATH_MSG_VERBOSE("Invalid doubletZ=" << doubletZ << " doubletZMin=" << doubletZMin(id) << " doubletZMax=" << doubletZMax(id));
720  return false;
721  }
722  if ((doubletPhi < doubletPhiMin(id)) || (doubletPhi > doubletPhiMax(id))) {
723  ATH_MSG_VERBOSE("Invalid doubletPhi=" << doubletPhi << " doubletPhiMin=" << doubletPhiMin(id)
724  << " doubletPhiMax=" << doubletPhiMax(id));
725  return false;
726  }
727  if ((gasGap < gasGapMin(id)) || (gasGap > gasGapMax(id))) {
728  ATH_MSG_VERBOSE("Invalid gasGap=" << gasGap << " gasGapMin=" << gasGapMin(id) << " gasGapMax=" << gasGapMax(id));
729  return false;
730  }
731  if ((measuresPhi < measuresPhiMin(id)) || (measuresPhi > measuresPhiMax(id))) {
732  ATH_MSG_VERBOSE("Invalid measuresPhi=" << measuresPhi << " measuresPhiMin=" << measuresPhiMin(id)
733  << " measuresPhiMax=" << measuresPhiMax(id));
734  return false;
735  }
736  if ((strip < stripMin(id)) || (strip > stripMax(id))) {
737  ATH_MSG_VERBOSE("Invalid strip=" << strip << " stripMin=" << stripMin(id) << " stripMax=" << stripMax(id));
738  return false;
739  }
740  return true;
741 }
742 
743 // Check values down to the pad
744 
745 bool RpcIdHelper::validPad(const Identifier& id, int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ,
746  int doubletPhi) const {
747  if (!validElement(id, stationName, stationEta, stationPhi, doubletR)) return false;
748 
749  if ((doubletZ < doubletZMin(id)) || (doubletZ > doubletZMax(id))) {
750  ATH_MSG_DEBUG("Invalid doubletZ=" << doubletZ << " doubletZMin=" << doubletZMin(id) << " doubletZMax=" << doubletZMax(id));
751  return false;
752  }
753  if ((doubletPhi < doubletPhiMin(id)) || (doubletPhi > doubletPhiMax(id))) {
754  ATH_MSG_DEBUG("Invalid doubletPhi=" << doubletPhi << " doubletPhiMin=" << doubletPhiMin(id)
755  << " doubletPhiMax=" << doubletPhiMax(id));
756  return false;
757  }
758  return true;
759 }
760 
762  //
763  // create a vector(s) to retrieve the hashes for compact ids. For
764  // the moment, we implement a hash for detector channels
765  //
766  m_st_BMS = stationNameIndex("BMS");
767  m_st_BIL = stationNameIndex("BIL");
768 
769  // detector element hash
771  unsigned int nids = 0;
772  std::set<Identifier> ids;
773  for (unsigned int i = 0; i < m_full_detectorElement_range.size(); ++i) {
775  Range::const_identifier_factory first = range.factory_begin();
776  Range::const_identifier_factory last = range.factory_end();
777  for (; first != last; ++first) {
778  Identifier id;
779  get_id((*first), id);
780  Identifier doubletZ_id = doubletZID(id);
781  if (!isExtraDetElId(id)) {
782  if (!ids.insert(doubletZ_id).second)
783  ATH_MSG_DEBUG("init_detectorElement_hashes "
784  << "Please check the dictionary for possible duplication for " << id);
785  } else if (!ids.insert(id).second) {
786  ATH_MSG_ERROR("init_detectorElement_hashes "
787  << " Error: duplicated id for detector element id. nid " << (int)nids
788  << " doubletPhi ID " << id);
789  return 1;
790 
791  }
792  nids++;
793  }
794  }
796  ATH_MSG_INFO("The detector element hash max is " << (int)m_detectorElement_hash_max);
797 
798  m_detectorElement_vec.insert(m_detectorElement_vec.end(), ids.begin(), ids.end());
799  return 0;
800 }
801 
803  // pack fields independently
811  return result;
812 }
813 
815  try {
818  return result;
819  } catch (const std::out_of_range&) { isValid = false; }
820  return Identifier{0};
821 }
822 
823 Identifier RpcIdHelper::elementID(const std::string& stationNameStr, int stationEta, int stationPhi, int doubletR) const {
824  return elementID(stationNameIndex(stationNameStr), stationEta, stationPhi, doubletR);
825 }
826 Identifier RpcIdHelper::elementID(const std::string& stationNameStr, int stationEta, int stationPhi, int doubletR, bool& isValid) const {
827  return elementID(stationNameIndex(stationNameStr), stationEta, stationPhi, doubletR, isValid);
828 }
829 
831  Identifier result(id);
833  return result;
834 }
835 
837  try {
838  const Identifier result = elementID(id, doubletR);
840  return result;
841  } catch (const std::out_of_range&) { isValid = false; }
842  return Identifier{0};
843 }
844 Identifier RpcIdHelper::elementID(const Identifier& id) const { return parentID(id); }
845 
846 
848  int measuresPhi) const {
849  // pack fields independently
861  return result;
862 }
864  int measuresPhi, bool& isValid) const {
865  try {
867  isValid = valid(result);
868  return result;
869  } catch (const std::out_of_range&) { isValid = false; }
870  return Identifier{0};
871 }
872 
873 Identifier RpcIdHelper::panelID(const Identifier& channelID) const {
876  return result;
877 }
878 
879 Identifier RpcIdHelper::panelID(const Identifier& padID, int gasGap, int measuresPhi) const {
883  return result;
884 }
885 Identifier RpcIdHelper::panelID(const Identifier& padID, int gasGap, int measuresPhi, bool& isValid) const {
886  try {
888  isValid = valid(result);
889  return result;
890  } catch (const std::out_of_range&) { isValid = false; }
891  return Identifier{0};
892 }
893 
895  int gasGap) const {
896  // pack fields independently
907 
908  return result;
909 }
911  bool& isValid) const {
912  try {
914  isValid = valid(result);
915  return result;
916  } catch (const std::out_of_range&) { isValid = false; }
917  return Identifier{0};
918 }
919 
920 Identifier RpcIdHelper::gapID(const Identifier& panelID) const {
923  return result;
924 }
925 
926 Identifier RpcIdHelper::gapID(const Identifier& padID, int gasGap) const {
929  return result;
930 }
931 Identifier RpcIdHelper::gapID(const Identifier& padID, int gasGap, bool& isValid) const {
932  try {
933  const Identifier result = gapID(padID, gasGap);
934  isValid = valid(result);
935  return result;
936  } catch (const std::out_of_range&) { isValid = false; }
937  return Identifier{0};
938 }
939 
941  int measuresPhi, int strip) const {
942  // pack fields independently
955  return result;
956 }
958  int measuresPhi, int strip, bool& isValid) const {
959  try {
960  const Identifier result =
963  return result;
964  } catch (const std::out_of_range&) { isValid = false; }
965  return Identifier{0};
966 }
967 Identifier RpcIdHelper::channelID(const std::string& stationNameStr, int stationEta, int stationPhi, int doubletR, int doubletZ,
968  int doubletPhi, int gasGap, int measuresPhi, int strip) const {
970 }
971 Identifier RpcIdHelper::channelID(const std::string& stationNameStr, int stationEta, int stationPhi, int doubletR, int doubletZ,
972  int doubletPhi, int gasGap, int measuresPhi, int strip, bool& isValid) const {
974  isValid);
975 }
976 
977 Identifier RpcIdHelper::channelID(const Identifier& id, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const {
978  // pack fields independently
979  Identifier result(id);
985  return result;
986 }
987 Identifier RpcIdHelper::channelID(const Identifier& id, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip,
988  bool& isValid) const {
989  try {
991  isValid = valid(result);
992  return result;
993  } catch (const std::out_of_range&) { isValid = false; }
994  return Identifier{0};
995 }
996 
997 // get the parent id from the strip identifier
999  assert(is_rpc(id));
1000  Identifier result(id);
1006  return result;
1007 }
1008 
1009 // doubletZ Identifier
1011  assert(is_rpc(id));
1012  Identifier result(id);
1017  return result;
1018 }
1019 
1020 Identifier RpcIdHelper::padID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi) const {
1021  // pack fields independently
1031  return result;
1032 }
1034  bool& isValid) const {
1035  try {
1038  return result;
1039  } catch (const std::out_of_range&) { isValid = false; }
1040  return Identifier{0};
1041 }
1042 
1043 Identifier RpcIdHelper::padID(const Identifier& id, int doubletZ, int doubletPhi) const {
1044  // pack fields independently
1045  Identifier result(id);
1048  return result;
1049 }
1050 Identifier RpcIdHelper::padID(const Identifier& id, int doubletZ, int doubletPhi, bool& isValid) const {
1051  try {
1052  const Identifier result = padID(id, doubletZ, doubletPhi);
1053  isValid = validPad(result);
1054  return result;
1055  } catch (const std::out_of_range&) { isValid = false; }
1056  return Identifier{0};
1057 }
1058 // Access to components of the ID
1059 
1060 int RpcIdHelper::doubletR(const Identifier& id) const { return m_dbr_impl.unpack(id); }
1061 
1062 int RpcIdHelper::doubletZ(const Identifier& id) const { return m_dbz_impl.unpack(id); }
1063 
1064 int RpcIdHelper::doubletPhi(const Identifier& id) const { return m_dbp_impl.unpack(id); }
1065 
1066 int RpcIdHelper::gasGap(const Identifier& id) const { return m_gap_impl.unpack(id); }
1067 
1068 bool RpcIdHelper::measuresPhi(const Identifier& id) const { return m_mea_impl.unpack(id); }
1069 
1070 int RpcIdHelper::strip(const Identifier& id) const { return m_str_impl.unpack(id); }
1071 
1072 int RpcIdHelper::channel(const Identifier& id) const { return strip(id); }
1073 
1074 // Access to min and max of level ranges
1075 
1077 
1079 
1081 
1083 
1085 
1087 
1089 
1091 
1093 
1095 
1097 
1098 int RpcIdHelper::gasGapMax() const { return m_gasGapMax; }
1099 
1101 
1103 
1105 
1107 
1109 
1111  int rpcField = technologyIndex("RPC");
1112  if (m_dict) { rpcField = rpc_field_value(); }
1113  return rpcField;
1114 }
1115 
1116 inline
1118  const int station = stationName(id);
1146  if (station == m_st_BMS) {
1147  const int eta = stationEta(id);
1148  const int dZ = doubletZ(id);
1149  if (std::abs(eta) != 4 && dZ != 3) {
1150  return false;
1151  }
1152  const int dP = doubletPhi(id);
1153  const int dR = doubletR(id);
1154  return (dZ == 3 && dP == 2) ||
1155  (std::abs(eta) == 4 && dZ !=1 && dR != 2 && dP == 2);
1156  } else if (m_st_BIL == station) {
1157  return std::abs(stationEta(id)) == 2 && doubletPhi(id) == 2;
1158  }
1159 
1160  return false;
1161 }
RpcIdHelper::m_mea_impl
IdDictFieldImplementation m_mea_impl
Definition: RpcIdHelper.h:198
Identifier::value_type
IDENTIFIER_TYPE value_type
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:39
MuonIdHelper::validStation
bool validStation(int stationName, int technology) const
Definition: MuonIdHelper.cxx:771
MuonIdHelper::stationNameIndex
int stationNameIndex(const std::string &name) const
Definition: MuonIdHelper.cxx:846
RpcIdHelper::m_gasGapMax
unsigned int m_gasGapMax
Definition: RpcIdHelper.h:236
MuonIdHelper::detectorElement_context
IdContext detectorElement_context() const
id for detector element
Definition: MuonIdHelper.cxx:740
RpcIdHelper::parentID
Identifier parentID(const Identifier &id) const
Definition: RpcIdHelper.cxx:998
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:129
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictMgr.cxx:1048
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
MuonIdHelper::initLevelsFromDict
int initLevelsFromDict()
Definition: MuonIdHelper.cxx:240
AtlasDetectorID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: AtlasDetectorID.cxx:320
MuonIdHelper::m_init
bool m_init
Definition: MuonIdHelper.h:342
get_generator_info.result
result
Definition: get_generator_info.py:21
IdDictGroup
Definition: IdDictDefs.h:355
max
#define max(a, b)
Definition: cfImp.cxx:41
MuonIdHelper::is_rpc
bool is_rpc(const Identifier &id) const
Definition: MuonIdHelper.cxx:792
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
MuonIdHelper::get_id
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)
Definition: MuonIdHelper.cxx:69
MuonIdHelper::technologyIndex
int technologyIndex(const std::string &name) const
Definition: MuonIdHelper.cxx:852
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
IdDictFieldImplementation::show_to_string
std::string show_to_string(void) const
Definition: IdDictFieldImplementation.cxx:57
AtlasDetectorID::muon_field_value
int muon_field_value() const
Definition: AtlasDetectorID.h:620
RpcIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi, int doubletR) const
Definition: RpcIdHelper.cxx:802
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
RpcIdHelper::doubletRMin
static int doubletRMin()
Definition: RpcIdHelper.cxx:1084
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
RpcIdHelper::validChannel
bool validChannel(const Identifier &id, int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
Definition: RpcIdHelper.cxx:714
RpcIdHelper::doubletZ
int doubletZ(const Identifier &id) const
Definition: RpcIdHelper.cxx:1062
MuonIdHelper::detectorElement_hash_max
size_type detectorElement_hash_max() const
Definition: MuonIdHelper.h:186
MultiRange::add
void add(const Range &range)
Definition: DetectorDescription/Identifier/src/Range.cxx:2410
RpcIdHelper::stripMax
static int stripMax()
Definition: RpcIdHelper.cxx:1106
RpcIdHelper::m_dbr_impl
IdDictFieldImplementation m_dbr_impl
Definition: RpcIdHelper.h:194
MuonIdHelper::m_detectorElement_hash_max
size_type m_detectorElement_hash_max
Definition: MuonIdHelper.h:280
MuonIdHelper::m_sta_impl
IdDictFieldImplementation m_sta_impl
Definition: MuonIdHelper.h:289
RpcIdHelper::DoubletZMin
@ DoubletZMin
Definition: RpcIdHelper.h:225
RpcIdHelper::stationPhiMin
static int stationPhiMin()
Definition: RpcIdHelper.cxx:1080
ExpandedIdentifier::add
void add(element_type value)
AtlasDetectorID::rpc_field_value
int rpc_field_value() const
Definition: AtlasDetectorID.h:659
RpcIdHelper::measuresPhi
bool measuresPhi(const Identifier &id) const override
Definition: RpcIdHelper.cxx:1068
createCablingJSON.doubletR
int doubletR
Definition: createCablingJSON.py:10
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:108
IdDictFieldImplementation::pack
void pack(int value, Identifier &id) const
Definition: IdDictFieldImplementation.h:174
RpcIdHelper::isExtraDetElId
bool isExtraDetElId(const Identifier &id) const
Definition: RpcIdHelper.cxx:1117
RpcIdHelper::doubletPhiMax
static int doubletPhiMax()
Definition: RpcIdHelper.cxx:1094
RpcIdHelper::m_dbp_impl
IdDictFieldImplementation m_dbp_impl
Definition: RpcIdHelper.h:196
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
RpcIdHelper::padID
Identifier padID(const Identifier &elementID, int doubletZ, int doubletPhi) const
Definition: RpcIdHelper.cxx:1043
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:804
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
RpcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
Definition: RpcIdHelper.cxx:940
MuonIdHelper::m_phi_impl
IdDictFieldImplementation m_phi_impl
Definition: MuonIdHelper.h:291
RpcIdHelper::m_gap_impl
IdDictFieldImplementation m_gap_impl
Definition: RpcIdHelper.h:197
IdDictFieldImplementation::unpack
int unpack(Identifier id) const
Identifier manipulation methods.
Definition: IdDictFieldImplementation.h:148
MuonIdHelper::m_full_channel_range
MultiRange m_full_channel_range
Definition: MuonIdHelper.h:274
RpcIdHelper::GasGapMin
@ GasGapMin
Definition: RpcIdHelper.h:229
RpcIdHelper::StationEtaMax
@ StationEtaMax
Definition: RpcIdHelper.h:220
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictMgr.cxx:309
CalibDbCompareRT.region_id
region_id
Definition: CalibDbCompareRT.py:68
IdDictRegion
Definition: IdDictDefs.h:448
RpcIdHelper.h
RpcIdHelper::DoubletRMin
@ DoubletRMin
Definition: RpcIdHelper.h:223
RpcIdHelper::doubletPhiMin
static int doubletPhiMin()
Definition: RpcIdHelper.cxx:1092
RpcIdHelper::DoubletRMax
@ DoubletRMax
Definition: RpcIdHelper.h:224
RpcIdHelper::RpcIdHelper
RpcIdHelper()
Definition: RpcIdHelper.cxx:7
RpcIdHelper::gasGapMin
static int gasGapMin()
Definition: RpcIdHelper.cxx:1096
RpcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: RpcIdHelper.cxx:1066
IdDictFieldImplementation::reset
void reset(Identifier &id) const
Definition: IdDictFieldImplementation.h:184
RpcIdHelper::stationPhiMax
static int stationPhiMax()
Definition: RpcIdHelper.cxx:1082
RpcIdHelper::get_detectorElement_hash
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const override
Definition: RpcIdHelper.cxx:298
IdDictMgr
Definition: IdDictDefs.h:32
IdDictDictionary::find_group
IdDictGroup * find_group(const std::string &group_name) const
Definition: IdDictMgr.cxx:383
IdDictMgr::find_dictionary
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:161
RpcIdHelper::m_DOUBLETR_INDEX
size_type m_DOUBLETR_INDEX
Definition: RpcIdHelper.h:188
MuonIdHelper
Definition: MuonIdHelper.h:80
RpcIdHelper::doubletZMax
static int doubletZMax()
Definition: RpcIdHelper.cxx:1090
Range::field::has_minimum
bool has_minimum() const
Definition: DetectorDescription/Identifier/src/Range.cxx:390
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
RpcIdHelper::m_MEASURESPHI_INDEX
size_type m_MEASURESPHI_INDEX
Definition: RpcIdHelper.h:192
RpcIdHelper::doubletR
int doubletR(const Identifier &id) const
Definition: RpcIdHelper.cxx:1060
lumiFormat.i
int i
Definition: lumiFormat.py:92
RpcIdHelper::DoubletPhiMax
@ DoubletPhiMax
Definition: RpcIdHelper.h:228
MuonIdHelper::m_module_vec
id_vec m_module_vec
Definition: MuonIdHelper.h:271
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
RpcIdHelper::m_detectorElement_hashes
std::unordered_map< Identifier, unsigned int > m_detectorElement_hashes
Definition: RpcIdHelper.h:185
RpcIdHelper::m_module_hashes
std::unordered_map< Identifier, unsigned int > m_module_hashes
Definition: RpcIdHelper.h:184
RpcIdHelper::measuresPhiMin
static int measuresPhiMin()
Definition: RpcIdHelper.cxx:1100
IdDictDictionary::m_regions
std::vector< IdDictRegion * > m_regions
Definition: IdDictDefs.h:302
RpcIdHelper::panelID
Identifier panelID(const Identifier &padID, int gasGap, int measuresPhi) const
Definition: RpcIdHelper.cxx:879
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
RpcIdHelper::StationEtaMin
@ StationEtaMin
Definition: RpcIdHelper.h:219
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MuonIdHelper::m_full_detectorElement_range
MultiRange m_full_detectorElement_range
Definition: MuonIdHelper.h:279
RpcIdHelper::StripMax
@ StripMax
Definition: RpcIdHelper.h:234
RpcIdHelper::strip
int strip(const Identifier &id) const
Definition: RpcIdHelper.cxx:1070
RpcIdHelper::doubletZMin
static int doubletZMin()
Definition: RpcIdHelper.cxx:1088
RpcIdHelper::doubletRMax
static int doubletRMax()
Definition: RpcIdHelper.cxx:1086
MuonIdHelper::m_full_module_range
MultiRange m_full_module_range
Definition: MuonIdHelper.h:269
RpcIdHelper::StripMin
@ StripMin
Definition: RpcIdHelper.h:233
RpcIdHelper::m_dbz_impl
IdDictFieldImplementation m_dbz_impl
Definition: RpcIdHelper.h:195
MuonIdHelper::get_expanded_id
int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
Create expanded id from compact id (return == 0 for OK)
Definition: MuonIdHelper.cxx:159
Range::const_identifier_factory
Definition: DetectorDescription/Identifier/Identifier/Range.h:191
RpcIdHelper::measuresPhiMax
static int measuresPhiMax()
Definition: RpcIdHelper.cxx:1102
RpcIdHelper::DoubletPhiMin
@ DoubletPhiMin
Definition: RpcIdHelper.h:227
IdDictGroup::regions
const std::vector< IdDictRegion * > & regions()
Definition: IdDictMgr.cxx:2272
MuonIdHelper::m_eta_impl
IdDictFieldImplementation m_eta_impl
Definition: MuonIdHelper.h:290
Range::field::get_minimum
element_type get_minimum() const
Definition: DetectorDescription/Identifier/Identifier/Range.h:524
MuonIdHelper::init_hashes
int init_hashes()
Definition: MuonIdHelper.cxx:347
RpcIdHelper::StationPhiMin
@ StationPhiMin
Definition: RpcIdHelper.h:221
RpcIdHelper::idChannels
void idChannels(const Identifier &id, std::vector< Identifier > &vect) const
Definition: RpcIdHelper.cxx:317
RpcIdHelper::m_DOUBLETPHI_INDEX
size_type m_DOUBLETPHI_INDEX
Definition: RpcIdHelper.h:190
MuonIdHelper::m_muon_impl
IdDictFieldImplementation m_muon_impl
Definition: MuonIdHelper.h:288
MuonIdHelper::m_GROUP_INDEX
size_t m_GROUP_INDEX
Definition: MuonIdHelper.h:258
AtlasDetectorID::register_dict_tag
int register_dict_tag(const IdDictMgr &dict_mgr, const std::string &dict_name)
Register the file and tag names for a particular IdDict dictionary.
Definition: AtlasDetectorID.cxx:266
Range::field::has_maximum
bool has_maximum() const
Definition: DetectorDescription/Identifier/src/Range.cxx:398
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:814
RpcIdHelper::channel
int channel(const Identifier &id) const override
Definition: RpcIdHelper.cxx:1072
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictMgr.cxx:338
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:858
RpcIdHelper::stripMin
static int stripMin()
Definition: RpcIdHelper.cxx:1104
AtlasDetectorID::print_to_string
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:655
MuonIdHelper::init_neighbors
int init_neighbors()
Definition: MuonIdHelper.cxx:522
MuonIdHelper::m_MODULE_INDEX
size_type m_MODULE_INDEX
Definition: MuonIdHelper.h:263
MultiRange
A MultiRange combines several Ranges.
Definition: DetectorDescription/Identifier/Identifier/Range.h:351
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
RpcIdHelper::m_GASGAP_INDEX
size_type m_GASGAP_INDEX
Definition: RpcIdHelper.h:191
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
RpcIdHelper::gasGapMax
int gasGapMax() const
Definition: RpcIdHelper.cxx:1098
MuonIdHelper::m_detectorElement_vec
id_vec m_detectorElement_vec
Definition: MuonIdHelper.h:281
RpcIdHelper::gapID
Identifier gapID(const Identifier &padID, int gasGap) const
Definition: RpcIdHelper.cxx:926
RpcIdHelper::valid
bool valid(const Identifier &id) const
Definition: RpcIdHelper.cxx:604
RpcIdHelper::stationEtaMax
static int stationEtaMax()
Definition: RpcIdHelper.cxx:1078
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:809
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:27
RpcIdHelper::init_detectorElement_hashes
virtual int init_detectorElement_hashes() override
Definition: RpcIdHelper.cxx:761
MuonIdHelper::module_hash_max
size_type module_hash_max() const
the maximum hash value
Definition: MuonIdHelper.cxx:752
IdDictDictionary
Definition: IdDictDefs.h:97
MuonIdHelper::m_ETA_INDEX
size_type m_ETA_INDEX
Definition: MuonIdHelper.h:260
Range::field::get_maximum
element_type get_maximum() const
Definition: DetectorDescription/Identifier/Identifier/Range.h:531
AtlasDetectorID::reinitialize
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
Definition: AtlasDetectorID.cxx:284
RpcIdHelper::StationPhiMax
@ StationPhiMax
Definition: RpcIdHelper.h:222
MuonIdHelper::m_TECHNOLOGY_INDEX
size_type m_TECHNOLOGY_INDEX
Definition: MuonIdHelper.h:262
IdDictDictionary::m_name
std::string m_name
Definition: IdDictDefs.h:283
RpcIdHelper::validElement
bool validElement(const Identifier &id) const
Definition: RpcIdHelper.cxx:640
MultiRange::size
size_type size() const
Definition: DetectorDescription/Identifier/src/Range.cxx:2488
DeMoScan.first
bool first
Definition: DeMoScan.py:534
RpcIdHelper::init_id_to_hashes
int init_id_to_hashes()
Definition: RpcIdHelper.cxx:273
MuonIdHelper::resetAndSet
void resetAndSet(const IdDictFieldImplementation &dict, const int new_val, Identifier &id) const
Definition: MuonIdHelper.h:309
RpcIdHelper::MeasuresPhiMin
@ MeasuresPhiMin
Definition: RpcIdHelper.h:231
RpcIdHelper::MeasuresPhiMax
@ MeasuresPhiMax
Definition: RpcIdHelper.h:232
MuonIdHelper::m_DETECTORELEMENT_INDEX
size_type m_DETECTORELEMENT_INDEX
Definition: MuonIdHelper.h:264
RpcIdHelper::doubletZID
Identifier doubletZID(const Identifier &id) const
Definition: RpcIdHelper.cxx:1010
WriteBchToCool.dbr
dbr
Definition: WriteBchToCool.py:164
MuonIdHelper::m_tec_impl
IdDictFieldImplementation m_tec_impl
Definition: MuonIdHelper.h:292
createCablingJSON.doubletPhi
int doubletPhi
Definition: createCablingJSON.py:11
RpcIdHelper::m_st_BMS
int m_st_BMS
Definition: RpcIdHelper.h:237
str
Definition: BTagTrackIpAccessor.cxx:11
merge.status
status
Definition: merge.py:17
ExpandedIdentifier::element_type
int element_type
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:116
Range::field
This is the individual specification for the range of one ExpandedIdentifier field.
Definition: DetectorDescription/Identifier/Identifier/Range.h:37
IdDictField
Definition: IdDictDefs.h:318
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:127
IdentifierHash
Definition: IdentifierHash.h:38
LArCellBinning.etamin
etamin
Definition: LArCellBinning.py:137
RpcIdHelper::m_str_impl
IdDictFieldImplementation m_str_impl
Definition: RpcIdHelper.h:199
RpcIdHelper::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: RpcIdHelper.cxx:10
IdContext
class IdContext
Definition: IdContext.h:34
RpcIdHelper::stationEtaMin
static int stationEtaMin()
Definition: RpcIdHelper.cxx:1076
IdDictRegion::m_implementation
std::vector< IdDictFieldImplementation > m_implementation
Definition: IdDictDefs.h:474
MuonIdHelper::m_PHI_INDEX
size_type m_PHI_INDEX
Definition: MuonIdHelper.h:261
RpcIdHelper::m_DOUBLETZ_INDEX
size_type m_DOUBLETZ_INDEX
Definition: RpcIdHelper.h:189
RpcIdHelper::validPad
bool validPad(const Identifier &id) const
Definition: RpcIdHelper.cxx:670
RpcIdHelper::rpcTechnology
int rpcTechnology() const
Utility methods.
Definition: RpcIdHelper.cxx:1110
RpcIdHelper::DoubletZMax
@ DoubletZMax
Definition: RpcIdHelper.h:226
RpcIdHelper::doubletPhi
int doubletPhi(const Identifier &id) const
Definition: RpcIdHelper.cxx:1064
RpcIdHelper::get_module_hash
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override
Definition: RpcIdHelper.cxx:288
RpcIdHelper::m_st_BIL
int m_st_BIL
Definition: RpcIdHelper.h:238
RpcIdHelper::isStNameInTech
bool isStNameInTech(const std::string &stationName) const override
The valid element checks converted the identifier to a stationName string in order to assess whether ...
Definition: RpcIdHelper.cxx:639
MuonIdHelper::m_CHANNEL_INDEX
size_type m_CHANNEL_INDEX
Definition: MuonIdHelper.h:265
MuonIdHelper::m_dict
const IdDictDictionary * m_dict
Definition: MuonIdHelper.h:266