for the weighted input histograms I get what you posted.
but the result depends on the binning of the input histograms, which is against the common sence.
[quote=“brun”]I cannot reproduce your problem. see the picture I get in attachment
TFractionFitter makes explicit use of the normalization of the input histogram.
The second “template” histogram in your example (referred to as _hmc2 in your
macro) is normalized to unity. This implies that effectively, you’re giving TFractionFitter
much too much freedom to fluctuate this template.
Use the un-renormalized histogram and you should be fine (I tested this briefly by
scaling _hcm2 up by a factor of 1280, but even that is presumably an underestimate).
Dear Frank
thank you! I would never think that fit might take into account the normalization of the input histograms. …and still can not believe that it does, as it makes no sense to me.
It should take into account only the content/errors of the bins.
…may be i am wrong, and the algo must work directly with the content values directly as well. but in this case, when the histogram normalization is unknown beforehand, and the task of the fit is to extract this very normalization (which is the sole purpose of the TFractionFitter class)…then the fit will produce such crazy output as in my case.
proposal: add in bold to the description of the TFractionFitter class, that
"TFractionFitter makes explicit use of the normalization of the input histogram."
thanks!
Igor
[quote=“filthaut”]Dear Igor,
TFractionFitter makes explicit use of the normalization of the input histogram.
The second “template” histogram in your example (referred to as _hmc2 in your
macro) is normalized to unity. This implies that effectively, you’re giving TFractionFitter
much too much freedom to fluctuate this template.
Use the un-renormalized histogram and you should be fine (I tested this briefly by
scaling _hcm2 up by a factor of 1280, but even that is presumably an underestimate).
btw, is it possible to define in the TFractionFitter a gap in the fitting range?
i.e. only [0:5] and [10:15] are used. and range (5:10) is excluded?
[quote=“filthaut”]Dear Igor,
TFractionFitter makes explicit use of the normalization of the input histogram.
The second “template” histogram in your example (referred to as _hmc2 in your
macro) is normalized to unity. This implies that effectively, you’re giving TFractionFitter
much too much freedom to fluctuate this template.
Use the un-renormalized histogram and you should be fine (I tested this briefly by
scaling _hcm2 up by a factor of 1280, but even that is presumably an underestimate).