CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TAbsFitConstraint.h
Go to the documentation of this file.
1 #ifndef TAbsFitConstraint_hh
2 #define TAbsFitConstraint_hh
3 
4 #include <vector>
6 #include "TMatrixD.h"
7 #include "TNamed.h"
8 #include "TString.h"
9 
10 class TAbsFitConstraint : public TNamed {
11 public:
13  TAbsFitConstraint(const TString& name, const TString& title);
14  ~TAbsFitConstraint() override;
15 
16  // returns derivative df/dP with P=(p,E) and f the constraint f=0.
17  // The matrix contains one row (df/dp, df/dE).
18  virtual TMatrixD* getDerivative(TAbsFitParticle* particle) = 0;
19  virtual Double_t getInitValue() = 0;
20  virtual Double_t getCurrentValue() = 0;
21 
22  // new --- additional parameters
23  Int_t getNPar() { return _nPar; }
24 
25  virtual TMatrixD* getDerivativeAlpha() { return nullptr; }
26 
27  virtual const TMatrixD* getCovMatrix() const { return &_covMatrix; }
28  virtual void setCovMatrix(const TMatrixD* theCovMatrix);
29 
30  virtual const TMatrixD* getCovMatrixFit() const { return &_covMatrixFit; }
31  virtual void setCovMatrixFit(const TMatrixD* theCovMatrixFit);
32 
33  virtual const TMatrixD* getCovMatrixDeltaAlpha();
34 
35  const TMatrixD* getParIni() { return &_iniparameters; }
36  void setParIni(const TMatrixD* parini);
37  virtual void applyDeltaAlpha(TMatrixD* corrMatrix);
38  const TMatrixD* getParCurr() { return &_parameters; }
39 
40  virtual TString getInfoString();
41  virtual void print();
42  virtual void reset();
43 
44 protected:
46 
47  Int_t _nPar;
48 
49  TMatrixD _covMatrix; // covariance matrix
50  TMatrixD _covMatrixFit; // fitted covariance matrix
51  TMatrixD _covMatrixDeltaAlpha; // V(deltaAlpha) == V(alpha_meas) - V(alpha_fit)
52  TMatrixD _iniparameters; // initialized parameters (parameters values before the fit)
53  TMatrixD _parameters; // fitted parameters
54 };
55 
56 #endif
virtual void applyDeltaAlpha(TMatrixD *corrMatrix)
virtual void reset()
virtual const TMatrixD * getCovMatrix() const
virtual Double_t getCurrentValue()=0
virtual TMatrixD * getDerivativeAlpha()
virtual Double_t getInitValue()=0
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
TMatrixD _covMatrixDeltaAlpha
virtual TString getInfoString()
virtual void setCovMatrixFit(const TMatrixD *theCovMatrixFit)
~TAbsFitConstraint() override
virtual TMatrixD * getDerivative(TAbsFitParticle *particle)=0
virtual const TMatrixD * getCovMatrixFit() const
virtual const TMatrixD * getCovMatrixDeltaAlpha()
const TMatrixD * getParIni()
virtual void print()
const TMatrixD * getParCurr()
void setParIni(const TMatrixD *parini)