ATLAS Offline Software
Loading...
Searching...
No Matches
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"
20
21namespace Trk {
22
25
27 Vertex(pos),
28 m_positionCovariance(3,3),
30 {
31 m_positionCovariance.setZero();
32 }
33
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),
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
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
#define endmsg
#define AmgSymMatrix(dim)
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition FitQuality.h:97
virtual MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition RecVertex.cxx:46
virtual ~RecVertex()
Destructor.
Trk::FitQuality m_fitQuality
Definition RecVertex.h:115
void scaleError(float factor)
Error scaling method.
RecVertex()
Default constructor, if called initializes a RecVertex with all data members set to 0.
Definition RecVertex.cxx:23
const Trk::FitQuality & fitQuality() const
Fit quality access method.
Definition RecVertex.cxx:64
Vertex()
Contructors: default, copy and a constructor taking a vertex position (Amg::Vector3D) as argument.
Definition Vertex.cxx:21
double chi2(TH1 *h0, TH1 *h1)
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.