ATLAS Offline Software
MmIdHelper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
9 /*******************************************************************************/
10 // Constructor/Destructor
12  m_module_hashes.fill(-1);
13  m_detectorElement_hashes.fill(-1);
14 }
15 /*******************************************************************************/
16 // Initialize dictionary
18  int status = 0;
19 
20  // Check whether this helper should be reinitialized
21  if (!reinitialize(dict_mgr)) {
22  ATH_MSG_INFO("Request to reinitialize not satisfied - tags have not changed");
23  return (0);
24  } else {
25  ATH_MSG_DEBUG("(Re)initialize ");
26  }
27 
28  // init base object
30  if (AtlasDetectorID::initialize_from_dictionary(dict_mgr)) return 1;
31 
32  // Register version of the MuonSpectrometer dictionary
33  if (register_dict_tag(dict_mgr, "MuonSpectrometer")) return 1;
34 
35  m_dict = dict_mgr.find_dictionary("MuonSpectrometer");
36  if (!m_dict) {
37  ATH_MSG_ERROR(" initialize_from_dict - cannot access MuonSpectrometer dictionary ");
38  return 1;
39  }
40 
41  // Initialize some of the field indices
42  if (initLevelsFromDict()) return 1;
43 
44  int index = technologyIndex("MM");
45  if (index == -1) {
46  ATH_MSG_DEBUG("initLevelsFromDict - there are no MM entries in the dictionary! ");
47  return 0;
48  }
49 
50  IdDictField* field = m_dict->find_field("mmMultilayer");
51  if (field) {
52  m_DETECTORELEMENT_INDEX = field->m_index;
53  } else {
54  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'mmMultilayer' field ");
55  status = 1;
56  }
57 
58  field = m_dict->find_field("mmGasGap");
59  if (field) {
60  m_GASGAP_INDEX = field->m_index;
61  } else {
62  ATH_MSG_ERROR("initLevelsFromDict - unable to find 'mmGasGap' field ");
63  status = 1;
64  }
65 
66  field = m_dict->find_field("mmChannel");
67  if (field) {
68  m_CHANNEL_INDEX = field->m_index;
69  } else {
70  ATH_MSG_ERROR("initLevelsFromDict - unable to find mmChannel' field ");
71  status = 1;
72  }
73 
74  // reinitialize the module ndex
76 
77  // save an index to the first region of MM
78  IdDictGroup* mmGroup = m_dict->find_group("mm");
79  if (!mmGroup) {
80  ATH_MSG_ERROR("Cannot find mm group");
81  } else {
82  m_GROUP_INDEX = mmGroup->regions()[0]->m_index;
83  }
84 
85  const IdDictRegion& region = *m_dict->m_regions[m_GROUP_INDEX];
92 
93  ATH_MSG_DEBUG(" MicroMegas decode index and bit fields for each level: " << std::endl
94  << " muon " << m_muon_impl.show_to_string() << std::endl
95  << " station " << m_sta_impl.show_to_string() << std::endl
96  << " eta " << m_eta_impl.show_to_string() << std::endl
97  << " phi " << m_phi_impl.show_to_string() << std::endl
98  << " technology " << m_tec_impl.show_to_string() << std::endl
99  << " multilayer " << m_mplet_impl.show_to_string()
100  << std::endl
101  << " gasgap " << m_gap_impl.show_to_string() << std::endl
102  << " channel " << m_cha_impl.show_to_string());
103 
104  //
105  // Build multirange for the valid set of identifiers
106  //
107 
108  // Find value for the field MuonSpectrometer
109  int muonField = -1;
110  const IdDictDictionary* atlasDict = dict_mgr.find_dictionary("ATLAS");
111  if (atlasDict->get_label_value("subdet", "MuonSpectrometer", muonField)) {
112  ATH_MSG_ERROR("Could not get value for label 'MuonSpectrometer' of field 'subdet' in dictionary " << atlasDict->m_name);
113  return 1;
114  }
115 
116  // Build MultiRange down to "technology" for all (muon) regions
118  region_id.add(muonField);
119  Range prefix;
120  MultiRange muon_range = m_dict->build_multirange(region_id, prefix, "technology");
121  if (muon_range.size() > 0) {
122  ATH_MSG_INFO("MultiRange built successfully to Technology: "
123  << "MultiRange size is " << muon_range.size());
124  } else {
125  ATH_MSG_ERROR("Muon MultiRange is empty");
126  }
127 
128  // Build MultiRange down to "detector element" for all mdt regions
129  ExpandedIdentifier detectorElement_region;
130  detectorElement_region.add(muonField);
131  Range detectorElement_prefix;
132  MultiRange muon_detectorElement_range = m_dict->build_multirange(detectorElement_region, detectorElement_prefix, "mmMultilayer");
133  if (muon_detectorElement_range.size() > 0) {
134  ATH_MSG_INFO("MultiRange built successfully to detector element: "
135  << "Multilayer MultiRange size is " << muon_detectorElement_range.size());
136  } else {
137  ATH_MSG_ERROR("Muon MicroMegas detector element MultiRange is empty");
138  }
139 
140  // Build MultiRange down to "channel" for all MM regions
141  ExpandedIdentifier mm_region;
142  mm_region.add(muonField);
143  Range mm_prefix;
144  MultiRange muon_channel_range = m_dict->build_multirange(mm_region, mm_prefix, "mmChannel");
145  if (muon_channel_range.size() > 0) {
146  ATH_MSG_INFO("MultiRange built successfully to channel: "
147  << "MultiRange size is " << muon_channel_range.size());
148  } else {
149  ATH_MSG_ERROR("Muon MultiRange is empty for channels");
150  }
151 
152  // build MicroMegas module ranges
153  // Find the regions that have a "technology field" that matches the MM and save them
154  int mmField = -1;
155  status = m_dict->get_label_value("technology", "MM", mmField);
156 
157  for (int i = 0; i < (int)muon_range.size(); ++i) {
158  const Range& range = muon_range[i];
159  if (range.fields() > m_TECHNOLOGY_INDEX) {
161  if (field.match((ExpandedIdentifier::element_type)mmField)) {
163  ATH_MSG_DEBUG("field size is " << (int)range.cardinality() << " field index = " << i);
164  }
165  }
166  }
167 
168  for (int j = 0; j < (int)muon_detectorElement_range.size(); ++j) {
169  const Range& range = muon_detectorElement_range[j];
170  if (range.fields() > m_TECHNOLOGY_INDEX) {
172  if (field.match((ExpandedIdentifier::element_type)mmField)) {
174  ATH_MSG_DEBUG("detector element field size is " << (int)range.cardinality() << " field index = " << j);
175  }
176  }
177  }
178 
179  for (int j = 0; j < (int)muon_channel_range.size(); ++j) {
180  const Range& range = muon_channel_range[j];
181  if (range.fields() > m_TECHNOLOGY_INDEX) {
183  if (field.match((ExpandedIdentifier::element_type)mmField)) {
185  ATH_MSG_DEBUG("channel field size is " << (int)range.cardinality() << " field index = " << j);
186  }
187  }
188  }
189 
190  // test to see that the multi range is not empty
191  if (m_full_module_range.size() == 0) {
192  ATH_MSG_ERROR("MicroMegas MultiRange ID is empty for modules");
193  status = 1;
194  }
195 
196  // test to see that the detector element multi range is not empty
197  if (m_full_detectorElement_range.size() == 0) {
198  ATH_MSG_ERROR("MicroMegas MultiRange ID is empty for detector elements");
199  status = 1;
200  }
201 
202  // test to see that the multi range is not empty
203  if (m_full_channel_range.size() == 0) {
204  ATH_MSG_ERROR("MicroMegas MultiRange ID is empty for channels");
205  status = 1;
206  }
207 
208  // Setup the hash tables for MicroMegas
209  ATH_MSG_INFO("Initializing MicroMegas hash indices ... ");
210  status = init_hashes();
211  status = init_detectorElement_hashes(); // same as module hash
213 
214  // Setup hash tables for finding neighbors
215  ATH_MSG_INFO("Initializing MicroMegas hash indices for finding neighbors ... ");
217 
218  m_init = true;
219  return (status);
220 } // end MmIdHelper::initialize_from_dictionary
221 /*******************************************************************************/
222 
223 inline unsigned int MmIdHelper::moduleHashIdx(const Identifier& id) const{
226  constexpr unsigned int C = s_phiDim;
227  constexpr unsigned int BxC = C*s_etaDim;
228  const int stEta = stationEta(id);
229  return (stationName(id) - m_stationShift)*BxC + (stEta + s_etaDim/2 - (stEta>0))*C + (stationPhi(id) -1);
230 }
231 inline unsigned int MmIdHelper::detEleHashIdx(const Identifier& id) const{
232  return moduleHashIdx(id) *s_mlDim + (multilayer(id) -1);
233 }
234 
237  unsigned int hash_max = module_hash_max();
238  for (unsigned int i = 0; i < hash_max; ++i) {
239  const Identifier& id = m_module_vec[i];
240  const unsigned idx = moduleHashIdx(id);
241  if (idx >= m_module_hashes.size() || m_module_hashes[idx] < hash_max){
242  ATH_MSG_FATAL("Failed to assign module hash to "<<show_to_string(id));
243  return 1;
244  }
245  m_module_hashes[idx] = i;
246  }
247 
248  hash_max = detectorElement_hash_max();
249  for (unsigned int i = 0; i < hash_max; ++i) {
250  const Identifier& id = m_detectorElement_vec[i];
251  const unsigned idx = detEleHashIdx(id);
252  if (idx >= m_detectorElement_hashes.size() || m_detectorElement_hashes[idx] < hash_max){
253  ATH_MSG_FATAL("Failed to assign detector hash to "<<show_to_string(id));
254  return 1;
255  }
257  }
258  return 0;
259 } // end MmIdHelper::init_id_to_hashes()
260 /*******************************************************************************/
261 int MmIdHelper::get_module_hash(const Identifier& id, IdentifierHash& hash_id) const {
262  const unsigned int idx = moduleHashIdx(id);
263  if (idx >= m_module_hashes.size()) return 1;
264  hash_id = m_module_hashes[idx];
265  return 0;
266 } // end MmIdHelper::get_module_hash
267 /*******************************************************************************/
269  const unsigned int idx = detEleHashIdx(id);
270  if (idx >= m_detectorElement_hashes.size()) return 1;
271  hash_id = m_detectorElement_hashes[idx];
272  return 0;
273  // return get_module_hash(id, hash_id);
274 }
275 /*******************************************************************************/
277  assert(is_mm(channelID));
279  // m_mplet_impl.reset(result);
282  return result;
283 }
284 /*******************************************************************************/
285 Identifier MmIdHelper::multilayerID(const Identifier& moduleID, int multilayer) const {
286  Identifier result(moduleID);
288  return result;
289 }
290 Identifier MmIdHelper::multilayerID(const Identifier& moduleID, int multilayer, bool& isValid) const {
291  try {
292  const Identifier result = multilayerID(moduleID, multilayer);
294  return result;
295  } catch (const std::out_of_range&) { isValid = false; }
296  return Identifier{0};
297 }
298 /*******************************************************************************/
300  int pcbNb = std::abs(stationEta)==1 ? pcb : pcb-5;
301  return (pcbNb-1)*1024+1;
302 }
303 Identifier MmIdHelper::pcbID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb) const {
304  int chnl = getFirstPcbChnl(stationEta, pcb);
306 }
307 Identifier MmIdHelper::pcbID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb, bool& isValid) const {
308  int chnl = getFirstPcbChnl(stationEta, pcb);
310 }
311 Identifier MmIdHelper::pcbID(const std::string& stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb) const {
312  int chnl = getFirstPcbChnl(stationEta, pcb);
314 }
315 Identifier MmIdHelper::pcbID(const std::string& stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb, bool& isValid) const {
316  int chnl = getFirstPcbChnl(stationEta, pcb);
318 }
320  int chnl = getFirstPcbChnl(stationEta(channelId), pcb);
322 }
323 Identifier MmIdHelper::pcbID(const Identifier& channelId, int pcb, bool& isValid) const {
324  int chnl = getFirstPcbChnl(stationEta(channelId), pcb);
326 }
328  int chnl = channel(channelId);
329  // PCB counts from 1-8. PCBs 1-5 are in abs(stationEta)==1 and PCBs 6-8 in abs(stationEta)==2
330  // each PCB consists of 1024 readout strips (strip number in athena is counting from 1 therefore chnl -1)
331  int pcb = (chnl-1)/1024+1 + (std::abs(stationEta(channelId))==2 ? 5:0); // int division should round downwards
332  return pcbID(channelId, pcb);
333 }
334 /*******************************************************************************/
336  int radiusNb = std::abs(stationEta)==1 ? radius : radius-10;
337  return radiusNb*512+1;
338 }
339 Identifier MmIdHelper::febID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius) const {
340  int chnl = getFirstRadiusChnl(stationEta, radius);
342 }
343 Identifier MmIdHelper::febID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius, bool& isValid) const {
344  int chnl = getFirstRadiusChnl(stationEta, radius);
346 }
347 Identifier MmIdHelper::febID(const std::string& stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius) const {
348  int chnl = getFirstRadiusChnl(stationEta, radius);
350 }
351 Identifier MmIdHelper::febID(const std::string& stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius, bool& isValid) const {
352  int chnl = getFirstRadiusChnl(stationEta, radius);
354 }
358 }
362 }
364  int chnl = channel(channelId);
365  // radius counts from 0-15. Radii 0-9 are in abs(stationEta)==1 and radii 10-15 in abs(stationEta)==2
366  // each radius consists of 512 readout strips (strip number in athena is counting from 1 therefore chnl -1)
367  int radius = (chnl-1)/512 + (std::abs(stationEta(channelId))==2 ? 10:0); // int division should round downwards
368  return febID(channelId, radius);
369 }
370 /*******************************************************************************/
371 void MmIdHelper::idChannels(const Identifier& id, std::vector<Identifier>& vect) const {
372  vect.clear();
373  Identifier parent = parentID(id);
374  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
375  const Range& range = m_full_channel_range[i];
376  Range::const_identifier_factory first = range.factory_begin();
377  Range::const_identifier_factory last = range.factory_end();
378  for (; first != last; ++first) {
379  Identifier child;
380  get_id((*first), 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 (eta_field.has_minimum()) {
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 (eta_field.has_maximum()) {
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 (phi_field.has_minimum()) { 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 (phi_field.has_maximum()) { 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 (multilayer_field.has_maximum()) {
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 (multilayer_field.has_minimum()) {
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 (multilayer_field.has_maximum()) {
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 (gasgap_field.has_minimum()) {
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 (gasgap_field.has_maximum()) { 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 (channel_field.has_minimum()) {
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 (channel_field.has_maximum()) {
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
Identifier::value_type
IDENTIFIER_TYPE value_type
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:39
MuonIdHelper::validStation
bool validStation(int stationName, int technology) const
Definition: MuonIdHelper.cxx:771
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:846
MmIdHelper::stationPhiMin
static int stationPhiMin()
Definition: MmIdHelper.cxx:807
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:129
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictMgr.cxx:1048
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
AtlasDetectorID::mm_field_value
int mm_field_value() const
Definition: AtlasDetectorID.h:668
MuonIdHelper::initLevelsFromDict
int initLevelsFromDict()
Definition: MuonIdHelper.cxx:240
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:261
get_generator_info.result
result
Definition: get_generator_info.py:21
IdDictGroup
Definition: IdDictDefs.h:355
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
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:69
MuonIdHelper::technologyIndex
int technologyIndex(const std::string &name) const
Definition: MuonIdHelper.cxx:852
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:11
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:57
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:299
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MuonIdHelper::channel_context
IdContext channel_context() const
id for channel
Definition: MuonIdHelper.cxx:745
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
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: DetectorDescription/Identifier/src/Range.cxx:2410
MmIdHelper::validElement
bool validElement(const Identifier &id) const
Definition: MmIdHelper.cxx:637
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:339
ExpandedIdentifier::add
void add(element_type value)
MmIdHelper::StationPhiMax
@ StationPhiMax
Definition: MmIdHelper.h:213
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:108
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
MmIdHelper::get_detectorElement_hash
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const override
Definition: MmIdHelper.cxx:268
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:804
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
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:231
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
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:309
CalibDbCompareRT.region_id
region_id
Definition: CalibDbCompareRT.py:68
IdDictRegion
Definition: IdDictDefs.h:448
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:276
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:383
IdDictMgr::find_dictionary
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:161
MuonIdHelper
Definition: MuonIdHelper.h:80
Range::field::has_minimum
bool has_minimum() const
Definition: DetectorDescription/Identifier/src/Range.cxx:390
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:92
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
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:159
MmIdHelper::MultilayerMax
@ MultilayerMax
Definition: MmIdHelper.h:215
Range::const_identifier_factory
Definition: DetectorDescription/Identifier/Identifier/Range.h:191
MuonIdHelper::is_mm
bool is_mm(const Identifier &id) const
Definition: MuonIdHelper.cxx:801
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
IdDictGroup::regions
const std::vector< IdDictRegion * > & regions()
Definition: IdDictMgr.cxx:2272
MuonIdHelper::m_eta_impl
IdDictFieldImplementation m_eta_impl
Definition: MuonIdHelper.h:290
Range::field::get_minimum
element_type get_minimum() const
Definition: DetectorDescription/Identifier/Identifier/Range.h:524
MuonIdHelper::init_hashes
int init_hashes()
Definition: MuonIdHelper.cxx:347
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
Range::field::has_maximum
bool has_maximum() const
Definition: DetectorDescription/Identifier/src/Range.cxx:398
MmIdHelper::moduleHashIdx
unsigned int moduleHashIdx(const Identifier &id) const
Definition: MmIdHelper.cxx:223
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:814
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:338
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:858
MuonIdHelper::init_neighbors
int init_neighbors()
Definition: MuonIdHelper.cxx:522
MmIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: MmIdHelper.cxx:706
MultiRange
A MultiRange combines several Ranges.
Definition: DetectorDescription/Identifier/Identifier/Range.h:351
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
MmIdHelper::parentID
Identifier parentID(const Identifier &id) const
Definition: MmIdHelper.cxx:786
MuonIdHelper::m_detectorElement_vec
id_vec m_detectorElement_vec
Definition: MuonIdHelper.h:281
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:809
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:27
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:752
IdDictDictionary
Definition: IdDictDefs.h:97
MuonIdHelper::m_ETA_INDEX
size_type m_ETA_INDEX
Definition: MuonIdHelper.h:260
Range::field::get_maximum
element_type get_maximum() const
Definition: DetectorDescription/Identifier/Identifier/Range.h:531
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:235
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:17
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: DetectorDescription/Identifier/src/Range.cxx:2488
DeMoScan.first
bool first
Definition: DeMoScan.py:534
MmIdHelper::channelMin
static int channelMin()
Definition: MmIdHelper.cxx:829
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:303
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
MmIdHelper::getFirstRadiusChnl
static int getFirstRadiusChnl(int stationEta, int pcb)
Definition: MmIdHelper.cxx:335
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
ExpandedIdentifier::element_type
int element_type
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:116
Range::field
This is the individual specification for the range of one ExpandedIdentifier field.
Definition: DetectorDescription/Identifier/Identifier/Range.h:37
IdDictField
Definition: IdDictDefs.h:318
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:127
IdentifierHash
Definition: IdentifierHash.h:38
MmIdHelper::idChannels
void idChannels(const Identifier &id, std::vector< Identifier > &vect) const
Definition: MmIdHelper.cxx:371
MmIdHelper::valid
bool valid(const Identifier &id) const
Definition: MmIdHelper.cxx:613
LArCellBinning.etamin
etamin
Definition: LArCellBinning.py:137
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
class IdContext
Definition: IdContext.h:34
IdDictRegion::m_implementation
std::vector< IdDictFieldImplementation > m_implementation
Definition: IdDictDefs.h:474
MuonIdHelper::m_PHI_INDEX
size_type m_PHI_INDEX
Definition: MuonIdHelper.h:261
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:730
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
MuonIdHelper::m_dict
const IdDictDictionary * m_dict
Definition: MuonIdHelper.h:266