PandaRoot
KalmanCalculator.h
Go to the documentation of this file.
1 // ******************************************************
2 // DecayTreeFitter Package
3 // We thank the original author Wouter Hulsbergen
4 // (BaBar, LHCb) for providing the sources.
5 // http://arxiv.org/abs/physics/0503191v1 (2005)
6 // Adaptation & Development for PANDA: Ralf Kliemt (2015)
7 // ******************************************************
8 #ifndef KALMANCALCULATOR_H
9 #define KALMANCALCULATOR_H 1
10 
11 #include "TVectorD.h"
12 #include "TMatrixD.h"
13 #include "TMatrixDSym.h"
14 #include "FitParams.h"
15 #include "ErrCode.h"
16 #include "Rtypes.h"
17 
18 namespace DecayTreeFitter {
19 
21  public:
23  virtual ~KalmanCalculator(){};
24 
25  ErrCode init(const TVectorD &value, const TMatrixD &G, const FitParams *fitparams, const TMatrixDSym &V, int weight = 1);
26  void updatePar(FitParams *fitparams);
27  void updatePar(const TVectorD &prediction, FitParams *fitparams);
28  void updateCov(FitParams *fitparams);
29  double chisq() const { return m_chisq; }
30 
31  private:
32  int m_nconstraints; // dimension of the constraint
33  int m_nparameters; // dimension of the state
34  const TVectorD *m_value;
35  const TMatrixD *m_matrixG;
36  TMatrixDSym m_matrixR; // cov of residual
37  TMatrixDSym m_matrixRinv; // inverse of cov of residual
38  TMatrixD m_matrixK; // kalman gain matrix
39  double m_chisq;
40  int m_ierr;
41  // some temporary results
42  TMatrixD m_matrixCGT;
43  ClassDef(KalmanCalculator, 1)
44 };
45 } // namespace DecayTreeFitter
46 
47 #endif
void updatePar(FitParams *fitparams)
void updateCov(FitParams *fitparams)
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
ErrCode init(const TVectorD &value, const TMatrixD &G, const FitParams *fitparams, const TMatrixDSym &V, int weight=1)