ATLAS Offline Software
Loading...
Searching...
No Matches
GlobalChi2AlignTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRKGLOBALCHI2ALIGNTOOLS_GLOBALCHI2ALIGNTOOL_H
6#define TRKGLOBALCHI2ALIGNTOOLS_GLOBALCHI2ALIGNTOOL_H
7
8#include "GaudiKernel/ToolHandle.h"
10
13
14//#include "TMatrixD.h"
15
16#include <string>
17
30
31class TFile;
32class TTree;
33
34namespace Trk {
35 class Track;
36 class IMatrixTool;
37 class IAlignModuleTool;
38
39 class GlobalChi2AlignTool : virtual public IAlignTool, public AthAlgTool {
40 public:
41
43 GlobalChi2AlignTool(const std::string& type, const std::string& name,
44 const IInterface* parent);
45
47 virtual ~GlobalChi2AlignTool();
48
50 virtual StatusCode initialize();
51
53 virtual StatusCode finalize();
54
56 virtual StatusCode firstEventInitialize();
57
59 virtual StatusCode solve();
60
62 bool accumulate(AlignTrack* alignTrack);
63
66
68 unsigned int nAccumulatedTracks() { return m_ntracks; };
69
71 void setNtuple(TFile* ntuple) { m_ntuple=ntuple; }
72
74 void setLogStream(std::ostream * os);
75
77 StatusCode fillNtuple();
78
79 private:
80
81 double getMaterialOnTrack(const Trk::Track* track);
82
84 ToolHandle <Trk::IMatrixTool> m_matrixTool;
85
87 ToolHandle <Trk::IAlignModuleTool> m_alignModuleTool;
88
89 std::string m_pathbin;
90 std::string m_pathtxt;
91 std::string m_prefixName;
92
93 unsigned int m_ntracks;
94 unsigned int m_nmeas;
95 unsigned int m_nhits;
96 double m_chi2;
97 unsigned int m_nDoF;
98
103
105 TFile* m_ntuple;
106 TTree* m_tree;
107 int m_run;
119 double m_eta;
120 double m_phi;
131
133
134 }; // end of class
135
136} // End of namespace
137
138#endif // TRKALIGNGENTOOLS_MATRIXTOOL_H
139
140
141
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Interface for tool used to manipulate matrix and vector entries and to solve for alignment parameters...
std::string m_pathtxt
path ascii files (in/out)
unsigned int m_nhits
number of accumulated hits
bool accumulate(AlignTrack *alignTrack)
accumulates information from an AlignTrack
void setLogStream(std::ostream *os)
sets the output stream for the logfile
std::string m_prefixName
prefix string to filenames
virtual ~GlobalChi2AlignTool()
Virtual destructor.
StatusCode fillNtuple()
writes tree to ntuple
virtual StatusCode initialize()
initialize
unsigned int nAccumulatedTracks()
returns total number of accumulated tracks
TFile * m_ntuple
output ntuple
bool accumulateFromFiles()
accumulates information from binary files
unsigned int m_ntracks
number of accumulated tracks
double getMaterialOnTrack(const Trk::Track *track)
virtual StatusCode solve()
solves for alignment parameters
ToolHandle< Trk::IMatrixTool > m_matrixTool
Pointer to MatrixTool, used to write to and solve matrix.
void setNtuple(TFile *ntuple)
set ntuple
GlobalChi2AlignTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
unsigned int m_nmeas
number of accumulated measurements
std::string m_pathbin
path binary files (in/out)
ToolHandle< Trk::IAlignModuleTool > m_alignModuleTool
Pointer to AlignModuleTool.
virtual StatusCode finalize()
finalize
virtual StatusCode firstEventInitialize()
sets up matrix
unsigned int m_nDoF
number of degrees of freedom
Ensure that the ATLAS eigen extensions are properly loaded.