TFractionFitter: MC templates shifted

Dear experts,

I am trying to fit some data according to 2 MC templates. The approach doesn’t seem to work for certain input of data sets. The MC templates are shifted in a certain range and the fit experiences jumps. This range changes in dependence of the binning used. The data sets for which the method works, has a fine binning, so that I rebinned the histograms in such a way that the fit was performed in the entire range. In contrast, the data sets with coarse binning can not rebinned since the results lose significance.

    auto _objArr = new TObjArray(3);
    _FractionFitter = new TFractionFitter(_h1DataDCA, _objArr, "Q");
    // constrain fraction values
    _FractionFitter->Constrain(0, 0.5, 1.0); // pri
    _FractionFitter->Constrain(1, 0.0, 0.5); // sec

     // Setting additional parameter values
    auto _Fitter = _FractionFitter->GetFitter();

    // perform fit
    _FitStatus = _FractionFitter->Fit();

It would be great to understand why this happens and whether there is a solution. Attached you will find the code (the relevant function is called MakeTemplateFits()) and two examples of results,
Examples.pdf (31.3 KB)
SecondarySacling.cpp (30.6 KB)
one that works fine and one that doesn’t. Please let me know if you need more information. Thank you in advance

Please read tips for efficient and successful posting and posting code

_ROOT Version:6.22/02
_Platform: Ubuntu
Compiler: Not Provided

Sorry for the slow response, I’ll try to have a look tomorrow!

Hard to tell without the histograms. My suspicion is that the template or data histograms have an issue with the binning (I cannot discern the template hist in the PDF) or if that’s not the case then one of the histograms has an issue with its uncertainties. Maybe these two are related - maybe you have scaled the bin content with the inverse of the bin width but then forgot to also scale the uncertainties off the bins?

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