CMS 3D CMS Logo

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
TAbsFitConstraint::reset
virtual void reset()
Definition: TAbsFitConstraint.cc:44
TAbsFitConstraint::setParIni
void setParIni(const TMatrixD *parini)
Definition: TAbsFitConstraint.cc:98
TAbsFitConstraint::_covMatrix
TMatrixD _covMatrix
Definition: TAbsFitConstraint.h:49
TAbsFitConstraint::setCovMatrix
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
Definition: TAbsFitConstraint.cc:51
TAbsFitConstraint::getInitValue
virtual Double_t getInitValue()=0
TAbsFitConstraint::setCovMatrixFit
virtual void setCovMatrixFit(const TMatrixD *theCovMatrixFit)
Definition: TAbsFitConstraint.cc:65
TAbsFitConstraint::_nPar
Int_t _nPar
Definition: TAbsFitConstraint.h:47
TAbsFitConstraint::getCurrentValue
virtual Double_t getCurrentValue()=0
TAbsFitConstraint::getNPar
Int_t getNPar()
Definition: TAbsFitConstraint.h:23
TAbsFitConstraint::getDerivativeAlpha
virtual TMatrixD * getDerivativeAlpha()
Definition: TAbsFitConstraint.h:25
TAbsFitConstraint
Definition: TAbsFitConstraint.h:10
TAbsFitConstraint::_covMatrixDeltaAlpha
TMatrixD _covMatrixDeltaAlpha
Definition: TAbsFitConstraint.h:51
TAbsFitConstraint::getCovMatrixDeltaAlpha
virtual const TMatrixD * getCovMatrixDeltaAlpha()
Definition: TAbsFitConstraint.cc:111
TAbsFitConstraint::getInfoString
virtual TString getInfoString()
Definition: TAbsFitConstraint.cc:118
TAbsFitConstraint::~TAbsFitConstraint
~TAbsFitConstraint() override
Definition: TAbsFitConstraint.cc:42
TAbsFitParticle
Definition: TAbsFitParticle.h:9
TAbsFitConstraint::TAbsFitConstraint
TAbsFitConstraint()
Definition: TAbsFitConstraint.cc:18
TAbsFitConstraint::_iniparameters
TMatrixD _iniparameters
Definition: TAbsFitConstraint.h:52
TAbsFitConstraint::_covMatrixFit
TMatrixD _covMatrixFit
Definition: TAbsFitConstraint.h:50
TAbsFitConstraint::getCovMatrixFit
virtual const TMatrixD * getCovMatrixFit() const
Definition: TAbsFitConstraint.h:30
TAbsFitConstraint::_parameters
TMatrixD _parameters
Definition: TAbsFitConstraint.h:53
TAbsFitConstraint::getDerivative
virtual TMatrixD * getDerivative(TAbsFitParticle *particle)=0
TAbsFitConstraint::calcCovMatrixDeltaAlpha
void calcCovMatrixDeltaAlpha()
Definition: TAbsFitConstraint.cc:79
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
TAbsFitConstraint::getParIni
const TMatrixD * getParIni()
Definition: TAbsFitConstraint.h:35
TAbsFitConstraint::getParCurr
const TMatrixD * getParCurr()
Definition: TAbsFitConstraint.h:38
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TAbsFitConstraint::print
virtual void print()
Definition: TAbsFitConstraint.cc:133
TAbsFitParticle.h
TAbsFitConstraint::applyDeltaAlpha
virtual void applyDeltaAlpha(TMatrixD *corrMatrix)
Definition: TAbsFitConstraint.cc:90
TAbsFitConstraint::getCovMatrix
virtual const TMatrixD * getCovMatrix() const
Definition: TAbsFitConstraint.h:27