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 
15 #include "IdDict/IdDictField.h"
16 #include "IdDict/IdDictMgr.h"
17 #include "IdDict/IdDictRegion.h"
20 #include "Identifier/IdContext.h"
21 #include <set>
22 #include <algorithm>
23 #include <iostream>
24 
25 
27  : AtlasDetectorID("PixelID", "pixel")
28 {
30  m_dbm_field.add_value(0); //DBM
31 }
32 
33 void
34 PixelID::wafer_id_checks(int barrel_ec,int layer_disk,int phi_module,int eta_module) const {
35 
36  // Fill expanded id
40  if (!m_full_wafer_range.match(id)) { // module range check is sufficient
41  MsgStream log(m_msgSvc, "PixelID");
42  log << MSG::ERROR << " PixelID::wafer_id result is NOT ok. ID, range "
43  << (std::string) id << " " << (std::string) m_full_wafer_range << endmsg;
44 
45  }
46 }
47 
48 void
49 PixelID::pixel_id_checks(int barrel_ec,int layer_disk,int phi_module,int eta_module,
50  int phi_index,int eta_index) const {
51  // Check that id is within allowed range
52  // Fill expanded id
56  if (!m_full_pixel_range.match(id)) {
57  MsgStream log(m_msgSvc, "PixelID");
58  log << MSG::ERROR << " PixelID::pixel_id result is NOT ok. ID, range "
59  << (std::string) id << " " << (std::string) m_full_pixel_range << endmsg;
60 
61  }
62 }
63 
64 int
66  // get max from dictionary
67  ExpandedIdentifier expId;
68  IdContext wafer_context1 = wafer_context();
69  get_expanded_id(id, expId, &wafer_context1);
70  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
71  const Range& range = m_full_wafer_range[i];
72  if (range.match(expId)) {
73  const Range::field& layer_disk_field = range[m_LAYER_DISK_INDEX];
74  if (not layer_disk_field.empty()) {
75  return(layer_disk_field.get_maximum());
76  }
77  }
78  }
79  return(-999); // default
80 }
81 
82 int
84  // get max from dictionary
85  ExpandedIdentifier expId;
86  IdContext wafer_context1 = wafer_context();
87  get_expanded_id(id, expId, &wafer_context1);
88  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
89  const Range& range = m_full_wafer_range[i];
90  if (range.match(expId)) {
91  const Range::field& eta_field = range[m_ETA_MODULE_INDEX];
92  if (not eta_field.empty()) {
93  return(eta_field.get_maximum());
94  }
95  }
96  }
97  return(-999);
98 }
99 
100 int PixelID::eta_module_min(const Identifier& id) const {
101  // get min from dictionary
102  ExpandedIdentifier expId;
103  IdContext wafer_context1 = wafer_context();
104  get_expanded_id(id, expId, &wafer_context1);
105  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
106  const Range& range = m_full_wafer_range[i];
107  if (range.match(expId)) {
108  const Range::field& eta_field = range[m_ETA_MODULE_INDEX];
109  if (not eta_field.empty()) {
110  return(eta_field.get_minimum());
111  }
112  }
113  }
114  return(-999);
115 }
116 
117 bool
119  return(eta_module(id) == eta_module_min(id));
120 }
121 
122 bool
124  return(eta_module(id) == eta_module_max(id));
125 }
126 
127 int PixelID::phi_module_max(const Identifier& id) const {
128  // get max from dictionary
129  ExpandedIdentifier expId;
130  IdContext wafer_context1 = wafer_context();
131 
132  get_expanded_id(id, expId, &wafer_context1);
133  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
134  const Range& range = m_full_wafer_range[i];
135  if (range.match(expId)) {
136  const Range::field& phi_field = range[m_PHI_MODULE_INDEX];
137  if (not phi_field.empty()) {
138  return(phi_field.get_maximum());
139  }
140  }
141  }
142  // Failed to find the max
143  return(-999);
144 }
145 
146 int
148  // get max from dictionary
149  ExpandedIdentifier expId;
150  IdContext wafer_context1 = wafer_context();
151  get_expanded_id(id, expId, &wafer_context1);
152  for (unsigned int i = 0; i < m_full_pixel_range.size(); ++i) {
153  const Range& range = m_full_pixel_range[i];
154  if (range.match(expId)) {
155  const Range::field& phi_field = range[m_PHI_INDEX_INDEX];
156  if (not phi_field.empty()) {
157  return(phi_field.get_maximum());
158  }
159  }
160  }
161  // Failed to find the max
162  return(-999);
163 }
164 
165 int
167  // get max from dictionary
168  ExpandedIdentifier expId;
169  IdContext wafer_context1 = wafer_context();
170  get_expanded_id(id, expId, &wafer_context1);
171  for (unsigned int i = 0; i < m_full_pixel_range.size(); ++i) {
172  const Range& range = m_full_pixel_range[i];
173  if (range.match(expId)) {
174  const Range::field& eta_field = range[m_ETA_INDEX_INDEX];
175  if (not eta_field.empty()) {
176  return(eta_field.get_maximum());
177  }
178  }
179  }
180  return(-999); // default
181 }
182 
183 bool
185  return(phi_module(id) == phi_module_max(id));
186 }
187 
188 int
190  MsgStream log(m_msgSvc, "PixelID");
191 
192  log << MSG::INFO << "Initialize from dictionary" << endmsg;
193 
194  // Check whether this helper should be reinitialized
195  if (!reinitialize(dict_mgr)) {
196  log << MSG::INFO << "Request to reinitialize not satisfied - tags have not changed" << endmsg;
197  return(0);
198  } else {
199  log << MSG::DEBUG << "(Re)initialize" << endmsg;
200  }
201 
202  // init base object
203  if (AtlasDetectorID::initialize_from_dictionary(dict_mgr)) return(1);
204 
205  // Register version of InnerDetector dictionary
206  if (register_dict_tag(dict_mgr, "InnerDetector")) return(1);
207 
208  m_dict = dict_mgr.find_dictionary("InnerDetector");
209  if (!m_dict) {
210  log << MSG::FATAL << " PixelID::initialize_from_dict - cannot access InnerDetector dictionary "
211  << endmsg;
212 
213  return(1);
214  }
215 
216  AtlasDetectorID::setDictVersion(dict_mgr, "InnerDetector");
217 
218  // Initialize the field indices
219  if (initLevelsFromDict()) return(1);
220 
221  // save indet id
222  m_pixel_id = pixel();
223  if (!is_pixel(m_pixel_id)) {
224  log << MSG::FATAL << " PixelID::initialize_from_dict - cannot get pixel id dictionary "
225  << endmsg;
226 
227  return(1);
228  }
229 
230  //
231  // Set barrel field for testing is_barrel
232  //
233  int barrel_value;
235  // barrel
236  if (m_dict->get_label_value("barrel_endcap", "barrel", barrel_value)) {
237  log << MSG::FATAL << "Could not get value for label 'barrel' of field 'barrel_endcap' in dictionary "
238  << m_dict->name()
239  << endmsg;
240 
241  return(1);
242  }
243  m_barrel_field.add_value(barrel_value);
244  m_barrel_field.add_value(barrel_value);
245  log << MSG::DEBUG << " PixelID::initialize_from_dict "
246  << "Set barrel field values: "
247  << (std::string) m_barrel_field
248  << endmsg;
249 
250 
251  //DBM
252  //Set dbm field for testing is_dbm
253  //
254  // WARNING:
255  // modified to skip DBM when aprorpiate dictionary is not present
256  // by adding +999 or -999 to the field
257  //
258 
259  int dbm_value;
260  m_dbm_field.clear();
261  if (m_dict->get_label_value("barrel_endcap", "negative_dbm", dbm_value)) {
262  if (m_dict->version().find("DBM") != std::string::npos) {
263  log << MSG::WARNING <<
264  "Could not get value for label 'negative_dbm' of field 'barrel_endcap' in dictionary "
265  << m_dict->name()
266  << endmsg;
267 
268  }
269  //return (1);
270  m_dbm_field.add_value(-999);
271  } else {
272  m_dbm_field.add_value(dbm_value);
273  }
274  if (m_dict->get_label_value("barrel_endcap", "positive_dbm", dbm_value)) {
275  if (m_dict->version().find("DBM") != std::string::npos) {
276  log << MSG::WARNING <<
277  "Could not get value for label 'positive_dbm' of field 'barrel_endcap' in dictionary "
278  << m_dict->name()
279  << endmsg;
280 
281  }
282  //return (1);
283  m_dbm_field.add_value(999);
284  } else {
285  m_dbm_field.add_value(dbm_value);
286  }
287  log << MSG::DEBUG << " PixelID::initialize_from_dict "
288  << "Set dbm field values: "
289  << (std::string) m_dbm_field
290  << endmsg;
291 
292 
293 
294  //
295  // Build multirange for the valid set of identifiers
296  //
297 
298 
299  // Find value for the field InnerDetector
300  const IdDictDictionary* atlasDict = dict_mgr.find_dictionary("ATLAS");
301  int inDetField = -1;
302  if (atlasDict->get_label_value("subdet", "InnerDetector", inDetField)) {
303  log << MSG::FATAL << "Could not get value for label 'InnerDetector' of field 'subdet' in dictionary "
304  << atlasDict->name()
305  << endmsg;
306 
307  return(1);
308  }
309 
310  // Find value for the field PIXEL
311  int pixelField = -1;
312  if (m_dict->get_label_value("part", "Pixel", pixelField)) {
313  log << MSG::FATAL << "Could not get value for label 'Pixel' of field 'part' in dictionary "
314  << m_dict->name()
315  << endmsg;
316 
317  return(1);
318  }
319  log << MSG::DEBUG << " PixelID::initialize_from_dict "
320  << "Found field values: InDet/Pixel "
321  << inDetField << "/"
322  << pixelField
323  << endmsg;
324 
325 
326  // Set up id for region and range prefix
328  region_id.add(inDetField);
329  region_id.add(pixelField);
330  Range prefix;
333 
334  // Set the base identifier for Pixel
338 
339  // Set the base expanded identifier for Pixel
341 
342  // Setup the hash tables
343  if (init_hashes()) return(1);
344 
345  // Setup hash tables for finding neighbors
346  if (init_neighbors()) return(1);
347  log << MSG::DEBUG << " PixelID::initialize_from_dict "
348  << endmsg;
349  log << MSG::DEBUG
350  << "Wafer range -> " << (std::string) m_full_wafer_range
351  << endmsg;
352  log << MSG::DEBUG
353  << "Pixel range -> " << (std::string) m_full_pixel_range
354  << endmsg;
355 
356  return 0;
357 }
358 
359 int
361  //
362  // create a vector(s) to retrieve the hashes for compact ids. For
363  // the moment, we implement a hash for wafers but NOT for pixels
364  // (too many)
365  //
366 
367  MsgStream log(m_msgSvc, "PixelID");
368 
369  // wafer hash
371  m_wafer_vec.clear();
373  unsigned int nids = 0;
374  std::set<Identifier> ids;
375  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
376  const Range& range = m_full_wafer_range[i];
378  for (const auto & exp_id:rit) {
380  exp_id[m_LAYER_DISK_INDEX],
381  exp_id[m_PHI_MODULE_INDEX],
382  exp_id[m_ETA_MODULE_INDEX]);
383  if (!(ids.insert(id)).second) {
384  log << MSG::FATAL << " PixelID::init_hashes "
385  << " Error: duplicated id for wafer id. nid " << nids
386  << " id " << show_to_string(id)
387  << " exp id " << (std::string) exp_id
388  << " " << (std::string) m_full_wafer_range << endmsg;
389 
390  return(1);
391  }
392  nids++;
393  }
394  }
395  if (ids.size() != m_wafer_hash_max) {
396  log << MSG::FATAL << " PixelID::init_hashes "
397  << " Error: set size NOT EQUAL to hash max. size " << ids.size()
398  << " hash max " << m_wafer_hash_max
399  << endmsg;
400 
401  return(1);
402  }
403 
404  nids = 0;
405  std::set<Identifier>::const_iterator first = ids.begin();
406  std::set<Identifier>::const_iterator last = ids.end();
407  for (; first != last && nids < m_wafer_vec.size(); ++first) {
408  m_wafer_vec[nids] = (*first);
409  nids++;
410  }
411 
412  // pixel hash - we do not keep a vec for the pixels - too large
414 
415  return(0);
416 }
417 
418 int
420  unsigned short index = id;
421 
422  if (index < m_prev_phi_wafer_vec.size()) {
423  if (m_prev_phi_wafer_vec[index] == NOT_VALID_HASH) return(1);
424 
425  prev = m_prev_phi_wafer_vec[index];
426  return(0);
427  }
428  return(1);
429 }
430 
431 int
433  unsigned short index = id;
434 
435  if (index < m_next_phi_wafer_vec.size()) {
436  if (m_next_phi_wafer_vec[index] == NOT_VALID_HASH) return(1);
437 
439  return(0);
440  }
441  return(1);
442 }
443 
444 int
446  unsigned short index = id;
447 
448  if (index < m_prev_eta_wafer_vec.size()) {
449  if (m_prev_eta_wafer_vec[index] == NOT_VALID_HASH) return(1);
450 
451  prev = m_prev_eta_wafer_vec[index];
452  return(0);
453  }
454  return(1);
455 }
456 
457 int
459  unsigned short index = id;
460  if (index < m_next_eta_wafer_vec.size()) {
461  if (m_next_eta_wafer_vec[index] == NOT_VALID_HASH) return(1);
462 
464  return(0);
465  }
466  return(1);
467 }
468 
469 int
471  //
472  // create a vector(s) to retrieve the hashes for compact ids for
473  // wafer neighbors.
474  //
475  MsgStream log(m_msgSvc, "PixelID");
476 
477  log << MSG::DEBUG << "PixelID::init_neighbors " << endmsg;
478 
479  m_prev_phi_wafer_vec.clear();
480  m_next_phi_wafer_vec.clear();
481  m_prev_eta_wafer_vec.clear();
482  m_next_eta_wafer_vec.clear();
487 
488  for (unsigned int i = 0; i < m_full_wafer_range.size(); ++i) {
489  const Range& range = m_full_wafer_range[i];
490  const Range::field& phi_field = range[m_PHI_MODULE_INDEX];
491  const Range::field& eta_field = range[m_ETA_MODULE_INDEX];
492 
493  // save the lowest value of the module offset
495  eta_field.get_minimum() : m_ETA_MODULE_OFFSET;
497  for (const auto & exp_id: rit) {
502  bool pphi = phi_field.get_previous(exp_id[m_PHI_MODULE_INDEX], previous_phi);
503  bool nphi = phi_field.get_next(exp_id[m_PHI_MODULE_INDEX], next_phi);
504  bool peta = eta_field.get_previous(exp_id[m_ETA_MODULE_INDEX], previous_eta);
505  bool neta = eta_field.get_next(exp_id[m_ETA_MODULE_INDEX], next_eta);
506 
507  IdContext wcontext = wafer_context();
508 
509  // First get primary hash id
510  IdentifierHash hash_id;
512  exp_id[m_LAYER_DISK_INDEX],
513  exp_id[m_PHI_MODULE_INDEX],
514  exp_id[m_ETA_MODULE_INDEX]);
515  if (get_hash(id, hash_id, &wcontext)) {
516  log << MSG::FATAL << " PixelID::init_neighbors - unable to get hash, exp/compact "
517  << id.getString() << " " << show_to_string(id) << endmsg;
518 
519  return(1);
520  }
521 
522  // index for the subsequent arrays
523  unsigned short index = hash_id;
524  assert(hash_id < m_prev_phi_wafer_vec.size());
525  assert(hash_id < m_next_phi_wafer_vec.size());
526  assert(hash_id < m_prev_eta_wafer_vec.size());
527  assert(hash_id < m_next_eta_wafer_vec.size());
528 
529  if (pphi) {
530  // Get previous phi hash id
531  ExpandedIdentifier expId = exp_id;
532  expId[m_PHI_MODULE_INDEX] = previous_phi;
534  expId[m_LAYER_DISK_INDEX],
535  expId[m_PHI_MODULE_INDEX],
536  expId[m_ETA_MODULE_INDEX]);
537  if (get_hash(id, hash_id, &wcontext)) {
538  log << MSG::FATAL << " PixelID::init_neighbors - unable to get previous phi hash, exp/compact "
539  << id.getString() << " " << show_to_string(id) << endmsg;
540 
541  return(1);
542  }
543  m_prev_phi_wafer_vec[index] = hash_id;
544  }
545 
546  if (nphi) {
547  // Get next phi hash id
548  ExpandedIdentifier expId = exp_id;
549  expId[m_PHI_MODULE_INDEX] = next_phi;
551  expId[m_LAYER_DISK_INDEX],
552  expId[m_PHI_MODULE_INDEX],
553  expId[m_ETA_MODULE_INDEX]);
554  if (get_hash(id, hash_id, &wcontext)) {
555  log << MSG::FATAL << " PixelID::init_neighbors - unable to get next phi hash, exp/compact " <<
556  id.getString() << " " << show_to_string(id) << endmsg;
557 
558  return(1);
559  }
560  m_next_phi_wafer_vec[index] = hash_id;
561  }
562 
563  if (peta) {
564  // Get previous eta hash id
565  ExpandedIdentifier expId = exp_id;
566  expId[m_ETA_MODULE_INDEX] = previous_eta;
568  expId[m_LAYER_DISK_INDEX],
569  expId[m_PHI_MODULE_INDEX],
570  expId[m_ETA_MODULE_INDEX]);
571  if (get_hash(id, hash_id, &wcontext)) {
572  log << MSG::FATAL << " PixelID::init_neighbors - unable to get previous eta hash, exp/compact "
573  << id.getString() << " " << show_to_string(id) << endmsg;
574 
575  return(1);
576  }
577  m_prev_eta_wafer_vec[index] = hash_id;
578  }
579 
580  if (neta) {
581  // Get next eta hash id
582  ExpandedIdentifier expId = exp_id;
583  expId[m_ETA_MODULE_INDEX] = next_eta;
585  expId[m_LAYER_DISK_INDEX],
586  expId[m_PHI_MODULE_INDEX],
587  expId[m_ETA_MODULE_INDEX]);
588  if (get_hash(id, hash_id, &wcontext)) {
589  log << MSG::FATAL << " PixelID::init_neighbors - unable to get next eta hash, exp/compact "
590  << id.getString() << " " << show_to_string(id) << endmsg;
591 
592  return(1);
593  }
594  m_next_eta_wafer_vec[index] = hash_id;
595  }
596  }
597  }
598  return(0);
599 }
600 
601 int
603  MsgStream log(m_msgSvc, "PixelID");
604 
605  if (!m_dict) {
606  log << MSG::FATAL << " PixelID::initLevelsFromDict - dictionary NOT initialized " << endmsg;
607  return(1);
608  }
609 
610  // Find out which identifier field corresponds to each level. Use
611  // names to find each field/leve.
612 
613  m_INDET_INDEX = 999;
614  m_PIXEL_INDEX = 999;
615  m_BARREL_EC_INDEX = 999;
616  m_LAYER_DISK_INDEX = 999;
617  m_PHI_MODULE_INDEX = 999;
618  m_ETA_MODULE_INDEX = 999;
619  m_PHI_INDEX_INDEX = 999;
620  m_ETA_INDEX_INDEX = 999;
621 
622  // Save index to a PIXEL region for unpacking
626  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find pixel region index: id, reg "
627  << (std::string) id << " " << m_pixel_region_index
628  << endmsg;
629 
630  return(1);
631  }
632 
633  // Get levels
634  IdDictField* field = m_dict->find_field("subdet");
635  if (field) {
636  m_INDET_INDEX = field->index();
637  } else {
638  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'subdet' field "
639  << endmsg;
640 
641  return(1);
642  }
643 
644  field = m_dict->find_field("part");
645  if (field) {
646  m_PIXEL_INDEX = field->index();
647  } else {
648  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'part' field " << endmsg;
649  return(1);
650  }
651 
652  field = m_dict->find_field("barrel_endcap");
653  if (field) {
654  m_BARREL_EC_INDEX = field->index();
655  } else {
656  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'barrel_endcap' field " << endmsg;
657  return(1);
658  }
659 
660  field = m_dict->find_field("layer");
661  if (field) {
662  m_LAYER_DISK_INDEX = field->index();
663  } else {
664  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'layer' field " << endmsg;
665  return(1);
666  }
667 
668  field = m_dict->find_field("phi_module");
669  if (field) {
670  m_PHI_MODULE_INDEX = field->index();
671  } else {
672  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'phi_module' field " << endmsg;
673  return(1);
674  }
675  field = m_dict->find_field("eta_module");
676  if (field) {
677  m_ETA_MODULE_INDEX = field->index();
678  } else {
679  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'eta_module' field " << endmsg;
680  return(1);
681  }
682  field = m_dict->find_field("phi_index");
683  if (field) {
684  m_PHI_INDEX_INDEX = field->index();
685  } else {
686  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'phi_index' field " << endmsg;
687  return(1);
688  }
689  field = m_dict->find_field("eta_index");
690  if (field) {
691  m_ETA_INDEX_INDEX = field->index();
692  } else {
693  log << MSG::FATAL << "PixelID::initLevelsFromDict - unable to find 'eta_index' field " << endmsg;
694  return(1);
695  }
696 
697  // Set the field implementations: for bec, lay/disk, eta/phi mod
698  // there are two kinds - shifted and non-shifted
699 
701 
710 
711 
712  log << MSG::DEBUG << "decode index and bit fields for each level: " << endmsg;
713  log << MSG::DEBUG << "indet " << m_indet_impl.show_to_string() << endmsg;
714  log << MSG::DEBUG << "pixel " << m_pixel_impl.show_to_string() << endmsg;
715  log << MSG::DEBUG << "bec " << m_bec_impl.show_to_string() << endmsg;
716  log << MSG::DEBUG << "bec_shift " << m_bec_shift_impl.show_to_string() << endmsg;
717  log << MSG::DEBUG << "lay_disk " << m_lay_disk_impl.show_to_string() << endmsg;
718  log << MSG::DEBUG << "lay_disk_shift " << m_lay_disk_shift_impl.show_to_string() << endmsg;
719  log << MSG::DEBUG << "phi_mod " << m_phi_mod_impl.show_to_string() << endmsg;
720  log << MSG::DEBUG << "phi_mod_shift " << m_phi_mod_shift_impl.show_to_string() << endmsg;
721  log << MSG::DEBUG << "eta_mod " << m_eta_mod_impl.show_to_string() << endmsg;
722  log << MSG::DEBUG << "eta_mod_shift " << m_eta_mod_shift_impl.show_to_string() << endmsg;
723  log << MSG::DEBUG << "phi_index " << m_phi_index_impl.show_to_string() << endmsg;
724  log << MSG::DEBUG << "eta_index " << m_eta_index_impl.show_to_string() << endmsg;
725  log << MSG::DEBUG << "bec_eta_mod " << m_bec_eta_mod_impl.show_to_string() << endmsg;
726 
727 
728 
729 
730  std::cout << "indet " << m_indet_impl.decode_index() << " "
731  << (std::string) m_indet_impl.ored_field() << " "
732  << std::hex << m_indet_impl.mask() << " "
733  << m_indet_impl.zeroing_mask() << " "
734  << std::dec << m_indet_impl.shift()
735  << " " << m_indet_impl.bits() << " " << m_indet_impl.bits_offset() << " ";
737  std::cout << "pixel " << m_pixel_impl.decode_index() << " "
738  << (std::string) m_pixel_impl.ored_field() << " "
739  << std::hex << m_pixel_impl.mask() << " "
740  << m_pixel_impl.zeroing_mask() << " "
741  << std::dec << m_pixel_impl.shift()
742  << " " << m_pixel_impl.bits() << " " << m_pixel_impl.bits_offset() << " ";
744  std::cout << "bec " << m_bec_impl.decode_index() << " "
745  << (std::string) m_bec_impl.ored_field() << " "
746  << std::hex << m_bec_impl.mask() << " "
747  << m_bec_impl.zeroing_mask() << " "
748  << std::dec << m_bec_impl.shift()
749  << " " << m_bec_impl.bits() << " " << m_bec_impl.bits_offset() << " ";
751  std::cout << "bec_shift " << m_bec_shift_impl.decode_index() << " "
752  << (std::string) m_bec_shift_impl.ored_field() << " "
753  << std::hex << m_bec_shift_impl.mask() << " "
754  << m_bec_shift_impl.zeroing_mask() << " "
755  << std::dec << m_bec_shift_impl.shift()
756  << " " << m_bec_shift_impl.bits() << " " << m_bec_shift_impl.bits_offset() << " ";
758  std::cout << "lay_disk " << m_lay_disk_impl.decode_index() << " "
759  << (std::string) m_lay_disk_impl.ored_field() << " "
760  << std::hex << m_lay_disk_impl.mask() << " "
761  << m_lay_disk_impl.zeroing_mask() << " "
762  << std::dec << m_lay_disk_impl.shift()
763  << " " << m_lay_disk_impl.bits() << " " << m_lay_disk_impl.bits_offset() << " ";
765  std::cout << "lay_disk_shift " << m_lay_disk_shift_impl.decode_index() << " "
766  << (std::string) m_lay_disk_shift_impl.ored_field() << " "
767  << std::hex << m_lay_disk_shift_impl.mask() << " "
769  << std::dec << m_lay_disk_shift_impl.shift()
770  << " " << m_lay_disk_shift_impl.bits() << " " << m_lay_disk_shift_impl.bits_offset() << " ";
772  std::cout << "phi_mod " << m_phi_mod_impl.decode_index() << " "
773  << (std::string) m_phi_mod_impl.ored_field() << " "
774  << std::hex << m_phi_mod_impl.mask() << " "
775  << m_phi_mod_impl.zeroing_mask() << " "
776  << std::dec << m_phi_mod_impl.shift()
777  << " " << m_phi_mod_impl.bits() << " " << m_phi_mod_impl.bits_offset() << " ";
779  std::cout << "phi_mod_shift " << m_phi_mod_shift_impl.decode_index() << " "
780  << (std::string) m_phi_mod_shift_impl.ored_field() << " "
781  << std::hex << m_phi_mod_shift_impl.mask() << " "
783  << std::dec << m_phi_mod_shift_impl.shift()
784  << " " << m_phi_mod_shift_impl.bits() << " " << m_phi_mod_shift_impl.bits_offset() << " ";
786  std::cout << "eta_mod " << m_eta_mod_impl.decode_index() << " "
787  << (std::string) m_eta_mod_impl.ored_field() << " "
788  << std::hex << m_eta_mod_impl.mask() << " "
789  << m_eta_mod_impl.zeroing_mask() << " "
790  << std::dec << m_eta_mod_impl.shift()
791  << " " << m_eta_mod_impl.bits() << " " << m_eta_mod_impl.bits_offset() << " ";
793  std::cout << "eta_mod_shift " << m_eta_mod_shift_impl.decode_index() << " "
794  << (std::string) m_eta_mod_shift_impl.ored_field() << " "
795  << std::hex << m_eta_mod_shift_impl.mask() << " "
797  << std::dec << m_eta_mod_shift_impl.shift()
798  << " " << m_eta_mod_shift_impl.bits() << " " << m_eta_mod_shift_impl.bits_offset() << " ";
800  std::cout << "phi_index " << m_phi_index_impl.decode_index() << " "
801  << (std::string) m_phi_index_impl.ored_field() << " "
802  << std::hex << m_phi_index_impl.mask() << " "
803  << m_phi_index_impl.zeroing_mask() << " "
804  << std::dec << m_phi_index_impl.shift()
805  << " " << m_phi_index_impl.bits() << " " << m_phi_index_impl.bits_offset() << " ";
807  std::cout << "eta_index " << m_eta_index_impl.decode_index() << " "
808  << (std::string) m_eta_index_impl.ored_field() << " "
809  << std::hex << m_eta_index_impl.mask() << " "
810  << m_eta_index_impl.zeroing_mask() << " "
811  << std::dec << m_eta_index_impl.shift()
812  << " " << m_eta_index_impl.bits() << " " << m_eta_index_impl.bits_offset() << " ";
814  std::cout << "bec_eta_mod " << m_bec_eta_mod_impl.decode_index() << " "
815  << (std::string) m_bec_eta_mod_impl.ored_field() << " "
816  << std::hex << m_bec_eta_mod_impl.mask() << " "
817  << m_bec_eta_mod_impl.zeroing_mask() << " "
818  << std::dec << m_bec_eta_mod_impl.shift()
819  << " " << m_bec_eta_mod_impl.bits() << " " << m_bec_eta_mod_impl.bits_offset() << " ";
821 
822 
823  std::cout << "PixelID::initLevelsFromDict - found levels " << std::endl;
824  std::cout << "subdet " << m_INDET_INDEX << std::endl;
825  std::cout << "part " << m_PIXEL_INDEX << std::endl;
826  std::cout << "barrel_endcap " << m_BARREL_EC_INDEX << std::endl;
827  std::cout << "layer or disk " << m_LAYER_DISK_INDEX << std::endl;
828  std::cout << "phi_module " << m_PHI_MODULE_INDEX << std::endl;
829  std::cout << "eta_module " << m_ETA_MODULE_INDEX << std::endl;
830  std::cout << "phi_index " << m_PHI_INDEX_INDEX << std::endl;
831  std::cout << "eta_index " << m_ETA_INDEX_INDEX << std::endl;
832 
833  return(0);
834 }
835 
838  return m_wafer_hash_max;
839 }
840 
843  return m_pixel_hash_max;
844 }
845 
847  return(m_wafer_vec.begin());
848 }
849 
851  return(m_wafer_vec.end());
852 }
853 
856 }
857 
860 }
861 
862 void
864  ExpandedIdentifier& exp_id,
865  const IdContext* context) const {
866  exp_id.clear();
867  exp_id = m_baseExpandedIdentifier;
868  exp_id << barrel_ec(id)
869  << layer_disk(id)
870  << phi_module(id)
871  << eta_module(id);
872  if (!context || context->end_index() == m_ETA_INDEX_INDEX) {
873  exp_id << phi_index(id)
874  << eta_index(id);
875  }
876 }
877 
878 // From hash get Identifier
879 int
881  Identifier& id,
882  const IdContext* context) const {
883  int result = 1;
884 
885  size_t begin = (context) ? context->begin_index() : 0;
886  // cannot get hash if end is 0:
887  size_t end = (context) ? context->end_index() : 0;
888 
889  if (0 == begin) {
890  // No hashes yet for ids with prefixes
891  if (m_ETA_MODULE_INDEX == end) {
892  if (hash_id < (unsigned int) (m_wafer_vec.end() - m_wafer_vec.begin())) {
893  id = m_wafer_vec[hash_id];
894  result = 0;
895  }
896  } else if (m_ETA_INDEX_INDEX == end) {
897  // Do not know how to calculate pixel id from hash yet!!
898  std::cout << "Do not know how to calculate pixel id from hash yet!!" << std::endl;
899  }
900  }
901  return(result);
902 }
903 
904 int
906  IdentifierHash& hash_id,
907  const IdContext* context) const {
908  // Get the hash code from either a vec (for wafers) or calculate
909  // it (pixels). For the former, we convert to compact and call
910  // get_hash again. For the latter, we calculate the hash from the
911  // Identifier.
912 
913  int result = 1;
914 
915  hash_id = 0;
916  size_t begin = (context) ? context->begin_index() : 0;
917  size_t end = (context) ? context->end_index() : 0;
918  if (0 == begin) {
919  // No hashes yet for ids with prefixes
920  if (m_ETA_MODULE_INDEX == end) {
921  hash_id = wafer_hash(id);
922  if (hash_id.is_valid()) result = 0;
923  } else if (context && context->end_index() == m_ETA_INDEX_INDEX) {
924  // Must calculate for pixel hash
925  ExpandedIdentifier new_id;
926  get_expanded_id(id, new_id, context);
927  hash_id = m_full_pixel_range.cardinalityUpTo(new_id);
928  result = 0;
929  }
930  }
931  return(result);
932 }
933 
934 void
936  MsgStream log(m_msgSvc, "PixelID");
937 
938  if (m_dict) {
939  int nids = 0;
940  IdContext context = wafer_context();
942  const_id_iterator last = m_wafer_vec.end();
943  for (; first != last; ++first, ++nids) {
944  Identifier id = (*first);
945  ExpandedIdentifier expId;
946  get_expanded_id(id, expId, &context);
947  Identifier new_id = wafer_id(expId[m_BARREL_EC_INDEX],
948  expId[m_LAYER_DISK_INDEX],
949  expId[m_PHI_MODULE_INDEX],
950  expId[m_ETA_MODULE_INDEX]);
951  if (id != new_id) {
952  log << MSG::ERROR <<
953  "PixelID::test_wafer_packing: new and old compact id not equal. New/old/expanded ids "
954  << show_to_string(new_id) << " " << show_to_string(id) << " "
955  << (std::string) expId << endmsg;
956 
957  continue;
958  }
959  }
960 
961  nids = 0;
962  context = pixel_context();
963  const_expanded_id_iterator first_pixel = pixel_begin();
964  const_expanded_id_iterator last_pixel = pixel_end();
965  for (; first_pixel != last_pixel && nids < 1000; ++first_pixel, ++nids) {
966  const ExpandedIdentifier& exp_id = *first_pixel;
967  ExpandedIdentifier new_exp_id;
968 
970  exp_id[m_LAYER_DISK_INDEX],
971  exp_id[m_PHI_MODULE_INDEX],
972  exp_id[m_ETA_MODULE_INDEX]);
973 
974  get_expanded_id(id, new_exp_id, &context);
975  if (exp_id[0] != new_exp_id[0] ||
976  exp_id[1] != new_exp_id[1] ||
977  exp_id[2] != new_exp_id[2] ||
978  exp_id[3] != new_exp_id[3] ||
979  exp_id[4] != new_exp_id[4] ||
980  exp_id[5] != new_exp_id[5]) {
981  log << MSG::ERROR <<
982  "PixelID::test_wafer_packing: new and old expanded ids not equal. New/old/compact ids "
983  << (std::string) new_exp_id
984  << " " << (std::string) exp_id
985  << " " << show_to_string(id) << endmsg;
986 
987  }
988 
990  exp_id[m_LAYER_DISK_INDEX],
991  exp_id[m_PHI_MODULE_INDEX],
992  exp_id[m_ETA_MODULE_INDEX],
993  exp_id[m_PHI_INDEX_INDEX],
994  exp_id[m_ETA_INDEX_INDEX]);
996  layer_disk(pid),
997  phi_module(pid),
998  eta_module(pid),
999  phi_index(pid),
1000  eta_index(pid));
1001  if (pid != pid1) {
1002  log << MSG::ERROR << "PixelID::test_wafer_packing: new and old pixel ids not equal. New/old ids "
1003  << " " << show_to_string(pid1) << " "
1004  << show_to_string(pid) << endmsg;
1005 
1006  }
1007  }
1008 
1009  log << MSG::DEBUG << "PixelID::test_wafer_packing: Successful tested "
1010  << nids << " ids. "
1011  << endmsg;
1012 
1013  } else {
1014  log << MSG::ERROR <<
1015  "PixelID::test_wafer_packing: Unable to test wafer is packing - no dictionary has been defined. "
1016  << endmsg;
1017 
1018  }
1019 }
1020 
1021 
1022 IdContext
1025 
1026  return(IdContext(id, 0, m_ETA_MODULE_INDEX));
1027 }
1028 
1029 
1030 IdContext
1032  // For pixel only, the prefix is the first two levels
1034 }
PixelID::init_hashes
int init_hashes()
Definition: PixelID.cxx:360
IdDictDictionary::find_region
IdDictRegion * find_region(const std::string &region_name) const
Definition: IdDictDictionary.cxx:101
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:755
AtlasDetectorID::indet_field_value
int indet_field_value() const
Provide efficient access to individual field values, for subclass idhelpers.
Definition: AtlasDetectorID.h:606
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:905
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:639
AtlasDetectorID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: AtlasDetectorID.cxx:255
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:118
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:18
IdDictDictionary::version
const std::string & version() const
Dictionary version.
Definition: IdDictDictionary.h:341
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:470
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:26
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:350
PixelID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: PixelID.cxx:189
MultiRange::factory_end
identifier_factory factory_end()
Definition: MultiRange.cxx:124
PixelID::NOT_VALID_HASH
@ NOT_VALID_HASH
Definition: PixelID.h:259
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
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:621
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:369
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:419
PixelID::initLevelsFromDict
int initLevelsFromDict()
Definition: PixelID.cxx:602
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
PixelID::pixel_end
const_expanded_id_iterator pixel_end() const
Definition: PixelID.cxx:858
IdDictDictionary::name
const std::string & name() const
Dictionary name.
Definition: IdDictDictionary.h:332
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:83
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictDictionary.cxx:47
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
PixelID::pixel_hash_max
size_type pixel_hash_max() const
Definition: PixelID.cxx:842
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:1023
PixelID::m_bec_eta_mod_impl
IdDictFieldImplementation m_bec_eta_mod_impl
Definition: PixelID.h:324
IdDictRegion::implementation
const IdDictFieldImplementation & implementation(size_t i) const
Definition: IdDictRegion.cxx:34
IdDictMgr
Definition: IdDictMgr.h:15
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:854
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:124
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:432
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:863
PixelID::phi_index_max
int phi_index_max(const Identifier &id) const
Definition: PixelID.cxx:147
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:166
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
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:49
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:458
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:201
PixelID::phi_module_max
int phi_module_max(const Identifier &id) const
Definition: PixelID.cxx:127
PixelID::wafer_hash_max
size_type wafer_hash_max() const
Definition: PixelID.cxx:837
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictDictionary.cxx:75
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:935
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:499
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:65
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:880
PixelID::is_eta_module_max
bool is_eta_module_max(const Identifier &id) const
For the barrel.
Definition: PixelID.cxx:123
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:90
PixelID::eta_module_min
int eta_module_min(const Identifier &id) const
Definition: PixelID.cxx:100
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:221
PixelID::pixel_context
IdContext pixel_context() const
Definition: PixelID.cxx:1031
IdDictField.h
IdDictFieldImplementation::zeroing_mask
value_type zeroing_mask() const
Definition: IdDictFieldImplementation.h:220
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:365
PixelID::wafer_id_checks
void wafer_id_checks(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
Definition: PixelID.cxx:34
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:15
PixelID::wafer_end
const_id_iterator wafer_end() const
Definition: PixelID.cxx:850
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:184
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:846
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: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: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:445
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