Skip to content
Snippets Groups Projects
Commit 69f25eb4 authored by Lorenzo Moneta's avatar Lorenzo Moneta
Browse files

add missing TMath

git-svn-id: http://root.cern.ch/svn/root/trunk@17836 27541ba8-7e3a-0410-8455-c3a389f83636
parent 3280de7c
No related branches found
No related tags found
No related merge requests found
// @(#)root/minuit2:$Name: $:$Id: minuit2FitBench.C,v 1.2 2006/05/29 10:16:54 moneta Exp $
// @(#)root/minuit2:$Name: $:$Id: minuit2FitBench.C,v 1.1 2006/12/11 21:56:34 brun Exp $
// Author: L. Moneta 10/2005
/**********************************************************************
......@@ -16,6 +16,7 @@
#include "TVirtualFitter.h"
#include "TPaveLabel.h"
#include "TStyle.h"
#include "TMath.h"
TF1 *fitFcn;
......@@ -51,13 +52,14 @@ void DoFit(const char* fitter, TVirtualPad *pad, Int_t npass) {
timer.Start();
for (Int_t pass=0;pass<npass;pass++) {
if (pass%100 == 0) printf("pass : %d\n",pass);
fitFcn->SetParameters(1,1,1,6,.03,1);
for (Int_t i=0;i<5000;i++) {
histo->Fill(fitFcn->GetRandom());
}
histo->Fit("fitFcn","0q");
histo->Fit("fitFcn","0Q");
}
histo->Fit("fitFcn");
histo->Fit("fitFcn","EV");
timer.Stop();
......
// @(#)root/minuit2:$Name: $:$Id: minuit2GausFit.C,v 1.1 2005/10/27 14:11:07 brun Exp $
// @(#)root/minuit2:$Name: $:$Id: minuit2GausFit.C,v 1.1 2006/12/11 21:56:34 brun Exp $
// Author: L. Moneta 10/2005
/**********************************************************************
......@@ -45,7 +45,8 @@ void testGausFit( std::string type = "Minuit2", int n = 1000) {
TH1D * h4 = new TH1D(*h1);
c1->cd(1);
cout << "\nDo Fit 1\n";
h1->Fit("gaus","Q");
h1->Fit("gaus","");
h1->SetName("Chi2 Fit");
h1->Draw();
c1->cd(2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment