Problem in plotting the errors of a histogram

Hi,

I have a text file from which I plot a gaussian function. Now I want to find the derivative at the histogram at each point of the gaussian function and want to plots its errors. I attach here the macro as well as the text file :

Der_new.C (962 Bytes)

try.txt (788 Bytes)

The following is the output that i get when I plot the histograms with “E1” option. I dont understand why the errors of the derivative histogram are so high ?

if I plot without “E1” option and just use “hist” i get the following :

So my question how can I get uncertanities plotted properly on my derivative histogram ?

thank you

Read about the associated errors:
https://root.cern/doc/master/classTH1.html#associated-errors
and you are filling h2 with weights (print out the weights to see why the errors are so big). If you want sqrt(bincontent), add h2->Sumw2(0); before drawing it.

thanks for the reply @dastudillo .
I tried h2->Sumw2(0); before drawing the derivative histogram and I get the following :

Now, I think its more or less ok.

Your “derivative errors” are meaningless.

I am sorry, I don’t understand you well. Could you please tell me how?

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