Plotting absolute rapidity

Hey,

I am trying to plot absolute rapidity for <1 and >1, but I am not sure how to implement this in my code:

     TCanvas C("C", "C", 800, 800);
     RooPlot *MassPlot = jpsi_mass.frame(Title("Mass"));

     data->plotOn(MassPlot);
     RooDataSet *Moo1 = data->reduce(Cut("abs(jpsi_rap <= 0.0)"));
     Moo1->plotOn(MassPlot, MarkerColor(kRed));
     RooDataSet *Moo2 = data ->reduce(Cut("abs(jpsi_rap >= 0.0)"));
     Moo2 ->plotOn(MassPlot, MarkerColor(kBlue)); 

     MassPlot->Draw();
     C.SaveAs("Data.eps");

I.e I want to change the cuts to plot the absolute value of the rapidity <1 and >1.

Hi,

I am not sure I understand your question. Just do

d1 = data ->reduce(Cut("rapidity > 1"));
d1 = data ->reduce(Cut("rapidity <  1"));

Lorenzo