Fit data is empty and unable to save the plots

Hi All,

I am trying to extract the yield under a peak(1778.9 KeV) in energy by doing Gaussian fit. There is background present under the peak. So first I need to subtract the background present under the peak then calibrate it to energy and calculate the area under the peak. I am using this macro. But when I run this it shows this error.! Also, I am not able to save the generated plots.
Screenshot%20(1)|690x194.
I will be very thankful to you if you can help me.
I am using the root version(6.14.06)
Compiler- gcc p1Yields.C (11.4 KB) gainMatch.h (3.2 KB) fitFunctions.h (32.4 KB) run244.root (69.9 KB) run326.root (64.9 KB)

Hello @shahina,

I didn’t have the time to look at your macro, but the first error message might already solve the problem:
“fit range is outside histogram range”

So please have a look into the observable on the x axis of the fit histogram. It could be as simple as an observable running from 0. to 1000., while the data run from 0. to 1.E6 because they are in MeV or something like this.

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