ROOT  6.06/09
Reference Guide
Functions
TFitter.cxx File Reference
#include "TMinuit.h"
#include "TFitter.h"
#include "TH1.h"
#include "TF1.h"
#include "TF2.h"
#include "TF3.h"
#include "TList.h"
#include "TGraph.h"
#include "TGraph2D.h"
#include "TMultiGraph.h"
#include "TMath.h"
+ Include dependency graph for TFitter.cxx:

Go to the source code of this file.

Functions

void H1FitChisquare (Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
 

Minimization function for H1s using a Chisquare method

More...
 
void H1FitLikelihood (Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
 

-*-*-*-*Minimization function for H1s using a Likelihood method*-*-*-*-*-*

Basically, it forms the likelihood by determining the Poisson probability that given a number of entries in a particular bin, the fit would predict it's value. More...
 
void GraphFitChisquare (Int_t &npar, Double_t *, Double_t &f, Double_t *u, Int_t)
 *-*-*-*-*-*Minimization function for Graphs using a Chisquare method*-*-*-*-* *-* ========================================================= More...
 
void Graph2DFitChisquare (Int_t &npar, Double_t *, Double_t &f, Double_t *u, Int_t)
 *-*-*-*-*Minimization function for 2D Graphs using a Chisquare method*-*-*-*-* *-* ============================================================ More...
 
void MultiGraphFitChisquare (Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
 
void F2Fit (Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
 
void F3Fit (Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)
 
 ClassImp (TFitter) TFitter
 *-*-*-*-*-*-*-*-*-*-*default constructor*-*-*-*-*-*-*-*-*-*-*-*-* *-* =================== More...
 

Function Documentation

ClassImp ( TFitter  )

*-*-*-*-*-*-*-*-*-*-*default constructor*-*-*-*-*-*-*-*-*-*-*-*-* *-* ===================

Definition at line 31 of file TFitter.cxx.

void F2Fit ( Int_t npar,
Double_t gin,
Double_t f,
Double_t u,
Int_t  flag 
)

Definition at line 1120 of file TFitter.cxx.

Referenced by TFitter::SetFitMethod().

void F3Fit ( Int_t npar,
Double_t gin,
Double_t f,
Double_t u,
Int_t  flag 
)

Definition at line 1130 of file TFitter.cxx.

Referenced by TFitter::SetFitMethod().

void Graph2DFitChisquare ( Int_t npar,
Double_t gin,
Double_t f,
Double_t u,
Int_t  flag 
)

*-*-*-*-*Minimization function for 2D Graphs using a Chisquare method*-*-*-*-* *-* ============================================================

Definition at line 978 of file TFitter.cxx.

Referenced by TFitter::SetFitMethod().

void GraphFitChisquare ( Int_t npar,
Double_t ,
Double_t f,
Double_t u,
Int_t   
)

*-*-*-*-*-*Minimization function for Graphs using a Chisquare method*-*-*-*-* *-* =========================================================

In case of a TGraphErrors object, ex, the error along x, is projected along the y-direction by calculating the function at the points x-exlow and x+exhigh.

The chisquare is computed as the sum of the quantity below at each point:

                (y - f(x))**2
    -----------------------------------
    ey**2 + (0.5*(exl + exh)*f'(x))**2

where x and y are the point coordinates and f'(x) is the derivative of function f(x). This method to approximate the uncertainty in y because of the errors in x, is called "effective variance" method. The improvement, compared to the previously used method (f(x+ exhigh) - f(x-exlow))/2 is of (error of x)**2 order.

In case the function lies below (above) the data point, ey is ey_low (ey_high).

thanks to Andy Haas (haas@.nosp@m.yaho.nosp@m.o.com) for adding the case with TGraphAsymmErrors University of Washington February 3, 2004

NOTE: 1) By using the "effective variance" method a simple linear regression becomes a non-linear case , which takes several iterations instead of 0 as in the linear case .

2) The effective variance technique assumes that there is no correlation between the x and y coordinate .

The book by Sigmund Brandt (Data Analysis) contains an interesting section how to solve the problem when correclations do exist .

Definition at line 906 of file TFitter.cxx.

Referenced by TFitter::SetFitMethod().

void H1FitChisquare ( Int_t npar,
Double_t gin,
Double_t f,
Double_t u,
Int_t  flag 
)

Minimization function for H1s using a Chisquare method

Definition at line 849 of file TFitter.cxx.

Referenced by TFitter::Chisquare(), and TFitter::SetFitMethod().

void H1FitLikelihood ( Int_t npar,
Double_t gin,
Double_t f,
Double_t u,
Int_t  flag 
)

-*-*-*-*Minimization function for H1s using a Likelihood method*-*-*-*-*-*

Basically, it forms the likelihood by determining the Poisson probability that given a number of entries in a particular bin, the fit would predict it's value.

This is then done for each bin, and the sum of the logs is taken as the likelihood.

Definition at line 863 of file TFitter.cxx.

Referenced by TFitter::SetFitMethod().

void MultiGraphFitChisquare ( Int_t npar,
Double_t gin,
Double_t f,
Double_t u,
Int_t  flag 
)

Definition at line 1047 of file TFitter.cxx.

Referenced by TFitter::SetFitMethod().