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(const 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 
95  {
96  return m_elementCollection[idHash];
97  }
98 
99  const SiDetectorElement* PixelDetectorManager::getDetectorElement(int barrel_endcap, int layer_wheel, int phi_module, int eta_module) const
100  {
101  return getDetectorElement(m_idHelper->wafer_id(barrel_endcap, layer_wheel, phi_module, eta_module));
102  }
103 
105  {
106  return &m_elementCollection;
107  }
108 
110  {
111  return m_elementCollection.begin();
112  }
113 
115  {
116  return m_elementCollection.end();
117  }
119  {
120  return m_elementCollection.begin();
121  }
122 
124  {
125  return m_elementCollection.end();
126  }
127 
129  {
130  IdentifierHash idHash = element->identifyHash();
131  if (idHash >= m_elementCollection.size())
132  throw std::runtime_error("PixelDetectorManager: Error adding detector element.");
133  m_elementCollection[idHash] = element;
134  }
135 
137  {
139 
140  // Loop over all elements and set the neighbours
142 
143  SiDetectorElement * element = *iter;
144  if (element) {
145 
146  IdentifierHash idHash = element->identifyHash();
147  IdentifierHash idHashOther;
148 
149  int result;
150  // If no neighbour, result != 0 in which case we leave neighbour as null
151  result = m_idHelper->get_next_in_eta(idHash, idHashOther);
152  if (result==0) element->setNextInEta(m_elementCollection[idHashOther]);
153 
154  result = m_idHelper->get_prev_in_eta(idHash, idHashOther);
155  if (result==0) element->setPrevInEta(m_elementCollection[idHashOther]);
156 
157  result = m_idHelper->get_next_in_phi(idHash, idHashOther);
158  if (result==0) element->setNextInPhi(m_elementCollection[idHashOther]);
159 
160  result = m_idHelper->get_prev_in_phi(idHash, idHashOther);
161  if (result==0) element->setPrevInPhi(m_elementCollection[idHashOther]);
162  }
163  }
164  }
165 
166 
168  {
169  return m_idHelper;
170  }
171 
173  {
174  unsigned int barrelLayers = 0;
175  for (int i = numerology().numLayers() - 1; i >= 0; --i) {
176  barrelLayers *= 10;
177  barrelLayers += numerology().useLayer(i);
178  }
179  return barrelLayers;
180  }
181 
183  {
184  unsigned int endcapLayers = 0;
185  for (int i = numerology().numDisks() - 1; i >= 0; --i) {
186  endcapLayers *= 10;
187  endcapLayers += numerology().useDisk(i);
188  }
189  return endcapLayers;
190  }
191 
192 
194  const Identifier & id,
195  const Amg::Transform3D & delta,
196  FrameType frame,
197  GeoVAlignmentStore* alignStore) const
198  {
199 
200  if (level == 0) { // At the element level - local shift
201 
202  // We retrieve it via a hashId.
203  IdentifierHash idHash = m_idHelper->wafer_hash(id);
204  if (!idHash.is_valid()) return false;
205 
206  if (frame == InDetDD::global) {
207 
208  return setAlignableTransformGlobalDelta(m_alignableTransforms[idHash].get(), delta, alignStore);
209 
210  } else if (frame == InDetDD::local) {
211 
212  const SiDetectorElement * element = m_elementCollection[idHash];
213  if (!element) return false;
214 
215  // Its a local transform
216  //See header file for definition of m_isLogical
217  if( m_isLogical ){
218  // Ensure cache is up to date and use the alignment corrected local to
219  // global transform
220  element->updateCache();
222  m_alignableTransforms[idHash].get(), element->transform(), delta,
223  alignStore);
224  } else
225  //Use default local to global transform
227  m_alignableTransforms[idHash].get(), element->defTransform(),
228  delta, alignStore);
229  } else {
230  // other not supported
231  ATH_MSG_WARNING("Frames other than global or local are not supported.");
232  return false;
233  }
234 
235  } else { // higher level
236 
237  if (frame != InDetDD::global) {
238  ATH_MSG_WARNING("Non global shift at higher levels is not possible.");
239  return false;
240  }
241 
242  int index = level - FIRST_HIGHER_LEVEL; // level 0 is treated separately.
243  if (index >= static_cast<int>(m_higherAlignableTransforms.size())) return false;
244 
245  // We retrieve it from a map.
246  AlignableTransformMap::const_iterator iter;
248  if (iter == m_higherAlignableTransforms[index].end()) return false;
249 
250  // Its a global transform
251  return setAlignableTransformGlobalDelta((iter->second).get(), delta, alignStore);
252  }
253 
254  }
255 
256 
258  const Identifier & id,
259  GeoAlignableTransform *transform,
260  const GeoVPhysVol * child)
261  {
263  if (m_idHelper) {
264 
265  const GeoVFullPhysVol * childFPV = dynamic_cast<const GeoVFullPhysVol *>(child);
266  if (!childFPV) {
267  ATH_MSG_ERROR("Child of alignable transform is not a full physical volume");
268  } else {
269  addAlignableTransform (level, id, transform, childFPV);
270  }
271  }
272  }
273 
275  const Identifier & id,
276  GeoAlignableTransform *transform,
277  const GeoVFullPhysVol * child)
278  {
280  if (m_idHelper) {
281  if (level == 0) {
282  IdentifierHash idHash = m_idHelper->wafer_hash(id);
283  if (idHash.is_valid()) {
284  m_alignableTransforms[idHash]= std::make_unique<ExtendedAlignableTransform>(transform, child);
285  }
286  } else {
287  // Higher levels are saved in a map. NB the index is level-1 as level=0 is treated above.
289  if (index >= static_cast<int>(m_higherAlignableTransforms.size())) m_higherAlignableTransforms.resize(index+1);
290  m_higherAlignableTransforms[index][id] = std::make_unique<ExtendedAlignableTransform>(transform, child);
291  }
292  }
293  }
294 
296  {
297  return getIdHelper()->is_pixel(id);
298  }
299 
300 
301 
303  {
304  return dynamic_cast<const PixelModuleDesign *>(getDesign(i));
305  }
306 
307 
308 
309  // The implementation of the new IBLDist DB;
310  // Specific for IBL -> maybe make it different function in future to be more general
312  {
313 
314  bool alignmentChange = false;
315 
316  std::string alignfolder;
317  if (alignfolderType == InDetDD::static_run1) alignfolder = "/Indet/Align";
318  if (alignfolderType == InDetDD::timedependent_run2) alignfolder = "/Indet/AlignL3";
319 
320  ATH_MSG_INFO("Processing IBLDist alignment container with key (" << key << ")"
321  << "and alignment folder pointing to " << alignfolder);
322 
323  int nstaves = 0;
324  if (numerology().numPhiModulesForLayer(0)<14) nstaves = 14;
325  else nstaves = numerology().numPhiModulesForLayer(0);
326 
327  std::vector<float> ibldist;
328  std::vector<float> iblbaseline;
329  ibldist.resize(nstaves);
330  iblbaseline.resize(nstaves);
331 
332  const CondAttrListCollection* atrlistcol=nullptr;
333  if (StatusCode::SUCCESS==m_detStore->retrieve(atrlistcol,key)) {
334  // loop over objects in collection
335  for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) {
336  const coral::AttributeList& atrlist=citr->second;
337  ibldist[atrlist["stave"].data<int>()] = atrlist["mag"].data<float>();
338  iblbaseline[atrlist["stave"].data<int>()] = atrlist["base"].data<float>();
339 
340  ATH_MSG_VERBOSE("IBLDist DB -- channel: " << citr->first
341  << " ,stave: " << atrlist["stave"].data<int>()
342  << " ,mag: " << atrlist["mag"].data<float>()
343  << " ,base: " << atrlist["base"].data<float>());
344  }
345  }
346  else {
347  ATH_MSG_WARNING("Cannot find IBLDist Container for key "
348  << key << " - no IBL bowing alignment");
349  return alignmentChange;
350  }
351 
363  const AlignableTransformContainer* container;
364  if (StatusCode::SUCCESS!=m_detStore->retrieve(container, alignfolder)) {
365  ATH_MSG_ERROR("Cannot find AlignableTransformContainer for key "
366  << key << " - no misalignment");
367  // This should not occur in normal situations so we force job to abort.
368  throw std::runtime_error("Unable to apply Inner Detector alignments");
369  }
370  // Check if container is empty - this can occur if it is an invalid IOV.
371  if (container->empty()) {
372  ATH_MSG_ERROR("AlignableTransformContainer for key "
373  << key << " is empty. Probably due to out of range IOV");
374  // This should not occur in normal situations so we force job to abort.
375  throw std::runtime_error("Unable to apply Inner Detector alignments.");
376  }
377  // loop over all the AlignableTransform objects in the collection
378  std::string IBLalignfolder = alignfolder;
379  IBLalignfolder.append("/PIXB1");// "/Indet/Align/PIXB1"
380  for (const auto *pat : *container)
381  {
382  if (!( pat->tag()==IBLalignfolder &&
383  numerology().numPhiModulesForLayer(0)==14 &&
384  numerology().numLayers()==4) ){ // hard-coded to IBL for now; no other geometry should really apply this!
385  ATH_MSG_DEBUG("IBLDist; ignoring collections " << pat->tag());
386  }
387  else{
388  const AlignableTransform* transformCollection = pat;
389  for (AlignableTransform::AlignTransMem_citr trans_iter = transformCollection->begin();
390  trans_iter != transformCollection->end();
391  ++trans_iter)
392  {
393  ATH_MSG_DEBUG("IBLDist alignment for identifier "
394  << getIdHelper()->show_to_string(trans_iter->identify()));
395 
396  IdentifierHash idHash = getIdHelper()->wafer_hash(trans_iter->identify());
397  if (!idHash.is_valid()){
398  ATH_MSG_WARNING("Invalid HashID for identifier "
399  << getIdHelper()->show_to_string(trans_iter->identify()));
400  ATH_MSG_WARNING("No IBLDist corrections can be applied for invalid HashID's - exiting");
401  return false;
402  }
403  const SiDetectorElement * sielem = m_elementCollection[idHash];
404  //This should work as Bowing is in L3 frame, i.e. local module frame
405  Amg::Vector3D center = sielem->defTransform() * Amg::Vector3D{0, 0, 0};
406  double z = center[2];
407  const double y0y0 = 366.5*366.5;
408 
409  double bowx = ibldist[getIdHelper()->phi_module(trans_iter->identify())] * ( z*z - y0y0 ) / y0y0;
410  double basex= iblbaseline[getIdHelper()->phi_module(trans_iter->identify())];
411  // This is in the module frame, as bowing corrections are directly L3
412 
413  ATH_MSG_DEBUG("Total IBL-module Tx shift (baseline+bowing): " << basex+bowx);
414  if ( (basex+bowx)==0 ) continue; // make sure we ignore NULL corrections
415 
416  Amg::Transform3D shift = Amg::Translation3D(basex+bowx,0,0) * Amg::RotationMatrix3D::Identity();
417 
418  const AlignableTransform* cpat = pat;
419  AlignableTransform::AlignTransMem_citr this_trans=cpat->findIdent(trans_iter->identify());
420  HepGeom::Transform3D newtrans = Amg::EigenTransformToCLHEP(shift)*this_trans->transform();
421 
423  if (msgLvl(MSG::VERBOSE)) {
424  ATH_MSG_LVL_NOCHK(MSG::VERBOSE, "Bowing Transformation only:");
426  ATH_MSG_LVL_NOCHK(MSG::VERBOSE, "Original alignable Transformation from StoreGate:");
427  printTransform(MSG::VERBOSE, Amg::CLHEPTransformToEigen(this_trans->transform()));
428  ATH_MSG_LVL_NOCHK(MSG::VERBOSE, "Final mModified Transformation:");
430  }
433  // Set the new transform; Will replace existing one with updated transform
435  trans_iter->identify(),
436  Amg::CLHEPTransformToEigen(newtrans),
438  nullptr);
439 
440  if (!status) {
441  ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier."
442  << getIdHelper()->show_to_string(trans_iter->identify())
443  << " at level 0 for IBLDist bowing deformation");
444  }
445  alignmentChange = (alignmentChange || status);
446  }
447  }
448  }
449 
450  return alignmentChange;
451  }
452 
455  GeoVAlignmentStore* alignStore) const {
456  bool alignmentChange = false;
457 
458  ATH_MSG_INFO("Processing IBLDist alignment container with key " << key);
459  if(numerology().numLayers() != 4) {
460  // this doesn't appear to be Run 2, i.e. the IBL isn't there. Bailing
461  return alignmentChange;
462  }
463 
464  int nstaves = 0;
465  if (numerology().numPhiModulesForLayer(0) < 14)
466  nstaves = 14;
467  else
468  nstaves = numerology().numPhiModulesForLayer(0);
469 
470  std::vector<float> ibldist;
471  std::vector<float> iblbaseline;
472  ibldist.resize(nstaves);
473  iblbaseline.resize(nstaves);
474 
475  // loop over objects in collection
476  for (CondAttrListCollection::const_iterator citr = obj->begin();
477  citr != obj->end(); ++citr) {
478 
479  const coral::AttributeList &atrlist = citr->second;
480  ibldist[atrlist["stave"].data<int>()] = atrlist["mag"].data<float>();
481  iblbaseline[atrlist["stave"].data<int>()] = atrlist["base"].data<float>();
482 
483  ATH_MSG_VERBOSE("IBLDist DB -- channel: " << citr->first
484  << ", stave: " << atrlist["stave"].data<int>()
485  << ", mag: " << atrlist["mag"].data<float>()
486  << ", base: " << atrlist["base"].data<float>());
487  }
488 
501  for(const auto* detElem : *getDetectorElementCollection()) {
502  if(!detElem->isInnermostPixelLayer()) {
503  // skip non-IBL elements. This only works if the innermost pixel layer is in fact
504  // the IBL. That should be the case for Run2 until replacement of the ID.
505  continue;
506  }
507  std::string repr = getIdHelper()->show_to_string(detElem->identify());
508  ATH_MSG_DEBUG("IBLDist alignment for identifier " << repr);
509 
510 
511  IdentifierHash idHash = getIdHelper()->wafer_hash(detElem->identify());
512  if (!idHash.is_valid()) {
513  ATH_MSG_WARNING("Invalid HashID for identifier " << repr);
514  ATH_MSG_WARNING("No IBLDist corrections can be applied for "
515  "invalid HashID's - exiting ");
516  return false;
517  }
518 
519  // extract the stave number
520  int stave = getIdHelper()->phi_module(detElem->identify());
521 
522  Amg::Vector3D center = detElem->defTransform() * Amg::Vector3D{0, 0, 0};
523  double z = center[2];
524  const double y0y0 = 366.5 * 366.5;
525 
526  double bowx = ibldist[stave] * (z * z - y0y0) / y0y0;
527  double basex = iblbaseline[stave];
528  // This is in the module frame, as bowing corrections are directly L3
529 
530  ATH_MSG_DEBUG("Total IBL-module Tx shift (baseline+bowing): " << basex + bowx);
531 
532  if ((basex + bowx) == 0) {
533  continue; // make sure we ignore NULL corrections
534  }
535 
536  Amg::Transform3D shift = Amg::Translation3D(basex + bowx, 0, 0) *
537  Amg::RotationMatrix3D::Identity();
538 
539  // now we need to get the original alignment delta to apply this additional
540  // shift to
542  const GeoTrf::Transform3D* currentDelta = alignStore->getDelta(eat->alignableTransform());
543  if (currentDelta == nullptr) {
544  ATH_MSG_ERROR("Have IBL Dist for element which does not have an alignment delta."
545  << " This indicates inconsistent alignment data");
546  return false;
547  }
548 
549  HepGeom::Transform3D recoToHitTransform = detElem->recoToHitTransform();
550  Amg::Transform3D r2h = Amg::CLHEPTransformToEigen(recoToHitTransform);
551 
552  ATH_MSG_VERBOSE("Previous delta for " << repr << ":\n" << currentDelta->matrix());
553  ATH_MSG_VERBOSE("Bowing-only delta for " << repr << ":\n" << shift.matrix());
554  Amg::Transform3D newDelta = shift * r2h.inverse() * (*currentDelta) * r2h;
555 
556  // We can probably just write it back to the geo alignment store.
557  // The IBL bowing is always at the module level, and that's the delta that
558  // we retrieved from the geo alignment store.
559 
561  detElem->identify(),
562  newDelta,
564  alignStore);
565 
566 
567  ATH_MSG_VERBOSE("New delta for " << repr << ":\n"
568  << alignStore->getDelta(eat->alignableTransform())->matrix());
569 
570  alignmentChange |= status;
571  }
572 
573  return alignmentChange;
574  }
575 
576  // New global alignment folders
577  bool PixelDetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame, const CondAttrListCollection* obj, GeoVAlignmentStore* alignStore) const
578  {
579 
580  bool alignmentChange = false;
581 
582  ATH_MSG_INFO("Processing new global alignment containers with key " << key
583  << " in the " << frame << " frame at level " << level);
584 
586  const CondAttrListCollection* atrlistcol=obj;
587  //cppcheck-suppress nullPointerRedundantCheck
588  if (!atrlistcol) {
589  ATH_MSG_INFO("Read alignment from detector store with key " << key);
590  if (StatusCode::SUCCESS!=m_detStore->retrieve(atrlistcol,key)) {
591  ATH_MSG_WARNING("Cannot find new global align Container for key "
592  << key << " - no new global alignment");
593  return alignmentChange;
594  }
595  }
596  // Avoid cppcheck warning.
597  if (!atrlistcol) {
598  return alignmentChange;
599  }
600  {
601  // loop over objects in collection
602  //cppcheck-suppress nullPointerRedundantCheck
603  for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) {
604  const coral::AttributeList& atrlist=citr->second;
605  // We are in the Pixel manager, therefore ignore all that is not Pixel Identifier
606  if (atrlist["det"].data<int>()!=1) continue;
607 
608  ident = getIdHelper()->wafer_id(atrlist["bec"].data<int>(),
609  atrlist["layer"].data<int>(),
610  atrlist["ring"].data<int>(),
611  atrlist["sector"].data<int>());
612 
613  // Make sure we have valid HashID (This ONLY works here as the 0-modules exist)
614  // Precaution which does not work for e.g. SCT
615  if (!(getIdHelper()->wafer_hash(ident)).is_valid()){
616  ATH_MSG_WARNING("Invalid HashID for identifier " << getIdHelper()->show_to_string(ident));
617  ATH_MSG_WARNING("No global alignment corrections can be applied for invalid HashID's - exiting");
618  return false;
619  }
620 
621  // construct new transform
622  // Order of rotations is defined as around z, then y, then x.
623  Amg::Translation3D newtranslation(atrlist["Tx"].data<float>(),atrlist["Ty"].data<float>(),atrlist["Tz"].data<float>());
624  Amg::Transform3D newtrans = newtranslation * Amg::RotationMatrix3D::Identity();
625  newtrans *= Amg::AngleAxis3D(atrlist["Rz"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,0.,1.));
626  newtrans *= Amg::AngleAxis3D(atrlist["Ry"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,1.,0.));
627  newtrans *= Amg::AngleAxis3D(atrlist["Rx"].data<float>()*CLHEP::mrad, Amg::Vector3D(1.,0.,0.));
628 
629  ATH_MSG_DEBUG("New global DB -- channel: " << citr->first
630  << " ,det: " << atrlist["det"].data<int>()
631  << " ,bec: " << atrlist["bec"].data<int>()
632  << " ,layer: " << atrlist["layer"].data<int>()
633  << " ,ring: " << atrlist["ring"].data<int>()
634  << " ,sector: " << atrlist["sector"].data<int>()
635  << " ,Tx: " << atrlist["Tx"].data<float>()
636  << " ,Ty: " << atrlist["Ty"].data<float>()
637  << " ,Tz: " << atrlist["Tz"].data<float>()
638  << " ,Rx: " << atrlist["Rx"].data<float>()
639  << " ,Ry: " << atrlist["Ry"].data<float>()
640  << " ,Rz: " << atrlist["Rz"].data<float>());
641 
642  // Set the new transform; Will replace existing one with updated transform
644  ident,
645  newtrans,
646  frame,
647  alignStore);
648 
649  if (!status) {
650  ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier."
651  << getIdHelper()->show_to_string(ident)
652  << " at level " << level << " for new global DB");
653  }
654 
655  alignmentChange = (alignmentChange || status);
656  }
657  }
658  return alignmentChange;
659  }
660 
661 
662  // Helpful function for debugging of transforms
664  const Amg::Transform3D & tr) const
665  {
666  ATH_MSG_LVL_NOCHK(level, " - translation: " << tr.translation().x() << " " <<tr.translation().y() << " " <<tr.translation().z());
667  ATH_MSG_LVL_NOCHK(level, " - rotation:");
668  ATH_MSG_LVL_NOCHK(level, " " << tr(0,0) << " " << tr(0,1) << " " << tr(0,2));
669  ATH_MSG_LVL_NOCHK(level, " " << tr(1,0) << " " << tr(1,1) << " " << tr(1,2));
670  ATH_MSG_LVL_NOCHK(level, " " << tr(2,0) << " " << tr(2,1) << " " << tr(2,2));
671  }
672 
673 
674 } // 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:663
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:755
InDetDD::ExtendedAlignableTransform::alignableTransform
GeoAlignableTransform * alignableTransform()
Definition: ExtendedAlignableTransform.h:43
InDetDD::PixelDetectorManager::getBarrelLayers
unsigned int getBarrelLayers() const
Layers built.
Definition: PixelDetectorManager.cxx:172
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:314
createLinkingScheme.iter
iter
Definition: createLinkingScheme.py:62
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
InDetDD::PixelDetectorManager::m_elementCollection
SiDetectorElementCollection m_elementCollection
Definition: PixelDetectorManager.h:163
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:128
get_generator_info.result
result
Definition: get_generator_info.py:21
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:27
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:45
InDetDD::SiDetectorElement::setPrevInEta
void setPrevInEta(const SiDetectorElement *element)
InDetDD::PixelDetectorManager::m_idHelper
const PixelID * m_idHelper
Definition: PixelDetectorManager.h:167
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
InDetDD::SiNumerology::useLayer
bool useLayer(int layer) const
Check if layer exists.
InDetDD::PixelDetectorManager::processSpecialAlignment
bool processSpecialAlignment(const std::string &, InDetDD::AlignFolderType) override
Process new IBLDist DB folder.
Definition: PixelDetectorManager.cxx:311
PLR_ID
This is a Identifier helper class for the PLR subdetector. This class inherits from PixelID.
Definition: PLR_ID.h:22
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:308
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:418
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
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:51
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:360
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
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:178
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:104
InDetDD::SolidStateDetectorElementBase::defTransform
const Amg::Transform3D defTransform() const
Definition: SolidStateDetectorElementBase.cxx:60
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:122
InDetDD::PixelDetectorManager::getEndcapLayers
unsigned int getEndcapLayers() const
Layers built.
Definition: PixelDetectorManager.cxx:182
PixelID::wafer_hash
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition: PixelID.h:383
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:431
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
InDetDD::PixelDetectorManager::identifierBelongs
virtual bool identifierBelongs(const Identifier &id) const override
Check identifier is for this detector.
Definition: PixelDetectorManager.cxx:295
InDetDD::PixelDetectorManager::initNeighbours
virtual void initNeighbours() override
Initialize the neighbours.
Definition: PixelDetectorManager.cxx:136
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::SolidStateDetectorElementBase::updateCache
virtual void updateCache() const
Recalculate cached values.
Definition: SolidStateDetectorElementBase.cxx:272
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:109
InDetDD::PixelDetectorManager::addTreeTop
void addTreeTop(const PVConstLink &vol)
Add a Tree top:
Definition: PixelDetectorManager.cxx:76
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:457
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:274
IdentifierHash::is_valid
bool is_valid() const
Check if id is in a valid state.
InDetDD::local
@ local
Definition: InDetDD_Defs.h:16
PixelID::wafer_hash_max
size_type wafer_hash_max() const
Definition: PixelID.cxx:836
dso-stats.pat
pat
Definition: dso-stats.py:37
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
InDetDD::PixelDetectorManager
Definition: PixelDetectorManager.h:47
DataVector::resize
void resize(size_type sz)
Resizes the collection to the specified number of elements.
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
InDetDD::PixelDetectorManager::m_volume
std::vector< PVConstLink > m_volume
Definition: PixelDetectorManager.h:162
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
IdentifierHash.h
InDetDD::PixelDetectorManager::getIdHelper
virtual const PixelID * getIdHelper() const override
Definition: PixelDetectorManager.cxx:167
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
HI::TowerBins::numLayers
constexpr unsigned int numLayers()
Definition: HIEventDefs.h:23
python.SystemOfUnits.mrad
float mrad
Definition: SystemOfUnits.py:127
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
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
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:365
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:62
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:193
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:577
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:166
InDetDD::PixelDetectorManager::getDetectorElementEnd
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override
Definition: PixelDetectorManager.cxx:114
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
InDetDD::PixelDetectorManager::getDetectorElement
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80
merge.status
status
Definition: merge.py:16
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
AlignableTransform::begin
AlignTransMem_citr begin() const
Definition: AlignableTransform.h:104
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::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:640
python.PyAthena.obj
obj
Definition: PyAthena.py:132
PixelID
Definition: PixelID.h:67
StoreGateSvc.h
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
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:444
InDetDD::AlignFolderType
AlignFolderType
Definition: InDetDD_Defs.h:19
InDetDD::PixelDetectorManager::m_higherAlignableTransforms
std::vector< AlignableTransformMap > m_higherAlignableTransforms
Definition: PixelDetectorManager.h:165
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:302
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
InDetDD::PixelDetectorManager::addDetectorElement
virtual void addDetectorElement(SiDetectorElement *element) override
Add elememts.
Definition: PixelDetectorManager.cxx:128
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
Identifier
Definition: IdentifierFieldParser.cxx:14