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"

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.

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.