ATLAS Offline Software
PixelID.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 /***************************************************************************
6  Inner Detector identifier package
7  -------------------------------------------
8 ***************************************************************************/
9 
10 
13 #include "IdDict/IdDictField.h"
14 #include "IdDict/IdDictMgr.h"
15 #include "IdDict/IdDictRegion.h"
18 #include "Identifier/IdContext.h"
19 #include <set>
20 #include <algorithm>
21 #include <iostream>
22 
23 
25  : AtlasDetectorID("PixelID", "pixel")
26 {
28  m_dbm_field.add_value(0); //DBM
29 }
30 
31 void
32 PixelID::wafer_id_checks(int barrel_ec,int layer_disk,int phi_module,int eta_module) const {
33 
34  // Fill expanded id
38  if (!m_full_wafer_range.match(id)) { // module range check is sufficient
39  ATH_MSG_ERROR("PixelID::wafer_id result is NOT ok. ID, range "
40  << (std::string) id << " " << (std::string) m_full_wafer_range);
41 
42  }
43 }
44 
45 void
46 PixelID::pixel_id_checks(int barrel_ec,int layer_disk,int phi_module,int eta_module,
47  int phi_index,int eta_index) const {
48  // Check that id is within allowed range
49  // Fill expanded id
53  if (!m_full_pixel_range.match(id)) {
54  ATH_MSG_ERROR("PixelID::pixel_id result is NOT ok. ID, range "
55  << (std::string) id << " " << (std::string) m_full_pixel_range);
56 
57  }
58 }
59 
60 int
62  // get max from dictionary
63  ExpandedIdentifier expId;
64  IdContext wafer_context1 = wafer_context();
65  get_expanded_id(id, expId, &wafer_context1);
66  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
67  const Range& range = m_full_wafer_range[i];
68  if (range.match(expId)) {
69  const Range::field& layer_disk_field = range[m_LAYER_DISK_INDEX];
70  if (not layer_disk_field.empty()) {
71  return(layer_disk_field.get_maximum());
72  }
73  }
74  }
75  return(-999); // default
76 }
77 
78 int
80  // get max from dictionary
81  ExpandedIdentifier expId;
82  IdContext wafer_context1 = wafer_context();
83  get_expanded_id(id, expId, &wafer_context1);
84  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
85  const Range& range = m_full_wafer_range[i];
86  if (range.match(expId)) {
87  const Range::field& eta_field = range[m_ETA_MODULE_INDEX];
88  if (not eta_field.empty()) {
89  return(eta_field.get_maximum());
90  }
91  }
92  }
93  return(-999);
94 }
95 
96 int PixelID::eta_module_min(const Identifier& id) const {
97  // get min from dictionary
98  ExpandedIdentifier expId;
99  IdContext wafer_context1 = wafer_context();
100  get_expanded_id(id, expId, &wafer_context1);
101  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
102  const Range& range = m_full_wafer_range[i];
103  if (range.match(expId)) {
104  const Range::field& eta_field = range[m_ETA_MODULE_INDEX];
105  if (not eta_field.empty()) {
106  return(eta_field.get_minimum());
107  }
108  }
109  }
110  return(-999);
111 }
112 
113 bool
115  return(eta_module(id) == eta_module_min(id));
116 }
117 
118 bool
120  return(eta_module(id) == eta_module_max(id));
121 }
122 
123 int PixelID::phi_module_max(const Identifier& id) const {
124  // get max from dictionary
125  ExpandedIdentifier expId;
126  IdContext wafer_context1 = wafer_context();
127 
128  get_expanded_id(id, expId, &wafer_context1);
129  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
130  const Range& range = m_full_wafer_range[i];
131  if (range.match(expId)) {
132  const Range::field& phi_field = range[m_PHI_MODULE_INDEX];
133  if (not phi_field.empty()) {
134  return(phi_field.get_maximum());
135  }
136  }
137  }
138  // Failed to find the max
139  return(-999);
140 }
141 
142 int
144  // get max from dictionary
145  ExpandedIdentifier expId;
146  IdContext wafer_context1 = wafer_context();
147  get_expanded_id(id, expId, &wafer_context1);
148  for (unsigned int i = 0; i < m_full_pixel_range.size(); ++i) {
149  const Range& range = m_full_pixel_range[i];
150  if (range.match(expId)) {
151  const Range::field& phi_field = range[m_PHI_INDEX_INDEX];
152  if (not phi_field.empty()) {
153  return(phi_field.get_maximum());
154  }
155  }
156  }
157  // Failed to find the max
158  return(-999);
159 }
160 
161 int
163  // get max from dictionary
164  ExpandedIdentifier expId;
165  IdContext wafer_context1 = wafer_context();
166  get_expanded_id(id, expId, &wafer_context1);
167  for (unsigned int i = 0; i < m_full_pixel_range.size(); ++i) {
168  const Range& range = m_full_pixel_range[i];
169  if (range.match(expId)) {
170  const Range::field& eta_field = range[m_ETA_INDEX_INDEX];
171  if (not eta_field.empty()) {
172  return(eta_field.get_maximum());
173  }
174  }
175  }
176  return(-999); // default
177 }
178 
179 bool
181  return(phi_module(id) == phi_module_max(id));
182 }
183 
184 int
186 
187  ATH_MSG_INFO("Initialize from dictionary");
188 
189  // Check whether this helper should be reinitialized
190  if (!reinitialize(dict_mgr)) {
191  ATH_MSG_INFO("Request to reinitialize not satisfied - tags have not changed");
192  return(0);
193  } else {
194  ATH_MSG_DEBUG("(Re)initialize");
195  }
196 
197  // init base object
198  if (AtlasDetectorID::initialize_from_dictionary(dict_mgr)) return(1);
199 
200  // Register version of InnerDetector dictionary
201  if (register_dict_tag(dict_mgr, "InnerDetector")) return(1);
202 
203  m_dict = dict_mgr.find_dictionary("InnerDetector");
204  if (!m_dict) {
205  ATH_MSG_FATAL("PixelID::initialize_from_dict - cannot access InnerDetector dictionary");
206 
207  return(1);
208  }
209 
210  AtlasDetectorID::setDictVersion(dict_mgr, "InnerDetector");
211 
212  // Initialize the field indices
213  if (initLevelsFromDict()) return(1);
214 
215  // save indet id
216  m_pixel_id = pixel();
217  if (!is_pixel(m_pixel_id)) {
218  ATH_MSG_FATAL(" PixelID::initialize_from_dict - cannot get pixel id dictionary ");
219  return(1);
220  }
221 
222  //
223  // Set barrel field for testing is_barrel
224  //
225  int barrel_value;
227  // barrel
228  if (m_dict->get_label_value("barrel_endcap", "barrel", barrel_value)) {
229  ATH_MSG_FATAL("Could not get value for label 'barrel' of field 'barrel_endcap' in dictionary "
230  << m_dict->name());
231  return(1);
232  }
233  m_barrel_field.add_value(barrel_value);
234  m_barrel_field.add_value(barrel_value);
235  ATH_MSG_DEBUG(" PixelID::initialize_from_dict "
236  << "Set barrel field values: "
237  << (std::string) m_barrel_field);
238 
239  //DBM
240  //Set dbm field for testing is_dbm
241  //
242  // WARNING:
243  // modified to skip DBM when aprorpiate dictionary is not present
244  // by adding +999 or -999 to the field
245  //
246 
247  int dbm_value;
248  m_dbm_field.clear();
249  if (m_dict->get_label_value("barrel_endcap", "negative_dbm", dbm_value)) {
250  if (m_dict->version().find("DBM") != std::string::npos) {
251  ATH_MSG_WARNING("Could not get value for label 'negative_dbm' of field 'barrel_endcap' in dictionary "
252  << m_dict->name());
253 
254  }
255  //return (1);
256  m_dbm_field.add_value(-999);
257  } else {
258  m_dbm_field.add_value(dbm_value);
259  }
260  if (m_dict->get_label_value("barrel_endcap", "positive_dbm", dbm_value)) {
261  if (m_dict->version().find("DBM") != std::string::npos) {
262  ATH_MSG_WARNING("Could not get value for label 'positive_dbm' of field 'barrel_endcap' in dictionary "
263  << m_dict->name());
264 
265  }
266  //return (1);
267  m_dbm_field.add_value(999);
268  } else {
269  m_dbm_field.add_value(dbm_value);
270  }
271  ATH_MSG_DEBUG("PixelID::initialize_from_dict Set dbm field values: " << (std::string)m_dbm_field);
272 
273 
274 
275  //
276  // Build multirange for the valid set of identifiers
277  //
278 
279 
280  // Find value for the field InnerDetector
281  const IdDictDictionary* atlasDict = dict_mgr.find_dictionary("ATLAS");
282  int inDetField = -1;
283  if (atlasDict->get_label_value("subdet", "InnerDetector", inDetField)) {
284  ATH_MSG_FATAL("Could not get value for label 'InnerDetector' of field 'subdet' in dictionary "
285  << atlasDict->name());
286 
287  return(1);
288  }
289 
290  // Find value for the field PIXEL
291  int pixelField = -1;
292  if (m_dict->get_label_value("part", "Pixel", pixelField)) {
293  ATH_MSG_FATAL("Could not get value for label 'Pixel' of field 'part' in dictionary "
294  << m_dict->name());
295 
296  return(1);
297  }
298  ATH_MSG_DEBUG("PixelID::initialize_from_dict Found field values: InDet/Pixel "
299  << inDetField << "/" << pixelField);
300 
301 
302  // Set up id for region and range prefix
304  region_id.add(inDetField);
305  region_id.add(pixelField);
306  Range prefix;
309 
310  // Set the base identifier for Pixel
314 
315  // Set the base expanded identifier for Pixel
317 
318  // Setup the hash tables
319  if (init_hashes()) return(1);
320 
321  // Setup hash tables for finding neighbors
322  if (init_neighbors()) return(1);
323  ATH_MSG_DEBUG("PixelID::initialize_from_dict");
324  ATH_MSG_DEBUG("Wafer range -> " << (std::string)m_full_wafer_range);
325  ATH_MSG_DEBUG("Pixel range -> " << (std::string)m_full_pixel_range);
326 
327  return 0;
328 }
329 
330 int
332  //
333  // create a vector(s) to retrieve the hashes for compact ids. For
334  // the moment, we implement a hash for wafers but NOT for pixels
335  // (too many)
336  //
337 
338  // wafer hash
340  m_wafer_vec.clear();
342  unsigned int nids = 0;
343  std::set<Identifier> ids;
344  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
345  const Range& range = m_full_wafer_range[i];
347  for (const auto & exp_id:rit) {
349  exp_id[m_LAYER_DISK_INDEX],
350  exp_id[m_PHI_MODULE_INDEX],
351  exp_id[m_ETA_MODULE_INDEX]);
352  if (!(ids.insert(id)).second) {
353  ATH_MSG_FATAL("PixelID::init_hashes "
354  << "Error: duplicated id for wafer id. nid " << nids
355  << " id " << show_to_string(id)
356  << " exp id " << (std::string) exp_id
357  << " " << (std::string) m_full_wafer_range);
358 
359  return(1);
360  }
361  nids++;
362  }
363  }
364  if (ids.size() != m_wafer_hash_max) {
365  ATH_MSG_FATAL("PixelID::init_hashes "
366  << "Error: set size NOT EQUAL to hash max. size " << ids.size()
367  << " hash max " << m_wafer_hash_max);
368 
369  return(1);
370  }
371 
372  nids = 0;
373  std::set<Identifier>::const_iterator first = ids.begin();
374  std::set<Identifier>::const_iterator last = ids.end();
375  for (; first != last && nids < m_wafer_vec.size(); ++first) {
376  m_wafer_vec[nids] = (*first);
377  nids++;
378  }
379 
380  // pixel hash - we do not keep a vec for the pixels - too large
382 
383  return(0);
384 }
385 
386 int
388  unsigned short index = id;
389 
390  if (index < m_prev_phi_wafer_vec.size()) {
391  if (m_prev_phi_wafer_vec[index] == NOT_VALID_HASH) return(1);
392 
393  prev = m_prev_phi_wafer_vec[index];
394  return(0);
395  }
396  return(1);
397 }
398 
399 int
401  unsigned short index = id;
402 
403  if (index < m_next_phi_wafer_vec.size()) {
404  if (m_next_phi_wafer_vec[index] == NOT_VALID_HASH) return(1);
405 
407  return(0);
408  }
409  return(1);
410 }
411 
412 int
414  unsigned short index = id;
415 
416  if (index < m_prev_eta_wafer_vec.size()) {
417  if (m_prev_eta_wafer_vec[index] == NOT_VALID_HASH) return(1);
418 
419  prev = m_prev_eta_wafer_vec[index];
420  return(0);
421  }
422  return(1);
423 }
424 
425 int
427  unsigned short index = id;
428  if (index < m_next_eta_wafer_vec.size()) {
429  if (m_next_eta_wafer_vec[index] == NOT_VALID_HASH) return(1);
430 
432  return(0);
433  }
434  return(1);
435 }
436 
437 int
439  //
440  // create a vector(s) to retrieve the hashes for compact ids for
441  // wafer neighbors.
442  //
443 
444  ATH_MSG_DEBUG("PixelID::init_neighbors");
445 
446  m_prev_phi_wafer_vec.clear();
447  m_next_phi_wafer_vec.clear();
448  m_prev_eta_wafer_vec.clear();
449  m_next_eta_wafer_vec.clear();
454 
455  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
456  const Range& range = m_full_wafer_range[i];
457  const Range::field& phi_field = range[m_PHI_MODULE_INDEX];
458  const Range::field& eta_field = range[m_ETA_MODULE_INDEX];
459 
460  // save the lowest value of the module offset
462  eta_field.get_minimum() : m_ETA_MODULE_OFFSET;
464  for (const auto & exp_id: rit) {
469  bool pphi = phi_field.get_previous(exp_id[m_PHI_MODULE_INDEX], previous_phi);
470  bool nphi = phi_field.get_next(exp_id[m_PHI_MODULE_INDEX], next_phi);
471  bool peta = eta_field.get_previous(exp_id[m_ETA_MODULE_INDEX], previous_eta);
472  bool neta = eta_field.get_next(exp_id[m_ETA_MODULE_INDEX], next_eta);
473 
474  IdContext wcontext = wafer_context();
475 
476  // First get primary hash id
477  IdentifierHash hash_id;
479  exp_id[m_LAYER_DISK_INDEX],
480  exp_id[m_PHI_MODULE_INDEX],
481  exp_id[m_ETA_MODULE_INDEX]);
482  if (get_hash(id, hash_id, &wcontext)) {
483  ATH_MSG_FATAL("PixelID::init_neighbors - unable to get hash, exp/compact "
484  << id.getString() << " " << show_to_string(id));
485 
486  return(1);
487  }
488 
489  // index for the subsequent arrays
490  unsigned short index = hash_id;
491  assert(hash_id < m_prev_phi_wafer_vec.size());
492  assert(hash_id < m_next_phi_wafer_vec.size());
493  assert(hash_id < m_prev_eta_wafer_vec.size());
494  assert(hash_id < m_next_eta_wafer_vec.size());
495 
496  if (pphi) {
497  // Get previous phi hash id
498  ExpandedIdentifier expId = exp_id;
499  expId[m_PHI_MODULE_INDEX] = previous_phi;
501  expId[m_LAYER_DISK_INDEX],
502  expId[m_PHI_MODULE_INDEX],
503  expId[m_ETA_MODULE_INDEX]);
504  if (get_hash(id, hash_id, &wcontext)) {
505  ATH_MSG_FATAL("PixelID::init_neighbors - unable to get previous phi hash, exp/compact "
506  << id.getString() << " " << show_to_string(id));
507 
508  return(1);
509  }
510  m_prev_phi_wafer_vec[index] = hash_id;
511  }
512 
513  if (nphi) {
514  // Get next phi hash id
515  ExpandedIdentifier expId = exp_id;
516  expId[m_PHI_MODULE_INDEX] = next_phi;
518  expId[m_LAYER_DISK_INDEX],
519  expId[m_PHI_MODULE_INDEX],
520  expId[m_ETA_MODULE_INDEX]);
521  if (get_hash(id, hash_id, &wcontext)) {
522  ATH_MSG_FATAL("PixelID::init_neighbors - unable to get next phi hash, exp/compact "
523  << id.getString() << " " << show_to_string(id));
524 
525  return(1);
526  }
527  m_next_phi_wafer_vec[index] = hash_id;
528  }
529 
530  if (peta) {
531  // Get previous eta hash id
532  ExpandedIdentifier expId = exp_id;
533  expId[m_ETA_MODULE_INDEX] = previous_eta;
535  expId[m_LAYER_DISK_INDEX],
536  expId[m_PHI_MODULE_INDEX],
537  expId[m_ETA_MODULE_INDEX]);
538  if (get_hash(id, hash_id, &wcontext)) {
539  ATH_MSG_FATAL("PixelID::init_neighbors - unable to get previous eta hash, exp/compact "
540  << id.getString() << " " << show_to_string(id));
541 
542  return(1);
543  }
544  m_prev_eta_wafer_vec[index] = hash_id;
545  }
546 
547  if (neta) {
548  // Get next eta hash id
549  ExpandedIdentifier expId = exp_id;
550  expId[m_ETA_MODULE_INDEX] = next_eta;
552  expId[m_LAYER_DISK_INDEX],
553  expId[m_PHI_MODULE_INDEX],
554  expId[m_ETA_MODULE_INDEX]);
555  if (get_hash(id, hash_id, &wcontext)) {
556  ATH_MSG_FATAL("PixelID::init_neighbors - unable to get next eta hash, exp/compact "
557  << id.getString() << " " << show_to_string(id));
558 
559  return(1);
560  }
561  m_next_eta_wafer_vec[index] = hash_id;
562  }
563  }
564  }
565  return(0);
566 }
567 
568 int
570 
571  if (!m_dict) {
572  ATH_MSG_FATAL("PixelID::initLevelsFromDict - dictionary NOT initialized");
573  return(1);
574  }
575 
576  // Find out which identifier field corresponds to each level. Use
577  // names to find each field/leve.
578 
579  m_INDET_INDEX = 999;
580  m_PIXEL_INDEX = 999;
581  m_BARREL_EC_INDEX = 999;
582  m_LAYER_DISK_INDEX = 999;
583  m_PHI_MODULE_INDEX = 999;
584  m_ETA_MODULE_INDEX = 999;
585  m_PHI_INDEX_INDEX = 999;
586  m_ETA_INDEX_INDEX = 999;
587 
588  // Save index to a PIXEL region for unpacking
592  ATH_MSG_FATAL("PixelID::initLevelsFromDict - unable to find pixel region index: id, reg "
593  << (std::string)id << " " << m_pixel_region_index);
594 
595  return(1);
596  }
597 
598  // Get levels
599  const IdDictField* field = m_dict->find_field("subdet");
600  if (field) {
601  m_INDET_INDEX = field->index();
602  } else {
603  ATH_MSG_FATAL("PixelID::initLevelsFromDict - unable to find 'subdet' field");
604 
605  return(1);
606  }
607 
608  field = m_dict->find_field("part");
609  if (field) {
610  m_PIXEL_INDEX = field->index();
611  } else {
612  ATH_MSG_FATAL("PixelID::initLevelsFromDict - unable to find 'part' field");
613  return(1);
614  }
615 
616  field = m_dict->find_field("barrel_endcap");
617  if (field) {
618  m_BARREL_EC_INDEX = field->index();
619  } else {
620  ATH_MSG_FATAL("PixelID::initLevelsFromDict - unable to find 'barrel_endcap' field");
621  return(1);
622  }
623 
624  field = m_dict->find_field("layer");
625  if (field) {
626  m_LAYER_DISK_INDEX = field->index();
627  } else {
628  ATH_MSG_FATAL("PixelID::initLevelsFromDict - unable to find 'layer' field");
629  return(1);
630  }
631 
632  field = m_dict->find_field("phi_module");
633  if (field) {
634  m_PHI_MODULE_INDEX = field->index();
635  } else {
636  ATH_MSG_FATAL("PixelID::initLevelsFromDict - unable to find 'phi_module' field");
637  return(1);
638  }
639  field = m_dict->find_field("eta_module");
640  if (field) {
641  m_ETA_MODULE_INDEX = field->index();
642  } else {
643  ATH_MSG_FATAL("PixelID::initLevelsFromDict - unable to find 'eta_module' field");
644  return(1);
645  }
646  field = m_dict->find_field("phi_index");
647  if (field) {
648  m_PHI_INDEX_INDEX = field->index();
649  } else {
650  ATH_MSG_FATAL("PixelID::initLevelsFromDict - unable to find 'phi_index' field");
651  return(1);
652  }
653  field = m_dict->find_field("eta_index");
654  if (field) {
655  m_ETA_INDEX_INDEX = field->index();
656  } else {
657  ATH_MSG_FATAL("PixelID::initLevelsFromDict - unable to find 'eta_index' field");
658  return(1);
659  }
660 
661  // Set the field implementations: for bec, lay/disk, eta/phi mod
662  // there are two kinds - shifted and non-shifted
663 
665 
674 
675 
676  ATH_MSG_DEBUG("decode index and bit fields for each level:");
680  ATH_MSG_DEBUG("bec_shift " << m_bec_shift_impl.show_to_string());
681  ATH_MSG_DEBUG("lay_disk " << m_lay_disk_impl.show_to_string());
682  ATH_MSG_DEBUG("lay_disk_shift " << m_lay_disk_shift_impl.show_to_string());
684  ATH_MSG_DEBUG("phi_mod_shift " << m_phi_mod_shift_impl.show_to_string());
686  ATH_MSG_DEBUG("eta_mod_shift " << m_eta_mod_shift_impl.show_to_string());
687  ATH_MSG_DEBUG("phi_index " << m_phi_index_impl.show_to_string());
688  ATH_MSG_DEBUG("eta_index " << m_eta_index_impl.show_to_string());
689  ATH_MSG_DEBUG("bec_eta_mod " << m_bec_eta_mod_impl.show_to_string());
690 
691 
692 
693 
694  std::cout << "indet " << m_indet_impl.decode_index() << " "
695  << (std::string) m_indet_impl.ored_field() << " "
696  << std::hex << m_indet_impl.mask() << " "
697  << m_indet_impl.zeroing_mask() << " "
698  << std::dec << m_indet_impl.shift()
699  << " " << m_indet_impl.bits() << " " << m_indet_impl.bits_offset() << " ";
701  std::cout << "pixel " << m_pixel_impl.decode_index() << " "
702  << (std::string) m_pixel_impl.ored_field() << " "
703  << std::hex << m_pixel_impl.mask() << " "
704  << m_pixel_impl.zeroing_mask() << " "
705  << std::dec << m_pixel_impl.shift()
706  << " " << m_pixel_impl.bits() << " " << m_pixel_impl.bits_offset() << " ";
708  std::cout << "bec " << m_bec_impl.decode_index() << " "
709  << (std::string) m_bec_impl.ored_field() << " "
710  << std::hex << m_bec_impl.mask() << " "
711  << m_bec_impl.zeroing_mask() << " "
712  << std::dec << m_bec_impl.shift()
713  << " " << m_bec_impl.bits() << " " << m_bec_impl.bits_offset() << " ";
715  std::cout << "bec_shift " << m_bec_shift_impl.decode_index() << " "
716  << (std::string) m_bec_shift_impl.ored_field() << " "
717  << std::hex << m_bec_shift_impl.mask() << " "
718  << m_bec_shift_impl.zeroing_mask() << " "
719  << std::dec << m_bec_shift_impl.shift()
720  << " " << m_bec_shift_impl.bits() << " " << m_bec_shift_impl.bits_offset() << " ";
722  std::cout << "lay_disk " << m_lay_disk_impl.decode_index() << " "
723  << (std::string) m_lay_disk_impl.ored_field() << " "
724  << std::hex << m_lay_disk_impl.mask() << " "
725  << m_lay_disk_impl.zeroing_mask() << " "
726  << std::dec << m_lay_disk_impl.shift()
727  << " " << m_lay_disk_impl.bits() << " " << m_lay_disk_impl.bits_offset() << " ";
729  std::cout << "lay_disk_shift " << m_lay_disk_shift_impl.decode_index() << " "
730  << (std::string) m_lay_disk_shift_impl.ored_field() << " "
731  << std::hex << m_lay_disk_shift_impl.mask() << " "
733  << std::dec << m_lay_disk_shift_impl.shift()
734  << " " << m_lay_disk_shift_impl.bits() << " " << m_lay_disk_shift_impl.bits_offset() << " ";
736  std::cout << "phi_mod " << m_phi_mod_impl.decode_index() << " "
737  << (std::string) m_phi_mod_impl.ored_field() << " "
738  << std::hex << m_phi_mod_impl.mask() << " "
739  << m_phi_mod_impl.zeroing_mask() << " "
740  << std::dec << m_phi_mod_impl.shift()
741  << " " << m_phi_mod_impl.bits() << " " << m_phi_mod_impl.bits_offset() << " ";
743  std::cout << "phi_mod_shift " << m_phi_mod_shift_impl.decode_index() << " "
744  << (std::string) m_phi_mod_shift_impl.ored_field() << " "
745  << std::hex << m_phi_mod_shift_impl.mask() << " "
747  << std::dec << m_phi_mod_shift_impl.shift()
748  << " " << m_phi_mod_shift_impl.bits() << " " << m_phi_mod_shift_impl.bits_offset() << " ";
750  std::cout << "eta_mod " << m_eta_mod_impl.decode_index() << " "
751  << (std::string) m_eta_mod_impl.ored_field() << " "
752  << std::hex << m_eta_mod_impl.mask() << " "
753  << m_eta_mod_impl.zeroing_mask() << " "
754  << std::dec << m_eta_mod_impl.shift()
755  << " " << m_eta_mod_impl.bits() << " " << m_eta_mod_impl.bits_offset() << " ";
757  std::cout << "eta_mod_shift " << m_eta_mod_shift_impl.decode_index() << " "
758  << (std::string) m_eta_mod_shift_impl.ored_field() << " "
759  << std::hex << m_eta_mod_shift_impl.mask() << " "
761  << std::dec << m_eta_mod_shift_impl.shift()
762  << " " << m_eta_mod_shift_impl.bits() << " " << m_eta_mod_shift_impl.bits_offset() << " ";
764  std::cout << "phi_index " << m_phi_index_impl.decode_index() << " "
765  << (std::string) m_phi_index_impl.ored_field() << " "
766  << std::hex << m_phi_index_impl.mask() << " "
767  << m_phi_index_impl.zeroing_mask() << " "
768  << std::dec << m_phi_index_impl.shift()
769  << " " << m_phi_index_impl.bits() << " " << m_phi_index_impl.bits_offset() << " ";
771  std::cout << "eta_index " << m_eta_index_impl.decode_index() << " "
772  << (std::string) m_eta_index_impl.ored_field() << " "
773  << std::hex << m_eta_index_impl.mask() << " "
774  << m_eta_index_impl.zeroing_mask() << " "
775  << std::dec << m_eta_index_impl.shift()
776  << " " << m_eta_index_impl.bits() << " " << m_eta_index_impl.bits_offset() << " ";
778  std::cout << "bec_eta_mod " << m_bec_eta_mod_impl.decode_index() << " "
779  << (std::string) m_bec_eta_mod_impl.ored_field() << " "
780  << std::hex << m_bec_eta_mod_impl.mask() << " "
781  << m_bec_eta_mod_impl.zeroing_mask() << " "
782  << std::dec << m_bec_eta_mod_impl.shift()
783  << " " << m_bec_eta_mod_impl.bits() << " " << m_bec_eta_mod_impl.bits_offset() << " ";
785 
786 
787  std::cout << "PixelID::initLevelsFromDict - found levels " << std::endl;
788  std::cout << "subdet " << m_INDET_INDEX << std::endl;
789  std::cout << "part " << m_PIXEL_INDEX << std::endl;
790  std::cout << "barrel_endcap " << m_BARREL_EC_INDEX << std::endl;
791  std::cout << "layer or disk " << m_LAYER_DISK_INDEX << std::endl;
792  std::cout << "phi_module " << m_PHI_MODULE_INDEX << std::endl;
793  std::cout << "eta_module " << m_ETA_MODULE_INDEX << std::endl;
794  std::cout << "phi_index " << m_PHI_INDEX_INDEX << std::endl;
795  std::cout << "eta_index " << m_ETA_INDEX_INDEX << std::endl;
796 
797  return(0);
798 }
799 
802  return m_wafer_hash_max;
803 }
804 
807  return m_pixel_hash_max;
808 }
809 
811  return(m_wafer_vec.begin());
812 }
813 
815  return(m_wafer_vec.end());
816 }
817 
820 }
821 
824 }
825 
826 void
828  ExpandedIdentifier& exp_id,
829  const IdContext* context) const {
830  exp_id.clear();
831  exp_id = m_baseExpandedIdentifier;
832  exp_id << barrel_ec(id)
833  << layer_disk(id)
834  << phi_module(id)
835  << eta_module(id);
836  if (!context || context->end_index() == m_ETA_INDEX_INDEX) {
837  exp_id << phi_index(id)
838  << eta_index(id);
839  }
840 }
841 
842 // From hash get Identifier
843 int
845  Identifier& id,
846  const IdContext* context) const {
847  int result = 1;
848 
849  size_t begin = (context) ? context->begin_index() : 0;
850  // cannot get hash if end is 0:
851  size_t end = (context) ? context->end_index() : 0;
852 
853  if (0 == begin) {
854  // No hashes yet for ids with prefixes
855  if (m_ETA_MODULE_INDEX == end) {
856  if (hash_id < (unsigned int) (m_wafer_vec.end() - m_wafer_vec.begin())) {
857  id = m_wafer_vec[hash_id];
858  result = 0;
859  }
860  } else if (m_ETA_INDEX_INDEX == end) {
861  // Do not know how to calculate pixel id from hash yet!!
862  std::cout << "Do not know how to calculate pixel id from hash yet!!" << std::endl;
863  }
864  }
865  return(result);
866 }
867 
868 int
870  IdentifierHash& hash_id,
871  const IdContext* context) const {
872  // Get the hash code from either a vec (for wafers) or calculate
873  // it (pixels). For the former, we convert to compact and call
874  // get_hash again. For the latter, we calculate the hash from the
875  // Identifier.
876 
877  int result = 1;
878 
879  hash_id = 0;
880  size_t begin = (context) ? context->begin_index() : 0;
881  size_t end = (context) ? context->end_index() : 0;
882  if (0 == begin) {
883  // No hashes yet for ids with prefixes
884  if (m_ETA_MODULE_INDEX == end) {
885  hash_id = wafer_hash(id);
886  if (hash_id.is_valid()) result = 0;
887  } else if (context && context->end_index() == m_ETA_INDEX_INDEX) {
888  // Must calculate for pixel hash
889  ExpandedIdentifier new_id;
890  get_expanded_id(id, new_id, context);
891  hash_id = m_full_pixel_range.cardinalityUpTo(new_id);
892  result = 0;
893  }
894  }
895  return(result);
896 }
897 
898 void
900 
901  if (m_dict) {
902  int nids = 0;
903  IdContext context = wafer_context();
905  const_id_iterator last = m_wafer_vec.end();
906  for (; first != last; ++first, ++nids) {
907  Identifier id = (*first);
908  ExpandedIdentifier expId;
909  get_expanded_id(id, expId, &context);
910  Identifier new_id = wafer_id(expId[m_BARREL_EC_INDEX],
911  expId[m_LAYER_DISK_INDEX],
912  expId[m_PHI_MODULE_INDEX],
913  expId[m_ETA_MODULE_INDEX]);
914  if (id != new_id) {
915  ATH_MSG_ERROR("PixelID::test_wafer_packing: new and old compact id not equal. New/old/expanded ids "
916  << show_to_string(new_id) << " " << show_to_string(id) << " "
917  << (std::string) expId);
918 
919  continue;
920  }
921  }
922 
923  nids = 0;
924  context = pixel_context();
925  const_expanded_id_iterator first_pixel = pixel_begin();
926  const_expanded_id_iterator last_pixel = pixel_end();
927  for (; first_pixel != last_pixel && nids < 1000; ++first_pixel, ++nids) {
928  const ExpandedIdentifier& exp_id = *first_pixel;
929  ExpandedIdentifier new_exp_id;
930 
932  exp_id[m_LAYER_DISK_INDEX],
933  exp_id[m_PHI_MODULE_INDEX],
934  exp_id[m_ETA_MODULE_INDEX]);
935 
936  get_expanded_id(id, new_exp_id, &context);
937  if (exp_id[0] != new_exp_id[0] ||
938  exp_id[1] != new_exp_id[1] ||
939  exp_id[2] != new_exp_id[2] ||
940  exp_id[3] != new_exp_id[3] ||
941  exp_id[4] != new_exp_id[4] ||
942  exp_id[5] != new_exp_id[5]) {
943  ATH_MSG_ERROR("PixelID::test_wafer_packing: new and old expanded ids not equal. New/old/compact ids "
944  << (std::string) new_exp_id
945  << " " << (std::string) exp_id
946  << " " << show_to_string(id));
947 
948  }
949 
951  exp_id[m_LAYER_DISK_INDEX],
952  exp_id[m_PHI_MODULE_INDEX],
953  exp_id[m_ETA_MODULE_INDEX],
954  exp_id[m_PHI_INDEX_INDEX],
955  exp_id[m_ETA_INDEX_INDEX]);
957  layer_disk(pid),
958  phi_module(pid),
959  eta_module(pid),
960  phi_index(pid),
961  eta_index(pid));
962  if (pid != pid1) {
963  ATH_MSG_ERROR("PixelID::test_wafer_packing: new and old pixel ids not equal. New/old ids "
964  << " " << show_to_string(pid1) << " "
965  << show_to_string(pid));
966 
967  }
968  }
969 
970  ATH_MSG_DEBUG("PixelID::test_wafer_packing: Successfully tested " << nids << " ids.");
971 
972  } else {
973  ATH_MSG_ERROR("PixelID::test_wafer_packing: Unable to test wafer is packing - no dictionary has been defined.");
974 
975  }
976 }
977 
978 
979 IdContext
982 
983  return(IdContext(id, 0, m_ETA_MODULE_INDEX));
984 }
985 
986 
987 IdContext
989  // For pixel only, the prefix is the first two levels
991 }
PixelID::init_hashes
int init_hashes()
Definition: PixelID.cxx:331
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
IdDictMgr.h
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:629
AtlasDetectorID::indet_field_value
int indet_field_value() const
Provide efficient access to individual field values, for subclass idhelpers.
Definition: AtlasDetectorID.h:480
PixelID::m_bec_impl
IdDictFieldImplementation m_bec_impl
Definition: PixelID.h:314
ConstRangeIterator
Definition: RangeIterator.h:46
PixelID::get_hash
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const override final
Create hash id from compact id (return == 0 for OK)
Definition: PixelID.cxx:869
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictDictionary.cxx:309
PixelID::m_wafer_hash_max
size_type m_wafer_hash_max
Definition: PixelID.h:303
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
PixelID::m_INDET_INDEX
size_type m_INDET_INDEX
Definition: PixelID.h:290
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:639
AtlasDetectorID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: AtlasDetectorID.cxx:257
PixelID::const_id_iterator
std::vector< Identifier >::const_iterator const_id_iterator
Definition: PixelID.h:72
get_generator_info.result
result
Definition: get_generator_info.py:21
PixelID::is_eta_module_min
bool is_eta_module_min(const Identifier &id) const
For the barrel.
Definition: PixelID.cxx:114
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IdDictDictionary::version
const std::string & version() const
Dictionary version.
Definition: IdDictDictionary.h:345
MultiRange::factory_begin
identifier_factory factory_begin()
Definition: MultiRange.cxx:112
IdDictFieldImplementation::show_to_string
std::string show_to_string(void) const
Definition: IdDictFieldImplementation.cxx:32
PixelID::m_pixel_id
Identifier m_pixel_id
Definition: PixelID.h:299
PixelID::init_neighbors
int init_neighbors()
Definition: PixelID.cxx:438
PixelID::m_eta_mod_shift_impl
IdDictFieldImplementation m_eta_mod_shift_impl
Definition: PixelID.h:321
PixelID::m_bec_shift_impl
IdDictFieldImplementation m_bec_shift_impl
Definition: PixelID.h:318
PixelID::PixelID
PixelID()
Definition: PixelID.cxx:24
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:600
index
Definition: index.py:1
IdDictDictionary::region
const IdDictRegion & region(size_t i) const
Region at index i.
Definition: IdDictDictionary.h:354
PixelID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: PixelID.cxx:185
MultiRange::factory_end
identifier_factory factory_end()
Definition: MultiRange.cxx:124
IdentifierField::get_minimum
element_type get_minimum() const
Query the values.
Definition: IdentifierField.h:121
PixelID::m_indet_impl
IdDictFieldImplementation m_indet_impl
Definition: PixelID.h:312
IdDictDictionary.h
PixelID::m_dbm_field
Range::field m_dbm_field
Definition: PixelID.h:326
MultiRange::cardinalityUpTo
size_type cardinalityUpTo(const ExpandedIdentifier &id) const
Definition: MultiRange.cxx:88
PixelID::m_next_eta_wafer_vec
hash_vec m_next_eta_wafer_vec
Definition: PixelID.h:310
IdContext::end_index
size_type end_index() const
Definition: IdContext.h:46
PixelID::m_BARREL_EC_INDEX
size_type m_BARREL_EC_INDEX
Definition: PixelID.h:292
PixelID::m_phi_index_impl
IdDictFieldImplementation m_phi_index_impl
Definition: PixelID.h:322
PixelID::m_ETA_INDEX_INDEX
size_type m_ETA_INDEX_INDEX
Definition: PixelID.h:297
ReadBchFromCrest.begin
begin
Definition: ReadBchFromCrest.py:80
PixelID::m_phi_mod_shift_impl
IdDictFieldImplementation m_phi_mod_shift_impl
Definition: PixelID.h:320
IdDictDictionary::find_field
const IdDictField * find_field(const std::string &name) const
Definition: IdDictDictionary.cxx:47
PixelID::m_full_pixel_range
MultiRange m_full_pixel_range
Definition: PixelID.h:302
IdentifierField::clear
void clear()
Set methods.
Definition: IdentifierField.cxx:224
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
AtlasDetectorID::pixel_field_value
int pixel_field_value() const
Definition: AtlasDetectorID.h:495
PixelID::m_eta_mod_impl
IdDictFieldImplementation m_eta_mod_impl
Definition: PixelID.h:317
IdDictFieldImplementation::pack
void pack(int value, Identifier &id) const
Definition: IdDictFieldImplementation.h:173
PixelID::m_ETA_MODULE_OFFSET
int m_ETA_MODULE_OFFSET
Definition: PixelID.h:298
IdDictFieldImplementation::decode_index
bool decode_index() const
Definition: IdDictFieldImplementation.h:231
IdentifierField::get_maximum
element_type get_maximum() const
Definition: IdentifierField.h:130
PixelID::m_ETA_MODULE_INDEX
size_type m_ETA_MODULE_INDEX
Definition: PixelID.h:295
PixelID::get_prev_in_phi
int get_prev_in_phi(const IdentifierHash &id, IdentifierHash &prev) const
Previous wafer hash in phi (return == 0 for neighbor found)
Definition: PixelID.cxx:387
PixelID::initLevelsFromDict
int initLevelsFromDict()
Definition: PixelID.cxx:569
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
PixelID::pixel_end
const_expanded_id_iterator pixel_end() const
Definition: PixelID.cxx:822
IdDictDictionary::name
const std::string & name() const
Dictionary name.
Definition: IdDictDictionary.h:336
PixelID::m_baseExpandedIdentifier
ExpandedIdentifier m_baseExpandedIdentifier
Definition: PixelID.h:287
PixelID::m_wafer_vec
id_vec m_wafer_vec
Definition: PixelID.h:306
PixelID::eta_module_max
int eta_module_max(const Identifier &id) const
Definition: PixelID.cxx:79
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:360
CalibDbCompareRT.region_id
region_id
Definition: CalibDbCompareRT.py:67
IdDictRegion
Definition: IdDictRegion.h:21
PixelID::NOT_VALID_HASH
@ NOT_VALID_HASH
Definition: PixelID.h:259
PixelID::pixel_hash_max
size_type pixel_hash_max() const
Definition: PixelID.cxx:806
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
PixelID::m_PIXEL_INDEX
size_type m_PIXEL_INDEX
Definition: PixelID.h:291
PixelID::wafer_context
IdContext wafer_context() const
Definition: PixelID.cxx:980
PixelID::m_bec_eta_mod_impl
IdDictFieldImplementation m_bec_eta_mod_impl
Definition: PixelID.h:324
IdDictDictionary::find_region
const IdDictRegion * find_region(const std::string &region_name) const
Definition: IdDictDictionary.cxx:114
IdDictRegion::implementation
const IdDictFieldImplementation & implementation(size_t i) const
Definition: IdDictRegion.cxx:38
IdDictMgr
Definition: IdDictMgr.h:16
IdContext::begin_index
size_type begin_index() const
Definition: IdContext.h:45
PixelID::pixel_begin
const_expanded_id_iterator pixel_begin() const
For pixel ids, only expanded id iterators are available.
Definition: PixelID.cxx:818
IdDictFieldImplementation::shift
size_type shift() const
Definition: IdDictFieldImplementation.h:226
PixelID::wafer_hash
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition: PixelID.h:383
PixelID::m_pixel_hash_max
size_type m_pixel_hash_max
Definition: PixelID.h:304
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
PixelID::get_next_in_phi
int get_next_in_phi(const IdentifierHash &id, IdentifierHash &next) const
Next wafer hash in phi (return == 0 for neighbor found)
Definition: PixelID.cxx:400
PixelID::m_baseIdentifier
Identifier m_baseIdentifier
Definition: PixelID.h:286
IdContext.h
PixelID::get_expanded_id
void get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context=0) const
Create expanded id from compact id (return == 0 for OK)
Definition: PixelID.cxx:827
PixelID::phi_index_max
int phi_index_max(const Identifier &id) const
Definition: PixelID.cxx:143
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
IdentifierField::empty
bool empty() const
If true, this field does not have any constraints, and may hold any value representable by element_ty...
Definition: IdentifierField.h:182
MultiRange::const_identifier_factory
Definition: MultiRange.h:52
lumiFormat.i
int i
Definition: lumiFormat.py:85
PixelID::eta_index_max
int eta_index_max(const Identifier &id) const
Definition: PixelID.cxx:162
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IdDictFieldImplementation::bits_offset
size_type bits_offset() const
Definition: IdDictFieldImplementation.h:208
PixelID::m_full_wafer_range
MultiRange m_full_wafer_range
Definition: PixelID.h:301
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
PixelID::pixel_id_checks
void pixel_id_checks(int barrel_ec, int layer_disk, int phi_module, int eta_module, int phi_index, int eta_index) const
Definition: PixelID.cxx:46
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:645
IdentifierField::get_next
bool get_next(element_type current, element_type &next) const
Definition: IdentifierField.cxx:149
createCablingJSON.eta_index
int eta_index
Definition: createCablingJSON.py:14
PixelID::get_next_in_eta
int get_next_in_eta(const IdentifierHash &id, IdentifierHash &next) const
Next wafer hash in eta (return == 0 for neighbor found)
Definition: PixelID.cxx:426
IdDictFieldImplementation::ored_field
const Range::field & ored_field() const
Definition: IdDictFieldImplementation.h:196
IdentifierHash::is_valid
bool is_valid() const
Check if id is in a valid state.
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:203
PixelID::phi_module_max
int phi_module_max(const Identifier &id) const
Definition: PixelID.cxx:123
PixelID::wafer_hash_max
size_type wafer_hash_max() const
Definition: PixelID.cxx:801
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictDictionary.cxx:92
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:607
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:632
PixelID::m_next_phi_wafer_vec
hash_vec m_next_phi_wafer_vec
Definition: PixelID.h:308
PixelID::test_wafer_packing
void test_wafer_packing() const
Tests of packing.
Definition: PixelID.cxx:899
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
IdentifierHash.h
PixelID::m_prev_phi_wafer_vec
hash_vec m_prev_phi_wafer_vec
Definition: PixelID.h:307
RangeIterator.h
AtlasDetectorID::setDictVersion
virtual void setDictVersion(const IdDictMgr &dict_mgr, const std::string &name) override
Definition: AtlasDetectorID.cxx:501
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:29
PixelID::layer_disk_max
int layer_disk_max(const Identifier &id) const
Max/Min values for each field (error returns -999)
Definition: PixelID.cxx:61
IdDictDictionary
Definition: IdDictDictionary.h:31
PixelID::get_id
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override final
Create compact id from hash id (return == 0 for OK)
Definition: PixelID.cxx:844
PixelID::is_eta_module_max
bool is_eta_module_max(const Identifier &id) const
For the barrel.
Definition: PixelID.cxx:119
PixelID::m_pixel_region_index
size_type m_pixel_region_index
Definition: PixelID.h:289
MultiRange::match
int match(const ExpandedIdentifier &id) const
Match an identifier.
Definition: MultiRange.cxx:57
AtlasDetectorID::pixel
Identifier pixel(void) const
Definition: AtlasDetectorID.cxx:92
PixelID::eta_module_min
int eta_module_min(const Identifier &id) const
Definition: PixelID.cxx:96
DeMoScan.index
string index
Definition: DeMoScan.py:362
AtlasDetectorID::reinitialize
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
Definition: AtlasDetectorID.cxx:223
PixelID::pixel_context
IdContext pixel_context() const
Definition: PixelID.cxx:988
IdDictField.h
IdDictFieldImplementation::zeroing_mask
value_type zeroing_mask() const
Definition: IdDictFieldImplementation.h:220
IdDictMgr::find_dictionary
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:116
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:367
PixelID::wafer_id_checks
void wafer_id_checks(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
Definition: PixelID.cxx:32
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
PixelID::wafer_end
const_id_iterator wafer_end() const
Definition: PixelID.cxx:814
PixelID::pixel_id
Identifier pixel_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
Definition: PixelID.h:428
PixelID::m_eta_index_impl
IdDictFieldImplementation m_eta_index_impl
Definition: PixelID.h:323
PixelID::m_phi_mod_impl
IdDictFieldImplementation m_phi_mod_impl
Definition: PixelID.h:316
MultiRange::size
size_type size() const
Definition: MultiRange.cxx:70
DeMoScan.first
bool first
Definition: DeMoScan.py:534
PixelID::m_barrel_field
Range::field m_barrel_field
Definition: PixelID.h:305
PixelID::is_phi_module_max
bool is_phi_module_max(const Identifier &id) const
To check for when phi wrap around may be needed.
Definition: PixelID.cxx:180
IdentifierField
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
Definition: IdentifierField.h:83
PixelID::m_lay_disk_shift_impl
IdDictFieldImplementation m_lay_disk_shift_impl
Definition: PixelID.h:319
PixelID::wafer_begin
const_id_iterator wafer_begin() const
Iterators over full set of ids. Wafer iterator is sorted.
Definition: PixelID.cxx:810
ExpandedIdentifier::clear
void clear()
Erase all fields.
IdentifierField::get_previous
bool get_previous(element_type current, element_type &previous) const
Returns false if previous/next is at end of range, or not possible.
Definition: IdentifierField.cxx:106
PixelID::m_prev_eta_wafer_vec
hash_vec m_prev_eta_wafer_vec
Definition: PixelID.h:309
PixelID::m_LAYER_DISK_INDEX
size_type m_LAYER_DISK_INDEX
Definition: PixelID.h:293
Identifier::value_type
unsigned long long value_type
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:27
IdDictRegion.h
IdentifierField::show
void show() const
Definition: IdentifierField.cxx:382
PixelID::size_type
Identifier::size_type size_type
Definition: PixelID.h:71
IdDictField
Definition: IdDictField.h:16
MultiRange::cardinality
size_type cardinality() const
Computes a possible cardinality from all ranges.
Definition: MultiRange.cxx:82
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
PixelID::m_PHI_MODULE_INDEX
size_type m_PHI_MODULE_INDEX
Definition: PixelID.h:294
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:625
ExpandedIdentifier::element_type
int element_type
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:106
PixelID::m_lay_disk_impl
IdDictFieldImplementation m_lay_disk_impl
Definition: PixelID.h:315
PixelID::m_dict
const IdDictDictionary * m_dict
Definition: PixelID.h:300
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
IdDictFieldImplementation::mask
size_type mask() const
Definition: IdDictFieldImplementation.h:214
PixelID::get_prev_in_eta
int get_prev_in_eta(const IdentifierHash &id, IdentifierHash &prev) const
Previous wafer hash in eta (return == 0 for neighbor found)
Definition: PixelID.cxx:413
IdentifierField::add_value
void add_value(element_type value)
Definition: IdentifierField.cxx:250
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:52
xAOD::TrackingDetails::phi_index
@ phi_index
Definition: TrackingDetails.h:40
PixelID::m_pixel_impl
IdDictFieldImplementation m_pixel_impl
Definition: PixelID.h:313
IdDictFieldImplementation::bits
size_type bits() const
Definition: IdDictFieldImplementation.h:202
PixelID::m_PHI_INDEX_INDEX
size_type m_PHI_INDEX_INDEX
Definition: PixelID.h:296
Identifier
Definition: IdentifierFieldParser.cxx:14