11#ifndef KF_CORE_KfVertex_h
12#define KF_CORE_KfVertex_h 1
19#include <boost/serialization/access.hpp>
25#if !defined(NO_ROOT) && !XPU_IS_HIP_CUDA
34 template<
typename T =
double>
127 template<DoPr
intDebug FlagPr
intDebug = DoPr
intDebug::Y>
131 template<DoPr
intDebug FlagPr
intDebug = DoPr
intDebug::Y>
138 template<
class Archive>
160#if !defined(NO_ROOT) && !XPU_IS_HIP_CUDA
182 template<DoPr
intDebug FlagPr
intDebug>
188 auto check = [&](
const std::string& s, T val) {
193 (*ss) <<
" Vertex parameter " << s <<
" is undefined: " << val << std::endl;
203 check(
"chi2",
ChiSq());
207 check(
"nofTracks",
static_cast<T
>(
NofTracks()));
215 template<DoPr
intDebug FlagPr
intDebug>
226 (*ss) <<
" Vertex: invalid chi2/ndf or nofTracks values: "
Common constant definitions for the Kalman Filter library.
Collection of generic mathematical methods.
header file for the kf::MatrixSym class
The class describes a symmetric N x N matrix stored in a low-triangular way.
static constexpr int kNofElements
N of matrix elements.
The class describes a reconstructed vertex.
std::string ToString() const
Prints parameters to a string.
T GetX() const
nof tracks used
void SetNdfTime(int32_t v)
nof degrees of freedom time
void SetZ(T v)
z position [cm]
T GetZ() const
z position [cm]
CovMatrix_t & CovMatrix()
get covariance matrix
bool IsFinite(std::stringstream *ss) const
Checks whether some parameters are finite.
int32_t Ndf() const
nof degrees of freedom
static constexpr int kNofCovParameters
void SetNdf(int32_t v)
nof degrees of freedom
~Vertex()=default
Default destructor.
std::array< T, kNofParameters > Parameters_t
covariance matrix type
int32_t GetNdf() const
nof degrees of freedom
T GetY() const
y position [cm]
void ResetErrors(T c00, T c11, T c22, T c33)
nof tracks used
int32_t GetNofTracks() const
T GetChiSqTime() const
chi2 time
void SetX(T v)
x position [cm]
int32_t & NdfTime()
nof degrees of freedom time
T & Time()
t position [cm]
const Parameters_t & GetParameters() const
nof tracks used
int32_t NofTracks() const
bool IsConsistent() const
Checks whether the covariance matrix elements are consistent.
T Time() const
t position [cm]
MatrixSym< T, kNofParameters > CovMatrix_t
covariance matrix type
int32_t GetNdfTime() const
nof degrees of freedom time
T ChiSqTime() const
chi2 time
void SetNofTracks(int32_t v)
void SetChiSqTime(T v)
chi2 time
bool IsConsistent(std::stringstream *ss) const
Checks whether the covariance matrix elements are consistent.
void SetY(T v)
y position [cm]
bool IsFinite() const
Checks whether some parameters are finite.
void SetCovMatrix(const CovMatrix_t &val)
set covariance matrix
int32_t & Ndf()
nof degrees of freedom
void serialize(Archive &ar, const unsigned int)
const CovMatrix_t & GetCovMatrix() const
get covariance matrix
T Y() const
y position [cm]
Parameters_t & Parameters()
nof tracks used
void SetTime(T v)
t position [cm]
Vertex()=default
Default constructor.
int32_t NdfTime() const
nof degrees of freedom time
T GetTime() const
t position [cm]
T Z() const
z position [cm]
static constexpr int kNofParameters
void SetParameters(const Parameters_t ¶ms)
Setters.
bool IsFinite(const T &val)
Checks whether a variable of a particular type is finite.
@ Y
Print debug information.
@ Y
Fit the time component.