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