Subtraction of background under a peak

Hi,
Pls I need your help, I have a 1D histogram and I want to draw the background under the signal on the same histogram and be able to get the value of the signal alone and also the background value alone. I edited the code from the tutorial it run but does not show anything. Attached is the codebackground.cpp (1.0 KB)

You did not send the root file used by your macro.
Which example did you start from ?

Thanks.
this is the root file
marneli.root (1.2 KB)
this the code I use in ploting
histo1.cpp (928 Bytes)
and this is my input file
marneli_0.txt (57.6 KB)

I ran this macro. The two histograms it generates and them store in marmeli.root are empty for me.

I covert the marneli.txt file to marneli.dat and that is what I use.

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