CMS 3D CMS Logo

TAbsFitParticle.h
Go to the documentation of this file.
1 #ifndef TAbsFitParticle_hh
2 #define TAbsFitParticle_hh
3 
4 #include "TMatrixD.h"
5 #include "TLorentzVector.h"
6 #include "TVector3.h"
7 #include "TNamed.h"
8 
9 class TAbsFitParticle : public TNamed {
10 public:
12  TAbsFitParticle(const TString& name, const TString& title);
13  ~TAbsFitParticle() override;
14  virtual TAbsFitParticle* clone(const TString& newname = "") const = 0;
15 
16  // returns derivative dP/dy with P=(p,E) and y=(par1, par2, par3, ...)
17  // the free parameters of the fit. The columns of the matrix contain
18  // (dP/dpar1, dP/dpar2, ...).
19  virtual TMatrixD* getDerivative() = 0;
20 
21  virtual void applycorr(TMatrixD* corrMatrix);
22  virtual TMatrixD* transform(const TLorentzVector& vec) = 0;
23  virtual void setCovMatrix(const TMatrixD* theCovMatrix);
24  virtual const TMatrixD* getCovMatrix() const { return &_covMatrix; }
25  virtual void setCovMatrixFit(const TMatrixD* theCovMatrixFit);
26  virtual const TMatrixD* getCovMatrixFit() const { return &_covMatrixFit; }
27  virtual const TMatrixD* getCovMatrixDeltaY();
28  virtual const TMatrixD* getPull();
29 
30  Int_t getNPar() const { return _nPar; }
31  const TLorentzVector* getCurr4Vec() { return &_pcurr; }
32  const TLorentzVector* getIni4Vec() { return &_pini; }
33  virtual TLorentzVector* calc4Vec(const TMatrixD* params) = 0;
34  virtual void setIni4Vec(const TLorentzVector* pini) = 0;
35  const TMatrixD* getParIni() { return &_iniparameters; }
36  void setParIni(const TMatrixD* parini);
37  const TMatrixD* getParCurr() { return &_parameters; }
38  const TVector3* getu1() { return &_u1; }
39  const TVector3* getu2() { return &_u2; }
40  const TVector3* getu3() { return &_u3; }
41 
42  TString getInfoString();
43  virtual void print();
44  virtual void reset();
45 
46 protected:
47  void calcCovMatrixDeltaY();
48 
49  Int_t _nPar; // Number of free parameters
50  TVector3 _u1; // base vector 1
51  TVector3 _u2; // base vector 2
52  TVector3 _u3; // base vector 3
53 
54  TMatrixD _covMatrix; // covariance matrix
55  TMatrixD _covMatrixFit; // fitted covariance matrix
56  TMatrixD _covMatrixDeltaY; // V(deltaY) == V(y_meas) - V(y_fit)
57  TMatrixD _pull; // pull values for all parameters
58  TMatrixD _iniparameters; // initialized parameters (parameters values before the fit)
59  TMatrixD _parameters; // fitted parameters
60  TLorentzVector _pini; // measured 4vector
61  TLorentzVector _pcurr; // fitted 4vector
62 };
63 
64 #endif
TAbsFitParticle::_iniparameters
TMatrixD _iniparameters
Definition: TAbsFitParticle.h:58
TAbsFitParticle::transform
virtual TMatrixD * transform(const TLorentzVector &vec)=0
TAbsFitParticle::setCovMatrixFit
virtual void setCovMatrixFit(const TMatrixD *theCovMatrixFit)
Definition: TAbsFitParticle.cc:112
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
TAbsFitParticle::calc4Vec
virtual TLorentzVector * calc4Vec(const TMatrixD *params)=0
TAbsFitParticle::calcCovMatrixDeltaY
void calcCovMatrixDeltaY()
Definition: TAbsFitParticle.cc:126
TAbsFitParticle::_parameters
TMatrixD _parameters
Definition: TAbsFitParticle.h:59
TAbsFitParticle::getDerivative
virtual TMatrixD * getDerivative()=0
TAbsFitParticle::_covMatrixFit
TMatrixD _covMatrixFit
Definition: TAbsFitParticle.h:55
TAbsFitParticle::_pcurr
TLorentzVector _pcurr
Definition: TAbsFitParticle.h:61
TAbsFitParticle::_pini
TLorentzVector _pini
Definition: TAbsFitParticle.h:60
TAbsFitParticle::_covMatrix
TMatrixD _covMatrix
Definition: TAbsFitParticle.h:54
TAbsFitParticle::getu3
const TVector3 * getu3()
Definition: TAbsFitParticle.h:40
TAbsFitParticle::_u2
TVector3 _u2
Definition: TAbsFitParticle.h:51
TAbsFitParticle::_nPar
Int_t _nPar
Definition: TAbsFitParticle.h:49
TAbsFitParticle::getPull
virtual const TMatrixD * getPull()
Definition: TAbsFitParticle.cc:137
TAbsFitParticle
Definition: TAbsFitParticle.h:9
TAbsFitParticle::setParIni
void setParIni(const TMatrixD *parini)
Definition: TAbsFitParticle.cc:176
TAbsFitParticle::getu1
const TVector3 * getu1()
Definition: TAbsFitParticle.h:38
TAbsFitParticle::getCurr4Vec
const TLorentzVector * getCurr4Vec()
Definition: TAbsFitParticle.h:31
TAbsFitParticle::getParIni
const TMatrixD * getParIni()
Definition: TAbsFitParticle.h:35
TAbsFitParticle::setCovMatrix
virtual void setCovMatrix(const TMatrixD *theCovMatrix)
Definition: TAbsFitParticle.cc:98
TAbsFitParticle::reset
virtual void reset()
Definition: TAbsFitParticle.cc:88
TAbsFitParticle::TAbsFitParticle
TAbsFitParticle()
Definition: TAbsFitParticle.cc:18
TAbsFitParticle::applycorr
virtual void applycorr(TMatrixD *corrMatrix)
Definition: TAbsFitParticle.cc:160
TAbsFitParticle::_u3
TVector3 _u3
Definition: TAbsFitParticle.h:52
TAbsFitParticle::print
virtual void print()
Definition: TAbsFitParticle.cc:82
TAbsFitParticle::getCovMatrixFit
virtual const TMatrixD * getCovMatrixFit() const
Definition: TAbsFitParticle.h:26
TAbsFitParticle::getCovMatrixDeltaY
virtual const TMatrixD * getCovMatrixDeltaY()
Definition: TAbsFitParticle.cc:187
TAbsFitParticle::getInfoString
TString getInfoString()
Definition: TAbsFitParticle.cc:50
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
TAbsFitParticle::clone
virtual TAbsFitParticle * clone(const TString &newname="") const =0
TAbsFitParticle::getParCurr
const TMatrixD * getParCurr()
Definition: TAbsFitParticle.h:37
TAbsFitParticle::_pull
TMatrixD _pull
Definition: TAbsFitParticle.h:57
TAbsFitParticle::_u1
TVector3 _u1
Definition: TAbsFitParticle.h:50
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TAbsFitParticle::~TAbsFitParticle
~TAbsFitParticle() override
Definition: TAbsFitParticle.cc:48
TAbsFitParticle::setIni4Vec
virtual void setIni4Vec(const TLorentzVector *pini)=0
TAbsFitParticle::getNPar
Int_t getNPar() const
Definition: TAbsFitParticle.h:30
TAbsFitParticle::_covMatrixDeltaY
TMatrixD _covMatrixDeltaY
Definition: TAbsFitParticle.h:56
TAbsFitParticle::getCovMatrix
virtual const TMatrixD * getCovMatrix() const
Definition: TAbsFitParticle.h:24
TAbsFitParticle::getIni4Vec
const TLorentzVector * getIni4Vec()
Definition: TAbsFitParticle.h:32
TAbsFitParticle::getu2
const TVector3 * getu2()
Definition: TAbsFitParticle.h:39