27 nodes[n - 1].SetSmoothedParam(nodes[n - 1].GetUpdatedParam());
30 for (
int i = n - 1; i > 0; i--) {
31 Smooth(&nodes[i - 1], &nodes[i]);
36 for (
int i = 0; i < n; i++) {
38 nodes[i].SetChiSqSmoothed(chi2Hit);
62 std::vector<litfloat> Ft(prevNode->
GetF());
71 std::vector<litfloat> A(25);
72 std::vector<litfloat> temp1(25);
86 std::vector<litfloat> temp2(7), temp3(7);
87 Subtract(prevSmoothedX, prevPredX, temp2);
89 std::vector<litfloat> thisSmoothedX(7);
90 Add(thisUpdX, temp3, thisSmoothedX);
100 std::vector<litfloat> temp4(15);
101 Subtract(prevSmoothedC, prevPredC, temp4);
106 std::vector<litfloat> temp5(15);
108 std::vector<litfloat> thisSmoothedC(15);
109 Add(thisUpdC, temp5, thisSmoothedC);
Implementation of Kalman smoother algorithm.
bool Similarity(const std::vector< litfloat > &a, const std::vector< litfloat > &b, std::vector< litfloat > &c)
bool Add(const std::vector< litfloat > &a, const std::vector< litfloat > &b, std::vector< litfloat > &c)
bool Transpose25(std::vector< litfloat > &a)
bool Subtract(const std::vector< litfloat > &a, const std::vector< litfloat > &b, std::vector< litfloat > &c)
bool Mult25On15(const std::vector< litfloat > &a, const std::vector< litfloat > &b, std::vector< litfloat > &c)
bool Mult25On5(const std::vector< litfloat > &a, const std::vector< litfloat > &b, std::vector< litfloat > &c)
bool Mult15On25(const std::vector< litfloat > &a, const std::vector< litfloat > &b, std::vector< litfloat > &c)
bool InvSym15(std::vector< litfloat > &a)
Base data class for track.
vector< CbmLitFitNode > FitNodeVector
Data class for storage of fitted track parameters, transport matrix and chi-square on each detector s...
const CbmLitTrackParam * GetPredictedParam() const
const CbmLitTrackParam * GetSmoothedParam() const
const CbmLitTrackParam * GetUpdatedParam() const
void SetSmoothedParam(const CbmLitTrackParam *par)
const vector< litfloat > & GetF() const
CbmLitKalmanSmoother()
Constructor.
virtual LitStatus Fit(CbmLitTrack *track, bool downstream=false)
Inherited from CbmLitTrackFitter.
virtual ~CbmLitKalmanSmoother()
Destructor.
void Smooth(CbmLitFitNode *thisNode, const CbmLitFitNode *prevNode)
Smooth one fit node.
Data class for track parameters.
void SetStateVector(const vector< litfloat > &x)
Set parameters from vector.
vector< litfloat > GetStateVector() const
Return state vector as vector.
const vector< litfloat > & GetCovMatrix() const
void SetCovMatrix(const vector< litfloat > &C)
Base data class for track.
const vector< CbmLitFitNode > & GetFitNodes() const
void SetParamFirst(const CbmLitTrackParam *par)
const CbmLitHit * GetHit(Int_t index) const
void SetChi2(litfloat chi2)
void SetFitNodes(const vector< CbmLitFitNode > &nodes)
Int_t NDF(const CbmLitTrack *track)
litfloat ChiSq(const CbmLitTrackParam *par, const CbmLitHit *hit)