24void testGausFit( std::string type =
"Minuit2",
int n = 1000) {
34 TH1D * h2 =
new TH1D(
name.c_str(),
"Chi2 Fit with Minos Error",100, -5, 5. );
36 TH1D * h3 =
new TH1D(
name.c_str(),
"Chi2 Fit with Integral and Minos",100, -5, 5. );
38 TH1D * h4 =
new TH1D(
name.c_str(),
"Likelihood Fit with Minos Error",100, -5, 5. );
40 gStyle->SetOptStat(1111111);
41 gStyle->SetOptFit(1111111);
43 for (
int i = 0; i <
n; ++i) {
51 std::string cname =
type +
"Canvas" ;
52 std::string ctitle =
type +
" Gaussian Fit" ;
57 std::cout <<
"\nDo Fit 1\n";
61 std::cout <<
"\nDo Fit 2\n";
65 std::cout <<
"\nDo Fit 3\n";
66 h3->
Fit(
"gaus",
"IGE");
69 std::cout <<
"\nDo Fit 4\n";
75void minuit2GausFit() {
78 testGausFit(
"Minuit2",
n);
79 testGausFit(
"Fumili2",
n);
1-D histogram with a double per channel (see TH1 documentation)
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
Fit histogram with function fname.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
void Draw(Option_t *option="") override
Draw this histogram with options.
Random number generator class based on M.
static void SetDefaultFitter(const char *name="")
static: set name of default fitter