Problem with Gaussian peak fitting

Hi all,

I am trying to fit a Gaussian peak in a spectrum in the energy range 339-351 keV (figure: no peak). I would like the Gaussian to be fitted to the background (red line). However, the resulting fit does not fit correctly (figure: with peak). Would someone be able to advise me what I am doing wrong and how I can fit the Gaussian peak correctly?

Thank you in advance,

Chlow
withpeak.pdf (149 KB)
Nopeak.pdf (146 KB)

Notice the 'R" fitting option:
myfit.C
multifit.C
See also:
minuit2GausFit.C
minuit2FitBench.C
fithist.C
FittingDemo.C
fitExclude.C

Thank you for the reply. I am not completely clear what you mean. I used the fit panel to do the fitting. Thanks chloe

See “option” = “R” in the TH1::Fit description (there’s a corresponding entry in the “Fit Panel”).

If that is “use the range specified in the function range” - I am using this option already. Thanks Chloe