testUnbinGausFit.cxx File Reference

#include "TMath.h"
#include "TSystem.h"
#include "TRandom3.h"
#include "TTree.h"
#include "TROOT.h"
#include "Fit/UnBinData.h"
#include "Fit/Fitter.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 "Math/DistFunc.h"
#include <string>
#include <iostream>
#include "TStopwatch.h"

Go to the source code of this file.

Classes

struct  MINUIT2

Defines

#define DEBUG

Typedefs

typedef ROOT::Math::IParamMultiFunction Func

Functions

double gausnorm (const double *x, const double *p)
double gausSum (const double *x, const double *p)
ROOT::Fit::UnBinDataFillUnBinData (TTree *tree)
template<class MinType, class T>
int DoUnBinFit (T *tree, Func &func, bool debug=false)
template<class MinType>
int DoFit (TTree *tree, Func &func, bool debug=false)
template<class MinType, class FitObj>
int FitUsingNewFitter (FitObj *fitobj, Func &func)
int testNdimFit ()
int main ()

Variables

const int N = 1
const int NGaus = 3
const int NPar = 8
const std::string branchType = "x[1]/D"
const int NPoints = 100000
double truePar [NPar]
double iniPar [NPar]
const int nfit = 1
const int strategy = 0


Define Documentation

#define DEBUG

Definition at line 29 of file testUnbinGausFit.cxx.


Typedef Documentation

typedef ROOT::Math::IParamMultiFunction Func

Definition at line 106 of file testUnbinGausFit.cxx.


Function Documentation

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

Definition at line 196 of file testUnbinGausFit.cxx.

References debug, and func().

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

Definition at line 108 of file testUnbinGausFit.cxx.

References ROOT::Math::chisquared_cdf_c(), ROOT::Fit::Fitter::Config(), d, debug, FillUnBinData(), ROOT::Fit::Fitter::Fit(), func(), i, name, NPar, ROOT::Fit::Fitter::Result(), ROOT::Fit::Fitter::SetFunction(), strategy, and truePar.

ROOT::Fit::UnBinData* FillUnBinData ( TTree tree  ) 

Definition at line 69 of file testUnbinGausFit.cxx.

References d, TTree::GetBranch(), TTree::GetEntries(), TBranch::GetEntry(), i, j, m, N, n, and TBranch::SetAddress().

template<class MinType, class FitObj>
int FitUsingNewFitter ( FitObj *  fitobj,
Func func 
)

Definition at line 209 of file testUnbinGausFit.cxx.

References func(), i, iniPar, name, nfit, true, and w.

double gausnorm ( const double x,
const double p 
)

Definition at line 45 of file testUnbinGausFit.cxx.

References exp(), and sqrt().

double gausSum ( const double x,
const double p 
)

Definition at line 53 of file testUnbinGausFit.cxx.

References gausnorm(), and norm().

Referenced by testNdimFit().

int main ( void   ) 

Definition at line 329 of file testUnbinGausFit.cxx.

References testNdimFit().

int testNdimFit (  ) 

Definition at line 244 of file testUnbinGausFit.cxx.

References a, b, TTree::Branch(), branchType, c, f2, TTree::Fill(), gausSum(), i, iniPar, j, N, NGaus, norm(), NPar, NPoints, s, truePar, and x.


Variable Documentation

const std::string branchType = "x[1]/D"

Definition at line 36 of file testUnbinGausFit.cxx.

double iniPar[NPar]

Definition at line 41 of file testUnbinGausFit.cxx.

const int N = 1

Definition at line 33 of file testUnbinGausFit.cxx.

const int nfit = 1

Definition at line 42 of file testUnbinGausFit.cxx.

const int NGaus = 3

Definition at line 34 of file testUnbinGausFit.cxx.

Referenced by testNdimFit().

const int NPar = 8

Definition at line 35 of file testUnbinGausFit.cxx.

Referenced by DoUnBinFit(), G__G__MathCore_182_0_3(), G__G__MathFit_163_0_13(), and testNdimFit().

const int NPoints = 100000

Definition at line 39 of file testUnbinGausFit.cxx.

const int strategy = 0

Definition at line 43 of file testUnbinGausFit.cxx.

double truePar[NPar]

Definition at line 40 of file testUnbinGausFit.cxx.


Generated on Tue Jul 5 16:07:25 2011 for ROOT_528-00b_version by  doxygen 1.5.1