Dear Experts ,
I have a histogram and for each of its bins I have the uncertainties estimated using error propagation, now I would like to fit my histogram with errors. I have the following questions :
If I draw my histogram using the drawing options “E1” and fit, will the uncertainties be considered in root by default if I fit it with a user defined function ?
If not how to consider the uncertainties while making the fit"
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided
Thanks for the question.
The relevant piece of documentation can be found here.
The answer is yes, the uncertanties are taken into account unless you specify otherwise
I hope this helps.
Thanks for the response!
But I am not sure whether I have understood you correctly.
Here I attach a macro in which I open a histogram and I want to find its first derivative (for which I do dy/dx, taking 7 bins). And I fit the first derivative in two ways :
- I draw histogram without errors and fit using the fit function defined (h2)
- I draw histogram with option E1 and fit using the fit function (h4)
And in both the cases I have the same fit results. Which I understand as root always calculates the errors automatically before fitting, Is this so ?
I attach my macro and result herewith for your consideration, thank you.
check4.C (5.1 KB)
h1.root (2.7 KB)
I think the way in which you decide to draw the histograms have no effect on the uncertainties on the bin content. But perhaps I am misunderstanding the question.
I might be wrong, but it seems this thread is similar to this one. (sorry if not)