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