ATLAS Offline Software
AlignAlg.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 TRKALIGNGENALGS_ALIGNALG_H
6 #define TRKALIGNGENALGS_ALIGNALG_H
7 
8 #include "GaudiKernel/ToolHandle.h"
10 
14 
15 #include <string>
16 #include <fstream>
17 
30 namespace Trk {
31 
33  class IFillNtupleTool;
34  class ITrkAlignDBTool;
37 
38  class AlignAlg : public AthAlgorithm {
39 
40  public:
41 
43  AlignAlg(const std::string& name, ISvcLocator* pSvcLocator);
44 
46  virtual ~AlignAlg();
47 
49  virtual StatusCode initialize();
50 
52  virtual StatusCode start();
53 
55  virtual StatusCode execute();
56 
58  virtual StatusCode stop();
59 
61  virtual StatusCode finalize();
62 
65 
66  /*
67  int nDoF() { return m_nDoF; }
68 
69  const AlignModuleList* moduleList() const { return m_modules; }
70 
71  bool doPixel() const { return m_doPixel; }
72  bool doSCT() const { return m_doSCT; }
73  bool doTRT() const { return m_doTRT; }
74  bool doMDT() const { return m_doMDT; }
75 
76  ToolHandle<IFillNtupleTool>* fillNtupleTool() { return &m_fillNtupleTool; }
77  */
78 
79  private:
80 
81  ToolHandle <ITrackCollectionProvider> m_trackCollectionProvider;
82 
84  ToolHandle<IAlignTrackPreProcessor> m_alignTrackPreProcessor;
85 
87  ToolHandle <IAlignTrackCreator> m_alignTrackCreator;
88 
90  ToolHandle <IAlignTrackDresser> m_alignTrackDresser;
91 
93  ToolHandle <IAlignTool> m_alignTool;
94 
96  ToolHandle <IGeometryManagerTool> m_geometryManagerTool;
97 
99  ToolHandle <ITrkAlignDBTool> m_trkAlignDBTool;
100 
102  ToolHandle <IFillNtupleTool> m_fillNtupleTool;
103 
104 
105  // various job options
106  std::string m_filename;
107  std::string m_filepath;
108 
109  bool m_solveOnly;
111 
113 
114  int m_nDoF;
115 
116  TFile* m_ntuple;
118  std::string m_logfileName;
119  std::ostream * m_logStream;
120 
121  int m_nevents;
122  int m_ntracks;
127 
128  std::string m_alignTracksName;
129 
130  };
131 
132 } // end namespace
133 
134 #endif // TRKALIGNGENALGS_ALIGNALG_H
IAlignTrackDresser.h
Trk::AlignAlg::m_ntracksSel
int m_ntracksSel
number of selected tracks
Definition: AlignAlg.h:123
Trk::AlignAlg::m_ntracksProc
int m_ntracksProc
number of tracks successfully processed
Definition: AlignAlg.h:124
Trk::AlignAlg::m_fillNtupleTool
ToolHandle< IFillNtupleTool > m_fillNtupleTool
Pointer to FillNtupleTool, used to write track information to ntuple.
Definition: AlignAlg.h:102
Trk::AlignAlg::finalize
virtual StatusCode finalize()
finalize method
Definition: AlignAlg.cxx:484
Trk::AlignAlg::m_writeNtuple
bool m_writeNtuple
write track and event information to ntuple
Definition: AlignAlg.h:110
Trk::AlignAlg::m_ntracksDress
int m_ntracksDress
number of tracks successfully dressed
Definition: AlignAlg.h:125
IAlignTool.h
ITrackCollectionProvider
Interface for tool used to get a collection of tracks.
Trk::AlignAlg::start
virtual StatusCode start()
set up geometry and prepare the tools
Definition: AlignAlg.cxx:210
Trk::AlignAlg::initialize
virtual StatusCode initialize()
initialize method
Definition: AlignAlg.cxx:97
Trk::AlignAlg::m_nDoF
int m_nDoF
Number of degrees of freedom = sum over chambers(DoF per chamber)
Definition: AlignAlg.h:114
Trk::AlignAlg::stop
virtual StatusCode stop()
processes information accumulated in execute method to determine alignment parameters
Definition: AlignAlg.cxx:412
IAlignTrackCreator.h
Trk::AlignAlg::m_alignTrackCreator
ToolHandle< IAlignTrackCreator > m_alignTrackCreator
Pointer to alignTrackCreator, used to convert Trk::Track to vector of AlignTrack.
Definition: AlignAlg.h:87
Trk::AlignAlg::m_ntracksAccum
int m_ntracksAccum
number of tracks successfully accumulated
Definition: AlignAlg.h:126
Trk::AlignAlg::m_ntuple
TFile * m_ntuple
output ntuple
Definition: AlignAlg.h:116
Trk::AlignAlg::m_solveOnly
bool m_solveOnly
only do the solving (accumulate from binaries)
Definition: AlignAlg.h:109
Trk::AlignAlg::AlignAlg
AlignAlg(const std::string &name, ISvcLocator *pSvcLocator)
constructor
Definition: AlignAlg.cxx:23
Trk::AlignAlg::m_alignTracksName
std::string m_alignTracksName
name of the AlignTrack collection in the StoreGate
Definition: AlignAlg.h:128
AthAlgorithm.h
Trk::AlignAlg::m_trackCollectionProvider
ToolHandle< ITrackCollectionProvider > m_trackCollectionProvider
Definition: AlignAlg.h:81
Trk::AlignAlg::m_trkAlignDBTool
ToolHandle< ITrkAlignDBTool > m_trkAlignDBTool
Pointer to TrkAlignDBTool, used for reading/writing alignment parameters from/to the database.
Definition: AlignAlg.h:99
Trk::AlignAlg::m_logStream
std::ostream * m_logStream
logfile output stream
Definition: AlignAlg.h:119
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IGeometryManagerTool
Interface for tool used to build the AlignModules to be used for alignment. The implementation is spe...
Trk::AlignAlg::m_alignSolveLevel
int m_alignSolveLevel
Set the Alignment Solve Level.
Definition: AlignAlg.h:112
IFillNtupleTool
Interface for tool used to fill an ntuple with useful information for debugging, etc....
Trk::AlignAlg::m_alignTrackDresser
ToolHandle< IAlignTrackDresser > m_alignTrackDresser
Pointer to alignTrackDresser, used to add residuals, derivatives, etc.
Definition: AlignAlg.h:90
Trk::AlignAlg::m_ntracks
int m_ntracks
number of processed tracks
Definition: AlignAlg.h:122
AthAlgorithm
Definition: AthAlgorithm.h:47
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::AlignAlg::~AlignAlg
virtual ~AlignAlg()
destructor
Definition: AlignAlg.cxx:86
Trk::AlignAlg::execute
virtual StatusCode execute()
loops over tracks in event, and accumulates information necessary for alignmnet
Definition: AlignAlg.cxx:250
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::AlignAlg::m_alignTool
ToolHandle< IAlignTool > m_alignTool
Pointer to alignTool.
Definition: AlignAlg.h:93
IAlignTrackPreProcessor
Generic interface for alignment algtools which process a track collection and return a collection of ...
Trk::AlignAlg
Definition: AlignAlg.h:38
Trk::AlignAlg::m_geometryManagerTool
ToolHandle< IGeometryManagerTool > m_geometryManagerTool
Pointer to GeometryManagerTool, used to get lists of chambers for which alignment parameters will be ...
Definition: AlignAlg.h:96
Trk::AlignAlg::m_alignTrackPreProcessor
ToolHandle< IAlignTrackPreProcessor > m_alignTrackPreProcessor
Pointer to AlignTrackPreProcessor, used to select hits on tracks and/or tracks before passing to Alig...
Definition: AlignAlg.h:84
ITrkAlignDBTool
Interface for tool use for managing list of AlignModules, detector elements in AlignModules,...
Trk::AlignAlg::m_filename
std::string m_filename
name of ntuple file
Definition: AlignAlg.h:106
Trk::AlignAlg::m_writeLogfile
bool m_writeLogfile
write a logfile for solving
Definition: AlignAlg.h:117
Trk::AlignAlg::m_filepath
std::string m_filepath
path to ntuple file
Definition: AlignAlg.h:107
Trk::AlignAlg::showStatistics
void showStatistics()
dumps statistics accumulated in each event
Trk::AlignAlg::m_logfileName
std::string m_logfileName
name of the logfile
Definition: AlignAlg.h:118
Trk::AlignAlg::m_nevents
int m_nevents
number of processed events
Definition: AlignAlg.h:121