CbmRoot
Loading...
Searching...
No Matches
KfVertex.cxx
Go to the documentation of this file.
1/* Copyright (C) 2007-2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergey Gorbunov [committer] */
4
5
10
11
12#include "KfVertex.h"
13
14#include "KfUtils.h"
15
16#include <iomanip>
17#include <iostream>
18
19namespace cbm::algo::kf
20{
21 template<typename T>
22 std::string Vertex<T>::ToString() const
23 {
24 std::stringstream s;
25 s.setf(std::ios::scientific, std::ios::floatfield);
26
27 s << "Pars = " << std::endl;
28 s << " x " << GetX() << std::endl;
29 s << " y " << GetY() << std::endl;
30 s << " z " << GetZ() << std::endl;
31 s << " t " << GetTime() << std::endl;
32 s << "C = " << std::endl;
33 s << fCovMatrix.ToStringCorrelations() << std::endl;
34 s << " chi2 " << ChiSq() << std::endl;
35 s << " ndf " << Ndf() << std::endl;
36 s << " chi2 time " << ChiSqTime() << std::endl;
37 s << " ndf time " << NdfTime() << std::endl;
38 s << " nof tracks " << NofTracks() << std::endl;
39 return s.str();
40 }
41
42
43 // template instantiations
44
45 template class Vertex<float>;
46 template class Vertex<double>;
47
48} // namespace cbm::algo::kf
header file for the kf::Vertex class
The class describes a reconstructed vertex.
Definition KfVertex.h:35
std::string ToString() const
Prints parameters to a string.
Definition KfVertex.cxx:22
T GetX() const
nof tracks used
Definition KfVertex.h:64
T GetZ() const
z position [cm]
Definition KfVertex.h:66
int32_t Ndf() const
nof degrees of freedom
Definition KfVertex.h:59
T GetY() const
y position [cm]
Definition KfVertex.h:65
int32_t NofTracks() const
Definition KfVertex.h:62
CovMatrix_t fCovMatrix
covariance matrix
Definition KfVertex.h:152
T ChiSqTime() const
chi2 time
Definition KfVertex.h:60
int32_t NdfTime() const
nof degrees of freedom time
Definition KfVertex.h:61
T GetTime() const
t position [cm]
Definition KfVertex.h:67
T ChiSq() const
chi2
Definition KfVertex.h:58