ATLAS Offline Software
SiTrkAlignDBTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETALIGNDBTOOLS_SITRKALIGNDBTOOL_H
6 #define INDETALIGNDBTOOLS_SITRKALIGNDBTOOL_H
7 
10 
12 
24 class TFile;
25 
26 class PixelID;
27 class SCT_ID;
28 class AtlasDetectorID;
29 
30 class Identifier;
31 
32 class IInDetAlignDBTool;
33 
34 namespace Trk
35 {
36  class AlignModule;
37  class IAlignModuleTool;
39 }
40 
41 namespace InDet
42 {
43 
44  class SiTrkAlignDBTool : virtual public Trk::ITrkAlignDBTool, public AthAlgTool {
45 
46  public:
47 
49  SiTrkAlignDBTool(const std::string & type, const std::string & name, const IInterface * parent);
50 
52  virtual ~SiTrkAlignDBTool();
53 
55  virtual StatusCode initialize();
56 
58  virtual StatusCode finalize();
59 
61  void writeAlignPar();
62 
64  void setNtuple(TFile * file)
65  { m_ntuple=file; }
66 
67 
68  private:
69 
71  void updateDB();
72 
73  bool checkPixelLevel();
74  bool checkSCTLevel();
75  bool checkSiLevel();
76 
78 
79  void updateAsL3(const Trk::AlignModule * module, const Amg::Transform3D & transform, double);
80 
81  void printTransform(const Amg::Transform3D & tr) const;
82 
83  void updateAsL2(const Trk::AlignModule * module, const Amg::Transform3D & transform, const int);
84 
85  void updateAsL16(const Trk::AlignModule * module, double);
86 
87  virtual Identifier GetL1L2fromL3Identifier( const Identifier& ident , const int& level) const ;
88 
89  const PixelID * m_pixHelper;
90  const SCT_ID * m_sctHelper;
92 
94  std::string m_SQLiteTag;
95  std::string m_outputAlignFile;
96  std::string m_outIBLDistFile;
97  std::string m_outGlobalFolderFile;
100  std::string m_oldIBLDistFile;
101  std::string m_oldAlignFile;
102  std::string m_oldGlobalFolderFile;
104 
105  ToolHandle<IInDetAlignDBTool> m_IDAlignDBTool;
106  ToolHandle<Trk::IAlignModuleTool> m_alignModuleTool;
107 
108  ToolHandle<Trk::IGeometryManagerTool> m_pixelGeoManager;
109  ToolHandle<Trk::IGeometryManagerTool> m_sctGeoManager;
110  ToolHandle<Trk::IGeometryManagerTool> m_siGeoManager;
111 
112  TFile * m_ntuple;
113 
118 
122 
124 
125  bool m_doSi;
126  bool m_doPixel;
127  bool m_doSCT;
128 
132 
133  }; // end class
134 
135 } // end namespace
136 
137 #endif // INDETALIGNDBTOOLS_SITRKALIGNDBTOOL_H
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
InDet::SiTrkAlignDBTool::m_writeAsL3
bool m_writeAsL3
Definition: SiTrkAlignDBTool.h:129
InDet::SiTrkAlignDBTool::m_sctGeoManager
ToolHandle< Trk::IGeometryManagerTool > m_sctGeoManager
Definition: SiTrkAlignDBTool.h:109
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
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::SiTrkAlignDBTool::setNtuple
void setNtuple(TFile *file)
sets ntuple to be used to write output
Definition: SiTrkAlignDBTool.h:64
InDet::SiTrkAlignDBTool::m_writeOldConstants
bool m_writeOldConstants
flag whether to write out the initial constants into text file
Definition: SiTrkAlignDBTool.h:99
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
InDet::SiTrkAlignDBTool::updateAsL16
void updateAsL16(const Trk::AlignModule *module, double)
Definition: SiTrkAlignDBTool.cxx:807
ITrkAlignDBTool.h
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
InDet::SiTrkAlignDBTool::initialize
virtual StatusCode initialize()
initialize method
Definition: SiTrkAlignDBTool.cxx:102
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
InDet::SiTrkAlignDBTool::m_IDAlignDBTool
ToolHandle< IInDetAlignDBTool > m_IDAlignDBTool
Definition: SiTrkAlignDBTool.h:105
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
AlignModule
AlignModule is a grouping of TrkDetElementBase objects, grouped according to the type of alignment,...
python.PyAthena.module
module
Definition: PyAthena.py:131
GeoPrimitives.h
InDet::SiTrkAlignDBTool::m_outputAlignFile
std::string m_outputAlignFile
filename for the textfile with final alignment constants
Definition: SiTrkAlignDBTool.h:95
InDet::SiTrkAlignDBTool::finalize
virtual StatusCode finalize()
finalize method
Definition: SiTrkAlignDBTool.cxx:225
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::SiTrkAlignDBTool::m_outIBLDistFile
std::string m_outIBLDistFile
filename for the textfile with final IBLDist params
Definition: SiTrkAlignDBTool.h:96
IGeometryManagerTool
Interface for tool used to build the AlignModules to be used for alignment. The implementation is spe...
InDet::SiTrkAlignDBTool::m_pixelaAlignDBM
bool m_pixelaAlignDBM
Definition: SiTrkAlignDBTool.h:117
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AthAlgTool.h
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
IInDetAlignDBTool
Definition: IInDetAlignDBTool.h:23
InDet::SiTrkAlignDBTool::printTransform
void printTransform(const Amg::Transform3D &tr) const
Definition: SiTrkAlignDBTool.cxx:854
InDet::SiTrkAlignDBTool::m_oldAlignFile
std::string m_oldAlignFile
filename for the textfile with initial alignment constants
Definition: SiTrkAlignDBTool.h:101
InDet::SiTrkAlignDBTool::writeAlignPar
void writeAlignPar()
Writes alignment parameters.
Definition: SiTrkAlignDBTool.cxx:347
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
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
InDet::SiTrkAlignDBTool::SiTrkAlignDBTool
SiTrkAlignDBTool(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition: SiTrkAlignDBTool.cxx:36
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
TRT::Hit::ident
@ ident
Definition: HitInfo.h:77
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
InDet::SiTrkAlignDBTool::m_pixelAlignLevel
int m_pixelAlignLevel
Definition: SiTrkAlignDBTool.h:114
SCT_ID
Definition: SCT_ID.h:68
InDet::SiTrkAlignDBTool
Definition: SiTrkAlignDBTool.h:44
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
InDet::SiTrkAlignDBTool::m_sctAlignLevelBarrel
int m_sctAlignLevelBarrel
Definition: SiTrkAlignDBTool.h:120
InDet::SiTrkAlignDBTool::updateAsL2
void updateAsL2(const Trk::AlignModule *module, const Amg::Transform3D &transform, const int)
Definition: SiTrkAlignDBTool.cxx:736
Trk::ITrkAlignDBTool
Definition: ITrkAlignDBTool.h:34
InDet::SiTrkAlignDBTool::m_doPixel
bool m_doPixel
Definition: SiTrkAlignDBTool.h:126
AthAlgTool
Definition: AthAlgTool.h:26
PixelID
Definition: PixelID.h:67
InDet::SiTrkAlignDBTool::checkSCTLevel
bool checkSCTLevel()
Definition: SiTrkAlignDBTool.cxx:291
InDet::SiTrkAlignDBTool::m_writeAsL16
bool m_writeAsL16
Definition: SiTrkAlignDBTool.h:131
InDet::SiTrkAlignDBTool::m_pixelAlignLevelEndcaps
int m_pixelAlignLevelEndcaps
Definition: SiTrkAlignDBTool.h:116
InDet::SiTrkAlignDBTool::updateSiL0asL1
void updateSiL0asL1(Identifier idL0, const Amg::Transform3D &transform)
Definition: SiTrkAlignDBTool.cxx:586
InDet::SiTrkAlignDBTool::~SiTrkAlignDBTool
virtual ~SiTrkAlignDBTool()
destructor
Definition: SiTrkAlignDBTool.cxx:98
InDet::SiTrkAlignDBTool::m_writeAsL2
bool m_writeAsL2
Definition: SiTrkAlignDBTool.h:130
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
Identifier
Definition: IdentifierFieldParser.cxx:14