I am trying to construct cumulative distribution functions from pdfs constructed from histograms via RooHistPdf. The RooHistPdf shapes are well formed and seem fine but when I construct a cdf using createCdf the resultant function is a constant zero. I've tried using the setCdfBoundaries but it doesn't seem to do anything and also doesn't seem to be documented. Is there some additional step that must be taken after creating a RooHistPdf before a cdf can be constructed from it?
Example of how I currently try and construct the cdf
The macro you have written is correct. The reason it doesn’t work is a bug in the integration handling of RooHistPdfs in older ROOT versions.
I’ve tested a variant of your macro in 5.25/02, in which it works fine.
(there are some warnings about evaluating the numeric cdf integral in the
range [100,100] for the cdf value at x=100 that can be ignored)
Since I have made no changes here since 5.24 I expect that this will also work fine in ROOT 5.24.
I actually encountered the same problem attempting to use my macro in root 5.24 but using root 5.25 I have no problems and the cdf is created properly.