Cut on an appended RooDataSet

Hi, I’m doing smth wrong and need help to understand what’s going on and then fix it.

I have 2 data sets:
RooDataSet *data0_a = new RooDataSet(“data_a”,“data_a”,theTree,
RooDataSet *data0_b = new RooDataSet(“data0_b”,“data0_b”,theTree,

with runNumber_a and b defined like:
RooRealVar* runNumber_a = new RooRealVar(“runNb”, “runNb”,1, 1000);
RooRealVar* runNumber_b = new RooRealVar(“runNb”, “runNb”,5000, 10000);

I append the 2 data sets (operation confirmed by the Print(), the new data0_a is data0_a (initial) + data0_b )

Then, I create a new data set and want to apply a cut, like so:
RooDataSet data = ( RooDataSet)data0_a->reduce(Cut(cut_));

This last bit does not work. It makes a cut, but on the initial data0_a, not on the one that has appended the second data set. How can I do this right?

Thanks, c.