ATLAS Offline Software
Loading...
Searching...
No Matches
InDetGeometryManagerTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
11
16
18
22
24#include <ostream>
25#include <algorithm>
26
27
28
29using namespace InDetDD;
30
31namespace InDet {
32
33 //________________________________________________________________________
35 const std::string& name,
36 const IInterface * parent)
37 : AthAlgTool(type,name,parent)
38 , m_pixelDetManager(nullptr)
39 , m_sctDetManager(nullptr)
40 , m_trtDetManager(nullptr)
41 , m_pixHelper()
42 , m_sctHelper()
43 , m_siHelper()
44 , m_trtHelper()
45 , m_siGeoManager("")
46 , m_trtGeoManager("")
47 , m_alignModuleTool("Trk::AlignModuleTool/AlignModuleTool")
48 , m_idHashToAlignModuleMaps(Trk::AlignModule::NDetectorTypes,(Trk::AlignModuleList*)nullptr)
49 , m_alignParList(nullptr)
50 , m_fullAlignParList(nullptr)
51 {
52 declareInterface<IGeometryManagerTool>(this);
53 declareProperty("AlignModuleTool", m_alignModuleTool);
54
55 declareProperty("SiGeometryManager", m_siGeoManager);
56 declareProperty("TRTGeometryManager", m_trtGeoManager);
57
58 // Inner Detector joboptions
59 declareProperty("AlignSilicon", m_alignSi = true);
60 declareProperty("AlignTRT", m_alignTRT = true);
61
62 declareProperty("AlignX", m_alignX = true);
63 declareProperty("AlignY", m_alignY = true);
64 declareProperty("AlignZ", m_alignZ = true);
65 declareProperty("AlignRotX", m_alignRotX = true);
66 declareProperty("AlignRotY", m_alignRotY = true);
67 declareProperty("AlignRotZ", m_alignRotZ = true);
68
69 declareProperty("SetSigmaX", m_sigmaX = 1.);
70 declareProperty("SetSigmaY", m_sigmaY = 1.);
71 declareProperty("SetSigmaZ", m_sigmaZ = 1.);
72 declareProperty("SetSigmaRotX", m_sigmaRotX = 0.001);
73 declareProperty("SetSigmaRotY", m_sigmaRotY = 0.001);
74 declareProperty("SetSigmaRotZ", m_sigmaRotZ = 0.001);
75
76 // defines alignment level
77 declareProperty("AlignmentLevel", m_alignLevel = -1);
78
79 declareProperty("doModuleSelection", m_doModuleSelection = false);
80 declareProperty("ModuleSelection", m_moduleSelection);
81
82 declareProperty("DumpGeometry", m_dumpGeometry = true);
83
84 // the setarate barrel and endcaps levels are not used here
87
88 m_hashCounter = 0;
89 m_logStream = nullptr;
90 }
91
92 //________________________________________________________________________
94 {
95 ATH_MSG_DEBUG("deleting alignModuleList");
96 for (const auto & i:m_alignModuleList){
97 delete i;
98 }
99 m_alignModuleList.clear();
100
101 ATH_MSG_DEBUG("deleting fullAlignParList");
102 delete m_fullAlignParList;
103 ATH_MSG_DEBUG("deleting alignParList");
104 delete m_alignParList;
105 }
106
107 //________________________________________________________________________
109 {
110 ATH_MSG_DEBUG("initialize() of InDetGeometryManagerTool");
111
112 // retrieve AlignModuleTool
113 ATH_CHECK( m_alignModuleTool.retrieve() );
114
115 // retrieve Pixel helper
116 ATH_CHECK( detStore()->retrieve(m_pixHelper) );
117
118 // retrieve SCT helper
119 ATH_CHECK( detStore()->retrieve(m_sctHelper) );
120
121 // retrieve silicon helper
122 ATH_CHECK( detStore()->retrieve(m_siHelper) );
123
124 // retrieve TRT helper
125 ATH_CHECK( detStore()->retrieve(m_trtHelper) );
126
127 // retrieve PIX detector manager
128 ATH_CHECK ( detStore()->retrieve(m_pixelDetManager, "Pixel"));
129
130 // retrieve SCT detector manager
131 ATH_CHECK( detStore()->retrieve(m_sctDetManager, "SCT"));
132
133 // retrieve SCT detector manager
134 ATH_CHECK ( detStore()->retrieve(m_trtDetManager, "TRT") );
135
136 // dump module selection
137 if(m_doModuleSelection && msgLvl(MSG::INFO)) {
138 unsigned int idx{0};
139 ATH_MSG_INFO("Creating geometry for selected "<<m_moduleSelection.size()<<" modules:");
140 for(const auto & i:m_moduleSelection)
141 ATH_MSG_INFO(" "<<idx++<<". "<<i);
142 }
143
144 // retrieve SiGeometryManagerTool
145 if ( !m_siGeoManager.empty() ) {
146 ATH_CHECK ( m_siGeoManager.retrieve() );
147 }
148
149 // retrieve TRTGeometryManagerTool
150 if ( !m_trtGeoManager.empty() ) {
151 ATH_CHECK ( m_trtGeoManager.retrieve() );
152 }
153
154 if(!m_alignSi && !m_alignTRT && m_alignLevel!=0) {
155 ATH_MSG_FATAL("Alignment of both Silicon and TRT turned off. Aborting.");
156 return StatusCode::FAILURE;
157 }
158
159 // check allowed alignment level
160 if(!checkAlignLevel()) {
161 ATH_MSG_FATAL("Wrong alignment level.");
162 return StatusCode::FAILURE;
163 }
164
165 return StatusCode::SUCCESS;
166 }
167
168 //________________________________________________________________________
170 {
171 ATH_MSG_DEBUG("finalize() of InDetGeometryManagerTool");
172
173 return StatusCode::SUCCESS;
174 }
175
176 //________________________________________________________________________
178 {
179 switch(m_alignLevel) {
180
181 case 0:
182 // for L0 we don't need the other two managers so everything is ok
183 ATH_MSG_INFO("Setting up level 0 alignment of the InnerDetector");
184 break;
185
186 case 1: case 2: case 3:
187 // for levels 1,2,3 we need the managers and we have to
188 // set the levels in them
189 if( (m_siGeoManager.empty() && m_alignSi) || (m_trtGeoManager.empty() && m_alignTRT) ) {
190 ATH_MSG_ERROR("SiliconGeometryManagerTool and/or TRTGeometryManagerTool not available");
191 ATH_MSG_ERROR("Can't set alignment geometry. ");
192 return false;
193 }
194
195 ATH_MSG_INFO("Setting up level "<<m_alignLevel<<" alignment of the Inner Detector");
196 m_siGeoManager->setAlignLevel(m_alignLevel);
197 m_trtGeoManager->setAlignLevel(m_alignLevel);
198
199 // we also check that the managers support the levels
200 if( (m_alignSi && !m_siGeoManager->checkAlignLevel()) || (m_alignTRT && !m_trtGeoManager->checkAlignLevel()) )
201 return false;
202 break;
203
204 case -1:
205 // if level is not set here (=-1) we need the Silicon and TRT
206 // managers but we trust their setup, we don't need to check it
207 if( (m_siGeoManager.empty() && m_alignSi) || (m_trtGeoManager.empty() && m_alignTRT) ) {
208 ATH_MSG_ERROR("SiGeometryManagerTool and/or TRTGeometryManagerTool not available");
209 ATH_MSG_ERROR("Can't set alignment geometry. ");
210 return false;
211 }
212 break;
213
214 default:
215 ATH_MSG_ERROR("Unknown alignment level "<<m_alignLevel<<". Can't set alignment geometry.");
216 return false;
217
218 }
219
220 return true;
221 }
222
223 //________________________________________________________________________
225 {
226 m_logStream = os;
227 if (!m_siGeoManager.empty())
228 m_siGeoManager->setLogStream(m_logStream);
229 if (!m_trtGeoManager.empty())
230 m_trtGeoManager->setLogStream(m_logStream);
231 }
232
233 //________________________________________________________________________
235 {
236 ATH_MSG_DEBUG("in ReadGeometry() solveLevel="<<solveLevel);
237
238 // set pointers
241
242 // build alignment geometry
244
245 // now set the alignment parameters
246 // first prepare the parameter lists
249 // loop over modules
250 ATH_MSG_DEBUG("Adding module parameters to modules");
251 for( const auto & imod:m_alignModuleList) {
252 ATH_MSG_DEBUG("Module "<<imod->name());
254 }
255
256 // set alignModuleList and hash table in the alignModuleTool
258 ATH_MSG_DEBUG(" geometry set in m_alignModuleTool");
259
260 // set alignPar lists in the alignModuleTool
261 ATH_MSG_DEBUG(" alignParList = "<<m_alignParList);
262 ATH_MSG_DEBUG(" fullAlignParList = "<<m_fullAlignParList);
264 ATH_MSG_DEBUG(" AlignParLists set in m_alignModuleTool");
265
266 // dump summary about the geometry setup
267 if (m_dumpGeometry)
268 dumpGeometry();
269
270 int nDoF= m_alignModuleTool->nAlignParameters();
271 ATH_MSG_INFO("Total number of degrees of freedom: "<<nDoF);
272
273 return nDoF;
274 }
275
276 //_______________________________________________________________________
278 {
279 ATH_MSG_INFO("Preparing the Inner Detector geometry");
280
281 int idHash = 0;
282
283 if(m_alignLevel==0)
284 buildL0();
285
286 else {
287
288 // Silicon
289 if(m_alignSi) {
290 m_siGeoManager->setFirstIDHash(idHash);
291 m_siGeoManager->setModuleList(m_alignModuleListPtr);
293
294 m_siGeoManager->buildGeometry();
295
296 idHash=m_siGeoManager->getNextIDHash();
297 }
298
299 // TRT
300 if(m_alignTRT) {
301 m_trtGeoManager->setFirstIDHash(idHash);
304
305 m_trtGeoManager->buildGeometry();
306 }
307 }
308
309 }
310
311 //_______________________________________________________________________
313 {
314 ATH_MSG_INFO("Preparing the Silicon geometry for L0");
315 // ========================================
316 // Level 0 is just one module containing
317 // the whole Inner Detector (Pixel+SCT+TRT)
318
319 Trk::AlignModule * indet = new Trk::AlignModule(this);
320 indet->setIdHash(getNextIDHash());
321 indet->setName("Inner Detector");
322
323 // use the identifier of the Pixel for the whole Inner Detector at L0
324 indet->setIdentifier(m_pixHelper->wafer_id(0,0,0,0));
325
326 // check if we're aligning Silicon
327 if(!moduleSelected(indet)) {
328 ATH_MSG_DEBUG("Module "<<indet->name()<<" NOT selected");
329 delete indet;
330 return;
331 }
332
333 ATH_MSG_DEBUG("Created module "<<indet->name()<<" idHash: "<<indet->identifyHash()<<" identifier: "<<indet->identify());
334
335 // for L0 alignment the alignment frame is equal to the global frame
336 // and since the PIXEL and SCT detector element positions are also stored
337 // in the global frame in DB, transform is identity
338 const Amg::Transform3D transform = Amg::Transform3D::Identity();
339
340
341 // PIXEL
342 // get maximum number of elements from the helper
343 unsigned int pixelmaxHash = m_pixHelper->wafer_hash_max();
344 ATH_MSG_DEBUG("maxHash for the Pixel: "<<pixelmaxHash);
345
347 m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(pixelmaxHash),nullptr);
349
350 // ==================================================================
351 // loop over Pixel elements and add them to respective alignModules
352 // ==================================================================
353 for (unsigned int index = 0; index < pixelmaxHash; index++) {
354 IdentifierHash idHash = index;
355 Identifier id = m_pixHelper->wafer_id(idHash);
356
357 ATH_MSG_DEBUG(" Pixel DetectorElement idhash: "<<index);
358 ATH_MSG_DEBUG(" DetectorElement id: "<<id);
359
360 // get the element via hash
361 const SiDetectorElement * element2 = m_pixelDetManager->getDetectorElement(id);
362 if (element2) {
363 const Trk::TrkDetElementBase * element = static_cast<const Trk::TrkDetElementBase*>( element2);
364
365 // get element location for debugging
366 // HepGeom::Point3D<double> center = element->transform() * HepGeom::Point3D<double>();
367 // ATH_MSG_DEBUG(" DetectorElement idhash: " << index);
368 // ATH_MSG_DEBUG(" DetectorElement id: " << id << " with center = " << center);
369 // ATH_MSG_DEBUG(" Is Barrel: "<< m_pixHelper->is_barrel(id));
370
371 // add element to respective AlignModule
372
373 // add to the pixel structure
374 if(msgLvl(MSG::DEBUG)) {
375 if (m_pixHelper->is_barrel(id))
376 msg(MSG::DEBUG)<<"... Pixel barrel element"<<endmsg;
377 else
378 msg(MSG::DEBUG)<<"... Pixel endcap element"<<endmsg;
379 }
380 indet->addDetElement(Trk::AlignModule::Pixel,element,transform);
381
382 // and fill the corresponding map
383 (*pixelIdHashMap)[idHash] = indet;
384 }
385 else
386 ATH_MSG_DEBUG("No Pixel detector with id: "<<id);
387 }
388
389 // SCT
390 // get maximum number of elements from the helper
391 unsigned int sctmaxHash = m_sctHelper->wafer_hash_max();
392 ATH_MSG_DEBUG("maxHash for the SCT: "<<sctmaxHash);
393
395 m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(sctmaxHash),nullptr);
397
398 // ================================================================
399 // loop over SCT elements and add them to respective alignModules
400 // ================================================================
401 for (unsigned int index = 0; index < sctmaxHash; index++) {
402 IdentifierHash idHash = index;
403 Identifier id = m_sctHelper->wafer_id(idHash);
404
405 ATH_MSG_DEBUG(" SCT DetectorElement idhash: "<<index);
406 ATH_MSG_DEBUG(" DetectorElement id: "<<id);
407
408 // get the element via hash
409 const SiDetectorElement * element2 = m_sctDetManager->getDetectorElement(id);
410 if (element2) {
411 const Trk::TrkDetElementBase * element = static_cast<const Trk::TrkDetElementBase*> (element2);
412
413 // add element to respective AlignModule
414
415 // add to the sct barrel structure
416 if(msgLvl(MSG::DEBUG)) {
417 if (m_sctHelper->is_barrel(id))
418 msg(MSG::DEBUG)<<"... SCT barrel element"<<endmsg;
419 else
420 msg(MSG::DEBUG)<<"... SCT endcap element"<<endmsg;
421 }
422 indet->addDetElement(Trk::AlignModule::SCT,element,transform);
423
424 // and fill the corresponding map
425 (*sctIdHashMap)[idHash] = indet;
426 }
427 else
428 ATH_MSG_DEBUG("No SCT detector with id: "<<id);
429 }
430
431
432 // TRT
433 // get maximum number of elements from the helper
434 unsigned int trtmaxHash = m_trtHelper->straw_layer_hash_max();
435 ATH_MSG_DEBUG("maxHash for the TRT "<<trtmaxHash);
436
438 m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)(trtmaxHash),nullptr);
440
441 // ================================================================
442 // loop over TRT elements and add them to respective alignModules
443 // ================================================================
444 for (unsigned int index = 0; index < trtmaxHash; index++) {
445 IdentifierHash idHash = index;
446 Identifier id = m_trtHelper->layer_id(idHash);
447
448 // get the element via hash
449 const TRT_BaseElement * element = m_trtDetManager->getElement(idHash);
450 if (element) {
451 // get element location for debugging
452// HepGeom::Point3D<double> center = element->transform() * HepGeom::Point3D<double>();
453// ATH_MSG_DEBUG(" TRTDetectorElement id: " << id << " with center = " << center);
454
455 // add element to respective AlignModule
456
457 // add to the Inner Detector structure
458 if(msgLvl(MSG::DEBUG)) {
459 if (m_trtHelper->is_barrel(id))
460 msg(MSG::DEBUG)<<"... TRT barrel element"<<endmsg;
461 else
462 msg(MSG::DEBUG)<<"... TRT endcap element"<<endmsg;
463 }
464 indet->addDetElement(Trk::AlignModule::TRT,element,transform);
465
466 // and fill the corresponding map
467 (*trtIdHashMap)[idHash] = indet;
468 }
469 else
470 ATH_MSG_DEBUG("No TRTDetectorElement with id: "<<id);
471 }
472
473 // add created module to the geometry
474 m_alignModuleListPtr->push_back(indet);
475
476 ATH_MSG_DEBUG("Inner Detector L0 module successfully added to the list");
477 }
478
479 //________________________________________________________________________
481 {
482 // for standalone Silicon and TRT modules call the respective methods
483 if(isSiOnly(module)) {
484 m_siGeoManager->addModuleParameters(module,allFullModPars,allActiveModPars);
485 return;
486 }
487 else if(isOneDetOnly(module,Trk::AlignModule::TRT)) {
488 m_trtGeoManager->addModuleParameters(module,allFullModPars,allActiveModPars);
489 return;
490 }
491
492 // for combined modules we do the work here
493
494 // prepare all parameters
496 fullModPars->push_back(new Trk::AlignPar(module,Trk::AlignModule::TransX));
497 fullModPars->push_back(new Trk::AlignPar(module,Trk::AlignModule::TransY));
498 fullModPars->push_back(new Trk::AlignPar(module,Trk::AlignModule::TransZ));
499 fullModPars->push_back(new Trk::AlignPar(module,Trk::AlignModule::RotX));
500 fullModPars->push_back(new Trk::AlignPar(module,Trk::AlignModule::RotY));
501 fullModPars->push_back(new Trk::AlignPar(module,Trk::AlignModule::RotZ));
502
503 // set sigmas
504 setSigmas(module,fullModPars);
505
506 // select active parameters based on jobOption properties
508 for(unsigned int ipar=0;ipar<fullModPars->size();++ipar) {
509
510 Identifier AlimodID = module->identify();
511
512 ATH_MSG_DEBUG("Inner Detector module with id "<<AlimodID);
513 if( (fullModPars->at(ipar)->paramType() == Trk::AlignModule::TransX && m_alignX)
514 || (fullModPars->at(ipar)->paramType() == Trk::AlignModule::TransY && m_alignY)
515 || (fullModPars->at(ipar)->paramType() == Trk::AlignModule::TransZ && m_alignZ)
516 || (fullModPars->at(ipar)->paramType() == Trk::AlignModule::RotX && m_alignRotX)
517 || (fullModPars->at(ipar)->paramType() == Trk::AlignModule::RotY && m_alignRotY)
518 || (fullModPars->at(ipar)->paramType() == Trk::AlignModule::RotZ && m_alignRotZ) ) {
519 ATH_MSG_DEBUG("parameter type "<<fullModPars->at(ipar)->paramType()<<" is now active");
520 activeModPars->push_back(fullModPars->at(ipar));
521 }
522 else
523 ATH_MSG_DEBUG("parameter type "<<fullModPars->at(ipar)->paramType()<<" is NOT active");
524 }
525
526 // now add parameters to the list
527 allFullModPars->push_back(fullModPars);
528 allActiveModPars->push_back(activeModPars);
529 }
530
531 //________________________________________________________________________
533 {
534 ATH_MSG_DEBUG("Setting sigmas for module: "<<module->name());
535 for(unsigned int ipar=0;ipar<modPars->size();++ipar)
536 switch(modPars->at(ipar)->paramType()) {
538 modPars->at(ipar)->setSigma(m_sigmaX);
539 break;
541 modPars->at(ipar)->setSigma(m_sigmaY);
542 break;
544 modPars->at(ipar)->setSigma(m_sigmaZ);
545 break;
547 modPars->at(ipar)->setSigma(m_sigmaRotX);
548 break;
550 modPars->at(ipar)->setSigma(m_sigmaRotY);
551 break;
553 modPars->at(ipar)->setSigma(m_sigmaRotZ);
554 break;
555 default:
556 break;
557 }
558 }
559
560 //________________________________________________________________________
562 {
563 if(!m_doModuleSelection) return true;
564 const bool found = (std::find(m_moduleSelection.begin(), m_moduleSelection.end(),id) != m_moduleSelection.end());
565 return found;
566 }
567
568 //________________________________________________________________________
570 {
571 return moduleSelected(mod->identify().get_compact());
572 }
573
574 //________________________________________________________________________
576 {
577 ATH_MSG_INFO("---------------------------------------------------");
578 ATH_MSG_INFO("Summary of the alignment geometry");
579 ATH_MSG_INFO("Number of alignable objects: "<< m_alignModuleList.size());
580 for(unsigned int i=0;i<m_alignModuleList.size();i++) {
581 const Trk::AlignModule* module = m_alignModuleList.at(i);
582 ATH_MSG_INFO(i<<". "<< module->name());
583 ATH_MSG_INFO(" - identifier: "<<module->identify());
584 ATH_MSG_INFO(" - identifierHash: "<<module->identifyHash());
585 int npix(0);
586 int nsct(0);
587 int ntrt(0);
588 if(module->detElementCollection(Trk::AlignModule::Pixel)) {
589 npix = module->detElementCollection(Trk::AlignModule::Pixel)->size();
590 ATH_MSG_INFO(" - has "<<npix<<" Pixel modules");
591 }
592 if(module->detElementCollection(Trk::AlignModule::SCT)) {
593 nsct = module->detElementCollection(Trk::AlignModule::SCT)->size();
594 ATH_MSG_INFO(" - has "<<nsct<<" SCT modules");
595 }
596 if(module->detElementCollection(Trk::AlignModule::TRT)) {
597 ntrt = module->detElementCollection(Trk::AlignModule::TRT)->size();
598 ATH_MSG_INFO(" - has "<<ntrt<<" TRT modules");
599 }
600 if(npix && nsct)
601 ATH_MSG_INFO(" - has "<<npix+nsct<<" Silicon modules in total");
602 if((npix || nsct) && ntrt)
603 ATH_MSG_INFO(" - has "<<npix+nsct+ntrt<<" Inner Detector modules in total");
604
605 Amg::Transform3D localtoglobal = (module->globalFrameToAlignFrame()).inverse();
606 ATH_MSG_DEBUG(" - local to global : "<<std::setprecision(12)<<localtoglobal.translation()<<" "<<localtoglobal.rotation());
607
608 DataVector<Trk::AlignPar> * pars = m_alignModuleTool->getAlignPars(module);
609 int npars = pars->size();
610 ATH_MSG_DEBUG(" - number of active transform parameters: "<<npars);
611 for(int j=0;j<npars;j++)
612 ATH_MSG_DEBUG(" * par "<<j<<": sigma = "<<(*pars)[j]->sigma());
613 }
614 ATH_MSG_INFO("---------------------------------------------------");
615 }
616
617 //________________________________________________________________________
619 {
620 ATH_MSG_DEBUG("in isOneDetOnly for detector type "<<dettype);
621 const Trk::AlignModule::DetElementCollection * coll = mod->detElementCollection(dettype);
622 if(!coll || coll->empty())
623 return false;
624
625 int nelem(0);
626 for(int i=1;i<Trk::AlignModule::NDetectorTypes;i++) {
627 if(i==dettype)
628 continue;
629 coll = mod->detElementCollection((Trk::AlignModule::DetectorType)i);
630 if(coll)
631 nelem += coll->size();
632 }
633
634 if(nelem)
635 return false;
636
637 ATH_MSG_DEBUG("module IS of type "<<dettype);
638 return true;
639 }
640
641 //________________________________________________________________________
643 {
644 ATH_MSG_DEBUG("in isSiOnly");
645 const Trk::AlignModule::DetElementCollection * collPix = mod->detElementCollection(Trk::AlignModule::Pixel);
646 const Trk::AlignModule::DetElementCollection * collSCT = mod->detElementCollection(Trk::AlignModule::SCT);
647 if((!collPix || collPix->empty()) && (!collSCT || collSCT->empty()))
648 return false;
649
650 int nelem(0);
651 for(int i=1;i<Trk::AlignModule::NDetectorTypes;i++) {
653 continue;
654 const Trk::AlignModule::DetElementCollection * coll = mod->detElementCollection((Trk::AlignModule::DetectorType)i);
655 if(coll)
656 nelem += coll->size();
657 }
658
659 if(nelem)
660 return false;
661
662 ATH_MSG_DEBUG("module IS of type Silicon");
663 return true;
664 }
665
666
667} // end namespace
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
An STL vector of pointers that by default owns its pointed-to elements.
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
This is an Identifier helper class for both the Pixel and SCT subdetectors.
This is an Identifier helper class for the TRT subdetector.
AlignModule is a grouping of TrkDetElementBase objects, grouped according to the type of alignment,...
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
bool msgLvl(const MSG::Level lvl) const
MsgStream & msg() const
Derived DataVector<T>.
Definition DataVector.h:795
const T * at(size_type n) const
Access an element, as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
This is a "hash" representation of an Identifier.
Class to hold geometrical description of a silicon detector element.
Virtual base class of TRT readout elements.
DataVector< DataVector< Trk::AlignPar > > * m_alignParList
void dumpGeometry()
print basic geometry info to screen
std::vector< unsigned long long > m_moduleSelection
bool isSiOnly(const Trk::AlignModule *mod) const
check whether the module is Silicon only
void buildGeometry()
builds geometry for Silicon alignment
const SiliconID * m_siHelper
pointer to Silicon detector manager
const TRT_ID * m_trtHelper
pointer to TRT detector manager
DataVector< DataVector< Trk::AlignPar > > * m_fullAlignParList
void buildL0()
creates L0 AlignModules for Silicon
int ReadGeometry(int solveLevel)
read the geometry Method is called from the main AlignAlg to build the geometry based on the requeste...
const InDetDD::SCT_DetectorManager * m_sctDetManager
pointer to SCT detector manager
void setLogStream(std::ostream *os)
sets the output stream for the logfile
const SCT_ID * m_sctHelper
pointer to SCT detector manager
void addModuleParameters(Trk::AlignModule *module, DataVector< DataVector< Trk::AlignPar > > *allFullModPars, DataVector< DataVector< Trk::AlignPar > > *allActiveModPars)
adds alignment parameters for the module checks for active parameters and calls setSigmas()
ToolHandle< Trk::IAlignModuleTool > m_alignModuleTool
pointer to AlignModuleTool
const InDetDD::PixelDetectorManager * m_pixelDetManager
pointer to PIX detector manager
bool moduleSelected(Trk::AlignModule *mod)
check wheather module is selected for module pointer
const InDetDD::TRT_DetectorManager * m_trtDetManager
pointer to TRT detector manager
std::vector< Trk::AlignModuleList * > m_idHashToAlignModuleMaps
const PixelID * m_pixHelper
pointer to PIX detector manager
bool isOneDetOnly(const Trk::AlignModule *mod, Trk::AlignModule::DetectorType dettype) const
check whether the module is of a single detector type
ToolHandle< Trk::IGeometryManagerTool > m_siGeoManager
pointer to Silicon geometry manager
void setSigmas(Trk::AlignModule *mod, DataVector< Trk::AlignPar > *modPars)
sets sigmas for modules
bool checkAlignLevel()
check whether the alignment level is correct
ToolHandle< Trk::IGeometryManagerTool > m_trtGeoManager
pointer to TRT geometry manager
InDetGeometryManagerTool(const std::string &type, const std::string &name, const IInterface *parent)
void setIdHash(IdentifierHash id)
Definition AlignModule.h:93
std::vector< const TrkDetElementBase * > DetElementCollection
typedefs to contain detector element pointers and transforms
Definition AlignModule.h:60
Identifier identify() const
Definition AlignModule.h:97
void setIdentifier(Identifier identifier)
Set and return identifier of module.
Definition AlignModule.h:96
const std::string & name() const
Definition AlignModule.h:89
void setName(const std::string &name)
Set and return name of align module (i.e.
Definition AlignModule.h:88
void addDetElement(AlignModule::DetectorType detType, const TrkDetElementBase *det, const Amg::Transform3D &transform, Identifier id=Identifier())
used to add a detector element to the align module with a align frame to detector element local frame...
IdentifierHash identifyHash() const
Set and return index of module, used by alignment classes to keep track of order of align module.
Definition AlignModule.h:92
std::ostream * m_logStream
logfile output stream
int m_alignLevelBarrel
alignment level
int m_hashCounter
variable for setting the idHash of the AlignModules
virtual int getNextIDHash()
get next free IDHash usable for new AlignModule
Trk::AlignModuleList * m_alignModuleListPtr
pointer to module list to which the modules are added
int m_alignLevelEndcaps
alignment level
std::vector< Trk::AlignModuleList * > * m_idHashToAlignModuleMapsPtr
pointer to vector of hashMaps to which the elements are added
This is the base class for all tracking detector elements with read-out relevant information.
Eigen::Affine3d Transform3D
Message Stream Member.
Primary Vertex Finder.
@ OWN_ELEMENTS
this data object owns its elements
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Ensure that the ATLAS eigen extensions are properly loaded.
std::vector< AlignModule * > AlignModuleList
Definition index.py:1