CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/PhysicsTools/KinFitter/interface/TAbsFitConstraint.h

Go to the documentation of this file.
00001 #ifndef TAbsFitConstraint_hh
00002 #define TAbsFitConstraint_hh
00003 
00004 #include <vector>
00005 #include "PhysicsTools/KinFitter/interface/TAbsFitParticle.h"
00006 #include "TMatrixD.h"
00007 #include "TNamed.h"
00008 #include "TString.h"
00009 
00010 class TAbsFitConstraint : public TNamed {
00011 
00012 public :
00013 
00014   TAbsFitConstraint();
00015   TAbsFitConstraint(const TString &name, const TString &title);
00016   virtual ~TAbsFitConstraint();
00017 
00018   // returns derivative df/dP with P=(p,E) and f the constraint f=0.
00019   // The matrix contains one row (df/dp, df/dE).
00020   virtual TMatrixD* getDerivative( TAbsFitParticle* particle ) = 0 ;
00021   virtual Double_t getInitValue() = 0;
00022   virtual Double_t getCurrentValue() = 0;
00023 
00024   // new ---  additional parameters
00025   Int_t getNPar() { return _nPar; } 
00026 
00027   virtual TMatrixD* getDerivativeAlpha() { return 0; }
00028   
00029   virtual const TMatrixD* getCovMatrix() const { return &_covMatrix; }
00030   virtual void setCovMatrix(const TMatrixD* theCovMatrix);
00031 
00032   virtual const TMatrixD* getCovMatrixFit() const { return &_covMatrixFit; }
00033   virtual void setCovMatrixFit(const TMatrixD* theCovMatrixFit);
00034 
00035   virtual const TMatrixD* getCovMatrixDeltaAlpha();
00036   
00037   const TMatrixD* getParIni() { return &_iniparameters; }
00038   void  setParIni(const TMatrixD* parini);
00039   virtual void applyDeltaAlpha(TMatrixD* corrMatrix);
00040   const TMatrixD* getParCurr(){ return &_parameters; }
00041 
00042   virtual TString getInfoString();
00043   virtual void print(); 
00044   virtual void reset();
00045 
00046 protected :
00047 
00048   void calcCovMatrixDeltaAlpha();
00049 
00050   Int_t _nPar;
00051 
00052   TMatrixD _covMatrix;      // covariance matrix
00053   TMatrixD _covMatrixFit;   // fitted covariance matrix
00054   TMatrixD _covMatrixDeltaAlpha;  // V(deltaAlpha) == V(alpha_meas) - V(alpha_fit)
00055   TMatrixD _iniparameters;  // initialized parameters (parameters values before the fit)
00056   TMatrixD _parameters;     // fitted parameters
00057 
00058 
00059 };
00060 
00061 #endif