ATLAS Offline Software
MmIdHelper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
9 
10 /*******************************************************************************/
11 // Constructor/Destructor
13  m_module_hashes.fill(-1);
14  m_detectorElement_hashes.fill(-1);
15 }
16 /*******************************************************************************/
17 // Initialize dictionary
19  int status = 0;
20 
21  // Check whether this helper should be reinitialized
22  if (!reinitialize(dict_mgr)) {
23  ATH_MSG_INFO("Request to reinitialize not satisfied - tags have not changed");
24  return (0);
25  } else {
26  ATH_MSG_DEBUG("(Re)initialize ");
27  }
28 
29  // init base object
31  if (AtlasDetectorID::initialize_from_dictionary(dict_mgr)) return 1;
32 
33  // Register version of the MuonSpectrometer dictionary
34  if (register_dict_tag(dict_mgr, "MuonSpectrometer")) return 1;
35 
36  m_dict = dict_mgr.find_dictionary("MuonSpectrometer");
37  if (!m_dict) {
38  ATH_MSG_ERROR(" initialize_from_dict - cannot access MuonSpectrometer dictionary ");
39  return 1;
40  }
41 
42  // Initialize some of the field indices
43  if (initLevelsFromDict()) return 1;
44 
45  int index = technologyIndex("MM");
46  if (index == -1) {
47  ATH_MSG_DEBUG("initLevelsFromDict - there are no MM entries in the dictionary! ");
48  return 0;
49  }
50 
51  IdDictField* field = m_dict->find_field("mmMultilayer");
52  if (field) {
53  m_DETECTORELEMENT_INDEX = field->m_index;
54  } else {
55  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'mmMultilayer' field ");
56  status = 1;
57  }
58 
59  field = m_dict->find_field("mmGasGap");
60  if (field) {
61  m_GASGAP_INDEX = field->m_index;
62  } else {
63  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'mmGasGap' field ");
64  status = 1;
65  }
66 
67  field = m_dict->find_field("mmChannel");
68  if (field) {
69  m_CHANNEL_INDEX = field->m_index;
70  } else {
71  ATH_MSG_ERROR("initLevelsFromDict - unable to find mmChannel' field ");
72  status = 1;
73  }
74 
75  // reinitialize the module ndex
77 
78  // save an index to the first region of MM
79  IdDictGroup* mmGroup = m_dict->find_group("mm");
80  if (!mmGroup) {
81  ATH_MSG_ERROR("Cannot find mm group");
82  } else {
83  m_GROUP_INDEX = mmGroup->regions()[0]->m_index;
84  }
85 
86  const IdDictRegion& region = *m_dict->m_regions[m_GROUP_INDEX];
93 
94  ATH_MSG_DEBUG(" MicroMegas decode index and bit fields for each level: " << std::endl
95  << " muon " << m_muon_impl.show_to_string() << std::endl
96  << " station " << m_sta_impl.show_to_string() << std::endl
97  << " eta " << m_eta_impl.show_to_string() << std::endl
98  << " phi " << m_phi_impl.show_to_string() << std::endl
99  << " technology " << m_tec_impl.show_to_string() << std::endl
100  << " multilayer " << m_mplet_impl.show_to_string()
101  << std::endl
102  << " gasgap " << m_gap_impl.show_to_string() << std::endl
103  << " channel " << m_cha_impl.show_to_string());
104 
105  //
106  // Build multirange for the valid set of identifiers
107  //
108 
109  // Find value for the field MuonSpectrometer
110  int muonField = -1;
111  const IdDictDictionary* atlasDict = dict_mgr.find_dictionary("ATLAS");
112  if (atlasDict->get_label_value("subdet", "MuonSpectrometer", muonField)) {
113  ATH_MSG_ERROR("Could not get value for label 'MuonSpectrometer' of field 'subdet' in dictionary " << atlasDict->m_name);
114  return 1;
115  }
116 
117  // Build MultiRange down to "technology" for all (muon) regions
119  region_id.add(muonField);
120  Range prefix;
121  MultiRange muon_range = m_dict->build_multirange(region_id, prefix, "technology");
122  if (muon_range.size() > 0) {
123  ATH_MSG_INFO("MultiRange built successfully to Technology: "
124  << "MultiRange size is " << muon_range.size());
125  } else {
126  ATH_MSG_ERROR("Muon MultiRange is empty");
127  }
128 
129  // Build MultiRange down to "detector element" for all mdt regions
130  ExpandedIdentifier detectorElement_region;
131  detectorElement_region.add(muonField);
132  Range detectorElement_prefix;
133  MultiRange muon_detectorElement_range = m_dict->build_multirange(detectorElement_region, detectorElement_prefix, "mmMultilayer");
134  if (muon_detectorElement_range.size() > 0) {
135  ATH_MSG_INFO("MultiRange built successfully to detector element: "
136  << "Multilayer MultiRange size is " << muon_detectorElement_range.size());
137  } else {
138  ATH_MSG_ERROR("Muon MicroMegas detector element MultiRange is empty");
139  }
140 
141  // Build MultiRange down to "channel" for all MM regions
142  ExpandedIdentifier mm_region;
143  mm_region.add(muonField);
144  Range mm_prefix;
145  MultiRange muon_channel_range = m_dict->build_multirange(mm_region, mm_prefix, "mmChannel");
146  if (muon_channel_range.size() > 0) {
147  ATH_MSG_INFO("MultiRange built successfully to channel: "
148  << "MultiRange size is " << muon_channel_range.size());
149  } else {
150  ATH_MSG_ERROR("Muon MultiRange is empty for channels");
151  }
152 
153  // build MicroMegas module ranges
154  // Find the regions that have a "technology field" that matches the MM and save them
155  int mmField = -1;
156  status = m_dict->get_label_value("technology", "MM", mmField);
157 
158  for (int i = 0; i < (int)muon_range.size(); ++i) {
159  const Range& range = muon_range[i];
160  if (range.fields() > m_TECHNOLOGY_INDEX) {
162  if (field.match((ExpandedIdentifier::element_type)mmField)) {
164  ATH_MSG_DEBUG("field size is " << (int)range.cardinality() << " field index = " << i);
165  }
166  }
167  }
168 
169  for (int j = 0; j < (int)muon_detectorElement_range.size(); ++j) {
170  const Range& range = muon_detectorElement_range[j];
171  if (range.fields() > m_TECHNOLOGY_INDEX) {
173  if (field.match((ExpandedIdentifier::element_type)mmField)) {
175  ATH_MSG_DEBUG("detector element field size is " << (int)range.cardinality() << " field index = " << j);
176  }
177  }
178  }
179 
180  for (int j = 0; j < (int)muon_channel_range.size(); ++j) {
181  const Range& range = muon_channel_range[j];
182  if (range.fields() > m_TECHNOLOGY_INDEX) {
184  if (field.match((ExpandedIdentifier::element_type)mmField)) {
186  ATH_MSG_DEBUG("channel field size is " << (int)range.cardinality() << " field index = " << j);
187  }
188  }
189  }
190 
191  // test to see that the multi range is not empty
192  if (m_full_module_range.size() == 0) {
193  ATH_MSG_ERROR("MicroMegas MultiRange ID is empty for modules");
194  status = 1;
195  }
196 
197  // test to see that the detector element multi range is not empty
198  if (m_full_detectorElement_range.size() == 0) {
199  ATH_MSG_ERROR("MicroMegas MultiRange ID is empty for detector elements");
200  status = 1;
201  }
202 
203  // test to see that the multi range is not empty
204  if (m_full_channel_range.size() == 0) {
205  ATH_MSG_ERROR("MicroMegas MultiRange ID is empty for channels");
206  status = 1;
207  }
208 
209  // Setup the hash tables for MicroMegas
210  ATH_MSG_INFO("Initializing MicroMegas hash indices ... ");
211  status = init_hashes();
212  status = init_detectorElement_hashes(); // same as module hash
214 
215  // Setup hash tables for finding neighbors
216  ATH_MSG_INFO("Initializing MicroMegas hash indices for finding neighbors ... ");
218 
219  m_init = true;
220  return (status);
221 } // end MmIdHelper::initialize_from_dictionary
222 /*******************************************************************************/
223 
224 inline unsigned int MmIdHelper::moduleHashIdx(const Identifier& id) const{
227  constexpr unsigned int C = s_phiDim;
228  constexpr unsigned int BxC = C*s_etaDim;
229  const int stEta = stationEta(id);
230  return (stationName(id) - m_stationShift)*BxC + (stEta + s_etaDim/2 - (stEta>0))*C + (stationPhi(id) -1);
231 }
232 inline unsigned int MmIdHelper::detEleHashIdx(const Identifier& id) const{
233  return moduleHashIdx(id) *s_mlDim + (multilayer(id) -1);
234 }
235 
238  unsigned int hash_max = module_hash_max();
239  for (unsigned int i = 0; i < hash_max; ++i) {
240  const Identifier& id = m_module_vec[i];
241  const unsigned idx = moduleHashIdx(id);
242  if (idx >= m_module_hashes.size() || m_module_hashes[idx] < hash_max){
243  ATH_MSG_FATAL("Failed to assign module hash to "<<show_to_string(id));
244  return 1;
245  }
246  m_module_hashes[idx] = i;
247  }
248 
249  hash_max = detectorElement_hash_max();
250  for (unsigned int i = 0; i < hash_max; ++i) {
251  const Identifier& id = m_detectorElement_vec[i];
252  const unsigned idx = detEleHashIdx(id);
253  if (idx >= m_detectorElement_hashes.size() || m_detectorElement_hashes[idx] < hash_max){
254  ATH_MSG_FATAL("Failed to assign detector hash to "<<show_to_string(id));
255  return 1;
256  }
258  }
259  return 0;
260 } // end MmIdHelper::init_id_to_hashes()
261 /*******************************************************************************/
262 int MmIdHelper::get_module_hash(const Identifier& id, IdentifierHash& hash_id) const {
263  const unsigned int idx = moduleHashIdx(id);
264  if (idx >= m_module_hashes.size()) return 1;
265  hash_id = m_module_hashes[idx];
266  return 0;
267 } // end MmIdHelper::get_module_hash
268 /*******************************************************************************/
270  const unsigned int idx = detEleHashIdx(id);
271  if (idx >= m_detectorElement_hashes.size()) return 1;
272  hash_id = m_detectorElement_hashes[idx];
273  return 0;
274  // return get_module_hash(id, hash_id);
275 }
276 /*******************************************************************************/
278  assert(is_mm(channelID));
280  // m_mplet_impl.reset(result);
283  return result;
284 }
285 /*******************************************************************************/
286 Identifier MmIdHelper::multilayerID(const Identifier& moduleID, int multilayer) const {
287  Identifier result(moduleID);
289  return result;
290 }
291 Identifier MmIdHelper::multilayerID(const Identifier& moduleID, int multilayer, bool& isValid) const {
292  try {
293  const Identifier result = multilayerID(moduleID, multilayer);
295  return result;
296  } catch (const std::out_of_range&) { isValid = false; }
297  return Identifier{0};
298 }
299 /*******************************************************************************/
301  int pcbNb = std::abs(stationEta)==1 ? pcb : pcb-5;
302  return (pcbNb-1)*1024+1;
303 }
304 Identifier MmIdHelper::pcbID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb) const {
305  int chnl = getFirstPcbChnl(stationEta, pcb);
307 }
308 Identifier MmIdHelper::pcbID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb, bool& isValid) const {
309  int chnl = getFirstPcbChnl(stationEta, pcb);
311 }
312 Identifier MmIdHelper::pcbID(const std::string& stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb) const {
313  int chnl = getFirstPcbChnl(stationEta, pcb);
315 }
316 Identifier MmIdHelper::pcbID(const std::string& stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb, bool& isValid) const {
317  int chnl = getFirstPcbChnl(stationEta, pcb);
319 }
321  int chnl = getFirstPcbChnl(stationEta(channelId), pcb);
323 }
324 Identifier MmIdHelper::pcbID(const Identifier& channelId, int pcb, bool& isValid) const {
325  int chnl = getFirstPcbChnl(stationEta(channelId), pcb);
327 }
329  int chnl = channel(channelId);
330  // PCB counts from 1-8. PCBs 1-5 are in abs(stationEta)==1 and PCBs 6-8 in abs(stationEta)==2
331  // each PCB consists of 1024 readout strips (strip number in athena is counting from 1 therefore chnl -1)
332  int pcb = (chnl-1)/1024+1 + (std::abs(stationEta(channelId))==2 ? 5:0); // int division should round downwards
333  return pcbID(channelId, pcb);
334 }
335 /*******************************************************************************/
337  int radiusNb = std::abs(stationEta)==1 ? radius : radius-10;
338  return radiusNb*512+1;
339 }
340 Identifier MmIdHelper::febID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius) const {
341  int chnl = getFirstRadiusChnl(stationEta, radius);
343 }
344 Identifier MmIdHelper::febID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius, bool& isValid) const {
345  int chnl = getFirstRadiusChnl(stationEta, radius);
347 }
348 Identifier MmIdHelper::febID(const std::string& stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius) const {
349  int chnl = getFirstRadiusChnl(stationEta, radius);
351 }
352 Identifier MmIdHelper::febID(const std::string& stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius, bool& isValid) const {
353  int chnl = getFirstRadiusChnl(stationEta, radius);
355 }
359 }
363 }
365  int chnl = channel(channelId);
366  // radius counts from 0-15. Radii 0-9 are in abs(stationEta)==1 and radii 10-15 in abs(stationEta)==2
367  // each radius consists of 512 readout strips (strip number in athena is counting from 1 therefore chnl -1)
368  int radius = (chnl-1)/512 + (std::abs(stationEta(channelId))==2 ? 10:0); // int division should round downwards
369  return febID(channelId, radius);
370 }
371 /*******************************************************************************/
372 void MmIdHelper::idChannels(const Identifier& id, std::vector<Identifier>& vect) const {
373  vect.clear();
374  Identifier parent = parentID(id);
375  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
376  const Range& range = m_full_channel_range[i];
378  for (const auto & expId : rit) {
379  Identifier child;
380  get_id(expId, child);
381  if (parentID(child) == parent) vect.push_back(child);
382  }
383  }
384 }
385 /*******************************************************************************/
386 int MmIdHelper::stationEtaMin(const Identifier& id) const {
387  ExpandedIdentifier expId;
388  IdContext eta_context(expId, 0, m_ETA_INDEX);
389  if (!get_expanded_id(id, expId, &eta_context)) {
390  int result = -999;
391  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
392  const Range& range = m_full_module_range[i];
393  if (range.match(expId)) {
394  const Range::field& eta_field = range[m_ETA_INDEX];
395  if (not eta_field.empty()) {
396  int etamin = eta_field.get_minimum();
397  if (-999 == result) {
398  result = etamin;
399  } else {
400  if (etamin < result) result = etamin;
401  }
402  }
403  }
404  }
405  return (result);
406  }
407  return (999); // default
408 } // end MmIdHelper::stationEtaMin
409 /*******************************************************************************/
410 int MmIdHelper::stationEtaMax(const Identifier& id) const {
411  ExpandedIdentifier expId;
412  IdContext eta_context(expId, 0, m_ETA_INDEX);
413  if (!get_expanded_id(id, expId, &eta_context)) {
414  int result = -999;
415  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
416  const Range& range = m_full_module_range[i];
417  if (range.match(expId)) {
418  const Range::field& eta_field = range[m_ETA_INDEX];
419  if (not eta_field.empty()) {
420  int etamax = eta_field.get_maximum();
421  if (result < etamax) result = etamax;
422  }
423  }
424  }
425  return (result);
426  }
427  return (-999);
428 } // end MmIdHelper::stationEtaMax
429 /*******************************************************************************/
430 int MmIdHelper::stationPhiMin(const Identifier& id) const {
431  ExpandedIdentifier expId;
432  IdContext phi_context(expId, 0, m_PHI_INDEX);
433 
434  if (!get_expanded_id(id, expId, &phi_context)) {
435  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
436  const Range& range = m_full_module_range[i];
437  if (range.match(expId)) {
438  const Range::field& phi_field = range[m_PHI_INDEX];
439  if (not phi_field.empty()) { return (phi_field.get_minimum()); }
440  }
441  }
442  }
443  // Failed to find the min
444  return (999);
445 }
446 /*******************************************************************************/
447 int MmIdHelper::stationPhiMax(const Identifier& id) const {
448  ExpandedIdentifier expId;
449  IdContext phi_context(expId, 0, m_PHI_INDEX);
450 
451  if (!get_expanded_id(id, expId, &phi_context)) {
452  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
453  const Range& range = m_full_module_range[i];
454  if (range.match(expId)) {
455  const Range::field& phi_field = range[m_PHI_INDEX];
456  if (not phi_field.empty()) { return (phi_field.get_maximum()); }
457  }
458  }
459  }
460  // Failed to find the max
461  return (-999);
462 }
463 /*******************************************************************************/
465  ExpandedIdentifier expId;
466  IdContext context = technology_context();
467  if (!get_expanded_id(id, expId, &context)) {
468  int result = -999;
469  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
470  const Range& range = m_full_channel_range[i];
471  if (range.match(expId)) {
472  const Range::field& multilayer_field = range[m_DETECTORELEMENT_INDEX];
473  if (not multilayer_field.empty()) {
474  int multilayermax = multilayer_field.get_maximum();
475  if (result < multilayermax) result = multilayermax;
476  }
477  }
478  }
479  return (result);
480  }
481  return (-999);
482 }
483 /*******************************************************************************/
484 int MmIdHelper::multilayerMin(const Identifier& id) const {
485  ExpandedIdentifier expId;
486  IdContext multilayer_context(expId, 0, m_DETECTORELEMENT_INDEX);
487  if (!get_expanded_id(id, expId, &multilayer_context)) {
488  int result = -999;
489  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
490  const Range& range = m_full_channel_range[i];
491  if (range.match(expId)) {
492  const Range::field& multilayer_field = range[m_DETECTORELEMENT_INDEX];
493  if (not multilayer_field.empty()) {
494  int multilayermin = multilayer_field.get_minimum();
495  if (-999 == result) {
496  result = multilayermin;
497  } else {
498  if (multilayermin < result) result = multilayermin;
499  }
500  }
501  }
502  }
503  return (result);
504  }
505  return (999);
506 }
507 /*******************************************************************************/
508 int MmIdHelper::multilayerMax(const Identifier& id) const {
509  ExpandedIdentifier expId;
510  IdContext multilayer_context(expId, 0, m_DETECTORELEMENT_INDEX);
511  if (!get_expanded_id(id, expId, &multilayer_context)) {
512  int result = -999;
513  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
514  const Range& range = m_full_channel_range[i];
515  if (range.match(expId)) {
516  const Range::field& multilayer_field = range[m_DETECTORELEMENT_INDEX];
517  if (not multilayer_field.empty()) {
518  int multilayermax = multilayer_field.get_maximum();
519  if (result < multilayermax) result = multilayermax;
520  }
521  }
522  }
523  return (result);
524  }
525  return (-999);
526 }
527 /*******************************************************************************/
528 int MmIdHelper::gasGapMin(const Identifier& id) const {
529  ExpandedIdentifier expId;
530  IdContext gasgap_context(expId, 0, m_GASGAP_INDEX);
531  if (!get_expanded_id(id, expId, &gasgap_context)) {
532  int result = -999;
533  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
534  const Range& range = m_full_channel_range[i];
535  if (range.match(expId)) {
536  const Range::field& gasgap_field = range[m_GASGAP_INDEX];
537  if (not gasgap_field.empty()) {
538  int gasgapmin = gasgap_field.get_minimum();
539  if (-999 == result) {
540  result = gasgapmin;
541  } else {
542  if (gasgapmin < result) result = gasgapmin;
543  }
544  }
545  }
546  }
547  return (result);
548  }
549  return (999);
550 }
551 /*******************************************************************************/
552 int MmIdHelper::gasGapMax(const Identifier& id) const {
553  ExpandedIdentifier expId;
554  IdContext gasgap_context(expId, 0, m_GASGAP_INDEX);
555  if (!get_expanded_id(id, expId, &gasgap_context)) {
556  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
557  const Range& range = m_full_channel_range[i];
558  if (range.match(expId)) {
559  const Range::field& gasgap_field = range[m_GASGAP_INDEX];
560  if (not gasgap_field.empty()) { return (gasgap_field.get_maximum()); }
561  }
562  }
563  }
564  // Failed to find the max
565  return (-999);
566 }
567 /*******************************************************************************/
568 int MmIdHelper::channelMin(const Identifier& id) const {
569  ExpandedIdentifier expId;
571  if (!get_expanded_id(id, expId, &channel_context)) {
572  int result = -999;
573  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
574  const Range& range = m_full_channel_range[i];
575  if (range.match(expId)) {
576  const Range::field& channel_field = range[m_CHANNEL_INDEX];
577  if (not channel_field.empty()) {
578  int channelmin = channel_field.get_minimum();
579  if (-999 == result) {
580  result = channelmin;
581  } else {
582  if (channelmin < result) result = channelmin;
583  }
584  }
585  }
586  }
587  return (result);
588  }
589  return (999);
590 }
591 /*******************************************************************************/
592 int MmIdHelper::channelMax(const Identifier& id) const {
593  ExpandedIdentifier expId;
595  if (!get_expanded_id(id, expId, &channel_context)) {
596  int result = -999;
597  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
598  const Range& range = m_full_channel_range[i];
599  if (range.match(expId)) {
600  const Range::field& channel_field = range[m_CHANNEL_INDEX];
601  if (not channel_field.empty()) {
602  int channelmax = channel_field.get_maximum();
603  if (result < channelmax) result = channelmax;
604  }
605  }
606  }
607  return (result);
608  }
609  return (-999);
610 }
611 /*******************************************************************************/
612 // validation of levels
613 bool MmIdHelper::valid(const Identifier& id) const {
614  if (!validElement(id)) return false;
615 
616  int mplet = multilayer(id);
617  if ((mplet < multilayerMin(id)) || (mplet > multilayerMax(id))) {
618  ATH_MSG_DEBUG("Invalid multilayer=" << mplet << " multilayerMin=" << multilayerMin(id) << " multilayerMax=" << multilayerMax(id));
619  return false;
620  }
621 
622  int gasG = gasGap(id);
623  if (gasG < gasGapMin(id) || gasG > gasGapMax(id)) {
624  ATH_MSG_DEBUG("Invalid gasGap=" << gasG << " gasGapMin=" << gasGapMin(id) << " gasGapMax=" << gasGapMax(id));
625  return false;
626  }
627 
628  int element = channel(id);
629  if (element < channelMin(id) || element > channelMax(id)) {
630  ATH_MSG_DEBUG("Invalid channel=" << element << " channelMin=" << channelMin(id) << " channelMax=" << channelMax(id));
631  return false;
632  }
633  return true;
634 } // end MmIdHelper::valid
635 /*******************************************************************************/
636 bool MmIdHelper::isStNameInTech(const std::string& stationName) const { return stationName[0] == 'M'; }
637 bool MmIdHelper::validElement(const Identifier& id) const {
638  int station = stationName(id);
639  if (!validStation(station)) {
640  ATH_MSG_DEBUG("Invalid stationName=" << stationNameString(station));
641  return false;
642  }
643 
644  int eta = stationEta(id);
645  if (eta < stationEtaMin(id) || eta > stationEtaMax(id)) {
646  ATH_MSG_DEBUG("Invalid stationEta=" << eta << " for stationName=" << stationNameString(station) << " stationIndex=" << station
647  << " stationEtaMin=" << stationEtaMin(id) << " stationEtaMax=" << stationEtaMax(id));
648  return false;
649  }
650 
651  int phi = stationPhi(id);
652  if (phi < stationPhiMin(id) || phi > stationPhiMax(id)) {
653  ATH_MSG_DEBUG("Invalid stationPhi=" << phi << " for stationName=" << stationNameString(station) << " stationIndex=" << station
654  << " stationPhiMin=" << stationPhiMin(id) << " stationPhiMax=" << stationPhiMax(id));
655  return false;
656  }
657  return true;
658 
659 } // end MmIdHelper::validElement
660 /*******************************************************************************/
661 // Private validation of levels
663  if (!validStation(stationName)) {
664  ATH_MSG_DEBUG("Invalid stationName=" << stationNameString(stationName));
665  return false;
666  }
667  if (stationEta < stationEtaMin(id) || stationEta > stationEtaMax(id)) {
668  ATH_MSG_DEBUG("Invalid stationEta=" << stationEta << " for stationName=" << stationNameString(stationName)
669  << " stationIndex=" << stationName << " stationEtaMin=" << stationEtaMin(id)
670  << " stationEtaMax=" << stationEtaMax(id));
671  return false;
672  }
673  if (stationPhi < stationPhiMin(id) || stationPhi > stationPhiMax(id)) {
674  ATH_MSG_DEBUG("Invalid stationPhi=" << stationPhi << " for stationName=" << stationNameString(stationName)
675  << " stationIndex=" << stationName << " stationPhiMin=" << stationPhiMin(id)
676  << " stationPhiMax=" << stationPhiMax(id));
677  return false;
678  }
679  return true;
680 } // end MmIdHelper::validElement
681 /*******************************************************************************/
682 // Check values down to readout channel level
683 bool MmIdHelper::validChannel(const Identifier& id, int stationName, int stationEta, int stationPhi, int multilayer, int gasGap,
684  int channel) const {
685  if (!validElement(id, stationName, stationEta, stationPhi)) return false;
686 
687  if ((multilayer < multilayerMin(id)) || (multilayer > multilayerMax(id))) {
688  ATH_MSG_DEBUG("Invalid multilayer=" << multilayer << " multilayerMin=" << multilayerMin(id)
689  << " multilayerMax=" << multilayerMax(id));
690  return false;
691  }
692 
693  if (gasGap < gasGapMin(id) || gasGap > gasGapMax(id)) {
694  ATH_MSG_DEBUG("Invalid gasGap=" << gasGap << " gasGapMin=" << gasGapMin(id) << " gasGapMax=" << gasGapMax(id));
695  return false;
696  }
697  if (channel < channelMin(id) || channel > channelMax(id)) {
698  ATH_MSG_DEBUG("Invalid channel=" << channel << " channelMin=" << channelMin(id) << " channelMax=" << channelMax(id));
699  return false;
700  }
701  return true;
702 } // end MmIdHelper::validChannel
703  /*******************************************************************************/
704  // Construct ID from components
705 
707  // pack fields independently
714  return result;
715 }
717  try {
720  return result;
721  } catch (const std::out_of_range&) { isValid = false; }
722  return Identifier{0};
723 }
724 
725 /*******************************************************************************/
726 Identifier MmIdHelper::elementID(const std::string& stationNameStr, int stationEta, int stationPhi) const {
727  return elementID(stationNameIndex(stationNameStr), stationEta, stationPhi);
728 }
729 Identifier MmIdHelper::elementID(const std::string& stationNameStr, int stationEta, int stationPhi, bool& isValid) const {
730  return elementID(stationNameIndex(stationNameStr), stationEta, stationPhi, isValid);
731 }
732 
733 /*******************************************************************************/
734 Identifier MmIdHelper::elementID(const Identifier& id) const { return parentID(id); }
735 /*******************************************************************************/
736 Identifier MmIdHelper::channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const {
737  // pack fields independently
747  return result;
748 }
750  bool& isValid) const {
751  try{
754  return result;
755  } catch (const std::out_of_range&) { isValid = false; }
756  return Identifier{0};
757 }
758 /*******************************************************************************/
759 Identifier MmIdHelper::channelID(const std::string& stationNameStr, int stationEta, int stationPhi, int multilayer, int gasGap, int channel,
760  bool& isValid) const {
762 }
763 Identifier MmIdHelper::channelID(const std::string& stationNameStr, int stationEta, int stationPhi, int multilayer, int gasGap,
764  int channel) const {
766 }
767 
768 /*******************************************************************************/
769 Identifier MmIdHelper::channelID(const Identifier& id, int multilayer, int gasGap, int channel) const {
770  Identifier result{id};
774  return result;
775 }
776 Identifier MmIdHelper::channelID(const Identifier& id, int multilayer, int gasGap, int channel, bool& isValid) const {
777  try {
779  isValid = valid(result);
780  return result;
781  } catch (const std::out_of_range&) { isValid = false; }
782  return Identifier{0};
783 }
784 /*******************************************************************************/
785 // get parent id from strip or gang identifier
787  assert(is_mm(id));
788  Identifier result(id);
792  return result;
793 }
794 /*******************************************************************************/
795 // Access to components of the ID
796 int MmIdHelper::multilayer(const Identifier& id) const { return m_mplet_impl.unpack(id); }
797 /*******************************************************************************/
798 int MmIdHelper::gasGap(const Identifier& id) const { return m_gap_impl.unpack(id); }
799 /*******************************************************************************/
800 int MmIdHelper::channel(const Identifier& id) const { return m_cha_impl.unpack(id); }
801 /*******************************************************************************/
802 // Access to min and max of level ranges
804 /*******************************************************************************/
806 /*******************************************************************************/
808 /*******************************************************************************/
810 /*******************************************************************************/
812 /*******************************************************************************/
814 /*******************************************************************************/
816 /*******************************************************************************/
817 bool MmIdHelper::isStereo(const Identifier& id) const {
818  bool isStereo = false;
819  int ml = multilayer(id);
820  int gg = gasGap(id);
821  if ((ml == 1 && gg > 2) || (ml == 2 && gg < 3)) isStereo = true;
822  return isStereo;
823 }
824 /*******************************************************************************/
825 bool MmIdHelper::measuresPhi(const Identifier& /*id*/) const { return false; }
826 /*******************************************************************************/
828 /*******************************************************************************/
830 /*******************************************************************************/
832 /*******************************************************************************/
835  int mmField = technologyIndex("MM");
836  if (m_dict) { mmField = mm_field_value(); }
837  return mmField;
838 }
839 /*******************************************************************************/
840 bool MmIdHelper::LargeSector(int stationName) const { return ('L' == stationNameString(stationName)[2]); }
841 /*******************************************************************************/
842 bool MmIdHelper::SmallSector(int stationName) const { return ('S' == stationNameString(stationName)[2]); }
843 /*******************************************************************************/
844 // Nektar: Modified for MicroMegas, but is almost certainly wrong
845 int MmIdHelper::sectorType(const std::string& stationName, int stationEta) {
846  if ('L' == stationName[2]) {
847  return (abs(stationEta) + 1);
848  } else if ('S' == stationName[2]) {
849  return (abs(stationEta) + 12);
850  }
851  assert(0);
852  return -1;
853 }
854 /*******************************************************************************/
856  std::string name = stationNameString(stationName);
857  return sectorType(name, stationEta);
858 }
MmIdHelper::MultilayerMin
@ MultilayerMin
Definition: MmIdHelper.h:214
MuonIdHelper::validStation
bool validStation(int stationName, int technology) const
Definition: MuonIdHelper.cxx:767
MmIdHelper::s_etaDim
static constexpr unsigned int s_etaDim
-2, -1 , 1, 2
Definition: MmIdHelper.h:172
MuonIdHelper::stationNameIndex
int stationNameIndex(const std::string &name) const
Definition: MuonIdHelper.cxx:842
MmIdHelper::stationPhiMin
static int stationPhiMin()
Definition: MmIdHelper.cxx:807
ConstRangeIterator
Definition: RangeIterator.h:46
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:158
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictMgr.cxx:923
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
AtlasDetectorID::mm_field_value
int mm_field_value() const
Definition: AtlasDetectorID.h:668
MuonIdHelper::initLevelsFromDict
int initLevelsFromDict()
Definition: MuonIdHelper.cxx:241
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
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
MmIdHelper::get_module_hash
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override
Definition: MmIdHelper.cxx:262
get_generator_info.result
result
Definition: get_generator_info.py:21
IdDictGroup
Definition: IdDictDefs.h:341
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
MmIdHelper::measuresPhi
bool measuresPhi(const Identifier &id) const override
Definition: MmIdHelper.cxx:825
AtlasDetectorID::setMessageSvc
virtual void setMessageSvc(IMessageSvc *msgSvc) override
Definition: AtlasDetectorID.cxx:748
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:70
MuonIdHelper::technologyIndex
int technologyIndex(const std::string &name) const
Definition: MuonIdHelper.cxx:848
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MmIdHelper::MmIdHelper
MmIdHelper()
Definition: MmIdHelper.cxx:12
MmIdHelper::stationPhiMax
static int stationPhiMax()
Definition: MmIdHelper.cxx:809
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MmIdHelper::s_mlDim
static constexpr unsigned int s_mlDim
2 multilayer
Definition: MmIdHelper.h:176
IdDictFieldImplementation::show_to_string
std::string show_to_string(void) const
Definition: IdDictFieldImplementation.cxx:44
AtlasDetectorID::muon_field_value
int muon_field_value() const
Definition: AtlasDetectorID.h:620
MmIdHelper::getFirstPcbChnl
static int getFirstPcbChnl(int stationEta, int pcb)
Definition: MmIdHelper.cxx:300
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MuonIdHelper::channel_context
IdContext channel_context() const
id for channel
Definition: MuonIdHelper.cxx:741
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
MmIdHelper::ChannelMin
@ ChannelMin
Definition: MmIdHelper.h:218
index
Definition: index.py:1
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
MmIdHelper::validElement
bool validElement(const Identifier &id) const
Definition: MmIdHelper.cxx:637
IdentifierField::get_minimum
element_type get_minimum() const
Query the values.
Definition: IdentifierField.h:59
MmIdHelper::channelMax
static int channelMax()
Definition: MmIdHelper.cxx:831
MuonIdHelper::m_sta_impl
IdDictFieldImplementation m_sta_impl
Definition: MuonIdHelper.h:289
DMTest::C
C_v1 C
Definition: C.h:26
MmIdHelper::febID
Identifier febID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius) const
Definition: MmIdHelper.cxx:340
ExpandedIdentifier::add
void add(element_type value)
Append a value into a new field.
MmIdHelper::StationPhiMax
@ StationPhiMax
Definition: MmIdHelper.h:213
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
MmIdHelper::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: MmIdHelper.cxx:636
IdDictFieldImplementation::pack
void pack(int value, Identifier &id) const
Definition: IdDictFieldImplementation.h:174
IdentifierField::get_maximum
element_type get_maximum() const
Definition: IdentifierField.h:68
MmIdHelper::get_detectorElement_hash
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const override
Definition: MmIdHelper.cxx:269
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:800
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:225
MuonIdHelper::m_phi_impl
IdDictFieldImplementation m_phi_impl
Definition: MuonIdHelper.h:291
MmIdHelper::SmallSector
bool SmallSector(int stationName) const
Definition: MmIdHelper.cxx:842
MmIdHelper::GasGapMin
@ GasGapMin
Definition: MmIdHelper.h:216
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
MmIdHelper::detEleHashIdx
unsigned int detEleHashIdx(const Identifier &id) const
Definition: MmIdHelper.cxx:232
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictMgr.cxx:311
CalibDbCompareRT.region_id
region_id
Definition: CalibDbCompareRT.py:68
IdDictRegion
Definition: IdDictDefs.h:433
MmIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: MmIdHelper.cxx:796
IdDictFieldImplementation::reset
void reset(Identifier &id) const
Definition: IdDictFieldImplementation.h:184
MmIdHelper::m_gap_impl
IdDictFieldImplementation m_gap_impl
Definition: MmIdHelper.h:193
MmIdHelper::multilayerID
Identifier multilayerID(const Identifier &channeldID) const
Definition: MmIdHelper.cxx:277
IdDictMgr
Definition: IdDictDefs.h:32
MmIdHelper::StationEtaMin
@ StationEtaMin
Definition: MmIdHelper.h:210
IdDictDictionary::find_group
IdDictGroup * find_group(const std::string &group_name) const
Definition: IdDictMgr.cxx:385
IdDictMgr::find_dictionary
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:163
MuonIdHelper
Definition: MuonIdHelper.h:80
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
IdentifierField::empty
bool empty() const
Definition: IdentifierField.h:114
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonIdHelper::m_module_vec
id_vec m_module_vec
Definition: MuonIdHelper.h:271
MmIdHelper::m_mplet_impl
IdDictFieldImplementation m_mplet_impl
Definition: MmIdHelper.h:192
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MmIdHelper::ChannelMax
@ ChannelMax
Definition: MmIdHelper.h:219
MmIdHelper::multilayerMax
static int multilayerMax()
Definition: MmIdHelper.cxx:813
IdDictDictionary::m_regions
std::vector< IdDictRegion * > m_regions
Definition: IdDictDefs.h:302
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
MmIdHelper.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MuonIdHelper::m_full_detectorElement_range
MultiRange m_full_detectorElement_range
Definition: MuonIdHelper.h:279
MmIdHelper::gasGapMax
static int gasGapMax()
Definition: MmIdHelper.cxx:827
MmIdHelper::m_GASGAP_INDEX
size_type m_GASGAP_INDEX
Definition: MmIdHelper.h:190
MmIdHelper::m_cha_impl
IdDictFieldImplementation m_cha_impl
Definition: MmIdHelper.h:194
MuonIdHelper::m_full_module_range
MultiRange m_full_module_range
Definition: MuonIdHelper.h:269
MmIdHelper::m_detectorElement_hashes
std::array< unsigned int, s_detHashDim > m_detectorElement_hashes
Definition: MmIdHelper.h:182
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:160
MmIdHelper::MultilayerMax
@ MultilayerMax
Definition: MmIdHelper.h:215
MuonIdHelper::is_mm
bool is_mm(const Identifier &id) const
Definition: MuonIdHelper.cxx:797
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
IdDictGroup::regions
const std::vector< IdDictRegion * > & regions()
Definition: IdDictMgr.cxx:1996
MuonIdHelper::m_eta_impl
IdDictFieldImplementation m_eta_impl
Definition: MuonIdHelper.h:290
MuonIdHelper::init_hashes
int init_hashes()
Definition: MuonIdHelper.cxx:348
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
min
#define min(a, b)
Definition: cfImp.cxx:40
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
MmIdHelper::moduleHashIdx
unsigned int moduleHashIdx(const Identifier &id) const
Definition: MmIdHelper.cxx:224
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:810
MmIdHelper::mmTechnology
int mmTechnology() const
Utility methods.
Definition: MmIdHelper.cxx:834
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictMgr.cxx:340
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:854
MuonIdHelper::init_neighbors
int init_neighbors()
Definition: MuonIdHelper.cxx:520
MmIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: MmIdHelper.cxx:706
MultiRange
A MultiRange combines several Ranges.
Definition: MultiRange.h:17
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MmIdHelper::parentID
Identifier parentID(const Identifier &id) const
Definition: MmIdHelper.cxx:786
RangeIterator.h
MuonIdHelper::m_detectorElement_vec
id_vec m_detectorElement_vec
Definition: MuonIdHelper.h:281
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
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
MmIdHelper::StationEtaMax
@ StationEtaMax
Definition: MmIdHelper.h:211
MuonIdHelper::module_hash_max
size_type module_hash_max() const
the maximum hash value
Definition: MuonIdHelper.cxx:748
IdDictDictionary
Definition: IdDictDefs.h:97
MuonIdHelper::m_ETA_INDEX
size_type m_ETA_INDEX
Definition: MuonIdHelper.h:260
MmIdHelper::StationPhiMin
@ StationPhiMin
Definition: MmIdHelper.h:212
MuonIdHelper::init_detectorElement_hashes
virtual int init_detectorElement_hashes()
Definition: MuonIdHelper.cxx:394
MmIdHelper::init_id_to_hashes
int init_id_to_hashes()
Definition: MmIdHelper.cxx:236
MmIdHelper::stationEtaMin
static int stationEtaMin()
Definition: MmIdHelper.cxx:803
MmIdHelper::s_phiDim
static constexpr unsigned int s_phiDim
8 phi station
Definition: MmIdHelper.h:174
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
MuonIdHelper::m_TECHNOLOGY_INDEX
size_type m_TECHNOLOGY_INDEX
Definition: MuonIdHelper.h:262
MmIdHelper::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: MmIdHelper.cxx:18
MmIdHelper::channel
int channel(const Identifier &id) const override
Definition: MmIdHelper.cxx:800
IdDictDictionary::m_name
std::string m_name
Definition: IdDictDefs.h:283
MmIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: MmIdHelper.cxx:798
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
MultiRange::size
size_type size() const
Definition: MultiRange.cxx:70
MmIdHelper::channelMin
static int channelMin()
Definition: MmIdHelper.cxx:829
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
MmIdHelper::pcbID
Identifier pcbID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb) const
Definition: MmIdHelper.cxx:304
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
MmIdHelper::LargeSector
bool LargeSector(int stationName) const
Definition: MmIdHelper.cxx:840
MuonIdHelper::m_DETECTORELEMENT_INDEX
size_type m_DETECTORELEMENT_INDEX
Definition: MuonIdHelper.h:264
MmIdHelper::stationEtaMax
static int stationEtaMax()
Definition: MmIdHelper.cxx:805
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
MmIdHelper::getFirstRadiusChnl
static int getFirstRadiusChnl(int stationEta, int pcb)
Definition: MmIdHelper.cxx:336
MmIdHelper::validChannel
bool validChannel(const Identifier &id, int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Definition: MmIdHelper.cxx:683
merge.status
status
Definition: merge.py:17
IdDictField
Definition: IdDictDefs.h:316
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:156
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
MmIdHelper::idChannels
void idChannels(const Identifier &id, std::vector< Identifier > &vect) const
Definition: MmIdHelper.cxx:372
MmIdHelper::valid
bool valid(const Identifier &id) const
Definition: MmIdHelper.cxx:613
LArCellBinning.etamin
etamin
Definition: LArCellBinning.py:137
ExpandedIdentifier::element_type
int element_type
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:106
MmIdHelper::m_module_hashes
std::array< unsigned int, s_modHashDim > m_module_hashes
Definition: MmIdHelper.h:181
MmIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Definition: MmIdHelper.cxx:736
MmIdHelper::isStereo
bool isStereo(const Identifier &id) const
Definition: MmIdHelper.cxx:817
MmIdHelper::m_stationShift
unsigned int m_stationShift
Minimal station index found.
Definition: MmIdHelper.h:187
MmIdHelper::GasGapMax
@ GasGapMax
Definition: MmIdHelper.h:217
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
IdDictRegion::m_implementation
std::vector< IdDictFieldImplementation > m_implementation
Definition: IdDictDefs.h:459
MuonIdHelper::m_PHI_INDEX
size_type m_PHI_INDEX
Definition: MuonIdHelper.h:261
MmIdHelper::multilayerMin
static int multilayerMin()
Definition: MmIdHelper.cxx:811
MuonIdHelper::technology_context
IdContext technology_context() const
access to IdContext's which define which levels or fields are contained in the Muon id
Definition: MuonIdHelper.cxx:726
MmIdHelper::sectorType
static int sectorType(const std::string &stationName, int stationEta)
Definition: MmIdHelper.cxx:845
MmIdHelper::numberOfMultilayers
int numberOfMultilayers(const Identifier &id) const
Definition: MmIdHelper.cxx:464
MmIdHelper::gasGapMin
static int gasGapMin()
Definition: MmIdHelper.cxx:815
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