ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkAlignment
TrkGlobalChi2AlignTools
TrkGlobalChi2AlignTools
GlobalChi2AlignTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 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"
9
#include "
AthenaBaseComps/AthAlgTool.h
"
10
11
#include "
TrkAlignInterfaces/IAlignTool.h
"
12
#include "
TrkAlignInterfaces/IMatrixTool.h
"
13
#include "
TrkAlignInterfaces/IAlignModuleTool.h
"
14
15
//#include "TMatrixD.h"
16
17
#include <string>
18
31
32
class
TFile;
33
class
TTree;
34
35
namespace
Trk
{
36
class
Track
;
37
38
class
GlobalChi2AlignTool
:
virtual
public
IAlignTool
,
public
AthAlgTool
{
39
public
:
40
42
GlobalChi2AlignTool
(
const
std::string&
type
,
const
std::string& name,
43
const
IInterface* parent);
44
46
virtual
~GlobalChi2AlignTool
();
47
49
virtual
StatusCode
initialize
();
50
52
virtual
StatusCode
finalize
();
53
55
virtual
StatusCode
firstEventInitialize
();
56
58
virtual
StatusCode
solve
();
59
61
bool
accumulate
(
AlignTrack
* alignTrack);
62
64
bool
accumulateFromFiles
();
65
67
unsigned
int
nAccumulatedTracks
() {
return
m_ntracks
; };
68
70
void
setNtuple
(TFile* ntuple) {
m_ntuple
=ntuple; }
71
73
void
setLogStream
(std::ostream * os);
74
76
StatusCode
fillNtuple
();
77
78
private
:
79
80
double
getMaterialOnTrack
(
const
Trk::Track
* track);
81
83
ToolHandle<Trk::IMatrixTool>
m_matrixTool
{
this
,
"MatrixTool"
,
"Trk::MatrixTool"
,
84
"tool for storing and inverting matrix"
};
85
87
PublicToolHandle<Trk::IAlignModuleTool>
m_alignModuleTool
{
this
,
88
"AlignModuleTool"
,
"Trk::AlignModuleTool/AlignModuleTool"
};
89
90
std::string
m_pathbin
;
91
std::string
m_pathtxt
;
92
std::string
m_prefixName
;
93
94
unsigned
int
m_ntracks
= 0;
95
unsigned
int
m_nmeas
= 0;
96
unsigned
int
m_nhits
= 0;
97
double
m_chi2
= 0.;
98
unsigned
int
m_nDoF
= 0;
99
100
Gaudi::Property<double>
m_secondDerivativeCut
{
this
,
"SecondDerivativeCut"
, -1e5};
101
Gaudi::Property<bool>
m_doTree
{
this
,
"DoTree"
,
false
};
102
Gaudi::Property<bool>
m_writeActualSecDeriv
{
this
,
"WriteActualSecDeriv"
,
false
};
103
Gaudi::Property<bool>
m_storeLocalDerivOnly
{
this
,
"StoreLocalDerivOnly"
,
false
};
104
105
static
constexpr
int
MAXNCHAMBERS
=50;
106
static
constexpr
int
MAXNINDICES
=50*6;
107
109
TFile*
m_ntuple
=
nullptr
;
110
TTree*
m_tree
=
nullptr
;
111
int
m_run
{};
112
int
m_event
{};
113
double
m_materialOnTrack
{};
114
double
m_momentum
{};
115
int
m_nChambers
= 0;
116
int
*
m_chamberIds
=
new
int
[
MAXNCHAMBERS
];
117
int
m_nMatrixIndices
= 0;
118
int
*
m_matrixIndices
=
new
int
[
MAXNINDICES
];
119
int
m_nSecndDeriv
= 0;
120
double
*
m_secndDeriv
=
new
double
[
MAXNINDICES
*
MAXNINDICES
];
121
double
*
m_firstDeriv
=
new
double
[
MAXNINDICES
];
122
double
*
m_actualSecndDeriv
=
new
double
[
MAXNINDICES
];
123
double
m_eta
{};
124
double
m_phi
{};
125
double
m_perigee_x
{};
126
double
m_perigee_y
{};
127
double
m_perigee_z
{};
128
int
m_trackInfo
{};
129
int
m_bremFit
{};
130
int
m_bremFitSuccessful
{};
131
int
m_straightTrack
{};
132
int
m_slimmedTrack
{};
133
int
m_hardScatterOrKink
{};
134
int
m_lowPtTrack
{};
135
136
bool
m_fromFiles
=
false
;
137
138
};
// end of class
139
140
}
// End of namespace
141
142
#endif
// TRKALIGNGENTOOLS_MATRIXTOOL_H
143
144
145
AthAlgTool.h
IAlignModuleTool.h
IAlignTool.h
IMatrixTool.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
Trk::AlignTrack
Definition
AlignTrack.h:41
Trk::GlobalChi2AlignTool::m_pathtxt
std::string m_pathtxt
path ascii files (in/out)
Definition
GlobalChi2AlignTool.h:91
Trk::GlobalChi2AlignTool::m_tree
TTree * m_tree
Definition
GlobalChi2AlignTool.h:110
Trk::GlobalChi2AlignTool::m_actualSecndDeriv
double * m_actualSecndDeriv
Definition
GlobalChi2AlignTool.h:122
Trk::GlobalChi2AlignTool::m_alignModuleTool
PublicToolHandle< Trk::IAlignModuleTool > m_alignModuleTool
Pointer to AlignModuleTool.
Definition
GlobalChi2AlignTool.h:87
Trk::GlobalChi2AlignTool::m_nhits
unsigned int m_nhits
number of accumulated hits
Definition
GlobalChi2AlignTool.h:96
Trk::GlobalChi2AlignTool::accumulate
bool accumulate(AlignTrack *alignTrack)
accumulates information from an AlignTrack
Definition
GlobalChi2AlignTool.cxx:95
Trk::GlobalChi2AlignTool::m_trackInfo
int m_trackInfo
Definition
GlobalChi2AlignTool.h:128
Trk::GlobalChi2AlignTool::m_lowPtTrack
int m_lowPtTrack
Definition
GlobalChi2AlignTool.h:134
Trk::GlobalChi2AlignTool::m_chi2
double m_chi2
total chi2
Definition
GlobalChi2AlignTool.h:97
Trk::GlobalChi2AlignTool::m_storeLocalDerivOnly
Gaudi::Property< bool > m_storeLocalDerivOnly
Definition
GlobalChi2AlignTool.h:103
Trk::GlobalChi2AlignTool::setLogStream
void setLogStream(std::ostream *os)
sets the output stream for the logfile
Definition
GlobalChi2AlignTool.cxx:71
Trk::GlobalChi2AlignTool::m_fromFiles
bool m_fromFiles
Definition
GlobalChi2AlignTool.h:136
Trk::GlobalChi2AlignTool::m_momentum
double m_momentum
Definition
GlobalChi2AlignTool.h:114
Trk::GlobalChi2AlignTool::m_chamberIds
int * m_chamberIds
Definition
GlobalChi2AlignTool.h:116
Trk::GlobalChi2AlignTool::m_perigee_x
double m_perigee_x
Definition
GlobalChi2AlignTool.h:125
Trk::GlobalChi2AlignTool::m_firstDeriv
double * m_firstDeriv
Definition
GlobalChi2AlignTool.h:121
Trk::GlobalChi2AlignTool::m_prefixName
std::string m_prefixName
prefix string to filenames
Definition
GlobalChi2AlignTool.h:92
Trk::GlobalChi2AlignTool::~GlobalChi2AlignTool
virtual ~GlobalChi2AlignTool()
Virtual destructor.
Definition
GlobalChi2AlignTool.cxx:46
Trk::GlobalChi2AlignTool::m_writeActualSecDeriv
Gaudi::Property< bool > m_writeActualSecDeriv
Definition
GlobalChi2AlignTool.h:102
Trk::GlobalChi2AlignTool::fillNtuple
StatusCode fillNtuple()
writes tree to ntuple
Definition
GlobalChi2AlignTool.cxx:582
Trk::GlobalChi2AlignTool::m_phi
double m_phi
Definition
GlobalChi2AlignTool.h:124
Trk::GlobalChi2AlignTool::initialize
virtual StatusCode initialize()
initialize
Definition
GlobalChi2AlignTool.cxx:61
Trk::GlobalChi2AlignTool::nAccumulatedTracks
unsigned int nAccumulatedTracks()
returns total number of accumulated tracks
Definition
GlobalChi2AlignTool.h:67
Trk::GlobalChi2AlignTool::m_nSecndDeriv
int m_nSecndDeriv
Definition
GlobalChi2AlignTool.h:119
Trk::GlobalChi2AlignTool::m_ntuple
TFile * m_ntuple
output ntuple
Definition
GlobalChi2AlignTool.h:109
Trk::GlobalChi2AlignTool::accumulateFromFiles
bool accumulateFromFiles()
accumulates information from binary files
Definition
GlobalChi2AlignTool.cxx:526
Trk::GlobalChi2AlignTool::m_bremFitSuccessful
int m_bremFitSuccessful
Definition
GlobalChi2AlignTool.h:130
Trk::GlobalChi2AlignTool::MAXNINDICES
static constexpr int MAXNINDICES
Definition
GlobalChi2AlignTool.h:106
Trk::GlobalChi2AlignTool::m_materialOnTrack
double m_materialOnTrack
Definition
GlobalChi2AlignTool.h:113
Trk::GlobalChi2AlignTool::m_ntracks
unsigned int m_ntracks
number of accumulated tracks
Definition
GlobalChi2AlignTool.h:94
Trk::GlobalChi2AlignTool::getMaterialOnTrack
double getMaterialOnTrack(const Trk::Track *track)
Definition
GlobalChi2AlignTool.cxx:601
Trk::GlobalChi2AlignTool::solve
virtual StatusCode solve()
solves for alignment parameters
Definition
GlobalChi2AlignTool.cxx:542
Trk::GlobalChi2AlignTool::m_secondDerivativeCut
Gaudi::Property< double > m_secondDerivativeCut
Definition
GlobalChi2AlignTool.h:100
Trk::GlobalChi2AlignTool::MAXNCHAMBERS
static constexpr int MAXNCHAMBERS
Definition
GlobalChi2AlignTool.h:105
Trk::GlobalChi2AlignTool::m_perigee_z
double m_perigee_z
Definition
GlobalChi2AlignTool.h:127
Trk::GlobalChi2AlignTool::m_run
int m_run
Definition
GlobalChi2AlignTool.h:111
Trk::GlobalChi2AlignTool::m_matrixTool
ToolHandle< Trk::IMatrixTool > m_matrixTool
Pointer to MatrixTool, used to write to and solve matrix.
Definition
GlobalChi2AlignTool.h:83
Trk::GlobalChi2AlignTool::m_straightTrack
int m_straightTrack
Definition
GlobalChi2AlignTool.h:131
Trk::GlobalChi2AlignTool::setNtuple
void setNtuple(TFile *ntuple)
set ntuple
Definition
GlobalChi2AlignTool.h:70
Trk::GlobalChi2AlignTool::GlobalChi2AlignTool
GlobalChi2AlignTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition
GlobalChi2AlignTool.cxx:37
Trk::GlobalChi2AlignTool::m_hardScatterOrKink
int m_hardScatterOrKink
Definition
GlobalChi2AlignTool.h:133
Trk::GlobalChi2AlignTool::m_secndDeriv
double * m_secndDeriv
Definition
GlobalChi2AlignTool.h:120
Trk::GlobalChi2AlignTool::m_doTree
Gaudi::Property< bool > m_doTree
Definition
GlobalChi2AlignTool.h:101
Trk::GlobalChi2AlignTool::m_nmeas
unsigned int m_nmeas
number of accumulated measurements
Definition
GlobalChi2AlignTool.h:95
Trk::GlobalChi2AlignTool::m_nMatrixIndices
int m_nMatrixIndices
Definition
GlobalChi2AlignTool.h:117
Trk::GlobalChi2AlignTool::m_nChambers
int m_nChambers
Definition
GlobalChi2AlignTool.h:115
Trk::GlobalChi2AlignTool::m_perigee_y
double m_perigee_y
Definition
GlobalChi2AlignTool.h:126
Trk::GlobalChi2AlignTool::m_pathbin
std::string m_pathbin
path binary files (in/out)
Definition
GlobalChi2AlignTool.h:90
Trk::GlobalChi2AlignTool::m_event
int m_event
Definition
GlobalChi2AlignTool.h:112
Trk::GlobalChi2AlignTool::m_slimmedTrack
int m_slimmedTrack
Definition
GlobalChi2AlignTool.h:132
Trk::GlobalChi2AlignTool::finalize
virtual StatusCode finalize()
finalize
Definition
GlobalChi2AlignTool.cxx:594
Trk::GlobalChi2AlignTool::m_eta
double m_eta
Definition
GlobalChi2AlignTool.h:123
Trk::GlobalChi2AlignTool::firstEventInitialize
virtual StatusCode firstEventInitialize()
sets up matrix
Definition
GlobalChi2AlignTool.cxx:78
Trk::GlobalChi2AlignTool::m_matrixIndices
int * m_matrixIndices
Definition
GlobalChi2AlignTool.h:118
Trk::GlobalChi2AlignTool::m_nDoF
unsigned int m_nDoF
number of degrees of freedom
Definition
GlobalChi2AlignTool.h:98
Trk::GlobalChi2AlignTool::m_bremFit
int m_bremFit
Definition
GlobalChi2AlignTool.h:129
Trk::IAlignTool
Definition
IAlignTool.h:32
Trk::Track
The ATLAS Track class.
Definition
Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Track
Definition
TriggerChamberClusterOnTrackCreator.h:19
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
type
Generated on
for ATLAS Offline Software by
1.17.0