CbmRoot
Loading...
Searching...
No Matches
CbmKfUtil.cxx
Go to the documentation of this file.
1/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergey Gorbunov [committer] */
4
5#include "CbmKfUtil.h"
6
7#include "FairTrackParam.h"
8#include "KfDefs.h"
9
10namespace cbm::kf
11{
13 {
15 t.X() = par.GetX();
16 t.Y() = par.GetY();
17 t.Tx() = par.GetTx();
18 t.Ty() = par.GetTy();
19 t.Qp() = par.GetQp();
20 t.Z() = par.GetZ();
21 t.Time() = 0.;
23
24 t.CovMatrix().fill(0.);
25
26 t.ChiSq() = 0.;
27 t.Ndf() = 0.;
28 t.ChiSqTime() = 0.;
29 t.NdfTime() = 0.;
30
31 for (Int_t i = 0; i < 5; i++) {
32 for (Int_t j = 0; j <= i; j++) {
33 t.C(i, j) = par.GetCovariance(i, j);
34 }
35 }
36
37 t.C55() = 1.;
38 t.C66() = 1.;
39
40 return t;
41 }
42
44 {
45 FairTrackParam par;
46 par.SetX(t.GetX());
47 par.SetY(t.GetY());
48 par.SetZ(t.GetZ());
49 par.SetTx(t.GetTx());
50 par.SetTy(t.GetTy());
51 par.SetQp(t.GetQp());
52 for (Int_t i = 0; i < 5; i++) {
53 for (Int_t j = 0; j <= i; j++) {
54 par.SetCovariance(i, j, t.C(i, j));
55 }
56 }
57 return par;
58 }
59
60
61} // namespace cbm::kf
Common constant definitions for the Kalman Filter library.
T Ndf() const
Gets NDF of track fit model.
T Vi() const
Gets inverse velocity [ns/cm].
T NdfTime() const
Gets NDF of time measurements.
T GetTy() const
Gets slope along y-axis.
T GetZ() const
Gets z position [cm].
T ChiSq() const
Gets Chi-square of track fit model.
T Tx() const
Gets slope along x-axis.
T X() const
Gets x position [cm].
T ChiSqTime() const
Gets Chi-square of time measurements.
T GetTx() const
Gets slope along x-axis.
T GetQp() const
Gets charge over momentum [ec/GeV].
T Y() const
Gets y position [cm].
T Qp() const
Gets charge over momentum [ec/GeV].
T Z() const
Gets z position [cm].
T Time() const
Gets time [ns].
T GetY() const
Gets y position [cm].
T C(int i, int j) const
Get covariance matrix element.
CovMatrix_t & CovMatrix()
Reference to covariance matrix.
T Ty() const
Gets slope along y-axis.
T GetX() const
Gets x position [cm].
constexpr auto SpeedOfLightInv
Inverse speed of light [ns/cm].
Definition KfDefs.h:107
cbm::algo::kf::TrackParamD ConvertTrackParam(const FairTrackParam &par)
copy fair track param to Ca track param
Definition CbmKfUtil.cxx:12