Consider this script:
void gausserrors()
{
gStyle -> SetOptFit(kTRUE);
TH1F * h = new TH1F("h1", "h1", 11, -5.0, 5.0);
h -> FillRandom("gaus", 500);
//for (unsigned char bind = 1; bind <= h -> GetNbinsX(); bind ++)
// {
// h -> SetBinError(bind, 0.0);
// }
h -> Fit("gaus");
TCanvas *c = new TCanvas();
h -> Draw();
}
How are the errors on fit parameters computed? And why does the fit fail if the bin errors are set to 0.0 (instead of producing a fit with error 0.0)?
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided