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?