Barlow-Beeston in subrange

I posted about an issue with integral in a subrange with Barlo-Beeston [1] and recently saw on root github that a fix [2] was made. Thanks for this.

However, I find that there’s still a bug with the getPropagatedError() method with the object returned by createIntegral(). The output that I get with the test code shared in [1] is this:

**Code snippet:**
RooAbsReal * integral_sig1 = p_ph_sig1.createIntegral(RooArgSet(x), RooArgSet(x), “window”);
Double_t Asig1val = Asig1.getVal();
Double_t Asig1val_err = Asig1.getError();
Double_t integval_sig = integral_sig1->getVal();
Double_t dintegval_sig = integral_sig1->getPropagatedError(*result1, RooArgSet(x));
cout << "Asig1 : " << Asig1val << " +/- " << Asig1val_err << endl;
cout << "Signal Integral in window: " << integval_sig << " +/- " << dintegval_sig << endl;

RooAbsReal * integral_sig2 = p_ph_sig1.createIntegral(RooArgSet(x), RooArgSet(x), “window1”);
integval_sig = integral_sig2->getVal();
dintegval_sig = integral_sig2->getPropagatedError(*result1, RooArgSet(x));
cout << "Signal Integral in window1: " << integval_sig << " +/- " << dintegval_sig << endl;
[#1] INFO:Eval -- RooRealVar::setRange(x) new range named 'window' created with bounds [-20,20]
Asig1 : 0.850507 +/- 0.235778
Signal Integral in window: 80.026 +/- 11.3836
[#1] INFO:Eval -- RooRealVar::setRange(x) new range named 'window1' created with bounds [-5,0]
Signal Integral in window1: 29.4324 +/- 11.3836

The integral error doesn’t change after altering the range.

Seems there is still a bug. Would you be able to take a look?

[1] CreateIntegral giving wrong results
[2] [RF] Consider rangeName for integration in RooParamHistFunc · root-project/root@c250ee4 · GitHub

Just to be sure, this is with the latest master branch from github?

Yes, that’s correct.

@moneta @jonas Can you help?

Hi @quantiser, thanks a lot for reporting this! There is indeed a problem when evaluating the uncertainty of an integral. I have made a pull request to fix this issue:

By the way, do you need this to be fixed in the 6.24 release? I guess you don’t want to keep using the ROOT master branch in your analysis.

Thanks for the fix! Yes, it would great if you could put it in 6.24

Sure! Just to document this issue completely in this forum thread:

The bug was now fixed with an another pull request (not the one linked in my previous post):

It also got integrated in the 6.24 branch so you can profit from this in the next release:

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