ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkEvent
VxVertex
src
RecVertex.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/***************************************************************************
6
RecVertex.cxx - Description
7
-------------------
8
begin : Autumn 2003
9
authors : Andreas Wildauer (CERN PH-ATC), Fredrik Akesson (CERN PH-ATC)
10
email : andreas.wildauer@cern.ch, fredrik.akesson@cern.ch
11
comments: original version by M. Elsing
12
changes : 05/12/06 Kirill.Prokofiev@cern.ch EDM cleanup, switch to the fit
13
quality instead of direct use of chi2 and ndf.
14
15
***************************************************************************/
16
17
#include "
VxVertex/RecVertex.h
"
18
#include "GaudiKernel/MsgStream.h"
19
#include "
EventPrimitives/EventPrimitivesToStringConverter.h
"
20
21
namespace
Trk
{
22
23
RecVertex::RecVertex
() :
24
Vertex
(),
m_fitQuality
(
Trk
::
FitQuality
(0.,0.)) {}
25
26
RecVertex::RecVertex
(
const
Vertex
& pos) :
27
Vertex
(pos),
28
m_positionCovariance(3,3),
29
m_fitQuality
(
Trk
::
FitQuality
(0.,0.))
30
{
31
m_positionCovariance.setZero();
32
}
33
34
RecVertex::RecVertex
(
const
Amg::Vector3D
&pos,
const
AmgSymMatrix
(3) &cov,
35
const
double
ndf,
const
double
chi2
) :
36
Vertex
(pos), m_positionCovariance(cov),
m_fitQuality
(
Trk
::
FitQuality
(
chi2
,ndf))
37
{}
38
39
RecVertex::RecVertex
(
const
Amg::Vector3D
&pos,
const
double
ndf,
const
double
chi2
) :
40
Vertex
(pos), m_positionCovariance(3,3),
41
m_fitQuality
(
Trk
::
FitQuality
(
chi2
,ndf))
42
{
43
m_positionCovariance.setZero();
44
}
45
46
MsgStream&
RecVertex::dump
(MsgStream& sl)
const
{
47
sl <<
"Trk::RecVertex: "
<< std::endl;
48
Vertex::dump(sl);
49
sl <<
Amg::toString
(m_positionCovariance) << std::endl;
50
sl <<
m_fitQuality
<<
endmsg
;
51
return
sl;
52
}
53
54
std::ostream&
RecVertex::dump
(std::ostream& sl)
const
{
55
sl <<
"Trk::RecVertex: "
<< std::endl;
56
Vertex::dump(sl);
57
sl <<
Amg::toString
(m_positionCovariance) << std::endl;
58
sl <<
m_fitQuality
<< std::endl;
59
return
sl;
60
}
61
62
RecVertex::~RecVertex
() =
default
;
63
64
const
Trk::FitQuality
&
RecVertex::fitQuality
()
const
65
{
return
m_fitQuality
;}
66
67
const
AmgSymMatrix
(3)& RecVertex::covariancePosition()
const
68
{
return
m_positionCovariance; }
69
70
void
RecVertex::scaleError
(
float
factor) {
71
//scale covariance matrix in *weight* representation
72
m_positionCovariance *= 1./factor;
73
}
74
75
}
// end of namespace
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
EventPrimitivesToStringConverter.h
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition
EventPrimitives.h:50
RecVertex.h
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition
FitQuality.h:97
Trk::RecVertex::dump
virtual MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition
RecVertex.cxx:46
Trk::RecVertex::~RecVertex
virtual ~RecVertex()
Destructor.
Trk::RecVertex::m_fitQuality
Trk::FitQuality m_fitQuality
Definition
RecVertex.h:115
Trk::RecVertex::scaleError
void scaleError(float factor)
Error scaling method.
Trk::RecVertex::RecVertex
RecVertex()
Default constructor, if called initializes a RecVertex with all data members set to 0.
Definition
RecVertex.cxx:23
Trk::RecVertex::fitQuality
const Trk::FitQuality & fitQuality() const
Fit quality access method.
Definition
RecVertex.cxx:64
Trk::Vertex::Vertex
Vertex()
Contructors: default, copy and a constructor taking a vertex position (Amg::Vector3D) as argument.
Definition
Vertex.cxx:21
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition
comparitor.cxx:525
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition
GeoPrimitivesToStringConverter.h:40
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Generated on
for ATLAS Offline Software by
1.17.0