Question about the fit error from TFractionFitter

Hello,

I’m trying to do a two-component fit to a mixed distribution. All spectra are generated by functions. The component spectra is generated from the exponential function ( bkg = exp[ -|b|(x+1) ] and sig = exp[ |s|(x-1) ] ), while the mixed spectrum is generated by the weighted sum of those functions.

An example of the spectra and the fit is in [1]

The error obtained from TFractionFitter::GetResult( component, result, error) always show larger value than result. ( for example, result = 0.2 and error = 0.3 ).
I found these values strange because I have quite large statistic ( >1000 events in each spectrum).
I would like to ask if treat the error as absolute error is correct, or should I treat it as the relative error of the result?

Thank you,
Hoa

[1] A fit plot
Blue: background, yellow: signal, black-dot: mixed sample.


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


I think @moneta can help

1 Like

Hi,
The error you are getting the fraction from TFractionFitter is the absolute error on the fractions.It is strange you set such large errors, something strange is happening.
Can you please post your example code, so I can reproduce the problem ?

Cheers

Lorenzo

1 Like

Hi @moneta

Sorry for the long delay. A test code is attached in [1]. My code is a bit messy, so let me know if you have questions.

I also ran this test code once, and the result is

 **********
 **    1 **SET PRINT           0
 **********
 **********
 **    2 **SET NOGRAD
 **********
 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 frac0        5.00000e-01  1.00000e-02     no limits
     2 frac1        5.00000e-01  1.00000e-02     no limits
 **********
 **    3 **SET ERR         0.5
 **********
 **********
 **    4 **SET PRINT           0
 **********
 **********
 **    5 **SET STR           1
 **********
 **********
 **    6 **MIGRAD        1220        0.01
 **********
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.
 MIGRAD MINIMIZATION HAS CONVERGED.
 FCN=-842021 FROM MIGRAD    STATUS=CONVERGED      80 CALLS          81 TOTAL
                     EDM=0.000130759    STRATEGY= 1  ERROR MATRIX UNCERTAINTY   8.4 per cent
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  frac0        1.96753e-01   3.34241e-01  -0.00000e+00   1.74186e-02
   2  frac1        8.18715e-01   6.22199e-01   0.00000e+00  -2.03625e-02
                               ERR DEF= 0.5
fit result for signal
|-- signal yield = 19675
`-- yield error =  33424
(int) 0

The value of the (signal) yield is expected, while its error is too large.

Thank you very much,
Hoa.

[1] test_tfractionfitter.C (3.5 KB)