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