CbmRoot
Loading...
Searching...
No Matches
LKFMinuit.h
Go to the documentation of this file.
1/* Copyright (C) 2015-2020 PI-UHd, GSI
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Norbert Herrmann [committer], Florian Uhlig, Pierre-Alain Loizeau */
4
5#ifndef LKFMinuit_h
6#define LKFMinuit_h
7
8#include "TFitter.h"
9#include "TMath.h"
10#include "TMinuit.h"
11#include "TRandom.h"
12
13#include <TGraph2D.h>
14#include <TGraph2DErrors.h>
15#include <TMath.h>
16#include <TPolyLine3D.h>
17
18#include <iostream>
19
20#include <Math/Vector3D.h>
21
22
23class TFitter;
24
25class LKFMinuit {
26 public: // öffentlich
27 inline static LKFMinuit* Instance() { return fInstance; }
28
29 LKFMinuit(); // der Default-Konstruktor
30 int DoFit(TGraph2DErrors* gr, double pStart[]);
31 int Initialize();
32 double SumDistance2(double par[]);
33 double distance2(double x, double y, double z, double* p);
34 double distance2err(double x, double y, double z, double ex, double ey, double ez, 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, double* gout, double& result, double par[], int flg);
51};
52
53#endif
Char_t * gr
static TGraph2DErrors * fgr
Definition LKFMinuit.h:44
static TFitter * fMyFit
Definition LKFMinuit.h:45
double myFunction(double)
Definition LKFMinuit.cxx:74
double distance2err(double x, double y, double z, double ex, double ey, double ez, double *p)
double distance2(double x, double y, double z, double *p)
static LKFMinuit * Instance()
Definition LKFMinuit.h:27
double fChi2DoF
Definition LKFMinuit.h:48
int DoFit(TGraph2DErrors *gr, double pStart[])
Definition LKFMinuit.cxx:36
int Initialize()
Definition LKFMinuit.cxx:23
double * GetParFit()
Definition LKFMinuit.h:37
void line(double t, double *p, double &x, double &y, double &z)
Definition LKFMinuit.cxx:92
static void minuitFunction(int &nDim, double *gout, double &result, double par[], int flg)
double SumDistance2(double par[])
double GetChi2DoF()
Definition LKFMinuit.h:39
double GetChi2()
Definition LKFMinuit.h:38
double fChi2
Definition LKFMinuit.h:47
static LKFMinuit * fInstance
Definition LKFMinuit.h:42
double fparFit[4]
Definition LKFMinuit.h:46