Error bars in macro

Hi,

I ma trying to draw a variable from the same file and tree but with different cuts of other variable in order to study the systematic uncertainty in the shape of the distribution. i have plotted all the histograms on top of each others plus the plot of the variable without any cut. i did a small macro to do this but i couldn’t draw the error bars. i am attaching the plot i produced and the macro when i added the option “E SAME” and the error bars reached the lower edge which i think it is correct.

thanks,

Mai

hstack_slicesf51_dEdX.C (3.4 KB)


_ROOT Version: 5.34/38
Platform: Not Provided
Compiler: Not Provided


At least, right after you create histograms:

h1->Sumw2(kTRUE);
h2->Sumw2(kTRUE);
h3->Sumw2(kTRUE);
h4->Sumw2(kTRUE);
h5->Sumw2(kTRUE);
h6->Sumw2(kTRUE);


Hello,

Thanks, now it is getting better … but when i removed the Y log scale it becomes better , is that mean that this behavior (to reach the x axis ) is related to the log scale???

thanks,

Mai

Your Y axis has negative minium, and log of something negative
is undefined.
May be try to set the minimum of the histogram to something positive.