Get minNll for fitting a weighted DataSet

Hi experts,

When I use some pdf to fit (unbinned likelihood fitting) a dataset which is weighted by positive and negative value like

RooAbsPdf somePdf;  // some Pdf
RooAbsData* wgtdata; // Dataset with positive and negative weight
RooFitResult* fitres = somePdf.fitTo (*wgtdata, RooFit::Save(kTRUE), RooFit::SumW2Error(kTRUE));
std::cout << fitres->minNll() << std::endl;

I got a very strange value for fitres->minNll() like 70.23 for example. If I came back to use unweight dataset associated with that weighted dataset, I got 230463 for example. Therefore, I want to ask

  1. The later is correct?

  2. Is this a bug for roofit when it handles weighted data?

  3. How do I avoid this issue when I want to use minNll information?

Many Thanks
Youying

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