ATLAS Offline Software
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 
21 namespace Trk {
22 
24  Vertex(), m_fitQuality(Trk::FitQuality(0.,0.)) {}
25 
27  Vertex(pos),
28  m_positionCovariance(3,3),
29  m_fitQuality(Trk::FitQuality(0.,0.))
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),
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;
57  sl << Amg::toString(m_positionCovariance) << std::endl;
58  sl << m_fitQuality << std::endl;
59  return sl;
60  }
61 
62  RecVertex::~RecVertex() = default;
63 
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
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
RecVertex.h
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
Trk::RecVertex::m_fitQuality
Trk::FitQuality m_fitQuality
Definition: RecVertex.h:115
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
Trk::RecVertex::~RecVertex
virtual ~RecVertex()
Destructor.
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
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:33
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
Trk::RecVertex::fitQuality
const Trk::FitQuality & fitQuality() const
Fit quality access method.
Definition: RecVertex.cxx:74
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
EventPrimitivesToStringConverter.h
Trk::Vertex::dump
virtual MsgStream & dump(MsgStream &sl) const
Output Method for MsgStream, to be overloaded by child classes.
Definition: Vertex.cxx:44
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
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:56
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
python.Dumpers.FitQuality
FitQuality
Definition: Dumpers.py:63