CbmRoot
LKFMinuit.h
Go to the documentation of this file.
1 #ifndef LKFMinuit_h
2 #define LKFMinuit_h
3 
4 #include <iostream>
5 
6 #include "TFitter.h"
7 #include "TMath.h"
8 #include "TMinuit.h"
9 #include "TRandom.h"
10 #include <Math/Vector3D.h>
11 #include <TGraph2D.h>
12 #include <TGraph2DErrors.h>
13 #include <TMath.h>
14 #include <TPolyLine3D.h>
15 
16 
17 class TFitter;
18 
19 class LKFMinuit {
20 public: // öffentlich
21  inline static LKFMinuit* Instance() { return fInstance; }
22 
23  LKFMinuit(); // der Default-Konstruktor
24  int DoFit(TGraph2DErrors* gr, double pStart[]);
25  int Initialize();
26  double SumDistance2(double par[]);
27  double distance2(double x, double y, double z, double* p);
28  double distance2err(double x,
29  double y,
30  double z,
31  double ex,
32  double ey,
33  double ez,
34  double* p);
35  void line(double t, double* p, double& x, double& y, double& z);
36 
37  inline double* GetParFit() { return fparFit; }
38  inline double GetChi2() { return fChi2; }
39  inline double GetChi2DoF() { return fChi2DoF; }
40 
41 private:
43 
44  static TGraph2DErrors* fgr;
45  static TFitter* fMyFit;
46  double fparFit[4];
47  double fChi2;
48  double fChi2DoF;
49  double myFunction(double);
50  static void minuitFunction(int& nDim,
51  double* gout,
52  double& result,
53  double par[],
54  int flg);
55 };
56 
57 #endif
LKFMinuit::minuitFunction
static void minuitFunction(int &nDim, double *gout, double &result, double par[], int flg)
Definition: LKFMinuit.cxx:179
LKFMinuit::GetParFit
double * GetParFit()
Definition: LKFMinuit.h:37
LKFMinuit::fChi2DoF
double fChi2DoF
Definition: LKFMinuit.h:48
LKFMinuit::myFunction
double myFunction(double)
Definition: LKFMinuit.cxx:66
LKFMinuit::fgr
static TGraph2DErrors * fgr
Definition: LKFMinuit.h:44
LKFMinuit::GetChi2
double GetChi2()
Definition: LKFMinuit.h:38
gr
Char_t * gr
Definition: CbmEvDisTracks.cxx:289
LKFMinuit::fparFit
double fparFit[4]
Definition: LKFMinuit.h:46
LKFMinuit::line
void line(double t, double *p, double &x, double &y, double &z)
Definition: LKFMinuit.cxx:83
LKFMinuit::LKFMinuit
LKFMinuit()
Definition: LKFMinuit.cxx:188
LKFMinuit
Definition: LKFMinuit.h:19
LKFMinuit::fInstance
static LKFMinuit * fInstance
Definition: LKFMinuit.h:42
LKFMinuit::distance2err
double distance2err(double x, double y, double z, double ex, double ey, double ez, double *p)
Definition: LKFMinuit.cxx:105
LKFMinuit::DoFit
int DoFit(TGraph2DErrors *gr, double pStart[])
Definition: LKFMinuit.cxx:28
LKFMinuit::distance2
double distance2(double x, double y, double z, double *p)
Definition: LKFMinuit.cxx:93
LKFMinuit::GetChi2DoF
double GetChi2DoF()
Definition: LKFMinuit.h:39
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
LKFMinuit::Initialize
int Initialize()
Definition: LKFMinuit.cxx:16
LKFMinuit::fChi2
double fChi2
Definition: LKFMinuit.h:47
LKFMinuit::Instance
static LKFMinuit * Instance()
Definition: LKFMinuit.h:21
LKFMinuit::fMyFit
static TFitter * fMyFit
Definition: LKFMinuit.h:45
LKFMinuit::SumDistance2
double SumDistance2(double par[])
Definition: LKFMinuit.cxx:144