Template Fit with TFractionFitter with 4 parameters

Hello,

I try to perform a 2-dimensional Template Fit with 4 Templates.
I’m just adding up these 4 Templates and fill a new Histogram with the matching integer values which should be my “data” for the TFractionFitter. Afterwards I scale the templates with a factor 1000 (or less), since they do have a large statistic but each entry has just a small weight. So these scaled templated are added to my “mc” for the Fitter. All in all the bin values in the Templates sum up to the bin values of the data, just multiplied with a factor 1000.
When I perform the Fit I first get warnings like
MINUIT WARNING IN MIGRAD
============== Negative diagonal element 1 in Error Matrix

and then
ERR MATRIX NOT POS-DEF
Error in TFractionFitter::ComputeChisquareLambda: Fit not yet (successfully) performed
fit status: 4
Error in TFractionFitter::GetResult: Fit not yet performed
Error in TFractionFitter::GetResult: Fit not yet performed
Error in TFractionFitter::GetResult: Fit not yet performed
Error in TFractionFitter::GetResult: Fit not yet performed

When I use only 3 Templates the Fit works perfectly.

Any ideas?

Thank you,
Nina
Fitter.C (3.71 KB)