6 if not verbose: option +=
"Q"
8 minFit = histo.GetMean() - histo.GetRMS()
9 maxFit = histo.GetMean() + histo.GetRMS()
11 funcName = histo.GetName() +
"_gaus"
12 fitFunc = ROOT.TF1(funcName,
"gaus",minFit,maxFit)
13 histo.Fit(fitFunc,option)
15 minFit = fitFunc.GetParameter(1) - nSigmas*fitFunc.GetParameter(2)
16 maxFit = fitFunc.GetParameter(1) + nSigmas*fitFunc.GetParameter(2)
17 fitFunc.SetRange(minFit,maxFit)
18 histo.Fit(fitFunc,option)
20 return (histo,fitFunc)