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 
11 #include "GaudiKernel/MsgStream.h"
12 
16 #include "IdDict/IdDictDefs.h"
17 #include <set>
18 #include <algorithm>
19 #include <iostream>
20 
21 
23  : AtlasDetectorID("PixelID", "pixel")
24 {
26  m_dbm_field.add_value(0); //DBM
27 }
28 
29 void
30 PixelID::wafer_id_checks(int barrel_ec,int layer_disk,int phi_module,int eta_module) const {
31 
32  // Fill expanded id
36  if (!m_full_wafer_range.match(id)) { // module range check is sufficient
37  MsgStream log(m_msgSvc, "PixelID");
38  log << MSG::ERROR << " PixelID::wafer_id result is NOT ok. ID, range "
39  << (std::string) id << " " << (std::string) m_full_wafer_range << endmsg;
40 
41  }
42 }
43 
44 void
45 PixelID::pixel_id_checks(int barrel_ec,int layer_disk,int phi_module,int eta_module,
46  int phi_index,int eta_index) const {
47  // Check that id is within allowed range
48  // Fill expanded id
52  if (!m_full_pixel_range.match(id)) {
53  MsgStream log(m_msgSvc, "PixelID");
54  log << MSG::ERROR << " PixelID::pixel_id result is NOT ok. ID, range "
55  << (std::string) id << " " << (std::string) m_full_pixel_range << endmsg;
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  MsgStream log(m_msgSvc, "PixelID");
187 
188  log << MSG::INFO << "Initialize from dictionary" << endmsg;
189 
190  // Check whether this helper should be reinitialized
191  if (!reinitialize(dict_mgr)) {
192  log << MSG::INFO << "Request to reinitialize not satisfied - tags have not changed" << endmsg;
193  return(0);
194  } else {
195  log << MSG::DEBUG << "(Re)initialize" << endmsg;
196  }
197 
198  // init base object
199  if (AtlasDetectorID::initialize_from_dictionary(dict_mgr)) return(1);
200 
201  // Register version of InnerDetector dictionary
202  if (register_dict_tag(dict_mgr, "InnerDetector")) return(1);
203 
204  m_dict = dict_mgr.find_dictionary("InnerDetector");
205  if (!m_dict) {
206  log << MSG::FATAL << " PixelID::initialize_from_dict - cannot access InnerDetector dictionary "
207  << endmsg;
208 
209  return(1);
210  }
211 
212  AtlasDetectorID::setDictVersion(dict_mgr, "InnerDetector");
213 
214  // Initialize the field indices
215  if (initLevelsFromDict()) return(1);
216 
217  // save indet id
218  m_pixel_id = pixel();
219  if (!is_pixel(m_pixel_id)) {
220  log << MSG::FATAL << " PixelID::initialize_from_dict - cannot get pixel id dictionary "
221  << endmsg;
222 
223  return(1);
224  }
225 
226  //
227  // Set barrel field for testing is_barrel
228  //
229  int barrel_value;
231  // barrel
232  if (m_dict->get_label_value("barrel_endcap", "barrel", barrel_value)) {
233  log << MSG::FATAL << "Could not get value for label 'barrel' of field 'barrel_endcap' in dictionary "
234  << m_dict->m_name
235  << endmsg;
236 
237  return(1);
238  }
239  m_barrel_field.add_value(barrel_value);
240  m_barrel_field.add_value(barrel_value);
241  log << MSG::DEBUG << " PixelID::initialize_from_dict "
242  << "Set barrel field values: "
243  << (std::string) m_barrel_field
244  << endmsg;
245 
246 
247  //DBM
248  //Set dbm field for testing is_dbm
249  //
250  // WARNING:
251  // modified to skip DBM when aprorpiate dictionary is not present
252  // by adding +999 or -999 to the field
253  //
254 
255  int dbm_value;
256  m_dbm_field.clear();
257  if (m_dict->get_label_value("barrel_endcap", "negative_dbm", dbm_value)) {
258  if (m_dict->m_version.find("DBM") != std::string::npos) {
259  log << MSG::WARNING <<
260  "Could not get value for label 'negative_dbm' of field 'barrel_endcap' in dictionary "
261  << m_dict->m_name
262  << endmsg;
263 
264  }
265  //return (1);
266  m_dbm_field.add_value(-999);
267  } else {
268  m_dbm_field.add_value(dbm_value);
269  }
270  if (m_dict->get_label_value("barrel_endcap", "positive_dbm", dbm_value)) {
271  if (m_dict->m_version.find("DBM") != std::string::npos) {
272  log << MSG::WARNING <<
273  "Could not get value for label 'positive_dbm' of field 'barrel_endcap' in dictionary "
274  << m_dict->m_name
275  << endmsg;
276 
277  }
278  //return (1);
279  m_dbm_field.add_value(999);
280  } else {
281  m_dbm_field.add_value(dbm_value);
282  }
283  log << MSG::DEBUG << " PixelID::initialize_from_dict "
284  << "Set dbm field values: "
285  << (std::string) m_dbm_field
286  << endmsg;
287 
288 
289 
290  //
291  // Build multirange for the valid set of identifiers
292  //
293 
294 
295  // Find value for the field InnerDetector
296  const IdDictDictionary* atlasDict = dict_mgr.find_dictionary("ATLAS");
297  int inDetField = -1;
298  if (atlasDict->get_label_value("subdet", "InnerDetector", inDetField)) {
299  log << MSG::FATAL << "Could not get value for label 'InnerDetector' of field 'subdet' in dictionary "
300  << atlasDict->m_name
301  << endmsg;
302 
303  return(1);
304  }
305 
306  // Find value for the field PIXEL
307  int pixelField = -1;
308  if (m_dict->get_label_value("part", "Pixel", pixelField)) {
309  log << MSG::FATAL << "Could not get value for label 'Pixel' of field 'part' in dictionary "
310  << m_dict->m_name
311  << endmsg;
312 
313  return(1);
314  }
315  log << MSG::DEBUG << " PixelID::initialize_from_dict "
316  << "Found field values: InDet/Pixel "
317  << inDetField << "/"
318  << pixelField
319  << endmsg;
320 
321 
322  // Set up id for region and range prefix
324  region_id.add(inDetField);
325  region_id.add(pixelField);
326  Range prefix;
329 
330  // Set the base identifier for Pixel
334 
335  // Set the base expanded identifier for Pixel
337 
338  // Setup the hash tables
339  if (init_hashes()) return(1);
340 
341  // Setup hash tables for finding neighbors
342  if (init_neighbors()) return(1);
343  log << MSG::DEBUG << " PixelID::initialize_from_dict "
344  << endmsg;
345  log << MSG::DEBUG
346  << "Wafer range -> " << (std::string) m_full_wafer_range
347  << endmsg;
348  log << MSG::DEBUG
349  << "Pixel range -> " << (std::string) m_full_pixel_range
350  << endmsg;
351 
352  return 0;
353 }
354 
355 int
357  //
358  // create a vector(s) to retrieve the hashes for compact ids. For
359  // the moment, we implement a hash for wafers but NOT for pixels
360  // (too many)
361  //
362 
363  MsgStream log(m_msgSvc, "PixelID");
364 
365  // wafer hash
367  m_wafer_vec.clear();
369  unsigned int nids = 0;
370  std::set<Identifier> ids;
371  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
372  const Range& range = m_full_wafer_range[i];
374  for (const auto & exp_id:rit) {
376  exp_id[m_LAYER_DISK_INDEX],
377  exp_id[m_PHI_MODULE_INDEX],
378  exp_id[m_ETA_MODULE_INDEX]);
379  if (!(ids.insert(id)).second) {
380  log << MSG::FATAL << " PixelID::init_hashes "
381  << " Error: duplicated id for wafer id. nid " << nids
382  << " id " << show_to_string(id)
383  << " exp id " << (std::string) exp_id
384  << " " << (std::string) m_full_wafer_range << endmsg;
385 
386  return(1);
387  }
388  nids++;
389  }
390  }
391  if (ids.size() != m_wafer_hash_max) {
392  log << MSG::FATAL << " PixelID::init_hashes "
393  << " Error: set size NOT EQUAL to hash max. size " << ids.size()
394  << " hash max " << m_wafer_hash_max
395  << endmsg;
396 
397  return(1);
398  }
399 
400  nids = 0;
401  std::set<Identifier>::const_iterator first = ids.begin();
402  std::set<Identifier>::const_iterator last = ids.end();
403  for (; first != last && nids < m_wafer_vec.size(); ++first) {
404  m_wafer_vec[nids] = (*first);
405  nids++;
406  }
407 
408  // pixel hash - we do not keep a vec for the pixels - too large
410 
411  return(0);
412 }
413 
414 int
416  unsigned short index = id;
417 
418  if (index < m_prev_phi_wafer_vec.size()) {
419  if (m_prev_phi_wafer_vec[index] == NOT_VALID_HASH) return(1);
420 
421  prev = m_prev_phi_wafer_vec[index];
422  return(0);
423  }
424  return(1);
425 }
426 
427 int
429  unsigned short index = id;
430 
431  if (index < m_next_phi_wafer_vec.size()) {
432  if (m_next_phi_wafer_vec[index] == NOT_VALID_HASH) return(1);
433 
435  return(0);
436  }
437  return(1);
438 }
439 
440 int
442  unsigned short index = id;
443 
444  if (index < m_prev_eta_wafer_vec.size()) {
445  if (m_prev_eta_wafer_vec[index] == NOT_VALID_HASH) return(1);
446 
447  prev = m_prev_eta_wafer_vec[index];
448  return(0);
449  }
450  return(1);
451 }
452 
453 int
455  unsigned short index = id;
456  if (index < m_next_eta_wafer_vec.size()) {
457  if (m_next_eta_wafer_vec[index] == NOT_VALID_HASH) return(1);
458 
460  return(0);
461  }
462  return(1);
463 }
464 
465 int
467  //
468  // create a vector(s) to retrieve the hashes for compact ids for
469  // wafer neighbors.
470  //
471  MsgStream log(m_msgSvc, "PixelID");
472 
473  log << MSG::DEBUG << "PixelID::init_neighbors " << endmsg;
474 
475  m_prev_phi_wafer_vec.clear();
476  m_next_phi_wafer_vec.clear();
477  m_prev_eta_wafer_vec.clear();
478  m_next_eta_wafer_vec.clear();
483 
484  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
485  const Range& range = m_full_wafer_range[i];
486  const Range::field& phi_field = range[m_PHI_MODULE_INDEX];
487  const Range::field& eta_field = range[m_ETA_MODULE_INDEX];
488 
489  // save the lowest value of the module offset
491  eta_field.get_minimum() : m_ETA_MODULE_OFFSET;
493  for (const auto & exp_id: rit) {
498  bool pphi = phi_field.get_previous(exp_id[m_PHI_MODULE_INDEX], previous_phi);
499  bool nphi = phi_field.get_next(exp_id[m_PHI_MODULE_INDEX], next_phi);
500  bool peta = eta_field.get_previous(exp_id[m_ETA_MODULE_INDEX], previous_eta);
501  bool neta = eta_field.get_next(exp_id[m_ETA_MODULE_INDEX], next_eta);
502 
503  IdContext wcontext = wafer_context();
504 
505  // First get primary hash id
506  IdentifierHash hash_id;
508  exp_id[m_LAYER_DISK_INDEX],
509  exp_id[m_PHI_MODULE_INDEX],
510  exp_id[m_ETA_MODULE_INDEX]);
511  if (get_hash(id, hash_id, &wcontext)) {
512  log << MSG::FATAL << " PixelID::init_neighbors - unable to get hash, exp/compact "
513  << id.getString() << " " << show_to_string(id) << endmsg;
514 
515  return(1);
516  }
517 
518  // index for the subsequent arrays
519  unsigned short index = hash_id;
520  assert(hash_id < m_prev_phi_wafer_vec.size());
521  assert(hash_id < m_next_phi_wafer_vec.size());
522  assert(hash_id < m_prev_eta_wafer_vec.size());
523  assert(hash_id < m_next_eta_wafer_vec.size());
524 
525  if (pphi) {
526  // Get previous phi hash id
527  ExpandedIdentifier expId = exp_id;
528  expId[m_PHI_MODULE_INDEX] = previous_phi;
530  expId[m_LAYER_DISK_INDEX],
531  expId[m_PHI_MODULE_INDEX],
532  expId[m_ETA_MODULE_INDEX]);
533  if (get_hash(id, hash_id, &wcontext)) {
534  log << MSG::FATAL << " PixelID::init_neighbors - unable to get previous phi hash, exp/compact "
535  << id.getString() << " " << show_to_string(id) << endmsg;
536 
537  return(1);
538  }
539  m_prev_phi_wafer_vec[index] = hash_id;
540  }
541 
542  if (nphi) {
543  // Get next phi hash id
544  ExpandedIdentifier expId = exp_id;
545  expId[m_PHI_MODULE_INDEX] = next_phi;
547  expId[m_LAYER_DISK_INDEX],
548  expId[m_PHI_MODULE_INDEX],
549  expId[m_ETA_MODULE_INDEX]);
550  if (get_hash(id, hash_id, &wcontext)) {
551  log << MSG::FATAL << " PixelID::init_neighbors - unable to get next phi hash, exp/compact " <<
552  id.getString() << " " << show_to_string(id) << endmsg;
553 
554  return(1);
555  }
556  m_next_phi_wafer_vec[index] = hash_id;
557  }
558 
559  if (peta) {
560  // Get previous eta hash id
561  ExpandedIdentifier expId = exp_id;
562  expId[m_ETA_MODULE_INDEX] = previous_eta;
564  expId[m_LAYER_DISK_INDEX],
565  expId[m_PHI_MODULE_INDEX],
566  expId[m_ETA_MODULE_INDEX]);
567  if (get_hash(id, hash_id, &wcontext)) {
568  log << MSG::FATAL << " PixelID::init_neighbors - unable to get previous eta hash, exp/compact "
569  << id.getString() << " " << show_to_string(id) << endmsg;
570 
571  return(1);
572  }
573  m_prev_eta_wafer_vec[index] = hash_id;
574  }
575 
576  if (neta) {
577  // Get next eta hash id
578  ExpandedIdentifier expId = exp_id;
579  expId[m_ETA_MODULE_INDEX] = next_eta;
581  expId[m_LAYER_DISK_INDEX],
582  expId[m_PHI_MODULE_INDEX],
583  expId[m_ETA_MODULE_INDEX]);
584  if (get_hash(id, hash_id, &wcontext)) {
585  log << MSG::FATAL << " PixelID::init_neighbors - unable to get next eta hash, exp/compact "
586  << id.getString() << " " << show_to_string(id) << endmsg;
587 
588  return(1);
589  }
590  m_next_eta_wafer_vec[index] = hash_id;
591  }
592  }
593  }
594  return(0);
595 }
596 
597 int
599  MsgStream log(m_msgSvc, "PixelID");
600 
601  if (!m_dict) {
602  log << MSG::FATAL << " PixelID::initLevelsFromDict - dictionary NOT initialized " << endmsg;
603  return(1);
604  }
605 
606  // Find out which identifier field corresponds to each level. Use
607  // names to find each field/leve.
608 
609  m_INDET_INDEX = 999;
610  m_PIXEL_INDEX = 999;
611  m_BARREL_EC_INDEX = 999;
612  m_LAYER_DISK_INDEX = 999;
613  m_PHI_MODULE_INDEX = 999;
614  m_ETA_MODULE_INDEX = 999;
615  m_PHI_INDEX_INDEX = 999;
616  m_ETA_INDEX_INDEX = 999;
617 
618  // Save index to a PIXEL region for unpacking
622  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find pixel region index: id, reg "
623  << (std::string) id << " " << m_pixel_region_index
624  << endmsg;
625 
626  return(1);
627  }
628 
629  // Get levels
630  IdDictField* field = m_dict->find_field("subdet");
631  if (field) {
632  m_INDET_INDEX = field->m_index;
633  } else {
634  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'subdet' field "
635  << endmsg;
636 
637  return(1);
638  }
639 
640  field = m_dict->find_field("part");
641  if (field) {
642  m_PIXEL_INDEX = field->m_index;
643  } else {
644  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'part' field " << endmsg;
645  return(1);
646  }
647 
648  field = m_dict->find_field("barrel_endcap");
649  if (field) {
650  m_BARREL_EC_INDEX = field->m_index;
651  } else {
652  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'barrel_endcap' field " << endmsg;
653  return(1);
654  }
655 
656  field = m_dict->find_field("layer");
657  if (field) {
658  m_LAYER_DISK_INDEX = field->m_index;
659  } else {
660  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'layer' field " << endmsg;
661  return(1);
662  }
663 
664  field = m_dict->find_field("phi_module");
665  if (field) {
666  m_PHI_MODULE_INDEX = field->m_index;
667  } else {
668  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'phi_module' field " << endmsg;
669  return(1);
670  }
671  field = m_dict->find_field("eta_module");
672  if (field) {
673  m_ETA_MODULE_INDEX = field->m_index;
674  } else {
675  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'eta_module' field " << endmsg;
676  return(1);
677  }
678  field = m_dict->find_field("phi_index");
679  if (field) {
680  m_PHI_INDEX_INDEX = field->m_index;
681  } else {
682  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'phi_index' field " << endmsg;
683  return(1);
684  }
685  field = m_dict->find_field("eta_index");
686  if (field) {
687  m_ETA_INDEX_INDEX = field->m_index;
688  } else {
689  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'eta_index' field " << endmsg;
690  return(1);
691  }
692 
693  // Set the field implementations: for bec, lay/disk, eta/phi mod
694  // there are two kinds - shifted and non-shifted
695 
697 
706 
707 
708  log << MSG::DEBUG << "decode index and bit fields for each level: " << endmsg;
709  log << MSG::DEBUG << "indet " << m_indet_impl.show_to_string() << endmsg;
710  log << MSG::DEBUG << "pixel " << m_pixel_impl.show_to_string() << endmsg;
711  log << MSG::DEBUG << "bec " << m_bec_impl.show_to_string() << endmsg;
712  log << MSG::DEBUG << "bec_shift " << m_bec_shift_impl.show_to_string() << endmsg;
713  log << MSG::DEBUG << "lay_disk " << m_lay_disk_impl.show_to_string() << endmsg;
714  log << MSG::DEBUG << "lay_disk_shift " << m_lay_disk_shift_impl.show_to_string() << endmsg;
715  log << MSG::DEBUG << "phi_mod " << m_phi_mod_impl.show_to_string() << endmsg;
716  log << MSG::DEBUG << "phi_mod_shift " << m_phi_mod_shift_impl.show_to_string() << endmsg;
717  log << MSG::DEBUG << "eta_mod " << m_eta_mod_impl.show_to_string() << endmsg;
718  log << MSG::DEBUG << "eta_mod_shift " << m_eta_mod_shift_impl.show_to_string() << endmsg;
719  log << MSG::DEBUG << "phi_index " << m_phi_index_impl.show_to_string() << endmsg;
720  log << MSG::DEBUG << "eta_index " << m_eta_index_impl.show_to_string() << endmsg;
721  log << MSG::DEBUG << "bec_eta_mod " << m_bec_eta_mod_impl.show_to_string() << endmsg;
722 
723 
724 
725 
726  std::cout << "indet " << m_indet_impl.decode_index() << " "
727  << (std::string) m_indet_impl.ored_field() << " "
728  << std::hex << m_indet_impl.mask() << " "
729  << m_indet_impl.zeroing_mask() << " "
730  << std::dec << m_indet_impl.shift()
731  << " " << m_indet_impl.bits() << " " << m_indet_impl.bits_offset() << " ";
733  std::cout << "pixel " << m_pixel_impl.decode_index() << " "
734  << (std::string) m_pixel_impl.ored_field() << " "
735  << std::hex << m_pixel_impl.mask() << " "
736  << m_pixel_impl.zeroing_mask() << " "
737  << std::dec << m_pixel_impl.shift()
738  << " " << m_pixel_impl.bits() << " " << m_pixel_impl.bits_offset() << " ";
740  std::cout << "bec " << m_bec_impl.decode_index() << " "
741  << (std::string) m_bec_impl.ored_field() << " "
742  << std::hex << m_bec_impl.mask() << " "
743  << m_bec_impl.zeroing_mask() << " "
744  << std::dec << m_bec_impl.shift()
745  << " " << m_bec_impl.bits() << " " << m_bec_impl.bits_offset() << " ";
747  std::cout << "bec_shift " << m_bec_shift_impl.decode_index() << " "
748  << (std::string) m_bec_shift_impl.ored_field() << " "
749  << std::hex << m_bec_shift_impl.mask() << " "
750  << m_bec_shift_impl.zeroing_mask() << " "
751  << std::dec << m_bec_shift_impl.shift()
752  << " " << m_bec_shift_impl.bits() << " " << m_bec_shift_impl.bits_offset() << " ";
754  std::cout << "lay_disk " << m_lay_disk_impl.decode_index() << " "
755  << (std::string) m_lay_disk_impl.ored_field() << " "
756  << std::hex << m_lay_disk_impl.mask() << " "
757  << m_lay_disk_impl.zeroing_mask() << " "
758  << std::dec << m_lay_disk_impl.shift()
759  << " " << m_lay_disk_impl.bits() << " " << m_lay_disk_impl.bits_offset() << " ";
761  std::cout << "lay_disk_shift " << m_lay_disk_shift_impl.decode_index() << " "
762  << (std::string) m_lay_disk_shift_impl.ored_field() << " "
763  << std::hex << m_lay_disk_shift_impl.mask() << " "
765  << std::dec << m_lay_disk_shift_impl.shift()
766  << " " << m_lay_disk_shift_impl.bits() << " " << m_lay_disk_shift_impl.bits_offset() << " ";
768  std::cout << "phi_mod " << m_phi_mod_impl.decode_index() << " "
769  << (std::string) m_phi_mod_impl.ored_field() << " "
770  << std::hex << m_phi_mod_impl.mask() << " "
771  << m_phi_mod_impl.zeroing_mask() << " "
772  << std::dec << m_phi_mod_impl.shift()
773  << " " << m_phi_mod_impl.bits() << " " << m_phi_mod_impl.bits_offset() << " ";
775  std::cout << "phi_mod_shift " << m_phi_mod_shift_impl.decode_index() << " "
776  << (std::string) m_phi_mod_shift_impl.ored_field() << " "
777  << std::hex << m_phi_mod_shift_impl.mask() << " "
779  << std::dec << m_phi_mod_shift_impl.shift()
780  << " " << m_phi_mod_shift_impl.bits() << " " << m_phi_mod_shift_impl.bits_offset() << " ";
782  std::cout << "eta_mod " << m_eta_mod_impl.decode_index() << " "
783  << (std::string) m_eta_mod_impl.ored_field() << " "
784  << std::hex << m_eta_mod_impl.mask() << " "
785  << m_eta_mod_impl.zeroing_mask() << " "
786  << std::dec << m_eta_mod_impl.shift()
787  << " " << m_eta_mod_impl.bits() << " " << m_eta_mod_impl.bits_offset() << " ";
789  std::cout << "eta_mod_shift " << m_eta_mod_shift_impl.decode_index() << " "
790  << (std::string) m_eta_mod_shift_impl.ored_field() << " "
791  << std::hex << m_eta_mod_shift_impl.mask() << " "
793  << std::dec << m_eta_mod_shift_impl.shift()
794  << " " << m_eta_mod_shift_impl.bits() << " " << m_eta_mod_shift_impl.bits_offset() << " ";
796  std::cout << "phi_index " << m_phi_index_impl.decode_index() << " "
797  << (std::string) m_phi_index_impl.ored_field() << " "
798  << std::hex << m_phi_index_impl.mask() << " "
799  << m_phi_index_impl.zeroing_mask() << " "
800  << std::dec << m_phi_index_impl.shift()
801  << " " << m_phi_index_impl.bits() << " " << m_phi_index_impl.bits_offset() << " ";
803  std::cout << "eta_index " << m_eta_index_impl.decode_index() << " "
804  << (std::string) m_eta_index_impl.ored_field() << " "
805  << std::hex << m_eta_index_impl.mask() << " "
806  << m_eta_index_impl.zeroing_mask() << " "
807  << std::dec << m_eta_index_impl.shift()
808  << " " << m_eta_index_impl.bits() << " " << m_eta_index_impl.bits_offset() << " ";
810  std::cout << "bec_eta_mod " << m_bec_eta_mod_impl.decode_index() << " "
811  << (std::string) m_bec_eta_mod_impl.ored_field() << " "
812  << std::hex << m_bec_eta_mod_impl.mask() << " "
813  << m_bec_eta_mod_impl.zeroing_mask() << " "
814  << std::dec << m_bec_eta_mod_impl.shift()
815  << " " << m_bec_eta_mod_impl.bits() << " " << m_bec_eta_mod_impl.bits_offset() << " ";
817 
818 
819  std::cout << "PixelID::initLevelsFromDict - found levels " << std::endl;
820  std::cout << "subdet " << m_INDET_INDEX << std::endl;
821  std::cout << "part " << m_PIXEL_INDEX << std::endl;
822  std::cout << "barrel_endcap " << m_BARREL_EC_INDEX << std::endl;
823  std::cout << "layer or disk " << m_LAYER_DISK_INDEX << std::endl;
824  std::cout << "phi_module " << m_PHI_MODULE_INDEX << std::endl;
825  std::cout << "eta_module " << m_ETA_MODULE_INDEX << std::endl;
826  std::cout << "phi_index " << m_PHI_INDEX_INDEX << std::endl;
827  std::cout << "eta_index " << m_ETA_INDEX_INDEX << std::endl;
828 
829  return(0);
830 }
831 
834  return m_wafer_hash_max;
835 }
836 
839  return m_pixel_hash_max;
840 }
841 
843  return(m_wafer_vec.begin());
844 }
845 
847  return(m_wafer_vec.end());
848 }
849 
852 }
853 
856 }
857 
858 void
860  ExpandedIdentifier& exp_id,
861  const IdContext* context) const {
862  exp_id.clear();
863  exp_id = m_baseExpandedIdentifier;
864  exp_id << barrel_ec(id)
865  << layer_disk(id)
866  << phi_module(id)
867  << eta_module(id);
868  if (!context || context->end_index() == m_ETA_INDEX_INDEX) {
869  exp_id << phi_index(id)
870  << eta_index(id);
871  }
872 }
873 
874 // From hash get Identifier
875 int
877  Identifier& id,
878  const IdContext* context) const {
879  int result = 1;
880 
881  size_t begin = (context) ? context->begin_index() : 0;
882  // cannot get hash if end is 0:
883  size_t end = (context) ? context->end_index() : 0;
884 
885  if (0 == begin) {
886  // No hashes yet for ids with prefixes
887  if (m_ETA_MODULE_INDEX == end) {
888  if (hash_id < (unsigned int) (m_wafer_vec.end() - m_wafer_vec.begin())) {
889  id = m_wafer_vec[hash_id];
890  result = 0;
891  }
892  } else if (m_ETA_INDEX_INDEX == end) {
893  // Do not know how to calculate pixel id from hash yet!!
894  std::cout << "Do not know how to calculate pixel id from hash yet!!" << std::endl;
895  }
896  }
897  return(result);
898 }
899 
900 int
902  IdentifierHash& hash_id,
903  const IdContext* context) const {
904  // Get the hash code from either a vec (for wafers) or calculate
905  // it (pixels). For the former, we convert to compact and call
906  // get_hash again. For the latter, we calculate the hash from the
907  // Identifier.
908 
909  int result = 1;
910 
911  hash_id = 0;
912  size_t begin = (context) ? context->begin_index() : 0;
913  size_t end = (context) ? context->end_index() : 0;
914  if (0 == begin) {
915  // No hashes yet for ids with prefixes
916  if (m_ETA_MODULE_INDEX == end) {
917  hash_id = wafer_hash(id);
918  if (hash_id.is_valid()) result = 0;
919  } else if (context && context->end_index() == m_ETA_INDEX_INDEX) {
920  // Must calculate for pixel hash
921  ExpandedIdentifier new_id;
922  get_expanded_id(id, new_id, context);
923  hash_id = m_full_pixel_range.cardinalityUpTo(new_id);
924  result = 0;
925  }
926  }
927  return(result);
928 }
929 
930 void
932  MsgStream log(m_msgSvc, "PixelID");
933 
934  if (m_dict) {
935  int nids = 0;
936  IdContext context = wafer_context();
938  const_id_iterator last = m_wafer_vec.end();
939  for (; first != last; ++first, ++nids) {
940  Identifier id = (*first);
941  ExpandedIdentifier expId;
942  get_expanded_id(id, expId, &context);
943  Identifier new_id = wafer_id(expId[m_BARREL_EC_INDEX],
944  expId[m_LAYER_DISK_INDEX],
945  expId[m_PHI_MODULE_INDEX],
946  expId[m_ETA_MODULE_INDEX]);
947  if (id != new_id) {
948  log << MSG::ERROR <<
949  "PixelID::test_wafer_packing: new and old compact id not equal. New/old/expanded ids "
950  << show_to_string(new_id) << " " << show_to_string(id) << " "
951  << (std::string) expId << endmsg;
952 
953  continue;
954  }
955  }
956 
957  nids = 0;
958  context = pixel_context();
959  const_expanded_id_iterator first_pixel = pixel_begin();
960  const_expanded_id_iterator last_pixel = pixel_end();
961  for (; first_pixel != last_pixel && nids < 1000; ++first_pixel, ++nids) {
962  const ExpandedIdentifier& exp_id = *first_pixel;
963  ExpandedIdentifier new_exp_id;
964 
966  exp_id[m_LAYER_DISK_INDEX],
967  exp_id[m_PHI_MODULE_INDEX],
968  exp_id[m_ETA_MODULE_INDEX]);
969 
970  get_expanded_id(id, new_exp_id, &context);
971  if (exp_id[0] != new_exp_id[0] ||
972  exp_id[1] != new_exp_id[1] ||
973  exp_id[2] != new_exp_id[2] ||
974  exp_id[3] != new_exp_id[3] ||
975  exp_id[4] != new_exp_id[4] ||
976  exp_id[5] != new_exp_id[5]) {
977  log << MSG::ERROR <<
978  "PixelID::test_wafer_packing: new and old expanded ids not equal. New/old/compact ids "
979  << (std::string) new_exp_id
980  << " " << (std::string) exp_id
981  << " " << show_to_string(id) << endmsg;
982 
983  }
984 
986  exp_id[m_LAYER_DISK_INDEX],
987  exp_id[m_PHI_MODULE_INDEX],
988  exp_id[m_ETA_MODULE_INDEX],
989  exp_id[m_PHI_INDEX_INDEX],
990  exp_id[m_ETA_INDEX_INDEX]);
992  layer_disk(pid),
993  phi_module(pid),
994  eta_module(pid),
995  phi_index(pid),
996  eta_index(pid));
997  if (pid != pid1) {
998  log << MSG::ERROR << "PixelID::test_wafer_packing: new and old pixel ids not equal. New/old ids "
999  << " " << show_to_string(pid1) << " "
1000  << show_to_string(pid) << endmsg;
1001 
1002  }
1003  }
1004 
1005  log << MSG::DEBUG << "PixelID::test_wafer_packing: Successful tested "
1006  << nids << " ids. "
1007  << endmsg;
1008 
1009  } else {
1010  log << MSG::ERROR <<
1011  "PixelID::test_wafer_packing: Unable to test wafer is packing - no dictionary has been defined. "
1012  << endmsg;
1013 
1014  }
1015 }
PixelID::init_hashes
int init_hashes()
Definition: PixelID.cxx:356
IdDictDictionary::find_region
IdDictRegion * find_region(const std::string &region_name) const
Definition: IdDictDictionary.cxx:92
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:767
AtlasDetectorID::indet_field_value
int indet_field_value() const
Provide efficient access to individual field values, for subclass idhelpers.
Definition: AtlasDetectorID.h:618
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:901
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictDictionary.cxx:290
PixelID::m_wafer_hash_max
size_type m_wafer_hash_max
Definition: PixelID.h:303
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:654
AtlasDetectorID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: AtlasDetectorID.cxx:250
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
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:18
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:38
PixelID::m_pixel_id
Identifier m_pixel_id
Definition: PixelID.h:299
PixelID::init_neighbors
int init_neighbors()
Definition: PixelID.cxx:466
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:22
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:615
index
Definition: index.py:1
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
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
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
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
PixelID::m_phi_mod_shift_impl
IdDictFieldImplementation m_phi_mod_shift_impl
Definition: PixelID.h:320
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:633
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
AtlasDetectorID::m_msgSvc
IMessageSvc * m_msgSvc
pointer to the message service
Definition: AtlasDetectorID.h:375
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:415
PixelID::initLevelsFromDict
int initLevelsFromDict()
Definition: PixelID.cxx:598
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
PixelID::pixel_end
const_expanded_id_iterator pixel_end() const
Definition: PixelID.cxx:854
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
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictDictionary.cxx:36
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:20
IdDictDictionary::m_version
std::string m_version
Definition: IdDictDictionary.h:217
PixelID::pixel_hash_max
size_type pixel_hash_max() const
Definition: PixelID.cxx:838
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.h:586
PixelID::m_bec_eta_mod_impl
IdDictFieldImplementation m_bec_eta_mod_impl
Definition: PixelID.h:324
IdDictDefs.h
IdDictMgr
Definition: IdDictMgr.h:14
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:850
IdDictFieldImplementation::shift
size_type shift() const
Definition: IdDictFieldImplementation.h:226
IdDictMgr::find_dictionary
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:115
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
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:428
PixelID::m_baseIdentifier
Identifier m_baseIdentifier
Definition: PixelID.h:286
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:859
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
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
IdDictDictionary::m_regions
std::vector< IdDictRegion * > m_regions
Definition: IdDictDictionary.h:235
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:45
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:660
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:454
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:196
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:833
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictDictionary.cxx:64
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:622
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:647
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:931
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:490
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:30
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:876
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:85
PixelID::eta_module_min
int eta_module_min(const Identifier &id) const
Definition: PixelID.cxx:96
DeMoScan.index
string index
Definition: DeMoScan.py:362
PixelID::NOT_VALID_HASH
@ NOT_VALID_HASH
Definition: PixelID.h:259
AtlasDetectorID::reinitialize
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
Definition: AtlasDetectorID.cxx:216
PixelID::pixel_context
IdContext pixel_context() const
Definition: PixelID.h:594
IdDictFieldImplementation::zeroing_mask
value_type zeroing_mask() const
Definition: IdDictFieldImplementation.h:220
IdDictDictionary::m_name
std::string m_name
Definition: IdDictDictionary.h:216
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:360
PixelID::wafer_id_checks
void wafer_id_checks(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
Definition: PixelID.cxx:30
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:15
PixelID::wafer_end
const_id_iterator wafer_end() const
Definition: PixelID.cxx:846
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
DEBUG
#define DEBUG
Definition: page_access.h:11
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
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
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:842
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
IdentifierField::show
void show() const
Definition: IdentifierField.cxx:376
PixelID::size_type
Identifier::size_type size_type
Definition: PixelID.h:71
IdDictField
Definition: IdDictField.h:15
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:640
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
IdDictRegion::m_implementation
std::vector< IdDictFieldImplementation > m_implementation
Definition: IdDictRegion.h:42
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:441
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:57
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