ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
InDet::SiTrkAlignDBTool Class Reference

#include <SiTrkAlignDBTool.h>

Inheritance diagram for InDet::SiTrkAlignDBTool:
Collaboration diagram for InDet::SiTrkAlignDBTool:

Public Member Functions

 SiTrkAlignDBTool (const std::string &type, const std::string &name, const IInterface *parent)
 constructor More...
 
virtual ~SiTrkAlignDBTool ()
 destructor More...
 
virtual StatusCode initialize ()
 initialize method More...
 
virtual StatusCode finalize ()
 finalize method More...
 
void writeAlignPar ()
 Writes alignment parameters. More...
 
void setNtuple (TFile *file)
 sets ntuple to be used to write output More...
 
virtual void setLogStream (std::ostream *os)
 sets the output stream for the logfile More...
 
virtual StatusCode preSolve ()
 sets up initial alignment constants before solving More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

std::ostream * m_logStream = nullptr
 logfile output stream More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void updateDB ()
 updates alignment constants in the DB More...
 
bool checkPixelLevel ()
 
bool checkSCTLevel ()
 
bool checkSiLevel ()
 
void updateSiL0asL1 (Identifier idL0, const Amg::Transform3D &transform)
 
void updateAsL3 (const Trk::AlignModule *module, const Amg::Transform3D &transform, double)
 
void printTransform (const Amg::Transform3D &tr) const
 
void updateAsL2 (const Trk::AlignModule *module, const Amg::Transform3D &transform, const int)
 
void updateAsL16 (const Trk::AlignModule *module, double)
 
virtual Identifier GetL1L2fromL3Identifier (const Identifier &ident, const int &level) const
 convert L3 module identifier to L1 or L2 More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

const PixelIDm_pixHelper
 pointer to PIX detector manager More...
 
const SCT_IDm_sctHelper
 pointer to SCT detector manager More...
 
const AtlasDetectorIDm_idHelper
 
bool m_writeSQLFile
 flag wether to write out .db file or not (file is not needed in parallel jobs) More...
 
std::string m_SQLiteTag
 tag name for the ConditionsDB More...
 
std::string m_outputAlignFile
 filename for the textfile with final alignment constants More...
 
std::string m_outIBLDistFile
 filename for the textfile with final IBLDist params More...
 
std::string m_outGlobalFolderFile
 filename for the textfile with final GlobalFolder constants More...
 
bool m_writeTextFile
 flag whether to write out the final constants into text file More...
 
bool m_writeOldConstants
 flag whether to write out the initial constants into text file More...
 
std::string m_oldIBLDistFile
 filename for the textfile with initial IBLDist params
More...
 
std::string m_oldAlignFile
 filename for the textfile with initial alignment constants More...
 
std::string m_oldGlobalFolderFile
 filename for the textfile with initial GlobalFolder constants More...
 
bool m_updateConstants
 flag whether to update the constants More...
 
ToolHandle< IInDetAlignDBToolm_IDAlignDBTool
 
ToolHandle< Trk::IAlignModuleToolm_alignModuleTool
 
ToolHandle< Trk::IGeometryManagerToolm_pixelGeoManager
 
ToolHandle< Trk::IGeometryManagerToolm_sctGeoManager
 
ToolHandle< Trk::IGeometryManagerToolm_siGeoManager
 
TFile * m_ntuple
 
int m_pixelAlignLevel
 
int m_pixelAlignLevelBarrel
 
int m_pixelAlignLevelEndcaps
 
bool m_pixelaAlignDBM
 
int m_sctAlignLevel
 
int m_sctAlignLevelBarrel
 
int m_sctAlignLevelEndcaps
 
int m_siAlignLevel
 
bool m_doSi
 
bool m_doPixel
 
bool m_doSCT
 
bool m_writeAsL3
 
bool m_writeAsL2
 
bool m_writeAsL16
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 44 of file SiTrkAlignDBTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ SiTrkAlignDBTool()

InDet::SiTrkAlignDBTool::SiTrkAlignDBTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

constructor

Definition at line 36 of file SiTrkAlignDBTool.cxx.

38  , m_pixHelper(nullptr)
39  , m_sctHelper(nullptr)
40  , m_idHelper(nullptr)
41  , m_writeSQLFile(true)
42  , m_SQLiteTag("test_tag")
43  , m_outputAlignFile("OutputSiAlignment.txt")
44  , m_outIBLDistFile("OutputIBLDist.txt")
45  , m_outGlobalFolderFile("OutputSiGlobalFolder.txt")
46  , m_writeTextFile(true)
47  , m_writeOldConstants(false)
48  , m_oldIBLDistFile("OldIBLDist.txt")
49  , m_oldAlignFile("OldSiAlignment.txt")
50  , m_oldGlobalFolderFile("OldSiGlobalFolder.txt")
51  , m_updateConstants(true)
52  , m_IDAlignDBTool("InDetAlignDBTool")
53  , m_alignModuleTool("Trk::AlignModuleTool/AlignModuleTool")
54  , m_pixelGeoManager("")
55  , m_sctGeoManager("")
56  , m_siGeoManager("")
57  , m_ntuple{}
58  , m_pixelAlignLevel(-1)
61  , m_pixelaAlignDBM(false)
62  , m_sctAlignLevel(-1)
65  , m_siAlignLevel(-1)
66  , m_doSi(false)
67  , m_doPixel(false)
68  , m_doSCT(false)
69  , m_writeAsL3(false)
70  , m_writeAsL2(false)
71  , m_writeAsL16(false)
72 {
73  declareInterface<ITrkAlignDBTool>(this);
74 
75  declareProperty("WriteSQLFile", m_writeSQLFile);
76  declareProperty("SQLiteTag", m_SQLiteTag);
77  declareProperty("OutputTextFile", m_outputAlignFile);
78  declareProperty("OutputIBLDistFile", m_outIBLDistFile);
79  declareProperty("OutputGlobalFolderFile",m_outGlobalFolderFile);
80  declareProperty("WriteTextFile", m_writeTextFile);
81  declareProperty("WriteOldConstants", m_writeOldConstants);
82  declareProperty("OldAlignFile", m_oldAlignFile);
83  declareProperty("OldIBLDistFile", m_oldIBLDistFile);
84  declareProperty("OldGlobalFolderFile",m_oldGlobalFolderFile);
85  declareProperty("UpdateConstants", m_updateConstants);
86  declareProperty("WriteAsL3", m_writeAsL3);
87 
88  declareProperty("IDAlignDBTool", m_IDAlignDBTool);
89  declareProperty("AlignModuleTool", m_alignModuleTool, "Tool for handling of align module collections");
90  declareProperty("AlignmentDBM", m_pixelaAlignDBM);
91 
92  declareProperty("PixelGeometryManager", m_pixelGeoManager, "Tool for handling the Pixel alignment geometry");
93  declareProperty("SCTGeometryManager", m_sctGeoManager, "Tool for handling the SCT alignment geometry");
94  declareProperty("SiGeometryManager", m_siGeoManager, "Tool for handling the Silicon alignment geometry");
95 }

◆ ~SiTrkAlignDBTool()

InDet::SiTrkAlignDBTool::~SiTrkAlignDBTool ( )
virtual

destructor

Definition at line 98 of file SiTrkAlignDBTool.cxx.

99 {}

Member Function Documentation

◆ checkPixelLevel()

bool InDet::SiTrkAlignDBTool::checkPixelLevel ( )
private

Definition at line 233 of file SiTrkAlignDBTool.cxx.

234 {
236  return true;
237 
238  if(!m_pixelaAlignDBM && m_pixelAlignLevel==11){// the new one with IBL (seems simplest solution)
239  m_writeAsL2 = true;
240  return true;
241  }
242 
243  if(m_pixelaAlignDBM && (m_pixelAlignLevel==1 || m_pixelAlignLevel==2 )){// the new one with DBM (seems simplest solution)
244  m_writeAsL2 = true;
245  return true;
246  }
247 
248  if(m_pixelaAlignDBM && m_pixelAlignLevel==3 ){// the new one with DBM (seems simplest solution)
249  return true;
250  }
251 
252  if(!m_pixelaAlignDBM && m_pixelAlignLevel==16){// the new IBL bowing level
253  m_writeAsL16 = true;
254  // We need some fix here with respect to current CL implementation! There bowing is updated at L3!! (this would currently do both..)
255  return true;
256  }
257 
258  if (m_writeAsL3)
259  return true;
260 
261  m_pixelAlignLevel = -1;
262 
263  bool ok = false;
264 
265  switch(m_pixelAlignLevelBarrel) {
266  case 11: case 12: case 15: case 16: case 2: case 22: case 26: case 27: case 3:
267  ok = true;
268  break;
269  default:
270  ATH_MSG_ERROR(" Storing of alignment constants for level "<<m_pixelAlignLevelBarrel<<" for Pixel Barrel is not implemented.");
272  ok = false;
273  break;
274  }
275 
276  switch(m_pixelAlignLevelEndcaps) {
277  case 11: case 16: case 2: case 3: case 12:
278  ok = ok && true;
279  break;
280  default:
281  ATH_MSG_ERROR(" Storing of alignment constants for level "<<m_pixelAlignLevelEndcaps<<" for Pixel Endcaps is not implemented.");
283  ok = false;
284  break;
285  }
286 
287  return ok;
288 }

◆ checkSCTLevel()

bool InDet::SiTrkAlignDBTool::checkSCTLevel ( )
private

Definition at line 291 of file SiTrkAlignDBTool.cxx.

292 {
293  if(m_sctAlignLevel==0)
294  return true;
295 
296  if (m_writeAsL3)
297  return true;
298 
299  m_sctAlignLevel = -1;
300 
301  bool ok = false;
302 
303  switch(m_sctAlignLevelBarrel) {
304  case 1: case 2: case 27: case 3:
305  ok = true;
306  break;
307  default:
308  ATH_MSG_ERROR(" Storing of alignment constants for level "<<m_sctAlignLevelBarrel<<" for SCT Barrel is not implemented.");
310  ok = false;
311  break;
312  }
313 
314  switch(m_sctAlignLevelEndcaps) {
315  case 1: case 2: case 25: case 3:
316  ok = ok && true;
317  break;
318  default:
319  ATH_MSG_ERROR(" Storing of alignment constants for level "<<m_sctAlignLevelEndcaps<<" for SCT Endcaps is not implemented.");
321  ok = false;
322  break;
323  }
324 
325  return ok;
326 }

◆ checkSiLevel()

bool InDet::SiTrkAlignDBTool::checkSiLevel ( )
private

Definition at line 329 of file SiTrkAlignDBTool.cxx.

330 {
331  if (m_writeAsL3)
332  return true;
333 
334  switch(m_siAlignLevel) {
335  case 0:
336  case 1:
337  case 2:
338  case 3:
339  return true;
340 
341  default:
342  return false;
343  }
344 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode InDet::SiTrkAlignDBTool::finalize ( )
virtual

finalize method

Implements Trk::ITrkAlignDBTool.

Definition at line 225 of file SiTrkAlignDBTool.cxx.

226 {
227  ATH_MSG_DEBUG("finalize() of SiTrkAlignDBTool");
228 
229  return StatusCode::SUCCESS;
230 }

◆ GetL1L2fromL3Identifier()

Identifier InDet::SiTrkAlignDBTool::GetL1L2fromL3Identifier ( const Identifier ident,
const int &  level 
) const
privatevirtual

convert L3 module identifier to L1 or L2

< no translation needed

check whether PIX

< Whole pixel det. at L1

check whether SCT

< barrel + 2 x EC at L1

< take care of the case where level != 1,2,3 or ident neither pix nor sct

Definition at line 866 of file SiTrkAlignDBTool.cxx.

866  {
867  if( level == 3 ) return ident ;
868 
869  if( m_pixHelper->is_pixel(ident) ) {
870  if( level == 1 ) {
871  return m_pixHelper->wafer_id( 0, 0, 0, 0 ) ;
872  }
873  if( level == 2 ) {
874  int barrel_ec = m_pixHelper->barrel_ec( ident ) ;
875  int layer_disk = m_pixHelper->layer_disk( ident ) ;
876  int phi_sector = m_pixHelper->phi_module( ident ) ;
877  if (abs(barrel_ec)==4) return m_pixHelper->wafer_id( barrel_ec, layer_disk, phi_sector, 0 ) ;
878  else return m_pixHelper->wafer_id( barrel_ec, layer_disk, 0, 0 ) ;
879  }
880  }
882  if( m_sctHelper->is_sct(ident) ) {
883  if( level == 1 ) {
884  int barrel_ec = m_sctHelper->barrel_ec( ident ) ;
885  return m_sctHelper->wafer_id( barrel_ec, 0, 0, 0, 0 ) ;
886  }
887  if( level == 2 ) {
888  int barrel_ec = m_sctHelper->barrel_ec( ident ) ;
889  int layer_disk = m_sctHelper->layer_disk( ident ) ;
890  return m_sctHelper->wafer_id( barrel_ec, layer_disk, 0, 0, 0 ) ;
891  }
892  }
893  return ident ;
894 }

◆ initialize()

StatusCode InDet::SiTrkAlignDBTool::initialize ( )
virtual

initialize method

Implements Trk::ITrkAlignDBTool.

Definition at line 102 of file SiTrkAlignDBTool.cxx.

102  {
103 
104  ATH_MSG_DEBUG("initialize() of SiTrkAlignDBTool");
105 
106  if(!m_updateConstants) {
107  ATH_MSG_WARNING("Not updating Silicon constants!");
108  return StatusCode::SUCCESS;
109  }
110 
111  // Si alignment database tool
112  ATH_CHECK( m_IDAlignDBTool.retrieve() );
113  // get AlignModuleTool
114  ATH_CHECK( m_alignModuleTool.retrieve() );
115  // retrieve Pixel helper
117  // retrieve SCT helper
119  ATH_CHECK(detStore()->retrieve(m_idHelper, "AtlasID"));
120 
121  // check which geometry managers are loaded and which are to be used
122 
123  // get SiGeometryManagerTool
124  if( !m_siGeoManager.empty() ) {
125  ATH_CHECK( m_siGeoManager.retrieve());
126 
127  ATH_MSG_DEBUG("retrieved " << m_siGeoManager);
128  m_siAlignLevel = m_siGeoManager->alignLevel();
129  ATH_MSG_INFO(" Requested update of Level "<<m_siAlignLevel<<" alignment constants for Silicon");
130 
131  // check alignment level but don't stop on error
132  // if unknown level given, set to -1
133  if(!checkSiLevel()) {
134  ATH_MSG_WARNING(" Storing of alignment constants for level "<<m_siAlignLevel<<" for Silicon is not implemented.");
135  m_siAlignLevel=-1;
136  }
137  }
138 
139  // for anything else then level 0 we need the other two geometry managers
140  if(m_siAlignLevel!=0) {
141 
142  // get PixelGeometryManagerTool
143  if( !m_pixelGeoManager.empty() ) {
144  ATH_CHECK( m_pixelGeoManager.retrieve());
145  ATH_MSG_DEBUG("retrieved " << m_pixelGeoManager);
146  m_pixelAlignLevel = m_pixelGeoManager->alignLevel();
147  m_pixelAlignLevelBarrel = m_pixelGeoManager->alignLevelBarrel();
148  m_pixelAlignLevelEndcaps = m_pixelGeoManager->alignLevelEndcaps();
149 // m_pixelaAlignDBM = m_pixelGeoManager->alignDBM();
150  ATH_MSG_DEBUG("Retrieved Pixel Global alignment level: "<<m_pixelAlignLevel);
151  ATH_MSG_DEBUG("Retrieved Pixel Barrel alignment level: "<<m_pixelAlignLevelBarrel);
152  ATH_MSG_DEBUG("Retrieved Pixel Endcap alignment level: "<<m_pixelAlignLevelEndcaps);
153  ATH_MSG_DEBUG("Retrieved DBM alignment configuration: "<<m_pixelaAlignDBM);
154 
155  if(m_pixelAlignLevel == 1)
156  ATH_MSG_INFO(" Requested update of Level "<<m_pixelAlignLevel<<" alignment constants for Pixel");
157  else {
158  ATH_MSG_INFO(" Requested update of Level "<<m_pixelAlignLevelBarrel<<" alignment constants for Pixel Barrel");
159  ATH_MSG_INFO(" Requested update of Level "<<m_pixelAlignLevelEndcaps<<" alignment constants for Pixel Endcaps");
160  }
161 
162  // check alignment level but don't stop on error
163  if(!checkPixelLevel()) {
164  ATH_MSG_FATAL(" Pixel alignment level not given.");
165 // return StatusCode::FAILURE;
166  }
167  }
168 
169  // get SCTGeometryManagerTool
170  if( !m_sctGeoManager.empty() ) {
171  ATH_CHECK( m_sctGeoManager.retrieve());
172  ATH_MSG_DEBUG("retrieved " << m_sctGeoManager);
173  m_sctAlignLevel = m_sctGeoManager->alignLevel();
174  m_sctAlignLevelBarrel = m_sctGeoManager->alignLevelBarrel();
175  m_sctAlignLevelEndcaps = m_sctGeoManager->alignLevelEndcaps();
176  ATH_MSG_DEBUG("Retrieved SCT Global alignment level: "<<m_sctAlignLevel);
177  ATH_MSG_DEBUG("Retrieved SCT Barrel alignment level: "<<m_sctAlignLevelBarrel);
178  ATH_MSG_DEBUG("Retrieved SCT Endcap alignment level: "<<m_sctAlignLevelEndcaps);
179 
180  if(m_sctAlignLevel == 0)
181  ATH_MSG_INFO(" Requested update of Level "<<m_sctAlignLevel<<" alignment constants for SCT");
182  else {
183  ATH_MSG_INFO(" Requested update of Level "<<m_sctAlignLevelBarrel<<" alignment constants for SCT Barrel");
184  ATH_MSG_INFO(" Requested update of Level "<<m_sctAlignLevelEndcaps<<" alignment constants for SCT Endcaps");
185  }
186 
187  // check alignment level but don't stop on error
188  if(!checkSCTLevel()) {
189  ATH_MSG_FATAL(" SCT alignment level not given.");
190 // return StatusCode::FAILURE;
191  }
192  }
193 
194  // if we're here it means that we need at least one the two managers
197  ATH_MSG_FATAL( " No geometry manager available or alignment level not given. " );
198  // we don't want to stop if there's errors
199  // so we comment out the return statement
200 // return StatusCode::FAILURE;
201  }
202  }
203 
204  m_doSi = (m_siAlignLevel==0);
205  m_doPixel = (checkPixelLevel() && !m_doSi);
206  m_doSCT = (checkSCTLevel() && !m_doSi);
207 
208  if (m_writeAsL3)
209  ATH_MSG_INFO(" Storing as level 3 constants.");
210 
211  if (m_writeAsL16)
212  ATH_MSG_INFO(" Storing IBLDist as level 16 constants in separate DB");
213 
214  if(!m_doPixel && !m_doSCT && !m_doSi) {
215  ATH_MSG_FATAL(" No geometry manager available or alignment level not given.");
216  ATH_MSG_FATAL(" DB not updated.");
217 // return;
218  }
219  ATH_MSG_DEBUG("Made it till here..... "<<m_doSi<<" "<<m_doPixel<<" "<<m_doSCT);
220  ATH_MSG_DEBUG("update constants..... "<<m_updateConstants);
221  return StatusCode::SUCCESS;
222 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & ITrkAlignDBTool::interfaceID ( )
inlinestaticinherited

Definition at line 58 of file ITrkAlignDBTool.h.

59  { return IID_TRKALIGNINTERFACES_ITrkAlignDBTool; }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ preSolve()

virtual StatusCode Trk::ITrkAlignDBTool::preSolve ( )
inlinevirtualinherited

sets up initial alignment constants before solving

Definition at line 52 of file ITrkAlignDBTool.h.

52 { return StatusCode::SUCCESS; }

◆ printTransform()

void InDet::SiTrkAlignDBTool::printTransform ( const Amg::Transform3D tr) const
private

Definition at line 854 of file SiTrkAlignDBTool.cxx.

855  {
856  ATH_MSG_DEBUG(" - translation: "<<tr.translation().x()<<" "<<tr.translation().y()<<" "<<tr.translation().z());
857  ATH_MSG_DEBUG(" - rotation:");
858  ATH_MSG_DEBUG(" "<<tr(0,0)<<" "<<tr(0,1)<<" "<<tr(0,2));
859  ATH_MSG_DEBUG(" "<<tr(1,0)<<" "<<tr(1,1)<<" "<<tr(1,2));
860  ATH_MSG_DEBUG(" "<<tr(2,0)<<" "<<tr(2,1)<<" "<<tr(2,2));
861  return;
862  }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setLogStream()

virtual void Trk::ITrkAlignDBTool::setLogStream ( std::ostream *  os)
inlinevirtualinherited

sets the output stream for the logfile

Definition at line 49 of file ITrkAlignDBTool.h.

49 { m_logStream = os; }

◆ setNtuple()

void InDet::SiTrkAlignDBTool::setNtuple ( TFile *  file)
inlinevirtual

sets ntuple to be used to write output

Reimplemented from Trk::ITrkAlignDBTool.

Definition at line 64 of file SiTrkAlignDBTool.h.

65  { m_ntuple=file; }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateAsL16()

void InDet::SiTrkAlignDBTool::updateAsL16 ( const Trk::AlignModule module,
double  bowx 
)
private

Definition at line 807 of file SiTrkAlignDBTool.cxx.

808 {
809  ATH_MSG_INFO("Updating constants for module "<<module->name()<<" as level 16 IBLDist constants (new)");
810 
812  const std::vector<const Trk::TrkDetElementBase *> * elements = module->detElementCollection(det);
813 
814  if( !elements ) {
815  ATH_MSG_FATAL("no elements of type "<<det);
816  return;
817  }
818 
819  ATH_MSG_DEBUG("looping over "<<elements->size()<<" elements");
820  std::vector<int> stave_phis; // where we store the unique identifiers we want to update
821  std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem = elements->begin();
822  std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem_end = elements->end();
823  for ( ; ielem != ielem_end; ++ielem) {
824  const InDetDD::SiDetectorElement * sielem = dynamic_cast<const InDetDD::SiDetectorElement *>(*ielem);
825  if (!sielem) {
826  ATH_MSG_WARNING("Should be Silicon detector element but is not. Skipping.");
827  continue;
828  }
829 
830  Identifier elemID = sielem->identify();
831  const int this_stave_phi = m_pixHelper->phi_module( elemID );
832 
833  ATH_MSG_DEBUG("module ID: "<<m_idHelper->show_to_string(elemID,nullptr,'/'));
834  ATH_MSG_DEBUG("phi identifier: "<<m_pixHelper->phi_module( elemID )) ;
835 
836  std::vector<int>::const_iterator ix = find(stave_phis.begin(),stave_phis.end(),this_stave_phi); // check whether it is unique
837  if (ix==stave_phis.end()) {
838  stave_phis.push_back(this_stave_phi);
839 
840  // tweak applies the transform onto already existing transform in the DB
841  if( !(m_IDAlignDBTool->tweakIBLDist(this_stave_phi,bowx)) ) {
842  ATH_MSG_ERROR("Error tweaking IBLDist DB for stave "<<this_stave_phi);
843  }
844  }
845  else {
846  ATH_MSG_DEBUG("Skipping ModuleID: "<<m_idHelper->show_to_string(elemID,nullptr,'/')<<" --> not unique");
847  }
848 
849  } // end loop over detElements
850 }

◆ updateAsL2()

void InDet::SiTrkAlignDBTool::updateAsL2 ( const Trk::AlignModule module,
const Amg::Transform3D transform,
const int  level 
)
private

Definition at line 736 of file SiTrkAlignDBTool.cxx.

737 {
738  ATH_MSG_INFO("Updating constants for module "<<module->name()<<" as level 2 constants (new)");
739 
740  // check the level we store in
741  ATH_MSG_INFO("DB aligning at level: "<<level);
742 
744  const std::vector<const Trk::TrkDetElementBase *> * elements = module->detElementCollection(det);
745 
746  if( !elements ) {
747  ATH_MSG_FATAL("no elements of type "<<det);
748  return;
749  }
750 
751  ATH_MSG_DEBUG("looping over "<<elements->size()<<" elements");
752  std::vector<std::string> level_mods; // where we store the unique identifiers we want to update
753 
754  std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem = elements->begin();
755  std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem_end = elements->end();
756  for ( ; ielem != ielem_end; ++ielem) {
757  const InDetDD::SiDetectorElement * sielem = dynamic_cast<const InDetDD::SiDetectorElement *>(*ielem);
758  if (!sielem) {
759  ATH_MSG_WARNING("Should be Silicon detector element but is not. Skipping.");
760  continue;
761  }
762 
763  Identifier elemID = sielem->identify();
764  Identifier level_mod = GetL1L2fromL3Identifier(elemID,level);
765  std::string key = m_IDAlignDBTool->dirkey(level_mod,level+1);
766 
767  ATH_MSG_DEBUG("TESTING value: "<<level_mod);
768  ATH_MSG_DEBUG("TESTING ID: "<<m_idHelper->show_to_string(level_mod,nullptr,'/'));
769  ATH_MSG_DEBUG("TESTING retrieved key: "<<key);
770  std::vector<std::string>::const_iterator ix = find(level_mods.begin(),level_mods.end(),key); // check whether it is unique
771  if (ix==level_mods.end()) {
772  level_mods.push_back(key);
773 
774  ATH_MSG_DEBUG("-----------------------------------------------------");
775 
776  ATH_MSG_DEBUG("ModuleID value: "<<level_mod);
777  ATH_MSG_DEBUG("ModuleID: "<<m_idHelper->show_to_string(level_mod,nullptr,'/'));
778 
779  // for levels 1 and 2 the DB frame equals to the global frame but the align
780  // frame doesnot, so we have to apply an additional transform
781  const Amg::Transform3D& dbFrameToAlignFrame = module->globalFrameToAlignFrame();
782 
783  ATH_MSG_DEBUG("DB to align");
784  printTransform(dbFrameToAlignFrame);
785 
786  Amg::Transform3D dbtransform = dbFrameToAlignFrame.inverse() * transform * dbFrameToAlignFrame;
787 
788  ATH_MSG_DEBUG("DB transform");
789  printTransform(dbtransform);
790 
791 
792  // tweak applies the transform onto already existing transform in the DB
793  if( !(m_IDAlignDBTool->tweakTrans(level_mod, level, dbtransform)) ) {
794  // set replaces the transform in the DB
795  if( !(m_IDAlignDBTool->setTrans(level_mod, level, dbtransform)) )
796  ATH_MSG_ERROR("Error setting level "<<level<<" constants for element "<<level_mod<<" in module "<<module->name());
797  }
798  }
799  else {
800  ATH_MSG_DEBUG("Skipping ModuleID: "<<m_idHelper->show_to_string(elemID,nullptr,'/')<<" --> not unique");
801  }
802  } // end loop over detElements
803 }

◆ updateAsL3()

void InDet::SiTrkAlignDBTool::updateAsL3 ( const Trk::AlignModule module,
const Amg::Transform3D transform,
double   
)
private
  if (apBowX!=0){
double z = sielem->center()[2];        
const double  y0y0  = 366.5*366.5;

ATH_MSG_DEBUG("Z position : "<< z); double bowx = apBowX * ( z*z - y0y0 ) / y0y0; This is in the module frame, as bowing corrections are directly L3 Amg::Translation3D translation_bow(bowx , 0, 0 ); dbtransform *= translation_bow; }

Definition at line 639 of file SiTrkAlignDBTool.cxx.

640 {
641  ATH_MSG_INFO("Updating constants for module "<<module->name()<<" as level 3 constants");
642 
643  // store as level 3 constants
644  const int level = 3;
645 
646  // transform from global frame to align frame
647  const Amg::Transform3D& globaltoalign = module->globalFrameToAlignFrame();
648 
649  // same code pplies to both Pixel and SCT
650  for (unsigned int idet=0; idet<2; idet++) {
651 
653 
654  ATH_MSG_DEBUG("getting elements of type "<<det<<" from the module");
655 
656  const std::vector<const Trk::TrkDetElementBase *> * elements = module->detElementCollection(det);
657 
658  if( !elements ) {
659  ATH_MSG_DEBUG("no elements of type "<<det);
660  continue;
661  }
662 
663  ATH_MSG_DEBUG("looping over "<<elements->size()<<" elements");
664 
665  std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem = elements->begin();
666  std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem_end = elements->end();
667  for ( ; ielem != ielem_end; ++ielem) {
668  const InDetDD::SiDetectorElement * sielem = dynamic_cast<const InDetDD::SiDetectorElement *>(*ielem);
669  if (!sielem) {
670  ATH_MSG_WARNING("Should be Silicon detector element but is not. Skipping.");
671  continue;
672  }
673 
674  Identifier elemID = sielem->identify();
675 
676  // for the SCT the 0 side Identifier is used in the DB
677  if (m_idHelper->is_sct(elemID)) {
678  if (m_sctHelper->side(elemID) > 0)
679  continue;
680  }
681 
682  ATH_MSG_DEBUG("-----------------------------------------------------");
683 
684  ATH_MSG_DEBUG("ModuleID value: "<<elemID);
685  ATH_MSG_DEBUG("ModuleID: "<<m_idHelper->show_to_string(elemID,nullptr,'/'));
686 
687  // this should work for both Pixel and SCT
688  // module transform is the transform between the db frame and global frame
689  Amg::Transform3D dbtoglobal = sielem->moduleTransform();
690  // ATH_MSG_DEBUG("DB to Global");
691  // printTransform(dbtoglobal);
692 
693  // ATH_MSG_DEBUG("Global to Align");
694  // printTransform(globaltoalign);
695 
696  // from DB frame to alignment frame transform
697  Amg::Transform3D dbtoalign = globaltoalign * dbtoglobal;
698  // ATH_MSG_DEBUG("DB to Align");
699  // printTransform(dbtoalign);
700 
701  ATH_MSG_DEBUG("Alignment transform");
703 
704  // alignment transform in DB frame
705  Amg::Transform3D dbtransform = dbtoalign.inverse() * transform * dbtoalign;
706 
707  // This should work as Bowing is in DB frame, i.e. local module frame
708  // This implementation is need in the CL as of Oct2015;
709  // For now, just comment for offline
721  ATH_MSG_DEBUG("DB transform");
722  printTransform(dbtransform);
723 
724  // tweak applies the transform onto already existing transform in the DB
725  if( !(m_IDAlignDBTool->tweakTrans(elemID, level, dbtransform)) ) {
726  // set replaces the transform in the DB
727  if( !(m_IDAlignDBTool->setTrans(elemID, level, dbtransform)) )
728  ATH_MSG_ERROR("Error setting level "<<level<<" constants for element "<<elemID<<" in module "<<module->name());
729  }
730  } // end loop over detElements
731  ATH_MSG_DEBUG("-----------------------------------------------------");
732  } // end loop over Pixel and SCT
733 }

◆ updateDB()

void InDet::SiTrkAlignDBTool::updateDB ( )
private

updates alignment constants in the DB

Definition at line 380 of file SiTrkAlignDBTool.cxx.

381 {
382  ATH_MSG_DEBUG(" in SiTrkAlignDBTool::updateDB()");
383 
384  Amg::Transform3D dbtransform;
385 
386  ATH_MSG_INFO("-------------------------------------------------");
387  // updating level 1, level 2 or level 3 constants in the DB
388  if(m_doSi)
389  ATH_MSG_INFO("Updating Level "<<m_siAlignLevel<<" alignment constants for Silicon");
390 
391  if(m_doPixel) {
392  if(m_pixelAlignLevel==1)
393  ATH_MSG_INFO("Updating Level "<<m_pixelAlignLevel<<" alignment constants for Pixel");
394  else {
395  ATH_MSG_INFO("Updating Level "<<m_pixelAlignLevelBarrel<<" alignment constants for Pixel Barrel");
396  ATH_MSG_INFO("Updating Level "<<m_pixelAlignLevelEndcaps<<" alignment constants for Pixel Endcaps");
397  }
398  }
399 
400  if(m_doSCT) {
401  if(m_sctAlignLevel==0)
402  ATH_MSG_INFO("Updating Level "<<m_sctAlignLevel<<" alignment constants for SCT");
403  else {
404  ATH_MSG_INFO("Updating Level "<<m_sctAlignLevelBarrel<<" alignment constants for SCT Barrel");
405  ATH_MSG_INFO("Updating Level "<<m_sctAlignLevelEndcaps<<" alignment constants for SCT Endcaps");
406  }
407  }
408 
409  if (m_writeAsL3)
410  ATH_MSG_INFO("Updating Level 3 constants.");
411 
412  // loop over all AlignModules
413  std::vector<Trk::AlignModule *>::const_iterator imod = m_alignModuleTool->getAlignModuleCollection()->begin();
414  std::vector<Trk::AlignModule *>::const_iterator imod_end = m_alignModuleTool->getAlignModuleCollection()->end();
415  for( ; imod != imod_end; ++imod ) {
416 
417  Trk::AlignModule * module = *imod;
418 
419  ATH_MSG_DEBUG("-------------------------------------------------------");
420  ATH_MSG_DEBUG("Alignment corrections for module: "<<module->name());
421 
422  // the the identifier of the module for the DB
423  Identifier modID = module->identify();
424 
425  // The Si AlignModules of levels 0, 1, 2 and 3 use the Silicon Identifier.
426  if(!m_idHelper->is_pixel(modID) && !m_idHelper->is_sct(modID)) {
427  ATH_MSG_DEBUG("Module with ID: "<<modID<<" is not a Silicon module. Skipping.");
428  continue;
429  }
430 
431  // get active alignment parameters for the module
432  DataVector<Trk::AlignPar> * alignPars = m_alignModuleTool->getAlignPars(module);
433  if(alignPars->size() == 0) {
434  ATH_MSG_INFO("Alignment constants for module "<<module->name()<<" not available.");
435  continue;
436  }
437 
438  ATH_MSG_DEBUG("Retrieved alignment constants for module "<<module->name());
439  ATH_MSG_DEBUG("Module ID : "<<modID);
440  ATH_MSG_DEBUG("Expanded module ID : "<<m_idHelper->show_to_string(modID,nullptr,'/'));
441 
442  // get final alignment parameters
443  DataVector<Trk::AlignPar> * fullAlignPars = m_alignModuleTool->getFullAlignPars(module);
444  double apTraX = fullAlignPars->at(Trk::AlignModule::TransX)->par();
445  double apTraY = fullAlignPars->at(Trk::AlignModule::TransY)->par();
446  double apTraZ = fullAlignPars->at(Trk::AlignModule::TransZ)->par();
447  double apRotX = fullAlignPars->at(Trk::AlignModule::RotX)->par();
448  double apRotY = fullAlignPars->at(Trk::AlignModule::RotY)->par();
449  double apRotZ = fullAlignPars->at(Trk::AlignModule::RotZ)->par();
450 
451  // Need to make sure not to call SCT modules - only defined for PIX
452  double apBowX = 0;
453  // This should be sufficient as bowing-DoF is only enabled for IBL
454  if(m_idHelper->is_pixel(modID) && m_pixHelper->is_barrel(modID) ){
455  apBowX = fullAlignPars->at(Trk::AlignModule::BowX)->par();
456 
457  // The last check ensures that it also updates for L11 in case bowing DoF is enables.
458  if(m_pixelAlignLevelBarrel==16 || m_writeAsL16 || apBowX!=0){
459  updateAsL16(module,apBowX);
460  // Can we get a baseline as well? include here in case it is possible!
461  // Allow other DoF to be updated as well!
462  // Initial CL (Oct. 2016) update at L3 --> commented for now
463  }
464  }
465 
466  Amg::Translation3D translation( apTraX, apTraY, apTraZ );
467  Amg::Transform3D transform = translation * Amg::RotationMatrix3D::Identity();
468  transform *= Amg::AngleAxis3D(apRotZ, Amg::Vector3D(0.,0.,1.));
469  transform *= Amg::AngleAxis3D(apRotY, Amg::Vector3D(0.,1.,0.));
470  transform *= Amg::AngleAxis3D(apRotX, Amg::Vector3D(1.,0.,0.));
471 
472 
473  ATH_MSG_DEBUG(" - translation X = "<<apTraX);
474  ATH_MSG_DEBUG(" - translation Y = "<<apTraY);
475  ATH_MSG_DEBUG(" - translation Z = "<<apTraZ);
476  ATH_MSG_DEBUG(" - rotation X = "<<apRotX);
477  ATH_MSG_DEBUG(" - rotation Y = "<<apRotY);
478  ATH_MSG_DEBUG(" - rotation Z = "<<apRotZ);
479 
480  int level=-1;
481 
482  // this is really ugly and quite confusing !!!
483  // but will do for now...
484  if(m_idHelper->is_pixel(modID)) {
485  if(!m_doPixel && !m_doSi) {
486  ATH_MSG_INFO("--> Pixel module - NOT storing");
487  continue;
488  }
489  if(m_doPixel) {
492  else if(m_pixHelper->is_barrel(modID))
494  else
496  }
497  else // this makes sure that Si L0 is handled since pixel identifier is used for it
499  }
500  else if(m_idHelper->is_sct(modID)) {
501  if(!m_doSCT) {
502  ATH_MSG_INFO("--> SCT module - NOT storing");
503  continue;
504  }
505  if(m_sctAlignLevel==0)
507  else if(m_sctHelper->is_barrel(modID))
509  else
511  }
512  // to better understand what is going on
513  ATH_MSG_DEBUG("We are having level: "<<level);
514 
515  if (m_writeAsL3) {
516  updateAsL3(module,transform,apBowX);
517  continue;
518  }
519 
520  if (m_idHelper->is_pixel(modID) && m_writeAsL2) {
521  level=2;
523  continue;
524  }
525 
526  // calculate the DB transform
527  switch(level) {
528 
529  case -1:
530  // level not recognized, do nothing
531  continue;
532 
533  case 0:
534  updateSiL0asL1(modID,transform);
535  continue;
536 
537  case 1: case 2: {
538  // for levels 1 and 2 the DB frame equals to the global frame but the align
539  // frame doesnot, so we have to apply an additional transform
540  Amg::Transform3D dbFrameToAlignFrame = module->globalFrameToAlignFrame();
541 
542  ATH_MSG_DEBUG("DB to align");
543  printTransform(dbFrameToAlignFrame);
544 
545  dbtransform = dbFrameToAlignFrame.inverse() * transform * dbFrameToAlignFrame;
546 
547  ATH_MSG_DEBUG("DB transform");
548  printTransform(dbtransform);
549  break;
550  }
551 
552  case 3:
553  // for level 3 alignment the DB frame and the align frame equals to the local frame
554  // so we don't apply any additional transform
555  dbtransform = transform;
556 
557  ATH_MSG_DEBUG("DB transform");
558  printTransform(dbtransform);
559  break;
560 
561  default:
562  // otherwise we split the AlignModule into level 3 modules
563  ATH_MSG_DEBUG("We are doing this one");
564  updateAsL3(module,transform,apBowX);
565  continue;
566  }
567 
568  // tweak applies the transform onto already existing transform in the DB
569  if( m_IDAlignDBTool->tweakTrans(modID, level, dbtransform) )
570  ATH_MSG_INFO("Module \'"<<module->name()<<"\': Level "<<level<<" constants updated.");
571  else {
572  // set replaces the transform in the DB
573  ATH_MSG_DEBUG("Module \'"<<module->name()<<"\': Call to tweak failed. Constants probably don't exist yet. Use set instead.");
574  if( m_IDAlignDBTool->setTrans(modID, level, dbtransform) )
575  ATH_MSG_INFO("Module \'"<<module->name()<<"\': Level "<<level<<" constants updated.");
576  else
577  ATH_MSG_ERROR("Error setting level "<<level<<" constants for module "<<module->name());
578  }
579 
580  }
581  ATH_MSG_INFO("-------------------------------------------------");
582 
583 }

◆ updateSiL0asL1()

void InDet::SiTrkAlignDBTool::updateSiL0asL1 ( Identifier  idL0,
const Amg::Transform3D transform 
)
private

Definition at line 586 of file SiTrkAlignDBTool.cxx.

587 {
588  // splitting the whole Silicon into Pixel, SCT barrel and 2 SCT endcaps
589  // the id has to be equal to L1 Pixel ID for Silicon level 0 update
590  // or to SCT barrel L1 ID for SCT level 0 update
591  if( idL0 != m_pixHelper->wafer_id(0,0,0,0) && idL0 != m_sctHelper->wafer_id(0,0,0,0,0) ) {
592  ATH_MSG_ERROR("wrong identifier for L0 Silicon in updateSiL0asL1()");
593  return;
594  }
595 
596  // for both L0 and L1 the global frame is equal to the DB frame
597  // for L0 it is also equal to align frame so no additional transform is needed
598 
599  if(idL0 == m_pixHelper->wafer_id(0,0,0,0)) {
600  ATH_MSG_INFO("Splitting Silicon into L1 modules and updating in the DB");
601 
602  // Pixel
603  Identifier idPixel = m_pixHelper->wafer_id(0,0,0,0);
604  ATH_MSG_INFO("Updating L1 constants for Pixel");
605  // tweak applies the transform onto already existing transform in the DB
606  if( m_IDAlignDBTool->tweakTrans(idPixel, 1, transform) )
607  ATH_MSG_INFO("Call to tweak OK. Constants updated.");
608  else {
609  // set replaces the transform in the DB
610  ATH_MSG_INFO("Call to tweak failed. Constants probably don't exist yet. Use set instead.");
611  if( !m_IDAlignDBTool->setTrans(idPixel, 1, transform) )
612  ATH_MSG_ERROR("Error setting constants.");
613  }
614  }
615  else
616  ATH_MSG_INFO("Splitting SCT into L1 modules and updating in the DB");
617 
618  // SCT
619  std::vector<Identifier> ids;
620  ids.push_back(m_sctHelper->wafer_id(0,0,0,0,0)); // SCT barrel
621  ids.push_back(m_sctHelper->wafer_id(-2,0,0,0,0)); // SCT endcap A
622  ids.push_back(m_sctHelper->wafer_id(2,0,0,0,0)); // SCT endcap C
623 
624  ATH_MSG_INFO("Updating L1 constants for SCT");
625  for(unsigned int i=0; i<ids.size(); ++i) {
626  // tweak applies the transform onto already existing transform in the DB
627  if( m_IDAlignDBTool->tweakTrans(ids[i], 1, transform) )
628  ATH_MSG_INFO("Module "<<i<<". - id "<<ids[i]<<": Call to tweak OK. Constants updated.");
629  else {
630  // set replaces the transform in the DB
631  ATH_MSG_INFO("Module "<<i<<". - id "<<ids[i]<<": Call to tweak failed. Constants probably don't exist yet. Use set instead.");
632  if( !m_IDAlignDBTool->setTrans(ids[i], 1, transform) )
633  ATH_MSG_ERROR("Error setting constants.");
634  }
635  }
636 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ writeAlignPar()

void InDet::SiTrkAlignDBTool::writeAlignPar ( )
virtual

Writes alignment parameters.

Reimplemented from Trk::ITrkAlignDBTool.

Definition at line 347 of file SiTrkAlignDBTool.cxx.

348 {
349  ATH_MSG_DEBUG("in SiTrkAlignDBTool::writeAlignPar()");
350 
351  // do we want to update the DB?
352  if(!m_updateConstants) {
353  ATH_MSG_INFO("Update of Silicon constants not requested!");
354  return;
355  }
356 
357  // write initial alignment constants
358  if(m_writeOldConstants) {
359  ATH_MSG_INFO("Writing old Silicon alignment constants to file "<<m_oldAlignFile);
360  m_IDAlignDBTool->writeFile(false, m_oldAlignFile);
361  m_IDAlignDBTool->writeIBLDistFile(m_oldIBLDistFile);
362  m_IDAlignDBTool->writeGlobalFolderFile(m_oldGlobalFolderFile);
363  }
364 
365  // now update the DB
366  updateDB();
367 
368  // and write the final alignment constants
369  if(m_writeTextFile) {
370  ATH_MSG_INFO("Writing Silicon alignment constants to file "<<m_outputAlignFile);
371  m_IDAlignDBTool->writeFile(false, m_outputAlignFile);
372  m_IDAlignDBTool->writeIBLDistFile(m_outIBLDistFile);
373  m_IDAlignDBTool->writeGlobalFolderFile(m_outGlobalFolderFile);
374  }
375 
376  return;
377 }

Member Data Documentation

◆ m_alignModuleTool

ToolHandle<Trk::IAlignModuleTool> InDet::SiTrkAlignDBTool::m_alignModuleTool
private

Definition at line 106 of file SiTrkAlignDBTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doPixel

bool InDet::SiTrkAlignDBTool::m_doPixel
private

Definition at line 126 of file SiTrkAlignDBTool.h.

◆ m_doSCT

bool InDet::SiTrkAlignDBTool::m_doSCT
private

Definition at line 127 of file SiTrkAlignDBTool.h.

◆ m_doSi

bool InDet::SiTrkAlignDBTool::m_doSi
private

Definition at line 125 of file SiTrkAlignDBTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_IDAlignDBTool

ToolHandle<IInDetAlignDBTool> InDet::SiTrkAlignDBTool::m_IDAlignDBTool
private

Definition at line 105 of file SiTrkAlignDBTool.h.

◆ m_idHelper

const AtlasDetectorID* InDet::SiTrkAlignDBTool::m_idHelper
private

Definition at line 91 of file SiTrkAlignDBTool.h.

◆ m_logStream

std::ostream* Trk::ITrkAlignDBTool::m_logStream = nullptr
protectedinherited

logfile output stream

Definition at line 55 of file ITrkAlignDBTool.h.

◆ m_ntuple

TFile* InDet::SiTrkAlignDBTool::m_ntuple
private

Definition at line 112 of file SiTrkAlignDBTool.h.

◆ m_oldAlignFile

std::string InDet::SiTrkAlignDBTool::m_oldAlignFile
private

filename for the textfile with initial alignment constants

Definition at line 101 of file SiTrkAlignDBTool.h.

◆ m_oldGlobalFolderFile

std::string InDet::SiTrkAlignDBTool::m_oldGlobalFolderFile
private

filename for the textfile with initial GlobalFolder constants

Definition at line 102 of file SiTrkAlignDBTool.h.

◆ m_oldIBLDistFile

std::string InDet::SiTrkAlignDBTool::m_oldIBLDistFile
private

filename for the textfile with initial IBLDist params

Definition at line 100 of file SiTrkAlignDBTool.h.

◆ m_outGlobalFolderFile

std::string InDet::SiTrkAlignDBTool::m_outGlobalFolderFile
private

filename for the textfile with final GlobalFolder constants

Definition at line 97 of file SiTrkAlignDBTool.h.

◆ m_outIBLDistFile

std::string InDet::SiTrkAlignDBTool::m_outIBLDistFile
private

filename for the textfile with final IBLDist params

Definition at line 96 of file SiTrkAlignDBTool.h.

◆ m_outputAlignFile

std::string InDet::SiTrkAlignDBTool::m_outputAlignFile
private

filename for the textfile with final alignment constants

Definition at line 95 of file SiTrkAlignDBTool.h.

◆ m_pixelaAlignDBM

bool InDet::SiTrkAlignDBTool::m_pixelaAlignDBM
private

Definition at line 117 of file SiTrkAlignDBTool.h.

◆ m_pixelAlignLevel

int InDet::SiTrkAlignDBTool::m_pixelAlignLevel
private

Definition at line 114 of file SiTrkAlignDBTool.h.

◆ m_pixelAlignLevelBarrel

int InDet::SiTrkAlignDBTool::m_pixelAlignLevelBarrel
private

Definition at line 115 of file SiTrkAlignDBTool.h.

◆ m_pixelAlignLevelEndcaps

int InDet::SiTrkAlignDBTool::m_pixelAlignLevelEndcaps
private

Definition at line 116 of file SiTrkAlignDBTool.h.

◆ m_pixelGeoManager

ToolHandle<Trk::IGeometryManagerTool> InDet::SiTrkAlignDBTool::m_pixelGeoManager
private

Definition at line 108 of file SiTrkAlignDBTool.h.

◆ m_pixHelper

const PixelID* InDet::SiTrkAlignDBTool::m_pixHelper
private

pointer to PIX detector manager

Definition at line 89 of file SiTrkAlignDBTool.h.

◆ m_sctAlignLevel

int InDet::SiTrkAlignDBTool::m_sctAlignLevel
private

Definition at line 119 of file SiTrkAlignDBTool.h.

◆ m_sctAlignLevelBarrel

int InDet::SiTrkAlignDBTool::m_sctAlignLevelBarrel
private

Definition at line 120 of file SiTrkAlignDBTool.h.

◆ m_sctAlignLevelEndcaps

int InDet::SiTrkAlignDBTool::m_sctAlignLevelEndcaps
private

Definition at line 121 of file SiTrkAlignDBTool.h.

◆ m_sctGeoManager

ToolHandle<Trk::IGeometryManagerTool> InDet::SiTrkAlignDBTool::m_sctGeoManager
private

Definition at line 109 of file SiTrkAlignDBTool.h.

◆ m_sctHelper

const SCT_ID* InDet::SiTrkAlignDBTool::m_sctHelper
private

pointer to SCT detector manager

Definition at line 90 of file SiTrkAlignDBTool.h.

◆ m_siAlignLevel

int InDet::SiTrkAlignDBTool::m_siAlignLevel
private

Definition at line 123 of file SiTrkAlignDBTool.h.

◆ m_siGeoManager

ToolHandle<Trk::IGeometryManagerTool> InDet::SiTrkAlignDBTool::m_siGeoManager
private

Definition at line 110 of file SiTrkAlignDBTool.h.

◆ m_SQLiteTag

std::string InDet::SiTrkAlignDBTool::m_SQLiteTag
private

tag name for the ConditionsDB

Definition at line 94 of file SiTrkAlignDBTool.h.

◆ m_updateConstants

bool InDet::SiTrkAlignDBTool::m_updateConstants
private

flag whether to update the constants

Definition at line 103 of file SiTrkAlignDBTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeAsL16

bool InDet::SiTrkAlignDBTool::m_writeAsL16
private

Definition at line 131 of file SiTrkAlignDBTool.h.

◆ m_writeAsL2

bool InDet::SiTrkAlignDBTool::m_writeAsL2
private

Definition at line 130 of file SiTrkAlignDBTool.h.

◆ m_writeAsL3

bool InDet::SiTrkAlignDBTool::m_writeAsL3
private

Definition at line 129 of file SiTrkAlignDBTool.h.

◆ m_writeOldConstants

bool InDet::SiTrkAlignDBTool::m_writeOldConstants
private

flag whether to write out the initial constants into text file

Definition at line 99 of file SiTrkAlignDBTool.h.

◆ m_writeSQLFile

bool InDet::SiTrkAlignDBTool::m_writeSQLFile
private

flag wether to write out .db file or not (file is not needed in parallel jobs)

Definition at line 93 of file SiTrkAlignDBTool.h.

◆ m_writeTextFile

bool InDet::SiTrkAlignDBTool::m_writeTextFile
private

flag whether to write out the final constants into text file

Definition at line 98 of file SiTrkAlignDBTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
InDet::SiTrkAlignDBTool::m_sctAlignLevelEndcaps
int m_sctAlignLevelEndcaps
Definition: SiTrkAlignDBTool.h:121
InDet::SiTrkAlignDBTool::m_oldIBLDistFile
std::string m_oldIBLDistFile
filename for the textfile with initial IBLDist params
Definition: SiTrkAlignDBTool.h:100
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::AlignModule::TransZ
@ TransZ
Definition: AlignModule.h:54
InDet::SiTrkAlignDBTool::m_writeAsL3
bool m_writeAsL3
Definition: SiTrkAlignDBTool.h:129
InDet::SiTrkAlignDBTool::m_sctGeoManager
ToolHandle< Trk::IGeometryManagerTool > m_sctGeoManager
Definition: SiTrkAlignDBTool.h:109
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::SiTrkAlignDBTool::m_doSi
bool m_doSi
Definition: SiTrkAlignDBTool.h:125
InDet::SiTrkAlignDBTool::m_SQLiteTag
std::string m_SQLiteTag
tag name for the ConditionsDB
Definition: SiTrkAlignDBTool.h:94
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDet::SiTrkAlignDBTool::m_writeOldConstants
bool m_writeOldConstants
flag whether to write out the initial constants into text file
Definition: SiTrkAlignDBTool.h:99
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::AlignModule
Definition: AlignModule.h:45
InDet::SiTrkAlignDBTool::updateAsL3
void updateAsL3(const Trk::AlignModule *module, const Amg::Transform3D &transform, double)
Definition: SiTrkAlignDBTool.cxx:639
InDet::SiTrkAlignDBTool::m_doSCT
bool m_doSCT
Definition: SiTrkAlignDBTool.h:127
InDet::SiTrkAlignDBTool::m_siGeoManager
ToolHandle< Trk::IGeometryManagerTool > m_siGeoManager
Definition: SiTrkAlignDBTool.h:110
Trk::AlignModule::Pixel
@ Pixel
Definition: AlignModule.h:57
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
InDet::SiTrkAlignDBTool::updateAsL16
void updateAsL16(const Trk::AlignModule *module, double)
Definition: SiTrkAlignDBTool.cxx:807
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDet::SiTrkAlignDBTool::m_pixelGeoManager
ToolHandle< Trk::IGeometryManagerTool > m_pixelGeoManager
Definition: SiTrkAlignDBTool.h:108
InDet::SiTrkAlignDBTool::m_sctAlignLevel
int m_sctAlignLevel
Definition: SiTrkAlignDBTool.h:119
InDet::SiTrkAlignDBTool::checkPixelLevel
bool checkPixelLevel()
Definition: SiTrkAlignDBTool.cxx:233
InDet::SiTrkAlignDBTool::m_writeSQLFile
bool m_writeSQLFile
flag wether to write out .db file or not (file is not needed in parallel jobs)
Definition: SiTrkAlignDBTool.h:93
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::SiTrkAlignDBTool::checkSiLevel
bool checkSiLevel()
Definition: SiTrkAlignDBTool.cxx:329
InDet::SiTrkAlignDBTool::m_idHelper
const AtlasDetectorID * m_idHelper
Definition: SiTrkAlignDBTool.h:91
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
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
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
InDet::SiTrkAlignDBTool::m_IDAlignDBTool
ToolHandle< IInDetAlignDBTool > m_IDAlignDBTool
Definition: SiTrkAlignDBTool.h:105
Trk::AlignPar::par
double par() const
returns final parameter and error
Definition: AlignPar.h:61
InDet::SiTrkAlignDBTool::m_siAlignLevel
int m_siAlignLevel
Definition: SiTrkAlignDBTool.h:123
InDet::SiTrkAlignDBTool::m_updateConstants
bool m_updateConstants
flag whether to update the constants
Definition: SiTrkAlignDBTool.h:103
InDet::SiTrkAlignDBTool::updateDB
void updateDB()
updates alignment constants in the DB
Definition: SiTrkAlignDBTool.cxx:380
Trk::AlignModule::BowX
@ BowX
Definition: AlignModule.h:54
python.PyAthena.module
module
Definition: PyAthena.py:131
InDet::SiTrkAlignDBTool::m_outputAlignFile
std::string m_outputAlignFile
filename for the textfile with final alignment constants
Definition: SiTrkAlignDBTool.h:95
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
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
InDetDD::SiDetectorElement::moduleTransform
const Amg::Transform3D & moduleTransform() const
Module to global frame transform.
Definition: SiDetectorElement.cxx:173
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
InDet::SiTrkAlignDBTool::m_outIBLDistFile
std::string m_outIBLDistFile
filename for the textfile with final IBLDist params
Definition: SiTrkAlignDBTool.h:96
InDet::SiTrkAlignDBTool::m_pixelaAlignDBM
bool m_pixelaAlignDBM
Definition: SiTrkAlignDBTool.h:117
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
file
TFile * file
Definition: tile_monitor.h:29
InDet::SiTrkAlignDBTool::m_outGlobalFolderFile
std::string m_outGlobalFolderFile
filename for the textfile with final GlobalFolder constants
Definition: SiTrkAlignDBTool.h:97
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::AlignModule::RotX
@ RotX
Definition: AlignModule.h:54
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::AlignModule::SCT
@ SCT
Definition: AlignModule.h:57
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
InDet::SiTrkAlignDBTool::printTransform
void printTransform(const Amg::Transform3D &tr) const
Definition: SiTrkAlignDBTool.cxx:854
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
InDet::SiTrkAlignDBTool::m_oldAlignFile
std::string m_oldAlignFile
filename for the textfile with initial alignment constants
Definition: SiTrkAlignDBTool.h:101
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
InDet::SiTrkAlignDBTool::m_pixelAlignLevelBarrel
int m_pixelAlignLevelBarrel
Definition: SiTrkAlignDBTool.h:115
InDet::SiTrkAlignDBTool::m_writeTextFile
bool m_writeTextFile
flag whether to write out the final constants into text file
Definition: SiTrkAlignDBTool.h:98
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
InDet::SiTrkAlignDBTool::GetL1L2fromL3Identifier
virtual Identifier GetL1L2fromL3Identifier(const Identifier &ident, const int &level) const
convert L3 module identifier to L1 or L2
Definition: SiTrkAlignDBTool.cxx:866
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
Trk::AlignModule::DetectorType
DetectorType
Definition: AlignModule.h:57
InDet::SiTrkAlignDBTool::m_alignModuleTool
ToolHandle< Trk::IAlignModuleTool > m_alignModuleTool
Definition: SiTrkAlignDBTool.h:106
InDet::SiTrkAlignDBTool::m_oldGlobalFolderFile
std::string m_oldGlobalFolderFile
filename for the textfile with initial GlobalFolder constants
Definition: SiTrkAlignDBTool.h:102
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
Trk::ITrkAlignDBTool::m_logStream
std::ostream * m_logStream
logfile output stream
Definition: ITrkAlignDBTool.h:55
TRT::Hit::ident
@ ident
Definition: HitInfo.h:77
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::SiTrkAlignDBTool::m_sctHelper
const SCT_ID * m_sctHelper
pointer to SCT detector manager
Definition: SiTrkAlignDBTool.h:90
InDet::SiTrkAlignDBTool::m_ntuple
TFile * m_ntuple
Definition: SiTrkAlignDBTool.h:112
Trk::AlignModule::TransX
@ TransX
Definition: AlignModule.h:54
InDet::SiTrkAlignDBTool::m_pixelAlignLevel
int m_pixelAlignLevel
Definition: SiTrkAlignDBTool.h:114
a
TList * a
Definition: liststreamerinfos.cxx:10
h
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::AlignModule::RotY
@ RotY
Definition: AlignModule.h:54
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
InDet::SiTrkAlignDBTool::m_pixHelper
const PixelID * m_pixHelper
pointer to PIX detector manager
Definition: SiTrkAlignDBTool.h:89
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
InDet::SiTrkAlignDBTool::m_sctAlignLevelBarrel
int m_sctAlignLevelBarrel
Definition: SiTrkAlignDBTool.h:120
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
InDet::SiTrkAlignDBTool::updateAsL2
void updateAsL2(const Trk::AlignModule *module, const Amg::Transform3D &transform, const int)
Definition: SiTrkAlignDBTool.cxx:736
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
InDet::SiTrkAlignDBTool::m_doPixel
bool m_doPixel
Definition: SiTrkAlignDBTool.h:126
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
Trk::AlignModule::RotZ
@ RotZ
Definition: AlignModule.h:54
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
InDet::SiTrkAlignDBTool::checkSCTLevel
bool checkSCTLevel()
Definition: SiTrkAlignDBTool.cxx:291
InDet::SiTrkAlignDBTool::m_writeAsL16
bool m_writeAsL16
Definition: SiTrkAlignDBTool.h:131
Trk::AlignModule::TransY
@ TransY
Definition: AlignModule.h:54
InDet::SiTrkAlignDBTool::m_pixelAlignLevelEndcaps
int m_pixelAlignLevelEndcaps
Definition: SiTrkAlignDBTool.h:116
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDet::SiTrkAlignDBTool::updateSiL0asL1
void updateSiL0asL1(Identifier idL0, const Amg::Transform3D &transform)
Definition: SiTrkAlignDBTool.cxx:586
InDet::SiTrkAlignDBTool::m_writeAsL2
bool m_writeAsL2
Definition: SiTrkAlignDBTool.h:130
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
fitman.k
k
Definition: fitman.py:528
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
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
Identifier
Definition: IdentifierFieldParser.cxx:14