Logo ROOT   6.08/07
Reference Guide
Macros | Typedefs | Functions | Variables
testFitPerf.cxx File Reference
#include "TH1.h"
#include "TF1.h"
#include "TF2.h"
#include "TMath.h"
#include "TSystem.h"
#include "TRandom3.h"
#include "TTree.h"
#include "TROOT.h"
#include "Fit/BinData.h"
#include "Fit/UnBinData.h"
#include "Fit/Fitter.h"
#include "HFitInterface.h"
#include "Math/IParamFunction.h"
#include "Math/WrappedTF1.h"
#include "Math/WrappedMultiTF1.h"
#include "Math/WrappedParamFunction.h"
#include "Math/MultiDimParamFunctionAdapter.h"
#include "TGraphErrors.h"
#include "TStyle.h"
#include "TSeqCollection.h"
#include "Math/Polynomial.h"
#include "Math/DistFunc.h"
#include <string>
#include <iostream>
#include "TStopwatch.h"
#include "TVirtualFitter.h"
#include "GaussFunction.h"
#include "RooDataHist.h"
#include "RooDataSet.h"
#include "RooRealVar.h"
#include "RooGaussian.h"
#include "RooMinuit.h"
#include "RooChi2Var.h"
#include "RooGlobalFunc.h"
#include "RooFitResult.h"
#include "RooProdPdf.h"
#include <cassert>
#include "MinimizerTypes.h"
Include dependency graph for testFitPerf.cxx:

Macros

#define USE_CHI2_FIT
 

Typedefs

typedef ROOT::Math::IParamMultiFunction Func
 

Functions

template<class MinType , class T >
int DoBinFit (T *hist, Func &func, bool debug=false, bool useGrad=false)
 
template<class MinType >
int DoFit (TTree *tree, Func &func, bool debug=false, bool copyData=false)
 
template<class MinType >
int DoFit (TH1 *h1, Func &func, bool debug=false, bool copyData=false)
 
template<class MinType >
int DoFit (TGraph *gr, Func &func, bool debug=false, bool copyData=false)
 
template<class MinType , class T >
int DoUnBinFit (T *tree, Func &func, bool debug=false, bool copyData=false)
 
ROOT::Fit::UnBinDataFillUnBinData (TTree *tree, bool copyData=true, unsigned int dim=1)
 
template<class MinType , class FitObj >
int FitUsingNewFitter (FitObj *fitobj, Func &func, bool useGrad=false)
 
int FitUsingRooFit (TH1 *hist, TF1 *func)
 
int FitUsingRooFit (TTree *tree, TF1 *func)
 
int FitUsingRooFit2 (TTree *tree)
 
template<class T , class MinType >
int FitUsingTFit (T *hist, TF1 *func)
 
template<class MinType >
int FitUsingTTreeFit (TTree *tree, TF1 *func, const std::string &vars="x")
 
double gausnorm (const double *x, const double *p)
 
double gausnorm2D (const double *x, const double *p)
 
double gausnormN (const double *x, const double *p)
 
double gaussian (const double *x, const double *p)
 
int main ()
 
double poly2 (const double *x, const double *p)
 
void printData (const ROOT::Fit::UnBinData &data)
 
template<class T >
void printData (const T &data)
 
void printResult (int iret)
 
int testFitPerf ()
 
int testGausFit ()
 
int testLargeTreeFit (int nevt=1000)
 
int testLargeTreeRooFit (int nevt=1000)
 
int testPolyFit ()
 
int testTreeFit ()
 

Variables

double iniPar [2 *N]
 
const int N = 20
 
int nfit
 
bool USE_BRANCH = false
 

Macro Definition Documentation

◆ USE_CHI2_FIT

#define USE_CHI2_FIT

Typedef Documentation

◆ Func

Definition at line 220 of file testFitPerf.cxx.

Function Documentation

◆ DoBinFit()

template<class MinType , class T >
int DoBinFit ( T *  hist,
Func func,
bool  debug = false,
bool  useGrad = false 
)

Definition at line 222 of file testFitPerf.cxx.

◆ DoFit() [1/3]

template<class MinType >
int DoFit ( TTree tree,
Func func,
bool  debug = false,
bool  copyData = false 
)

Definition at line 325 of file testFitPerf.cxx.

◆ DoFit() [2/3]

template<class MinType >
int DoFit ( TH1 h1,
Func func,
bool  debug = false,
bool  copyData = false 
)

Definition at line 329 of file testFitPerf.cxx.

◆ DoFit() [3/3]

template<class MinType >
int DoFit ( TGraph gr,
Func func,
bool  debug = false,
bool  copyData = false 
)

Definition at line 333 of file testFitPerf.cxx.

◆ DoUnBinFit()

template<class MinType , class T >
int DoUnBinFit ( T *  tree,
Func func,
bool  debug = false,
bool  copyData = false 
)

Definition at line 275 of file testFitPerf.cxx.

◆ FillUnBinData()

ROOT::Fit::UnBinData* FillUnBinData ( TTree tree,
bool  copyData = true,
unsigned int  dim = 1 
)

Definition at line 80 of file testFitPerf.cxx.

◆ FitUsingNewFitter()

template<class MinType , class FitObj >
int FitUsingNewFitter ( FitObj *  fitobj,
Func func,
bool  useGrad = false 
)

Definition at line 338 of file testFitPerf.cxx.

◆ FitUsingRooFit() [1/2]

int FitUsingRooFit ( TH1 hist,
TF1 func 
)

Definition at line 484 of file testFitPerf.cxx.

◆ FitUsingRooFit() [2/2]

int FitUsingRooFit ( TTree tree,
TF1 func 
)

Definition at line 539 of file testFitPerf.cxx.

◆ FitUsingRooFit2()

int FitUsingRooFit2 ( TTree tree)

Definition at line 610 of file testFitPerf.cxx.

◆ FitUsingTFit()

template<class T , class MinType >
int FitUsingTFit ( T *  hist,
TF1 func 
)

Definition at line 377 of file testFitPerf.cxx.

◆ FitUsingTTreeFit()

template<class MinType >
int FitUsingTTreeFit ( TTree tree,
TF1 func,
const std::string &  vars = "x" 
)

Definition at line 437 of file testFitPerf.cxx.

◆ gausnorm()

double gausnorm ( const double *  x,
const double *  p 
)

Definition at line 800 of file testFitPerf.cxx.

◆ gausnorm2D()

double gausnorm2D ( const double *  x,
const double *  p 
)

Definition at line 807 of file testFitPerf.cxx.

◆ gausnormN()

double gausnormN ( const double *  x,
const double *  p 
)

Definition at line 811 of file testFitPerf.cxx.

◆ gaussian()

double gaussian ( const double *  x,
const double *  p 
)

Definition at line 794 of file testFitPerf.cxx.

◆ main()

int main ( )

Definition at line 1130 of file testFitPerf.cxx.

◆ poly2()

double poly2 ( const double *  x,
const double *  p 
)

Definition at line 715 of file testFitPerf.cxx.

◆ printData() [1/2]

void printData ( const ROOT::Fit::UnBinData data)

Definition at line 64 of file testFitPerf.cxx.

◆ printData() [2/2]

template<class T >
void printData ( const T &  data)

Definition at line 210 of file testFitPerf.cxx.

◆ printResult()

void printResult ( int  iret)

Definition at line 71 of file testFitPerf.cxx.

◆ testFitPerf()

int testFitPerf ( )

Definition at line 1087 of file testFitPerf.cxx.

◆ testGausFit()

int testGausFit ( )

Definition at line 820 of file testFitPerf.cxx.

◆ testLargeTreeFit()

int testLargeTreeFit ( int  nevt = 1000)

Definition at line 995 of file testFitPerf.cxx.

◆ testLargeTreeRooFit()

int testLargeTreeRooFit ( int  nevt = 1000)

Definition at line 1043 of file testFitPerf.cxx.

◆ testPolyFit()

int testPolyFit ( )

Definition at line 719 of file testFitPerf.cxx.

◆ testTreeFit()

int testTreeFit ( )

Definition at line 914 of file testFitPerf.cxx.

Variable Documentation

◆ iniPar

double iniPar[2 *N]

Definition at line 61 of file testFitPerf.cxx.

◆ N

const int N = 20

Definition at line 60 of file testFitPerf.cxx.

◆ nfit

int nfit

Definition at line 59 of file testFitPerf.cxx.

◆ USE_BRANCH

bool USE_BRANCH = false

Definition at line 79 of file testFitPerf.cxx.