Integral error with a TF1 functoin not from fitting

Dear experts

I have a problem about how to get the integral error of the TF1 function not from fitting?

The case is like I have a histogram contain both signal and background distribution. And I have a TF1 function consisting of signal part (Gaussian) and background part (3rd order polynomial). Now I fit the histogram with the function. I would like to integral the signal part to get the signal yield. The way I choose to get the yield is to set the parameters of the background to be zeroes and then to integral the function. But how could I get the integral error in this condition that I do not know what the covariance matrix exaclyt is.

Many thanks in advance.


Instead of “gaus” try “gausn” (normalized gaussian), then the “Constant” parameter will be the “peak area” (and you immediately get its error, too), not the “peak height”:


Thank you, Wile. It is a good try. If the signal function is not gaussian, how could I do to get the integral error? I think it would be a general problem I would meet in the future frequently for me.

See this old post (in the old “TH1F variable bin width” thread) and / or that old post (in the old “How to find the area error using peakfind.C" thread).

Thank you, Wile! Good post!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.