RooFIt: get sigma() from a dataset within a certain variable range

In RooFit, I would like o use the sigma() function from a simple dataset to calculate its RMS. I want to specify the range of the variable for this.
According to the reference, it is possible:

But I don’t understand how to skip the cutSpec argument and how to specify the cutRange properly. These don’t work for me:

ds.sigma(var, None, "myRangeName") ds.sigma(var, "", "myRangeName")

Any help would be great.

My solution to the problem is to use reduce() function to a dataset before sigma().
Still, would be nice to use this functionality in sigma() itself.


yes, it should be possible to pass nullptr. I have zero time for PyROOT at the moment. Please file a bug report ( to keep track of this issue.