ATLAS Offline Software
PixelDetectorManager.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
5 
10 #include "Identifier/Identifier.h"
14 #include "StoreGate/StoreGateSvc.h"
15 #include "GeoModelKernel/GeoVAlignmentStore.h"
19 
20 namespace InDetDD {
21 
22  const int FIRST_HIGHER_LEVEL = 1;
23 
24 
26  const std::string& name,
27  const std::string& pixelIDName)
29  m_idHelper(nullptr),
30  m_isLogical(false) // Change to true to change the definition of local module corrections
31  {
32  //
33  // Initialized the Identifier helper.
34  //
35  if (pixelIDName == "PLR_ID") {
36  const PLR_ID* plr_idHelper;
37  StatusCode sc = detStore->retrieve(plr_idHelper, pixelIDName);
38  if (sc.isFailure()) {
39  ATH_MSG_ERROR("Could not retrieve PLR_ID helper");
40  }
41  m_idHelper = plr_idHelper;
42  // make the symlink
43  sc = detStore->symLink(plr_idHelper, m_idHelper);
44  if (sc.isFailure()) {
45  ATH_MSG_ERROR("Could not make PLR_ID symlink");
46  }
47  } else {
48  StatusCode sc = detStore->retrieve(m_idHelper, pixelIDName);
49  if (sc.isFailure()) {
50  ATH_MSG_ERROR("Could not retrieve PixelID helper");
51  }
52  }
53 
54  // Initialize the collections.
55  if (m_idHelper) {
58  }
59  //https://its.cern.ch/jira/browse/ATLASRECTS-4886
61  }
62 
64  : PixelDetectorManager(detStore, "Pixel", "PixelID"){ }
65 
67  {
68  return m_volume.size();
69  }
70 
71  PVConstLink PixelDetectorManager::getTreeTop(unsigned int i) const
72  {
73  return m_volume[i];
74  }
75 
76  void PixelDetectorManager::addTreeTop(PVConstLink vol){
77  m_volume.push_back(vol);
78  }
79 
81  {
82  // NB the id helpers implementation for getting a hash is not optimal.
83  // Essentially does a binary search.
84  // Make sure it is a wafer Id
85  Identifier waferId = m_idHelper->wafer_id(id);
86  IdentifierHash idHash = m_idHelper->wafer_hash(waferId);
87  if (idHash.is_valid()) {
88  return m_elementCollection[idHash];
89  } else {
90  return nullptr;
91  }
92  }
93 
94 
96  {
97  return m_elementCollection[idHash];
98  }
99 
100  SiDetectorElement* PixelDetectorManager::getDetectorElement(int barrel_endcap, int layer_wheel, int phi_module, int eta_module) const
101  {
102  return getDetectorElement(m_idHelper->wafer_id(barrel_endcap, layer_wheel, phi_module, eta_module));
103  }
104 
106  {
107  return &m_elementCollection;
108  }
109 
110  SiDetectorElementCollection::const_iterator PixelDetectorManager::getDetectorElementBegin() const
111  {
112  return m_elementCollection.begin();
113  }
114 
115  SiDetectorElementCollection::const_iterator PixelDetectorManager::getDetectorElementEnd() const
116  {
117  return m_elementCollection.end();
118  }
119 
120 
122  {
123  IdentifierHash idHash = element->identifyHash();
124  if (idHash >= m_elementCollection.size())
125  throw std::runtime_error("PixelDetectorManager: Error adding detector element.");
126  m_elementCollection[idHash] = element;
127  }
128 
130  {
132 
133  // Loop over all elements and set the neighbours
134  for (iter = m_elementCollection.begin(); iter != m_elementCollection.end(); ++iter){
135 
136  SiDetectorElement * element = *iter;
137  if (element) {
138 
139  IdentifierHash idHash = element->identifyHash();
140  IdentifierHash idHashOther;
141 
142  int result;
143  // If no neighbour, result != 0 in which case we leave neighbour as null
144  result = m_idHelper->get_next_in_eta(idHash, idHashOther);
145  if (result==0) element->setNextInEta(m_elementCollection[idHashOther]);
146 
147  result = m_idHelper->get_prev_in_eta(idHash, idHashOther);
148  if (result==0) element->setPrevInEta(m_elementCollection[idHashOther]);
149 
150  result = m_idHelper->get_next_in_phi(idHash, idHashOther);
151  if (result==0) element->setNextInPhi(m_elementCollection[idHashOther]);
152 
153  result = m_idHelper->get_prev_in_phi(idHash, idHashOther);
154  if (result==0) element->setPrevInPhi(m_elementCollection[idHashOther]);
155  }
156  }
157  }
158 
159 
161  {
162  return m_idHelper;
163  }
164 
166  {
167  unsigned int barrelLayers = 0;
168  for (int i = numerology().numLayers() - 1; i >= 0; --i) {
169  barrelLayers *= 10;
170  barrelLayers += numerology().useLayer(i);
171  }
172  return barrelLayers;
173  }
174 
176  {
177  unsigned int endcapLayers = 0;
178  for (int i = numerology().numDisks() - 1; i >= 0; --i) {
179  endcapLayers *= 10;
180  endcapLayers += numerology().useDisk(i);
181  }
182  return endcapLayers;
183  }
184 
185 
187  const Identifier & id,
188  const Amg::Transform3D & delta,
189  FrameType frame,
190  GeoVAlignmentStore* alignStore) const
191  {
192 
193  if (level == 0) { // At the element level - local shift
194 
195  // We retrieve it via a hashId.
196  IdentifierHash idHash = m_idHelper->wafer_hash(id);
197  if (!idHash.is_valid()) return false;
198 
199  if (frame == InDetDD::global) {
200 
201  return setAlignableTransformGlobalDelta(m_alignableTransforms[idHash].get(), delta, alignStore);
202 
203  } else if (frame == InDetDD::local) {
204 
205  SiDetectorElement * element = m_elementCollection[idHash];
206  if (!element) return false;
207 
208  // Its a local transform
209  //See header file for definition of m_isLogical
210  if( m_isLogical ){
211  //Ensure cache is up to date and use the alignment corrected local to global transform
212  element->setCache();
213  return setAlignableTransformLocalDelta(m_alignableTransforms[idHash].get(), element->transform(), delta, alignStore);
214  } else
215  //Use default local to global transform
216  return setAlignableTransformLocalDelta(m_alignableTransforms[idHash].get(), element->defTransform(), delta, alignStore);
217  } else {
218  // other not supported
219  ATH_MSG_WARNING("Frames other than global or local are not supported.");
220  return false;
221  }
222 
223  } else { // higher level
224 
225  if (frame != InDetDD::global) {
226  ATH_MSG_WARNING("Non global shift at higher levels is not possible.");
227  return false;
228  }
229 
230  int index = level - FIRST_HIGHER_LEVEL; // level 0 is treated separately.
231  if (index >= static_cast<int>(m_higherAlignableTransforms.size())) return false;
232 
233  // We retrieve it from a map.
234  AlignableTransformMap::const_iterator iter;
235  iter = m_higherAlignableTransforms[index].find(id);
236  if (iter == m_higherAlignableTransforms[index].end()) return false;
237 
238  // Its a global transform
239  return setAlignableTransformGlobalDelta((iter->second).get(), delta, alignStore);
240  }
241 
242  }
243 
244 
246  const Identifier & id,
247  GeoAlignableTransform *transform,
248  const GeoVPhysVol * child)
249  {
251  if (m_idHelper) {
252 
253  const GeoVFullPhysVol * childFPV = dynamic_cast<const GeoVFullPhysVol *>(child);
254  if (!childFPV) {
255  ATH_MSG_ERROR("Child of alignable transform is not a full physical volume");
256  } else {
257  addAlignableTransform (level, id, transform, childFPV);
258  }
259  }
260  }
261 
263  const Identifier & id,
264  GeoAlignableTransform *transform,
265  const GeoVFullPhysVol * child)
266  {
268  if (m_idHelper) {
269  if (level == 0) {
270  IdentifierHash idHash = m_idHelper->wafer_hash(id);
271  if (idHash.is_valid()) {
272  m_alignableTransforms[idHash]= std::make_unique<ExtendedAlignableTransform>(transform, child);
273  }
274  } else {
275  // Higher levels are saved in a map. NB the index is level-1 as level=0 is treated above.
277  if (index >= static_cast<int>(m_higherAlignableTransforms.size())) m_higherAlignableTransforms.resize(index+1);
278  m_higherAlignableTransforms[index][id] = std::make_unique<ExtendedAlignableTransform>(transform, child);
279  }
280  }
281  }
282 
284  {
285  return getIdHelper()->is_pixel(id);
286  }
287 
288 
289 
291  {
292  return dynamic_cast<const PixelModuleDesign *>(getDesign(i));
293  }
294 
295 
296 
297  // The implementation of the new IBLDist DB;
298  // Specific for IBL -> maybe make it different function in future to be more general
299  bool PixelDetectorManager::processSpecialAlignment(const std::string & key, InDetDD::AlignFolderType alignfolderType) const
300  {
301 
302  bool alignmentChange = false;
303 
304  std::string alignfolder;
305  if (alignfolderType == InDetDD::static_run1) alignfolder = "/Indet/Align";
306  if (alignfolderType == InDetDD::timedependent_run2) alignfolder = "/Indet/AlignL3";
307 
308  ATH_MSG_INFO("Processing IBLDist alignment container with key (" << key << ")"
309  << "and alignment folder pointing to " << alignfolder);
310 
311  int nstaves = 0;
312  if (numerology().numPhiModulesForLayer(0)<14) nstaves = 14;
313  else nstaves = numerology().numPhiModulesForLayer(0);
314 
315  std::vector<float> ibldist;
316  std::vector<float> iblbaseline;
317  ibldist.resize(nstaves);
318  iblbaseline.resize(nstaves);
319 
320  const CondAttrListCollection* atrlistcol=nullptr;
321  if (StatusCode::SUCCESS==m_detStore->retrieve(atrlistcol,key)) {
322  // loop over objects in collection
323  for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) {
324  const coral::AttributeList& atrlist=citr->second;
325  ibldist[atrlist["stave"].data<int>()] = atrlist["mag"].data<float>();
326  iblbaseline[atrlist["stave"].data<int>()] = atrlist["base"].data<float>();
327 
328  ATH_MSG_VERBOSE("IBLDist DB -- channel: " << citr->first
329  << " ,stave: " << atrlist["stave"].data<int>()
330  << " ,mag: " << atrlist["mag"].data<float>()
331  << " ,base: " << atrlist["base"].data<float>());
332  }
333  }
334  else {
335  ATH_MSG_WARNING("Cannot find IBLDist Container for key "
336  << key << " - no IBL bowing alignment");
337  return alignmentChange;
338  }
339 
351  const AlignableTransformContainer* container;
352  if (StatusCode::SUCCESS!=m_detStore->retrieve(container, alignfolder)) {
353  ATH_MSG_ERROR("Cannot find AlignableTransformContainer for key "
354  << key << " - no misalignment");
355  // This should not occur in normal situations so we force job to abort.
356  throw std::runtime_error("Unable to apply Inner Detector alignments");
357  }
358  // Check if container is empty - this can occur if it is an invalid IOV.
359  if (container->empty()) {
360  ATH_MSG_ERROR("AlignableTransformContainer for key "
361  << key << " is empty. Probably due to out of range IOV");
362  // This should not occur in normal situations so we force job to abort.
363  throw std::runtime_error("Unable to apply Inner Detector alignments.");
364  }
365  // loop over all the AlignableTransform objects in the collection
366  std::string IBLalignfolder = alignfolder;
367  IBLalignfolder.append("/PIXB1");// "/Indet/Align/PIXB1"
368  for (const auto *pat : *container)
369  {
370  if (!( pat->tag()==IBLalignfolder &&
371  numerology().numPhiModulesForLayer(0)==14 &&
372  numerology().numLayers()==4) ){ // hard-coded to IBL for now; no other geometry should really apply this!
373  ATH_MSG_DEBUG("IBLDist; ignoring collections " << pat->tag());
374  }
375  else{
376  const AlignableTransform* transformCollection = pat;
377  for (AlignableTransform::AlignTransMem_citr trans_iter = transformCollection->begin();
378  trans_iter != transformCollection->end();
379  ++trans_iter)
380  {
381  ATH_MSG_DEBUG("IBLDist alignment for identifier "
382  << getIdHelper()->show_to_string(trans_iter->identify()));
383 
384  IdentifierHash idHash = getIdHelper()->wafer_hash(trans_iter->identify());
385  if (!idHash.is_valid()){
386  ATH_MSG_WARNING("Invalid HashID for identifier "
387  << getIdHelper()->show_to_string(trans_iter->identify()));
388  ATH_MSG_WARNING("No IBLDist corrections can be applied for invalid HashID's - exiting");
389  return false;
390  }
391  SiDetectorElement * sielem = m_elementCollection[idHash];
392  //This should work as Bowing is in L3 frame, i.e. local module frame
393  Amg::Vector3D center = sielem->defTransform() * Amg::Vector3D{0, 0, 0};
394  double z = center[2];
395  const double y0y0 = 366.5*366.5;
396 
397  double bowx = ibldist[getIdHelper()->phi_module(trans_iter->identify())] * ( z*z - y0y0 ) / y0y0;
398  double basex= iblbaseline[getIdHelper()->phi_module(trans_iter->identify())];
399  // This is in the module frame, as bowing corrections are directly L3
400 
401  ATH_MSG_DEBUG("Total IBL-module Tx shift (baseline+bowing): " << basex+bowx);
402  if ( (basex+bowx)==0 ) continue; // make sure we ignore NULL corrections
403 
404  Amg::Transform3D shift = Amg::Translation3D(basex+bowx,0,0) * Amg::RotationMatrix3D::Identity();
405 
406  const AlignableTransform* cpat = pat;
407  AlignableTransform::AlignTransMem_citr this_trans=cpat->findIdent(trans_iter->identify());
408  HepGeom::Transform3D newtrans = Amg::EigenTransformToCLHEP(shift)*this_trans->transform();
409 
411  if (msgLvl(MSG::VERBOSE)) {
412  ATH_MSG_LVL_NOCHK(MSG::VERBOSE, "Bowing Transformation only:");
414  ATH_MSG_LVL_NOCHK(MSG::VERBOSE, "Original alignable Transformation from StoreGate:");
415  printTransform(MSG::VERBOSE, Amg::CLHEPTransformToEigen(this_trans->transform()));
416  ATH_MSG_LVL_NOCHK(MSG::VERBOSE, "Final mModified Transformation:");
418  }
421  // Set the new transform; Will replace existing one with updated transform
423  trans_iter->identify(),
424  Amg::CLHEPTransformToEigen(newtrans),
426  nullptr);
427 
428  if (!status) {
429  ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier."
430  << getIdHelper()->show_to_string(trans_iter->identify())
431  << " at level 0 for IBLDist bowing deformation");
432  }
433  alignmentChange = (alignmentChange || status);
434  }
435  }
436  }
437 
438  return alignmentChange;
439  }
440 
443  GeoVAlignmentStore* alignStore) const {
444  bool alignmentChange = false;
445 
446  ATH_MSG_INFO("Processing IBLDist alignment container with key " << key);
447  if(numerology().numLayers() != 4) {
448  // this doesn't appear to be Run 2, i.e. the IBL isn't there. Bailing
449  return alignmentChange;
450  }
451 
452  int nstaves = 0;
453  if (numerology().numPhiModulesForLayer(0) < 14)
454  nstaves = 14;
455  else
456  nstaves = numerology().numPhiModulesForLayer(0);
457 
458  std::vector<float> ibldist;
459  std::vector<float> iblbaseline;
460  ibldist.resize(nstaves);
461  iblbaseline.resize(nstaves);
462 
463  // loop over objects in collection
464  for (CondAttrListCollection::const_iterator citr = obj->begin();
465  citr != obj->end(); ++citr) {
466 
467  const coral::AttributeList &atrlist = citr->second;
468  ibldist[atrlist["stave"].data<int>()] = atrlist["mag"].data<float>();
469  iblbaseline[atrlist["stave"].data<int>()] = atrlist["base"].data<float>();
470 
471  ATH_MSG_VERBOSE("IBLDist DB -- channel: " << citr->first
472  << ", stave: " << atrlist["stave"].data<int>()
473  << ", mag: " << atrlist["mag"].data<float>()
474  << ", base: " << atrlist["base"].data<float>());
475  }
476 
489  for(const auto* detElem : *getDetectorElementCollection()) {
490  if(!detElem->isInnermostPixelLayer()) {
491  // skip non-IBL elements. This only works if the innermost pixel layer is in fact
492  // the IBL. That should be the case for Run2 until replacement of the ID.
493  continue;
494  }
495  std::string repr = getIdHelper()->show_to_string(detElem->identify());
496  ATH_MSG_DEBUG("IBLDist alignment for identifier " << repr);
497 
498 
499  IdentifierHash idHash = getIdHelper()->wafer_hash(detElem->identify());
500  if (!idHash.is_valid()) {
501  ATH_MSG_WARNING("Invalid HashID for identifier " << repr);
502  ATH_MSG_WARNING("No IBLDist corrections can be applied for "
503  "invalid HashID's - exiting ");
504  return false;
505  }
506 
507  // extract the stave number
508  int stave = getIdHelper()->phi_module(detElem->identify());
509 
510  Amg::Vector3D center = detElem->defTransform() * Amg::Vector3D{0, 0, 0};
511  double z = center[2];
512  const double y0y0 = 366.5 * 366.5;
513 
514  double bowx = ibldist[stave] * (z * z - y0y0) / y0y0;
515  double basex = iblbaseline[stave];
516  // This is in the module frame, as bowing corrections are directly L3
517 
518  ATH_MSG_DEBUG("Total IBL-module Tx shift (baseline+bowing): " << basex + bowx);
519 
520  if ((basex + bowx) == 0) {
521  continue; // make sure we ignore NULL corrections
522  }
523 
524  Amg::Transform3D shift = Amg::Translation3D(basex + bowx, 0, 0) *
525  Amg::RotationMatrix3D::Identity();
526 
527  // now we need to get the original alignment delta to apply this additional
528  // shift to
530  const GeoTrf::Transform3D* currentDelta = alignStore->getDelta(eat->alignableTransform());
531  if (currentDelta == nullptr) {
532  ATH_MSG_ERROR("Have IBL Dist for element which does not have an alignment delta."
533  << " This indicates inconsistent alignment data");
534  return false;
535  }
536 
537  HepGeom::Transform3D recoToHitTransform = detElem->recoToHitTransform();
538  Amg::Transform3D r2h = Amg::CLHEPTransformToEigen(recoToHitTransform);
539 
540  ATH_MSG_VERBOSE("Previous delta for " << repr << ":\n" << currentDelta->matrix());
541  ATH_MSG_VERBOSE("Bowing-only delta for " << repr << ":\n" << shift.matrix());
542  Amg::Transform3D newDelta = shift * r2h.inverse() * (*currentDelta) * r2h;
543 
544  // We can probably just write it back to the geo alignment store.
545  // The IBL bowing is always at the module level, and that's the delta that
546  // we retrieved from the geo alignment store.
547 
549  detElem->identify(),
550  newDelta,
552  alignStore);
553 
554 
555  ATH_MSG_VERBOSE("New delta for " << repr << ":\n"
556  << alignStore->getDelta(eat->alignableTransform())->matrix());
557 
558  alignmentChange |= status;
559  }
560 
561  return alignmentChange;
562  }
563 
564  // New global alignment folders
565  bool PixelDetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame, const CondAttrListCollection* obj, GeoVAlignmentStore* alignStore) const
566  {
567 
568  bool alignmentChange = false;
569 
570  ATH_MSG_INFO("Processing new global alignment containers with key " << key
571  << " in the " << frame << " frame at level " << level);
572 
574  const CondAttrListCollection* atrlistcol=obj;
575  //cppcheck-suppress nullPointerRedundantCheck
576  if (!atrlistcol) {
577  ATH_MSG_INFO("Read alignment from detector store with key " << key);
578  if (StatusCode::SUCCESS!=m_detStore->retrieve(atrlistcol,key)) {
579  ATH_MSG_WARNING("Cannot find new global align Container for key "
580  << key << " - no new global alignment");
581  return alignmentChange;
582  }
583  }
584  // Avoid cppcheck warning.
585  if (!atrlistcol) {
586  return alignmentChange;
587  }
588  {
589  // loop over objects in collection
590  //cppcheck-suppress nullPointerRedundantCheck
591  for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) {
592  const coral::AttributeList& atrlist=citr->second;
593  // We are in the Pixel manager, therefore ignore all that is not Pixel Identifier
594  if (atrlist["det"].data<int>()!=1) continue;
595 
596  ident = getIdHelper()->wafer_id(atrlist["bec"].data<int>(),
597  atrlist["layer"].data<int>(),
598  atrlist["ring"].data<int>(),
599  atrlist["sector"].data<int>());
600 
601  // Make sure we have valid HashID (This ONLY works here as the 0-modules exist)
602  // Precaution which does not work for e.g. SCT
603  if (!(getIdHelper()->wafer_hash(ident)).is_valid()){
604  ATH_MSG_WARNING("Invalid HashID for identifier " << getIdHelper()->show_to_string(ident));
605  ATH_MSG_WARNING("No global alignment corrections can be applied for invalid HashID's - exiting");
606  return false;
607  }
608 
609  // construct new transform
610  // Order of rotations is defined as around z, then y, then x.
611  Amg::Translation3D newtranslation(atrlist["Tx"].data<float>(),atrlist["Ty"].data<float>(),atrlist["Tz"].data<float>());
612  Amg::Transform3D newtrans = newtranslation * Amg::RotationMatrix3D::Identity();
613  newtrans *= Amg::AngleAxis3D(atrlist["Rz"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,0.,1.));
614  newtrans *= Amg::AngleAxis3D(atrlist["Ry"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,1.,0.));
615  newtrans *= Amg::AngleAxis3D(atrlist["Rx"].data<float>()*CLHEP::mrad, Amg::Vector3D(1.,0.,0.));
616 
617  ATH_MSG_DEBUG("New global DB -- channel: " << citr->first
618  << " ,det: " << atrlist["det"].data<int>()
619  << " ,bec: " << atrlist["bec"].data<int>()
620  << " ,layer: " << atrlist["layer"].data<int>()
621  << " ,ring: " << atrlist["ring"].data<int>()
622  << " ,sector: " << atrlist["sector"].data<int>()
623  << " ,Tx: " << atrlist["Tx"].data<float>()
624  << " ,Ty: " << atrlist["Ty"].data<float>()
625  << " ,Tz: " << atrlist["Tz"].data<float>()
626  << " ,Rx: " << atrlist["Rx"].data<float>()
627  << " ,Ry: " << atrlist["Ry"].data<float>()
628  << " ,Rz: " << atrlist["Rz"].data<float>());
629 
630  // Set the new transform; Will replace existing one with updated transform
632  ident,
633  newtrans,
634  frame,
635  alignStore);
636 
637  if (!status) {
638  ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier."
639  << getIdHelper()->show_to_string(ident)
640  << " at level " << level << " for new global DB");
641  }
642 
643  alignmentChange = (alignmentChange || status);
644  }
645  }
646  return alignmentChange;
647  }
648 
649 
650  // Helpful function for debugging of transforms
652  const Amg::Transform3D & tr) const
653  {
654  ATH_MSG_LVL_NOCHK(level, " - translation: " << tr.translation().x() << " " <<tr.translation().y() << " " <<tr.translation().z());
655  ATH_MSG_LVL_NOCHK(level, " - rotation:");
656  ATH_MSG_LVL_NOCHK(level, " " << tr(0,0) << " " << tr(0,1) << " " << tr(0,2));
657  ATH_MSG_LVL_NOCHK(level, " " << tr(1,0) << " " << tr(1,1) << " " << tr(1,2));
658  ATH_MSG_LVL_NOCHK(level, " " << tr(2,0) << " " << tr(2,1) << " " << tr(2,2));
659  }
660 
661 
662 } // namespace InDetDD
InDetDD::FrameType
FrameType
Definition: InDetDD_Defs.h:16
InDetDD::PixelDetectorManager::printTransform
void printTransform(MSG::Level level, const Amg::Transform3D &tr) const
Definition: PixelDetectorManager.cxx:651
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
InDetDD::ExtendedAlignableTransform::alignableTransform
GeoAlignableTransform * alignableTransform()
Definition: ExtendedAlignableTransform.h:43
InDetDD::PixelDetectorManager::getBarrelLayers
unsigned int getBarrelLayers() const
Layers built.
Definition: PixelDetectorManager.cxx:165
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:315
InDetDD::PixelDetectorManager::m_elementCollection
SiDetectorElementCollection m_elementCollection
Definition: PixelDetectorManager.h:161
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:126
get_generator_info.result
result
Definition: get_generator_info.py:21
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthMsgStreamMacros.h
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:48
InDetDD::SiDetectorElement::setPrevInEta
void setPrevInEta(const SiDetectorElement *element)
InDetDD::PixelDetectorManager::m_idHelper
const PixelID * m_idHelper
Definition: PixelDetectorManager.h:165
GeoNodePtr.h
InDetDD::timedependent_run2
@ timedependent_run2
Definition: InDetDD_Defs.h:19
index
Definition: index.py:1
CondMultChanCollection
A CondMultChanCollection is a template class which can hold a collection of T* objects which are inte...
Definition: CondMultChanCollection.h:52
AlignableTransform::AlignTransMem_citr
std::vector< AlignTransMember >::const_iterator AlignTransMem_citr
Definition: AlignableTransform.h:46
InDetDD::SiDetectorManager::setAlignableTransformLocalDelta
static bool setAlignableTransformLocalDelta(ExtendedAlignableTransform *extXF, const Amg::Transform3D &localToGlobalXF, const Amg::Transform3D &delta, GeoVAlignmentStore *alignStore=nullptr)
Helper method to set delta transform from a local delta - Amg interface.
Definition: SiDetectorManager.cxx:62
PLR_ID.h
This is an Identifier helper class for the PLR subdetector. This class inherits from PicelID.
InDetDD::SiNumerology::useLayer
bool useLayer(int layer) const
Check if layer exists.
PLR_ID
This is an Identifier helper class for the PLR subdetector. This class inherits from PixelID.
Definition: PLR_ID.h:24
InDetDD::InDetDetectorManager::m_suppressWarnings
std::atomic_bool m_suppressWarnings
Definition: InDetDetectorManager.h:100
InDetDD::SiDetectorElement::setPrevInPhi
void setPrevInPhi(const SiDetectorElement *element)
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:309
GeoNodePtr
GeoIntrusivePtr< T > GeoNodePtr
Definition: GeoNodePtr.h:12
InDetDD::SiDetectorElement::setNextInEta
void setNextInEta(const SiDetectorElement *element)
InDetDD::static_run1
@ static_run1
Definition: InDetDD_Defs.h:19
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:458
InDetDD::global
@ global
Definition: InDetDD_Defs.h:16
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
InDetDD::SolidStateDetectorElementBase::setCache
void setCache()
Set/calculate cache values (inline)
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
python.SystemOfUnits.mrad
int mrad
Definition: SystemOfUnits.py:112
InDetDD::SolidStateDetectorElementBase::identifyHash
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
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:364
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
InDetDD::SiDetectorManager::setAlignableTransformGlobalDelta
static bool setAlignableTransformGlobalDelta(ExtendedAlignableTransform *extXF, const Amg::Transform3D &delta, GeoVAlignmentStore *alignStore=nullptr)
Helper method to set delta transform from a global delta - Amg interface.
Definition: SiDetectorManager.cxx:101
InDetDD::PixelDetectorManager::m_isLogical
bool m_isLogical
This variable switches the how the local alignment corrections are applied If true they will be calcu...
Definition: PixelDetectorManager.h:176
StoreGateSvc::retrieve
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
ATH_MSG_LVL_NOCHK
#define ATH_MSG_LVL_NOCHK(lvl, x)
Definition: AthMsgStreamMacros.h:18
InDetDD::PixelDetectorManager::getDetectorElementCollection
virtual const SiDetectorElementCollection * getDetectorElementCollection() const override
access to whole collection via Iterators
Definition: PixelDetectorManager.cxx:105
InDetDD::SolidStateDetectorElementBase::defTransform
const Amg::Transform3D defTransform() const
Definition: SolidStateDetectorElementBase.cxx:60
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
InDetDD::PixelDetectorManager::getEndcapLayers
unsigned int getEndcapLayers() const
Layers built.
Definition: PixelDetectorManager.cxx:175
PixelID::wafer_hash
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition: PixelID.h:387
PixelDetectorManager.h
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
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:471
lumiFormat.i
int i
Definition: lumiFormat.py:92
z
#define z
InDetDD::PixelDetectorManager::identifierBelongs
virtual bool identifierBelongs(const Identifier &id) const override
Check identifier is for this detector.
Definition: PixelDetectorManager.cxx:283
InDetDD::PixelDetectorManager::initNeighbours
virtual void initNeighbours() override
Initialize the neighbours.
Definition: PixelDetectorManager.cxx:129
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AlignableTransformContainer.h
AlignableTransform::end
AlignTransMem_citr end() const
Definition: AlignableTransform.h:106
InDetDD::SiDetectorManager::getDesign
const SiDetectorDesign * getDesign(int i) const
Definition: SiDetectorManager.cxx:146
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
InDetDD::FIRST_HIGHER_LEVEL
const int FIRST_HIGHER_LEVEL
Definition: PixelDetectorManager.cxx:22
InDetDD::PixelDetectorManager::PixelDetectorManager
PixelDetectorManager(StoreGateSvc *detStore)
Constructor.
Definition: PixelDetectorManager.cxx:63
PyAthena::repr
std::string repr(PyObject *o)
returns the string representation of a python object equivalent of calling repr(o) in python
Definition: PyAthenaUtils.cxx:106
InDetDD::SiNumerology::useDisk
bool useDisk(int disk) const
Check if disk exists.
InDetDD::PixelDetectorManager::getDetectorElementBegin
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override
Definition: PixelDetectorManager.cxx:110
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:497
InDetDD::InDetDetectorManager::m_detStore
StoreGateSvc * m_detStore
Definition: InDetDetectorManager.h:99
AlignableTransform
Definition: AlignableTransform.h:24
InDetDD::PixelDetectorManager::addAlignableTransform
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
Add alignable transforms.
Definition: PixelDetectorManager.cxx:262
IdentifierHash::is_valid
bool is_valid() const
Check if id is in a valid state.
InDetDD::local
@ local
Definition: InDetDD_Defs.h:16
dso-stats.pat
pat
Definition: dso-stats.py:39
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
InDetDD::PixelDetectorManager
Definition: PixelDetectorManager.h:47
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
InDetDD::PixelDetectorManager::m_volume
std::vector< PVConstLink > m_volume
Definition: PixelDetectorManager.h:160
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
IdentifierHash.h
InDetDD::PixelDetectorManager::getIdHelper
virtual const PixelID * getIdHelper() const override
Definition: PixelDetectorManager.cxx:160
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
PixelID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: PixelID.cxx:912
HI::TowerBins::numLayers
constexpr unsigned int numLayers()
Definition: HIEventDefs.h:23
TRT::Hit::ident
@ ident
Definition: HitInfo.h:77
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDetDD::PixelDetectorManager::getNumTreeTops
virtual unsigned int getNumTreeTops() const override
Access to raw geometry:
Definition: PixelDetectorManager.cxx:66
InDetDD::ExtendedAlignableTransform
Definition: ExtendedAlignableTransform.h:31
AlignableTransform::findIdent
AlignTransMem_citr findIdent(const Identifier &ident) const
Definition: AlignableTransform.h:118
SiDetectorElement.h
AlignableTransform.h
InDetDD::SiDetectorElement::setNextInPhi
void setNextInPhi(const SiDetectorElement *element)
DeMoScan.index
string index
Definition: DeMoScan.py:362
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
PixelModuleDesign.h
Amg::CLHEPTransformToEigen
Amg::Transform3D CLHEPTransformToEigen(const HepGeom::Transform3D &CLHEPtransf)
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D.
Definition: CLHEPtoEigenConverter.h:38
GeoPrimitivesHelpers.h
InDetDD::PixelDetectorManager::setAlignableTransformDelta
virtual bool setAlignableTransformDelta(int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const override
implements the main alignment update for delta transforms in different frames, it translates into the...
Definition: PixelDetectorManager.cxx:186
InDetDD::PixelDetectorManager::processGlobalAlignment
virtual bool processGlobalAlignment(const std::string &, int level, FrameType frame, const CondAttrListCollection *obj, GeoVAlignmentStore *alignStore) const override
Process new global DB folders for L1 and L2.
Definition: PixelDetectorManager.cxx:565
InDetDD::PixelDetectorManager::getTreeTop
virtual PVConstLink getTreeTop(unsigned int i) const override
Definition: PixelDetectorManager.cxx:71
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
Amg::EigenTransformToCLHEP
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
Definition: CLHEPtoEigenConverter.h:120
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
InDetDD::SiNumerology::numPhiModulesForLayer
int numPhiModulesForLayer(int layer) const
Number of sectors in phi for a layer.
InDetDD::SiDetectorManager
Definition: SiDetectorManager.h:60
InDetDD::PixelDetectorManager::m_alignableTransforms
std::vector< std::unique_ptr< ExtendedAlignableTransform > > m_alignableTransforms
Definition: PixelDetectorManager.h:164
InDetDD::PixelDetectorManager::addTreeTop
void addTreeTop(PVConstLink vol)
Add a Tree top:
Definition: PixelDetectorManager.cxx:76
InDetDD::PixelDetectorManager::getDetectorElementEnd
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override
Definition: PixelDetectorManager.cxx:115
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
merge.status
status
Definition: merge.py:17
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
AlignableTransform::begin
AlignTransMem_citr begin() const
Definition: AlignableTransform.h:104
IdentifierHash
Definition: IdentifierHash.h:38
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
python.PyAthena.obj
obj
Definition: PyAthena.py:135
PixelID
Definition: PixelID.h:67
StoreGateSvc.h
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:484
InDetDD::AlignFolderType
AlignFolderType
Definition: InDetDD_Defs.h:19
InDetDD::PixelDetectorManager::m_higherAlignableTransforms
std::vector< AlignableTransformMap > m_higherAlignableTransforms
Definition: PixelDetectorManager.h:163
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
InDetDD::SolidStateDetectorElementBase::transform
virtual const Amg::Transform3D & transform() const override final
Return local to global transform.
InDetDD::PixelDetectorManager::getPixelDesign
virtual const PixelModuleDesign * getPixelDesign(int i) const
Access to module design, Casts to PixelModuleDesign.
Definition: PixelDetectorManager.cxx:290
InDetDD::PixelDetectorManager::addDetectorElement
virtual void addDetectorElement(SiDetectorElement *element) override
Add elememts.
Definition: PixelDetectorManager.cxx:121
InDetDD::PixelDetectorManager::processSpecialAlignment
bool processSpecialAlignment(const std::string &, InDetDD::AlignFolderType) const override
Process new IBLDist DB folder.
Definition: PixelDetectorManager.cxx:299
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
InDetDD::PixelDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80