GetParError for exponential fit

Hi All,

I trying fi find the +1 sigma and -1sigma in EXPONENTIAL background fit. But getting error wid the value of the amplitude of the background along with its error. They come out same value can’t be correct.

Attached is code and refer to the mass plot from before with gaussian and exponential fit from 2.6 - 4 fitGausandexponentfunc.cpp (4.7 KB)


Ps: exponential function maybe wrong


    Double_t bkg = fit->GetParameter(3);
    Double_t bkg_err = fit->GetParError(3);
    bkg *= hsub->GetBinWidth(1); bkg_err *= hsub->GetBinWidth(1); // same scaling
    std::cout << "bkg = " << bkg << " \t" << "bkg_err = " << bkg_err << std::endl;

Hi Wile_E,

Thank you so much, I tried but the result is : bkg = 798.114 bkg_err = 2833.18

Also why the * sign after bkg and bkg_err
My bkg also doesnt fit on the function anymore.

This is what plot looks like:

canvas fit.pdf (23.6 KB)