ATLAS Offline Software
InDetGeometryManagerTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
11 
12 #include "InDetIdentifier/TRT_ID.h"
13 #include "InDetIdentifier/SCT_ID.h"
16 
18 
21 #include "TrkAlignEvent/AlignPar.h"
22 
24 #include <ostream>
25 #include <algorithm>
26 
27 
28 
29 using namespace InDetDD;
30 
31 namespace InDet {
32 
33  //________________________________________________________________________
34  InDetGeometryManagerTool::InDetGeometryManagerTool(const std::string& type,
35  const std::string& name,
36  const IInterface * 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
85  m_alignLevelBarrel = -1;
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
117 
118  // retrieve SCT helper
120 
121  // retrieve silicon helper
123 
124  // retrieve TRT helper
126 
127  // retrieve PIX detector manager
129 
130  // retrieve SCT detector manager
132 
133  // retrieve SCT detector manager
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
243  buildGeometry();
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);
302  m_trtGeoManager->setModuleList(m_alignModuleListPtr);
304 
305  m_trtGeoManager->buildGeometry();
306  }
307  }
308 
309  return;
310  }
311 
312  //_______________________________________________________________________
314  {
315  ATH_MSG_INFO("Preparing the Silicon geometry for L0");
316  // ========================================
317  // Level 0 is just one module containing
318  // the whole Inner Detector (Pixel+SCT+TRT)
319 
320  Trk::AlignModule * indet = new Trk::AlignModule(this);
321  indet->setIdHash(getNextIDHash());
322  indet->setName("Inner Detector");
323 
324  // use the identifier of the Pixel for the whole Inner Detector at L0
325  indet->setIdentifier(m_pixHelper->wafer_id(0,0,0,0));
326 
327  // check if we're aligning Silicon
328  if(!moduleSelected(indet)) {
329  ATH_MSG_DEBUG("Module "<<indet->name()<<" NOT selected");
330  delete indet;
331  return;
332  }
333 
334  ATH_MSG_DEBUG("Created module "<<indet->name()<<" idHash: "<<indet->identifyHash()<<" identifier: "<<indet->identify());
335 
336  // for L0 alignment the alignment frame is equal to the global frame
337  // and since the PIXEL and SCT detector element positions are also stored
338  // in the global frame in DB, transform is identity
339  const Amg::Transform3D transform = Amg::Transform3D::Identity();
340 
341 
342  // PIXEL
343  // get maximum number of elements from the helper
344  unsigned int pixelmaxHash = m_pixHelper->wafer_hash_max();
345  ATH_MSG_DEBUG("maxHash for the Pixel: "<<pixelmaxHash);
346 
348  m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::Pixel) = new Trk::AlignModuleList((size_t)(pixelmaxHash),nullptr);
350 
351  // ==================================================================
352  // loop over Pixel elements and add them to respective alignModules
353  // ==================================================================
354  for (unsigned int index = 0; index < pixelmaxHash; index++) {
355  IdentifierHash idHash = index;
356  Identifier id = m_pixHelper->wafer_id(idHash);
357 
358  ATH_MSG_DEBUG(" Pixel DetectorElement idhash: "<<index);
359  ATH_MSG_DEBUG(" DetectorElement id: "<<id);
360 
361  // get the element via hash
363  if (element2) {
364  const Trk::TrkDetElementBase * element = (const Trk::TrkDetElementBase*) element2;
365 
366  // get element location for debugging
367  // HepGeom::Point3D<double> center = element->transform() * HepGeom::Point3D<double>();
368  // ATH_MSG_DEBUG(" DetectorElement idhash: " << index);
369  // ATH_MSG_DEBUG(" DetectorElement id: " << id << " with center = " << center);
370  // ATH_MSG_DEBUG(" Is Barrel: "<< m_pixHelper->is_barrel(id));
371 
372  // add element to respective AlignModule
373 
374  // add to the pixel structure
375  if(msgLvl(MSG::DEBUG)) {
376  if (m_pixHelper->is_barrel(id))
377  msg(MSG::DEBUG)<<"... Pixel barrel element"<<endmsg;
378  else
379  msg(MSG::DEBUG)<<"... Pixel endcap element"<<endmsg;
380  }
382 
383  // and fill the corresponding map
384  (*pixelIdHashMap)[idHash] = indet;
385  }
386  else
387  ATH_MSG_DEBUG("No Pixel detector with id: "<<id);
388  }
389 
390  // SCT
391  // get maximum number of elements from the helper
392  unsigned int sctmaxHash = m_sctHelper->wafer_hash_max();
393  ATH_MSG_DEBUG("maxHash for the SCT: "<<sctmaxHash);
394 
396  m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::SCT) = new Trk::AlignModuleList((size_t)(sctmaxHash),nullptr);
398 
399  // ================================================================
400  // loop over SCT elements and add them to respective alignModules
401  // ================================================================
402  for (unsigned int index = 0; index < sctmaxHash; index++) {
403  IdentifierHash idHash = index;
404  Identifier id = m_sctHelper->wafer_id(idHash);
405 
406  ATH_MSG_DEBUG(" SCT DetectorElement idhash: "<<index);
407  ATH_MSG_DEBUG(" DetectorElement id: "<<id);
408 
409  // get the element via hash
411  if (element2) {
412  const Trk::TrkDetElementBase * element = (const Trk::TrkDetElementBase*) element2;
413 
414  // add element to respective AlignModule
415 
416  // add to the sct barrel structure
417  if(msgLvl(MSG::DEBUG)) {
418  if (m_sctHelper->is_barrel(id))
419  msg(MSG::DEBUG)<<"... SCT barrel element"<<endmsg;
420  else
421  msg(MSG::DEBUG)<<"... SCT endcap element"<<endmsg;
422  }
424 
425  // and fill the corresponding map
426  (*sctIdHashMap)[idHash] = indet;
427  }
428  else
429  ATH_MSG_DEBUG("No SCT detector with id: "<<id);
430  }
431 
432 
433  // TRT
434  // get maximum number of elements from the helper
435  unsigned int trtmaxHash = m_trtHelper->straw_layer_hash_max();
436  ATH_MSG_DEBUG("maxHash for the TRT "<<trtmaxHash);
437 
439  m_idHashToAlignModuleMapsPtr->at(Trk::AlignModule::TRT) = new Trk::AlignModuleList((size_t)(trtmaxHash),nullptr);
441 
442  // ================================================================
443  // loop over TRT elements and add them to respective alignModules
444  // ================================================================
445  for (unsigned int index = 0; index < trtmaxHash; index++) {
446  IdentifierHash idHash = index;
447  Identifier id = m_trtHelper->layer_id(idHash);
448 
449  // get the element via hash
450  const TRT_BaseElement * element = m_trtDetManager->getElement(idHash);
451  if (element) {
452  // get element location for debugging
453 // HepGeom::Point3D<double> center = element->transform() * HepGeom::Point3D<double>();
454 // ATH_MSG_DEBUG(" TRTDetectorElement id: " << id << " with center = " << center);
455 
456  // add element to respective AlignModule
457 
458  // add to the Inner Detector structure
459  if(msgLvl(MSG::DEBUG)) {
460  if (m_trtHelper->is_barrel(id))
461  msg(MSG::DEBUG)<<"... TRT barrel element"<<endmsg;
462  else
463  msg(MSG::DEBUG)<<"... TRT endcap element"<<endmsg;
464  }
466 
467  // and fill the corresponding map
468  (*trtIdHashMap)[idHash] = indet;
469  }
470  else
471  ATH_MSG_DEBUG("No TRTDetectorElement with id: "<<id);
472  }
473 
474  // add created module to the geometry
475  m_alignModuleListPtr->push_back(indet);
476 
477  ATH_MSG_DEBUG("Inner Detector L0 module successfully added to the list");
478  }
479 
480  //________________________________________________________________________
482  {
483  // for standalone Silicon and TRT modules call the respective methods
484  if(isSiOnly(module)) {
485  m_siGeoManager->addModuleParameters(module,allFullModPars,allActiveModPars);
486  return;
487  }
489  m_trtGeoManager->addModuleParameters(module,allFullModPars,allActiveModPars);
490  return;
491  }
492 
493  // for combined modules we do the work here
494 
495  // prepare all parameters
503 
504  // set sigmas
505  setSigmas(module,fullModPars);
506 
507  // select active parameters based on jobOption properties
509  for(unsigned int ipar=0;ipar<fullModPars->size();++ipar) {
510 
511  Identifier AlimodID = module->identify();
512 
513  ATH_MSG_DEBUG("Inner Detector module with id "<<AlimodID);
514  if( (fullModPars->at(ipar)->paramType() == Trk::AlignModule::TransX && m_alignX)
515  || (fullModPars->at(ipar)->paramType() == Trk::AlignModule::TransY && m_alignY)
516  || (fullModPars->at(ipar)->paramType() == Trk::AlignModule::TransZ && m_alignZ)
517  || (fullModPars->at(ipar)->paramType() == Trk::AlignModule::RotX && m_alignRotX)
518  || (fullModPars->at(ipar)->paramType() == Trk::AlignModule::RotY && m_alignRotY)
519  || (fullModPars->at(ipar)->paramType() == Trk::AlignModule::RotZ && m_alignRotZ) ) {
520  ATH_MSG_DEBUG("parameter type "<<fullModPars->at(ipar)->paramType()<<" is now active");
521  activeModPars->push_back(fullModPars->at(ipar));
522  }
523  else
524  ATH_MSG_DEBUG("parameter type "<<fullModPars->at(ipar)->paramType()<<" is NOT active");
525  }
526 
527  // now add parameters to the list
528  allFullModPars->push_back(fullModPars);
529  allActiveModPars->push_back(activeModPars);
530  }
531 
532  //________________________________________________________________________
534  {
535  ATH_MSG_DEBUG("Setting sigmas for module: "<<module->name());
536  for(unsigned int ipar=0;ipar<modPars->size();++ipar)
537  switch(modPars->at(ipar)->paramType()) {
539  modPars->at(ipar)->setSigma(m_sigmaX);
540  break;
542  modPars->at(ipar)->setSigma(m_sigmaY);
543  break;
545  modPars->at(ipar)->setSigma(m_sigmaZ);
546  break;
548  modPars->at(ipar)->setSigma(m_sigmaRotX);
549  break;
551  modPars->at(ipar)->setSigma(m_sigmaRotY);
552  break;
554  modPars->at(ipar)->setSigma(m_sigmaRotZ);
555  break;
556  default:
557  break;
558  }
559  }
560 
561  //________________________________________________________________________
562  bool InDetGeometryManagerTool::moduleSelected(unsigned long long id)
563  {
564  if(!m_doModuleSelection) return true;
565  const bool found = (std::find(m_moduleSelection.begin(), m_moduleSelection.end(),id) != m_moduleSelection.end());
566  return found;
567  }
568 
569  //________________________________________________________________________
571  {
572  return moduleSelected(mod->identify().get_compact());
573  }
574 
575  //________________________________________________________________________
577  {
578  ATH_MSG_INFO("---------------------------------------------------");
579  ATH_MSG_INFO("Summary of the alignment geometry");
580  ATH_MSG_INFO("Number of alignable objects: "<< m_alignModuleList.size());
581  for(unsigned int i=0;i<m_alignModuleList.size();i++) {
583  ATH_MSG_INFO(i<<". "<< module->name());
584  ATH_MSG_INFO(" - identifier: "<<module->identify());
585  ATH_MSG_INFO(" - identifierHash: "<<module->identifyHash());
586  int npix(0);
587  int nsct(0);
588  int ntrt(0);
589  if(module->detElementCollection(Trk::AlignModule::Pixel)) {
590  npix = module->detElementCollection(Trk::AlignModule::Pixel)->size();
591  ATH_MSG_INFO(" - has "<<npix<<" Pixel modules");
592  }
593  if(module->detElementCollection(Trk::AlignModule::SCT)) {
594  nsct = module->detElementCollection(Trk::AlignModule::SCT)->size();
595  ATH_MSG_INFO(" - has "<<nsct<<" SCT modules");
596  }
597  if(module->detElementCollection(Trk::AlignModule::TRT)) {
598  ntrt = module->detElementCollection(Trk::AlignModule::TRT)->size();
599  ATH_MSG_INFO(" - has "<<ntrt<<" TRT modules");
600  }
601  if(npix && nsct)
602  ATH_MSG_INFO(" - has "<<npix+nsct<<" Silicon modules in total");
603  if((npix || nsct) && ntrt)
604  ATH_MSG_INFO(" - has "<<npix+nsct+ntrt<<" Inner Detector modules in total");
605 
606  Amg::Transform3D localtoglobal = (module->globalFrameToAlignFrame()).inverse();
607  ATH_MSG_DEBUG(" - local to global : "<<std::setprecision(12)<<localtoglobal.translation()<<" "<<localtoglobal.rotation());
608 
610  int npars = pars->size();
611  ATH_MSG_DEBUG(" - number of active transform parameters: "<<npars);
612  for(int j=0;j<npars;j++)
613  ATH_MSG_DEBUG(" * par "<<j<<": sigma = "<<(*pars)[j]->sigma());
614  }
615  ATH_MSG_INFO("---------------------------------------------------");
616  }
617 
618  //________________________________________________________________________
620  {
621  ATH_MSG_DEBUG("in isOneDetOnly for detector type "<<dettype);
622  const Trk::AlignModule::DetElementCollection * coll = mod->detElementCollection(dettype);
623  if(!coll || coll->size() == 0)
624  return false;
625 
626  int nelem(0);
627  for(int i=1;i<Trk::AlignModule::NDetectorTypes;i++) {
628  if(i==dettype)
629  continue;
630  coll = mod->detElementCollection((Trk::AlignModule::DetectorType)i);
631  if(coll)
632  nelem += coll->size();
633  }
634 
635  if(nelem)
636  return false;
637 
638  ATH_MSG_DEBUG("module IS of type "<<dettype);
639  return true;
640  }
641 
642  //________________________________________________________________________
644  {
645  ATH_MSG_DEBUG("in isSiOnly");
646  const Trk::AlignModule::DetElementCollection * collPix = mod->detElementCollection(Trk::AlignModule::Pixel);
647  const Trk::AlignModule::DetElementCollection * collSCT = mod->detElementCollection(Trk::AlignModule::SCT);
648  if((!collPix || collPix->size()==0) && (!collSCT || collSCT->size()==0))
649  return false;
650 
651  int nelem(0);
652  for(int i=1;i<Trk::AlignModule::NDetectorTypes;i++) {
654  continue;
655  const Trk::AlignModule::DetElementCollection * coll = mod->detElementCollection((Trk::AlignModule::DetectorType)i);
656  if(coll)
657  nelem += coll->size();
658  }
659 
660  if(nelem)
661  return false;
662 
663  ATH_MSG_DEBUG("module IS of type Silicon");
664  return true;
665  }
666 
667 
668 } // end namespace
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
InDet::InDetGeometryManagerTool::m_sigmaRotY
double m_sigmaRotY
Definition: InDetGeometryManagerTool.h:136
InDet::InDetGeometryManagerTool::m_siGeoManager
ToolHandle< Trk::IGeometryManagerTool > m_siGeoManager
pointer to Silicon geometry manager
Definition: InDetGeometryManagerTool.h:111
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
InDet::InDetGeometryManagerTool::m_alignModuleList
Trk::AlignModuleList m_alignModuleList
Definition: InDetGeometryManagerTool.h:116
Trk::IGeometryManagerTool::m_alignLevelBarrel
int m_alignLevelBarrel
alignment level
Definition: IGeometryManagerTool.h:116
TRT_ID::layer_id
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
Definition: TRT_ID.h:500
InDet::InDetGeometryManagerTool::m_sigmaZ
double m_sigmaZ
Definition: InDetGeometryManagerTool.h:134
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
Trk::AlignModule::TRT
@ TRT
Definition: AlignModule.h:57
Trk::AlignModule::TransZ
@ TransZ
Definition: AlignModule.h:54
InDet::InDetGeometryManagerTool::m_alignTRT
bool m_alignTRT
Definition: InDetGeometryManagerTool.h:141
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
InDet::InDetGeometryManagerTool::m_alignRotY
bool m_alignRotY
Definition: InDetGeometryManagerTool.h:129
TRT_DetectorManager.h
Trk::AlignModuleList
std::vector< AlignModule * > AlignModuleList
Definition: AlignModuleList.h:37
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
Trk::IGeometryManagerTool::m_hashCounter
int m_hashCounter
variable for setting the idHash of the AlignModules
Definition: IGeometryManagerTool.h:111
InDet::InDetGeometryManagerTool::m_pixelDetManager
const InDetDD::PixelDetectorManager * m_pixelDetManager
pointer to PIX detector manager
Definition: InDetGeometryManagerTool.h:102
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDet::InDetGeometryManagerTool::setLogStream
void setLogStream(std::ostream *os)
sets the output stream for the logfile
Definition: InDetGeometryManagerTool.cxx:224
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
TRT_ID::straw_layer_hash_max
size_type straw_layer_hash_max(void) const
Definition: TRT_ID.h:920
InDet::InDetGeometryManagerTool::m_moduleSelection
std::vector< unsigned long long > m_moduleSelection
Definition: InDetGeometryManagerTool.h:144
Trk::AlignModule::addDetElement
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...
Definition: AlignModule.cxx:126
InDet::InDetGeometryManagerTool::ReadGeometry
int ReadGeometry(int solveLevel)
read the geometry Method is called from the main AlignAlg to build the geometry based on the requeste...
Definition: InDetGeometryManagerTool.cxx:234
InDet::InDetGeometryManagerTool::m_sctDetManager
const InDetDD::SCT_DetectorManager * m_sctDetManager
pointer to SCT detector manager
Definition: InDetGeometryManagerTool.h:103
InDet::InDetGeometryManagerTool::checkAlignLevel
bool checkAlignLevel()
check whether the alignment level is correct
Definition: InDetGeometryManagerTool.cxx:177
TRT_ID.h
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
Trk::AlignModule
Definition: AlignModule.h:45
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Trk::IGeometryManagerTool::m_alignLevelEndcaps
int m_alignLevelEndcaps
alignment level
Definition: IGeometryManagerTool.h:117
InDet::InDetGeometryManagerTool::isSiOnly
bool isSiOnly(const Trk::AlignModule *mod) const
check whether the module is Silicon only
Definition: InDetGeometryManagerTool.cxx:643
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
Trk::AlignModule::Pixel
@ Pixel
Definition: AlignModule.h:57
InDet::InDetGeometryManagerTool::m_alignZ
bool m_alignZ
Definition: InDetGeometryManagerTool.h:127
InDet::InDetGeometryManagerTool::m_alignRotZ
bool m_alignRotZ
Definition: InDetGeometryManagerTool.h:130
Trk::AlignModule::NDetectorTypes
@ NDetectorTypes
Definition: AlignModule.h:57
InDetDD::SCT_DetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
Definition: SCT_DetectorManager.cxx:64
Trk::AlignPar::paramType
AlignModule::TransformParameters paramType() const
returns the type of parameter (i.e.
Definition: AlignPar.h:47
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:364
InDet::InDetGeometryManagerTool::m_siHelper
const SiliconID * m_siHelper
pointer to Silicon detector manager
Definition: InDetGeometryManagerTool.h:108
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
InDet::InDetGeometryManagerTool::m_fullAlignParList
DataVector< DataVector< Trk::AlignPar > > * m_fullAlignParList
Definition: InDetGeometryManagerTool.h:122
Trk::IGeometryManagerTool::m_alignLevel
int m_alignLevel
alignment level
Definition: IGeometryManagerTool.h:115
Rec::nDoF
double nDoF(const Trk::Track &track)
Definition: OutwardsCombinedMuonTrackBuilder.cxx:31
InDet::InDetGeometryManagerTool::m_alignParList
DataVector< DataVector< Trk::AlignPar > > * m_alignParList
Definition: InDetGeometryManagerTool.h:121
AlignModule
AlignModule is a grouping of TrkDetElementBase objects, grouped according to the type of alignment,...
python.PyAthena.module
module
Definition: PyAthena.py:134
InDetGeometryManagerTool.h
InDet::InDetGeometryManagerTool::m_sigmaY
double m_sigmaY
Definition: InDetGeometryManagerTool.h:133
PixelID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
Definition: PixelID.h:605
InDet::InDetGeometryManagerTool::setSigmas
void setSigmas(Trk::AlignModule *mod, DataVector< Trk::AlignPar > *modPars)
sets sigmas for modules
Definition: InDetGeometryManagerTool.cxx:533
Trk::AlignPar::setSigma
void setSigma(double sigma)
sets sigma
Definition: AlignPar.h:87
PixelDetectorManager.h
InDet::InDetGeometryManagerTool::moduleSelected
bool moduleSelected(Trk::AlignModule *mod)
check wheather module is selected for module pointer
Definition: InDetGeometryManagerTool.cxx:570
Trk::AlignModule::setName
void setName(const std::string &name)
Set and return name of align module (i.e.
Definition: AlignModule.h:88
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::IGeometryManagerTool::m_alignModuleListPtr
Trk::AlignModuleList * m_alignModuleListPtr
pointer to module list to which the modules are added
Definition: IGeometryManagerTool.h:106
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
Trk::AlignModule::setIdentifier
void setIdentifier(Identifier identifier)
Set and return identifier of module.
Definition: AlignModule.h:96
lumiFormat.i
int i
Definition: lumiFormat.py:92
InDet::InDetGeometryManagerTool::m_sctHelper
const SCT_ID * m_sctHelper
pointer to SCT detector manager
Definition: InDetGeometryManagerTool.h:107
SG::OWN_ELEMENTS
@ OWN_ELEMENTS
this data object owns its elements
Definition: OwnershipPolicy.h:17
Trk::IGeometryManagerTool::getNextIDHash
virtual int getNextIDHash()
get next free IDHash usable for new AlignModule
Definition: IGeometryManagerTool.h:65
Trk::AlignModule::identifyHash
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
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
InDet::InDetGeometryManagerTool::m_trtHelper
const TRT_ID * m_trtHelper
pointer to TRT detector manager
Definition: InDetGeometryManagerTool.h:109
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
Trk::AlignPar
Definition: AlignPar.h:25
SiliconID.h
This is an Identifier helper class for both the Pixel and SCT subdetectors. This class defines identi...
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::AlignModule::RotX
@ RotX
Definition: AlignModule.h:54
InDet::InDetGeometryManagerTool::dumpGeometry
void dumpGeometry()
print basic geometry info to screen
Definition: InDetGeometryManagerTool.cxx:576
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::AlignModule::SCT
@ SCT
Definition: AlignModule.h:57
InDet::InDetGeometryManagerTool::~InDetGeometryManagerTool
virtual ~InDetGeometryManagerTool()
Definition: InDetGeometryManagerTool.cxx:93
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AlignModuleList.h
InDet::InDetGeometryManagerTool::m_sigmaRotX
double m_sigmaRotX
Definition: InDetGeometryManagerTool.h:135
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
Trk::AlignModule::DetElementCollection
std::vector< const TrkDetElementBase * > DetElementCollection
typedefs to contain detector element pointers and transforms
Definition: AlignModule.h:60
Trk::AlignModule::name
const std::string & name() const
Definition: AlignModule.h:89
InDet::InDetGeometryManagerTool::addModuleParameters
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()
Definition: InDetGeometryManagerTool.cxx:481
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::InDetGeometryManagerTool::m_idHashToAlignModuleMaps
std::vector< Trk::AlignModuleList * > m_idHashToAlignModuleMaps
Definition: InDetGeometryManagerTool.h:119
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SCT_ID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: SCT_ID.cxx:639
Trk::AlignModule::DetectorType
DetectorType
Definition: AlignModule.h:57
InDetDD::TRT_DetectorManager::getElement
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
Definition: TRT_DetectorManager.cxx:158
AlignModule.h
InDet::InDetGeometryManagerTool::m_trtGeoManager
ToolHandle< Trk::IGeometryManagerTool > m_trtGeoManager
pointer to TRT geometry manager
Definition: InDetGeometryManagerTool.h:112
InDet::InDetGeometryManagerTool::m_dumpGeometry
bool m_dumpGeometry
Definition: InDetGeometryManagerTool.h:146
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
PixelID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: PixelID.cxx:912
Trk::IGeometryManagerTool::m_logStream
std::ostream * m_logStream
logfile output stream
Definition: IGeometryManagerTool.h:113
InDet::InDetGeometryManagerTool::m_alignSi
bool m_alignSi
Definition: InDetGeometryManagerTool.h:140
SiDetectorElement.h
InDet::InDetGeometryManagerTool::m_pixHelper
const PixelID * m_pixHelper
pointer to PIX detector manager
Definition: InDetGeometryManagerTool.h:106
InDet::InDetGeometryManagerTool::finalize
StatusCode finalize()
Definition: InDetGeometryManagerTool.cxx:169
Trk::AlignModule::setIdHash
void setIdHash(IdentifierHash id)
Definition: AlignModule.h:93
Trk::AlignModule::TransX
@ TransX
Definition: AlignModule.h:54
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
InDet::InDetGeometryManagerTool::m_sigmaRotZ
double m_sigmaRotZ
Definition: InDetGeometryManagerTool.h:137
DeMoScan.index
string index
Definition: DeMoScan.py:362
TRT_ID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel.
Definition: TRT_ID.h:857
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
Trk::IGeometryManagerTool::m_idHashToAlignModuleMapsPtr
std::vector< Trk::AlignModuleList * > * m_idHashToAlignModuleMapsPtr
pointer to vector of hashMaps to which the elements are added
Definition: IGeometryManagerTool.h:109
InDet::InDetGeometryManagerTool::m_doModuleSelection
bool m_doModuleSelection
Definition: InDetGeometryManagerTool.h:143
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
Trk::AlignModule::RotY
@ RotY
Definition: AlignModule.h:54
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
InDet::InDetGeometryManagerTool::m_alignX
bool m_alignX
Definition: InDetGeometryManagerTool.h:125
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
InDet::InDetGeometryManagerTool::m_sigmaX
double m_sigmaX
Definition: InDetGeometryManagerTool.h:132
InDet::InDetGeometryManagerTool::m_alignY
bool m_alignY
Definition: InDetGeometryManagerTool.h:126
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
IAlignModuleTool.h
AlignPar.h
InDet::InDetGeometryManagerTool::m_alignRotX
bool m_alignRotX
Definition: InDetGeometryManagerTool.h:128
InDet::InDetGeometryManagerTool::buildL0
void buildL0()
creates L0 AlignModules for Silicon
Definition: InDetGeometryManagerTool.cxx:313
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
AthAlgTool
Definition: AthAlgTool.h:26
SCT_ID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition: SCT_ID.h:464
SCT_DetectorManager.h
Trk::AlignModule::RotZ
@ RotZ
Definition: AlignModule.h:54
InDet::InDetGeometryManagerTool::buildGeometry
void buildGeometry()
builds geometry for Silicon alignment
Definition: InDetGeometryManagerTool.cxx:277
InDet::InDetGeometryManagerTool::isOneDetOnly
bool isOneDetOnly(const Trk::AlignModule *mod, Trk::AlignModule::DetectorType dettype) const
check whether the module is of a single detector type
Definition: InDetGeometryManagerTool.cxx:619
Trk::AlignModule::TransY
@ TransY
Definition: AlignModule.h:54
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Trk::AlignModule::identify
Identifier identify() const
Definition: AlignModule.h:97
InDet::InDetGeometryManagerTool::m_alignModuleTool
ToolHandle< Trk::IAlignModuleTool > m_alignModuleTool
pointer to AlignModuleTool
Definition: InDetGeometryManagerTool.h:114
InDet::InDetGeometryManagerTool::m_trtDetManager
const InDetDD::TRT_DetectorManager * m_trtDetManager
pointer to TRT detector manager
Definition: InDetGeometryManagerTool.h:104
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:57
SCT_ID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...
Definition: SCT_ID.h:721
InDet::InDetGeometryManagerTool::initialize
StatusCode initialize()
Definition: InDetGeometryManagerTool.cxx:108
InDetDD::PixelDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80