Signal Yield and integral of signal func tion in full region are not same

Dear Experts,

I am trying to some fits to measure signal yields. I am not using RooFit but I am writing the functions myself. Please see the code kk_fit_full_set.C and the rootfile that I am using deltam_dist_all_pid_comb.root attached below.

The problem is that, even after changing fit parameters and trying a lot of times, the total signal yield is not in agreement with the integral of the signal function over the complete range. I think they should be equal. Or, is there an explanation of why they are not equal.

Also, the signal and the background shapes are not drawn separately in the fits(only the total is drawn).

Can you please help?
deltam_dist_all_pid_comb.root (31.4 KB) kk_fit_full_set.C (5.7 KB)

Gratefully,
Sanjeeda

Please help.


Please read tips for efficient and successful posting and posting code

ROOT Version: 5.14
Platform: linux
_Compiler:_g++


Hi Sanjeeda,
sorry for the late reply. Given your description of the issue, there is a problem in your code that’s probably not caused by ROOT.
I am not sure we cannot debug your code for you :smiley:

As a suggestion, you should strip down the 175-line script you shared to the very bare minimum amount of lines that reproduce the issue. Make a copy of the original script to keep it safe, and remove everything unnecessary until you can precisely pin down what goes wrong and where.

If you can provide a simpler reproducer, or if you have a specific question about ROOT interfaces, it’s possible that someone here on the forum can take a look.
Cheers,
Enrico

P.S.
note that 5.14 is an ancient ROOT version, the last release in the 5 series was 5.34 and it was several years ago. ROOT 5 is currently not maintained and users are advised to switch to ROOT 6 if possible.

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