Running integral of RooHistFunc not working?

Hi,

Can anyone help me understand why the standard “createRunningIntegral” method doesn’t seem to work for a RooHistFunc? I get the right sort of result if I do “createScanRI”, but I don’t understand why the main method produces a function that is zero everywhere. Here’s a minimal example:

TH1D* h = new TH1D("h","h",10,0,10);h->Fill(5);
RooRealVar x("x","x",10,0,10);RooDataHist dh("dh","dh",x,h);RooHistFunc hf("hf","hf",RooArgSet(x),dh);

RooAbsReal* ri = hf.createRunningIntegral(x);
RooAbsReal* ri2 = hf.createScanRI(RooArgSet(x),RooArgSet(),100,2);

RooPlot* xframe = x.frame();

ri->plotOn(xframe); //THIS IS ZERO EVERYWHERE
ri2->plotOn(xframe,RooFit::LineColor(kRed)); //THIS IS ABOUT RIGHT

xframe->Draw()

I don’t seem to get this with other functions (e.g. RooFormulaVar). Why doesn’t it work?

Cheers

Will

Did you find a solution ?

Nope :frowning:

Hi,

Sorry for the late reply. A JIRA issue has been opened

sft.its.cern.ch/jira/browse/ROOT-7413?filter=-2

As a workaround you could use a RooHistPdf

Lorenzo

Dear all,

I have posted a bugfix in the JIRA ticket. Could you check if this is the expected behaviour.

Cheers,
Danilo

PS I am not a ROOT developer … just interested in fixing this.