FairRoot/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 {
20 
22  {
23  public:
25  virtual ~KalmanCalculator(){};
26 
27  ErrCode init(const TVectorD& value, const TMatrixD& G,
28  const FitParams* fitparams, const TMatrixDSym& V, int weight=1) ;
29  void updatePar(FitParams* fitparams) ;
30  void updatePar(const TVectorD& prediction, FitParams* fitparams) ;
31  void updateCov(FitParams* fitparams) ;
32  double chisq() const { return m_chisq ; }
33  private:
34  int m_nconstraints ; // dimension of the constraint
35  int m_nparameters ; // dimension of the state
36  const TVectorD* m_value ;
38  TMatrixDSym m_matrixR; // cov of residual
39  TMatrixDSym m_matrixRinv; // inverse of cov of residual
40  TMatrixD m_matrixK ; // kalman gain matrix
41  double m_chisq ;
42  int m_ierr ;
43  // some temporary results
45  ClassDef ( KalmanCalculator,1 )
46  } ;
47 }
48 
49 #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)