CbmRoot
Loading...
Searching...
No Matches
cbm::algo::kf::Vertex< T > Class Template Reference

The class describes a reconstructed vertex. More...

#include <KfVertex.h>

Inheritance diagram for cbm::algo::kf::Vertex< T >:
[legend]
Collaboration diagram for cbm::algo::kf::Vertex< T >:
[legend]

Public Types

using Parameters_t = std::array<T, kNofParameters>
 covariance matrix type
 
using CovMatrix_t = MatrixSym<T, kNofParameters>
 covariance matrix type
 

Public Member Functions

 Vertex ()=default
 Default constructor.
 
 ~Vertex ()=default
 Default destructor.
 
X () const
 Accessors.
 
Y () const
 y position [cm]
 
Z () const
 z position [cm]
 
Time () const
 t position [cm]
 
ChiSq () const
 chi2
 
int32_t Ndf () const
 nof degrees of freedom
 
ChiSqTime () const
 chi2 time
 
int32_t NdfTime () const
 nof degrees of freedom time
 
int32_t NofTracks () const
 
GetX () const
 nof tracks used
 
GetY () const
 y position [cm]
 
GetZ () const
 z position [cm]
 
GetTime () const
 t position [cm]
 
GetChiSq () const
 chi2
 
int32_t GetNdf () const
 nof degrees of freedom
 
GetChiSqTime () const
 chi2 time
 
int32_t GetNdfTime () const
 nof degrees of freedom time
 
int32_t GetNofTracks () const
 
const Parameters_tGetParameters () const
 nof tracks used
 
const CovMatrix_tGetCovMatrix () const
 get covariance matrix
 
T & X ()
 Mutators.
 
T & Y ()
 y position [cm]
 
T & Z ()
 z position [cm]
 
T & Time ()
 t position [cm]
 
T & ChiSq ()
 chi2
 
int32_t & Ndf ()
 nof degrees of freedom
 
T & ChiSqTime ()
 chi2 time
 
int32_t & NdfTime ()
 nof degrees of freedom time
 
int32_t & NofTracks ()
 
Parameters_tParameters ()
 nof tracks used
 
CovMatrix_tCovMatrix ()
 get covariance matrix
 
void SetParameters (const Parameters_t &params)
 Setters.
 
void SetCovMatrix (const CovMatrix_t &val)
 set covariance matrix
 
void SetX (T v)
 x position [cm]
 
void SetY (T v)
 y position [cm]
 
void SetZ (T v)
 z position [cm]
 
void SetTime (T v)
 t position [cm]
 
void SetChiSq (T v)
 chi2
 
void SetNdf (int32_t v)
 nof degrees of freedom
 
void SetChiSqTime (T v)
 chi2 time
 
void SetNdfTime (int32_t v)
 nof degrees of freedom time
 
void SetNofTracks (int32_t v)
 
void ResetErrors (T c00, T c11, T c22, T c33)
 nof tracks used
 
std::string ToString () const
 Prints parameters to a string.
 
bool IsFinite () const
 Checks whether some parameters are finite.
 
bool IsConsistent () const
 Checks whether the covariance matrix elements are consistent.
 
template<DoPrintDebug FlagPrintDebug = DoPrintDebug::Y>
bool IsFinite (std::stringstream *ss) const
 Checks whether some parameters are finite.
 
template<DoPrintDebug FlagPrintDebug = DoPrintDebug::Y>
bool IsConsistent (std::stringstream *ss) const
 Checks whether the covariance matrix elements are consistent.
 
template<class Archive>
void serialize (Archive &ar, const unsigned int)
 

Static Public Attributes

static constexpr int kNofParameters {4}
 N of variable track parameters: {x, y, z, t}.
 
static constexpr int kNofCovParameters {CovMatrix_t::kNofElements}
 N of covariance matrix elements.
 

Private Member Functions

 ClassDefNV (Vertex, 1)
 

Private Attributes

Parameters_t fParameters {0., 0., 0., 0.}
 parameters: x, y, z, t
 
CovMatrix_t fCovMatrix
 covariance matrix
 
fChiSq {0.}
 chi^2 of track fit, spatial measurements
 
fChiSqTime {0.}
 chi^2 of track fit, time measurements
 
int32_t fNdf {-3}
 NDF of track fit, spatial measurements.
 
int32_t fNdfTime {-1}
 NDF of track fit, time measurements.
 
int32_t fNofTracks {0}
 

Detailed Description

template<typename T = double>
class cbm::algo::kf::Vertex< T >

The class describes a reconstructed vertex.

Definition at line 35 of file KfVertex.h.

Member Typedef Documentation

◆ CovMatrix_t

template<typename T = double>
using cbm::algo::kf::Vertex< T >::CovMatrix_t = MatrixSym<T, kNofParameters>

covariance matrix type

Definition at line 41 of file KfVertex.h.

◆ Parameters_t

template<typename T = double>
using cbm::algo::kf::Vertex< T >::Parameters_t = std::array<T, kNofParameters>

covariance matrix type

Definition at line 40 of file KfVertex.h.

Constructor & Destructor Documentation

◆ Vertex()

template<typename T = double>
cbm::algo::kf::Vertex< T >::Vertex ( )
default

Default constructor.

◆ ~Vertex()

template<typename T = double>
cbm::algo::kf::Vertex< T >::~Vertex ( )
default

Default destructor.

Member Function Documentation

◆ ChiSq() [1/2]

template<typename T = double>
T & cbm::algo::kf::Vertex< T >::ChiSq ( )
inline

chi2

Definition at line 83 of file KfVertex.h.

◆ ChiSq() [2/2]

template<typename T = double>
T cbm::algo::kf::Vertex< T >::ChiSq ( ) const
inline

◆ ChiSqTime() [1/2]

template<typename T = double>
T & cbm::algo::kf::Vertex< T >::ChiSqTime ( )
inline

chi2 time

Definition at line 85 of file KfVertex.h.

◆ ChiSqTime() [2/2]

template<typename T = double>
T cbm::algo::kf::Vertex< T >::ChiSqTime ( ) const
inline

◆ ClassDefNV()

template<typename T = double>
cbm::algo::kf::Vertex< T >::ClassDefNV ( Vertex< T > ,
1  )
private

◆ CovMatrix()

template<typename T = double>
CovMatrix_t & cbm::algo::kf::Vertex< T >::CovMatrix ( )
inline

get covariance matrix

Definition at line 89 of file KfVertex.h.

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex().

◆ GetChiSq()

template<typename T = double>
T cbm::algo::kf::Vertex< T >::GetChiSq ( ) const
inline

chi2

Definition at line 68 of file KfVertex.h.

◆ GetChiSqTime()

template<typename T = double>
T cbm::algo::kf::Vertex< T >::GetChiSqTime ( ) const
inline

chi2 time

Definition at line 70 of file KfVertex.h.

◆ GetCovMatrix()

template<typename T = double>
const CovMatrix_t & cbm::algo::kf::Vertex< T >::GetCovMatrix ( ) const
inline

get covariance matrix

Definition at line 74 of file KfVertex.h.

◆ GetNdf()

template<typename T = double>
int32_t cbm::algo::kf::Vertex< T >::GetNdf ( ) const
inline

nof degrees of freedom

Definition at line 69 of file KfVertex.h.

◆ GetNdfTime()

template<typename T = double>
int32_t cbm::algo::kf::Vertex< T >::GetNdfTime ( ) const
inline

nof degrees of freedom time

Definition at line 71 of file KfVertex.h.

◆ GetNofTracks()

template<typename T = double>
int32_t cbm::algo::kf::Vertex< T >::GetNofTracks ( ) const
inline

Definition at line 72 of file KfVertex.h.

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex().

◆ GetParameters()

template<typename T = double>
const Parameters_t & cbm::algo::kf::Vertex< T >::GetParameters ( ) const
inline

nof tracks used

get all parameters

Definition at line 73 of file KfVertex.h.

◆ GetTime()

template<typename T = double>
T cbm::algo::kf::Vertex< T >::GetTime ( ) const
inline

t position [cm]

Definition at line 67 of file KfVertex.h.

Referenced by ToString().

◆ GetX()

template<typename T = double>
T cbm::algo::kf::Vertex< T >::GetX ( ) const
inline

nof tracks used

x position [cm]

Definition at line 64 of file KfVertex.h.

Referenced by ToString().

◆ GetY()

template<typename T = double>
T cbm::algo::kf::Vertex< T >::GetY ( ) const
inline

y position [cm]

Definition at line 65 of file KfVertex.h.

Referenced by ToString().

◆ GetZ()

template<typename T = double>
T cbm::algo::kf::Vertex< T >::GetZ ( ) const
inline

z position [cm]

Definition at line 66 of file KfVertex.h.

Referenced by ToString().

◆ IsConsistent() [1/2]

template<typename T = double>
bool cbm::algo::kf::Vertex< T >::IsConsistent ( ) const
inline

Checks whether the covariance matrix elements are consistent.

Definition at line 123 of file KfVertex.h.

Referenced by IsConsistent(), and cbm::algo::kf::Vertex< fscal >::IsConsistent().

◆ IsConsistent() [2/2]

template<typename T>
template<DoPrintDebug FlagPrintDebug>
bool cbm::algo::kf::Vertex< T >::IsConsistent ( std::stringstream * ss) const
inline

Checks whether the covariance matrix elements are consistent.

Definition at line 216 of file KfVertex.h.

References ChiSq(), ChiSqTime(), fCovMatrix, IsConsistent(), IsFinite(), Ndf(), NdfTime(), NofTracks(), and cbm::algo::kf::Y.

◆ IsFinite() [1/2]

template<typename T = double>
bool cbm::algo::kf::Vertex< T >::IsFinite ( ) const
inline

Checks whether some parameters are finite.

Definition at line 120 of file KfVertex.h.

Referenced by IsConsistent(), IsFinite(), and cbm::algo::kf::Vertex< fscal >::IsFinite().

◆ IsFinite() [2/2]

template<typename T>
template<DoPrintDebug FlagPrintDebug>
bool cbm::algo::kf::Vertex< T >::IsFinite ( std::stringstream * ss) const
inline

Checks whether some parameters are finite.

Definition at line 183 of file KfVertex.h.

References ChiSq(), ChiSqTime(), fCovMatrix, cbm::algo::kf::utils::IsFinite(), IsFinite(), Ndf(), NdfTime(), NofTracks(), X(), cbm::algo::kf::Y, and Z().

◆ Ndf() [1/2]

template<typename T = double>
int32_t & cbm::algo::kf::Vertex< T >::Ndf ( )
inline

nof degrees of freedom

Definition at line 84 of file KfVertex.h.

◆ Ndf() [2/2]

template<typename T = double>
int32_t cbm::algo::kf::Vertex< T >::Ndf ( ) const
inline

nof degrees of freedom

Definition at line 59 of file KfVertex.h.

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex(), IsConsistent(), IsFinite(), and ToString().

◆ NdfTime() [1/2]

template<typename T = double>
int32_t & cbm::algo::kf::Vertex< T >::NdfTime ( )
inline

nof degrees of freedom time

Definition at line 86 of file KfVertex.h.

◆ NdfTime() [2/2]

template<typename T = double>
int32_t cbm::algo::kf::Vertex< T >::NdfTime ( ) const
inline

nof degrees of freedom time

Definition at line 61 of file KfVertex.h.

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex(), IsConsistent(), IsFinite(), and ToString().

◆ NofTracks() [1/2]

template<typename T = double>
int32_t & cbm::algo::kf::Vertex< T >::NofTracks ( )
inline

Definition at line 87 of file KfVertex.h.

◆ NofTracks() [2/2]

template<typename T = double>
int32_t cbm::algo::kf::Vertex< T >::NofTracks ( ) const
inline

◆ Parameters()

template<typename T = double>
Parameters_t & cbm::algo::kf::Vertex< T >::Parameters ( )
inline

nof tracks used

get all parameters

Definition at line 88 of file KfVertex.h.

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex().

◆ ResetErrors()

template<typename T>
void cbm::algo::kf::Vertex< T >::ResetErrors ( T c00,
T c11,
T c22,
T c33 )
inline

nof tracks used


Other methods

Resets variances of track parameters and chi2, ndf values

Parameters
c00Variance of x-position [cm2]
c11Variance of y-position [cm2]
c22Variance of z-position [cm2]
c33Variance of time [ns2]

Definition at line 171 of file KfVertex.h.

References fChiSq, fChiSqTime, fCovMatrix, fNdf, fNdfTime, and fNofTracks.

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex().

◆ serialize()

template<typename T = double>
template<class Archive>
void cbm::algo::kf::Vertex< T >::serialize ( Archive & ar,
const unsigned int  )
inline

Serialization

Definition at line 139 of file KfVertex.h.

◆ SetChiSq()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetChiSq ( T v)
inline

chi2

Definition at line 100 of file KfVertex.h.

◆ SetChiSqTime()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetChiSqTime ( T v)
inline

chi2 time

Definition at line 102 of file KfVertex.h.

◆ SetCovMatrix()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetCovMatrix ( const CovMatrix_t & val)
inline

set covariance matrix

Definition at line 94 of file KfVertex.h.

◆ SetNdf()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetNdf ( int32_t v)
inline

nof degrees of freedom

Definition at line 101 of file KfVertex.h.

◆ SetNdfTime()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetNdfTime ( int32_t v)
inline

nof degrees of freedom time

Definition at line 103 of file KfVertex.h.

◆ SetNofTracks()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetNofTracks ( int32_t v)
inline

Definition at line 104 of file KfVertex.h.

◆ SetParameters()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetParameters ( const Parameters_t & params)
inline

Setters.

set all parameters

Definition at line 93 of file KfVertex.h.

◆ SetTime()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetTime ( T v)
inline

t position [cm]

Definition at line 99 of file KfVertex.h.

◆ SetX()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetX ( T v)
inline

x position [cm]

Definition at line 96 of file KfVertex.h.

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex().

◆ SetY()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetY ( T v)
inline

y position [cm]

Definition at line 97 of file KfVertex.h.

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex().

◆ SetZ()

template<typename T = double>
void cbm::algo::kf::Vertex< T >::SetZ ( T v)
inline

z position [cm]

Definition at line 98 of file KfVertex.h.

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex().

◆ Time() [1/2]

template<typename T = double>
T & cbm::algo::kf::Vertex< T >::Time ( )
inline

t position [cm]

Definition at line 82 of file KfVertex.h.

◆ Time() [2/2]

template<typename T = double>
T cbm::algo::kf::Vertex< T >::Time ( ) const
inline

t position [cm]

Definition at line 57 of file KfVertex.h.

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex().

◆ ToString()

template<typename T>
std::string cbm::algo::kf::Vertex< T >::ToString ( ) const

Prints parameters to a string.

Definition at line 22 of file KfVertex.cxx.

References ChiSq(), ChiSqTime(), fCovMatrix, GetTime(), GetX(), GetY(), GetZ(), Ndf(), NdfTime(), and NofTracks().

Referenced by cbm::algo::kf::VertexFitter< FlagFitTime >::FitVertex().

◆ X() [1/2]

template<typename T = double>
T & cbm::algo::kf::Vertex< T >::X ( )
inline

Mutators.

x position [cm]

Definition at line 79 of file KfVertex.h.

◆ X() [2/2]

template<typename T = double>
T cbm::algo::kf::Vertex< T >::X ( ) const
inline

Accessors.

x position [cm]

Definition at line 54 of file KfVertex.h.

Referenced by IsFinite().

◆ Y() [1/2]

template<typename T = double>
T & cbm::algo::kf::Vertex< T >::Y ( )
inline

y position [cm]

Definition at line 80 of file KfVertex.h.

◆ Y() [2/2]

template<typename T = double>
T cbm::algo::kf::Vertex< T >::Y ( ) const
inline

y position [cm]

Definition at line 55 of file KfVertex.h.

◆ Z() [1/2]

template<typename T = double>
T & cbm::algo::kf::Vertex< T >::Z ( )
inline

z position [cm]

Definition at line 81 of file KfVertex.h.

◆ Z() [2/2]

template<typename T = double>
T cbm::algo::kf::Vertex< T >::Z ( ) const
inline

z position [cm]

Definition at line 56 of file KfVertex.h.

Referenced by IsFinite().

Member Data Documentation

◆ fChiSq

template<typename T = double>
T cbm::algo::kf::Vertex< T >::fChiSq {0.}
private

chi^2 of track fit, spatial measurements

Definition at line 153 of file KfVertex.h.

Referenced by ResetErrors().

◆ fChiSqTime

template<typename T = double>
T cbm::algo::kf::Vertex< T >::fChiSqTime {0.}
private

chi^2 of track fit, time measurements

Definition at line 154 of file KfVertex.h.

Referenced by ResetErrors().

◆ fCovMatrix

template<typename T = double>
CovMatrix_t cbm::algo::kf::Vertex< T >::fCovMatrix
private

covariance matrix

Definition at line 152 of file KfVertex.h.

Referenced by IsConsistent(), IsFinite(), ResetErrors(), and ToString().

◆ fNdf

template<typename T = double>
int32_t cbm::algo::kf::Vertex< T >::fNdf {-3}
private

NDF of track fit, spatial measurements.

Definition at line 155 of file KfVertex.h.

Referenced by ResetErrors().

◆ fNdfTime

template<typename T = double>
int32_t cbm::algo::kf::Vertex< T >::fNdfTime {-1}
private

NDF of track fit, time measurements.

Definition at line 156 of file KfVertex.h.

Referenced by ResetErrors().

◆ fNofTracks

template<typename T = double>
int32_t cbm::algo::kf::Vertex< T >::fNofTracks {0}
private

Definition at line 157 of file KfVertex.h.

Referenced by ResetErrors().

◆ fParameters

template<typename T = double>
Parameters_t cbm::algo::kf::Vertex< T >::fParameters {0., 0., 0., 0.}
private

parameters: x, y, z, t

Definition at line 151 of file KfVertex.h.

◆ kNofCovParameters

template<typename T = double>
int cbm::algo::kf::Vertex< T >::kNofCovParameters {CovMatrix_t::kNofElements}
staticconstexpr

N of covariance matrix elements.

Definition at line 43 of file KfVertex.h.

◆ kNofParameters

template<typename T = double>
int cbm::algo::kf::Vertex< T >::kNofParameters {4}
staticconstexpr

N of variable track parameters: {x, y, z, t}.

Definition at line 38 of file KfVertex.h.


The documentation for this class was generated from the following files: