I’m using the PyRoot implementation of RooFit and it works great. IHowever, 'm running into an issue tonight though trying to get the integral of a PDF.
I’ve rewritten the rf308_normintegration2d.C tutorial and I attach it to this post. The tutorial shows how you can define a sub-range and integrate the PDF only over that sub-range.
[code]# Define a range named “signal” in x from -5,5
Create an integral of gxy_Norm[x,y] over x and y in range “signal”
This is the fraction of of p.d.f. gxy_Norm[x,y] which is in the
range named “signal”
igxy_sig = gxy.createIntegral(RooArgSet(x,y),RooFit.NormSet(RooArgSet(x,y)),RooFit.Range(“signal”))
print “gx_Int[x,y|signal]_Norm[x,y] = %f” % ( igxy_sig.getVal() )[/code]
When I run the C version, I get
gx_Int[x,y|signal]_Norm[x,y] = 0.572035
The python version gives me
gx_Int[x,y|signal]_Norm[x,y] = 1.000000
The rest of the output is the same. It seems to not like the RooFit.Range(XXX).
rf308_normintegration2d.py (3.17 KB)