How to subtract two RooDatasets


I have two roodatasets, obtained from a single roodataset after applying two different cuts. I need to subtract one from the other in order to subtract the background. I couldn’t find a straightforward way to do this. Could some one please suggest me an example.

I followed the discussion here. But that recipe of using ‘setWeightVar’ doesn’t work.

thanks in advance