Error with Chi^2 fitting to unbinned dataset

Hi,

I am trying to fit a RooEfficiency pdf to an unbinned dataset using the .chi2FitTo method.

effPdf.chi2FitTo(*data,ConditionalObservables(muonPt));

However, when running I get the error
[#1] INFO:NumericIntegration – RooRealIntegral::init(effPdf_Int[cut,muonPt]) using numeric integrator RooIntegrator1D to calculate Int(muonPt)
Exception: RooXYChi2Var::ctor(chi2_effPdf_/tmp/tbalestr/HISingleMuonTrig_MB15Feb.root) ERROR: Input p.d.f. must be an extendible
runTriggerFitterDep.C:4:
(void)0
*** Interpreter error recovered ***

This seems like an easy fix, but I am having trouble getting it to work.

Did you (or anyone) figure this out? I’m having exactly the same issue here.

Hi,

In principle you cannot fit using a chi2 un unbinned data set. It might work if each point contains a weight and this value is interpreted as the bin content.
However, the pdf for fitting must be extended ( i.e. RooAbsPdf::canBeExtended() must return TRUE) and I guess this is your problem.

Lorenzo

Hi,
Thanks for your answer!
Indeed, the problem is that the likelihood isn’t extended. The problem is that I’m fitting a set of scale factors - so there is no extended constraint that makes sense. So my model isn’t exactly the way that most people are using RooFit. Yet the errors and the fit results are all well known. So it seems like this is an oversight. I’ve been implementing the chi2 by hand… though I’ve not added in the correlations (that is for this weekend) to get around this.