Options when plotting an unbinned RooDataset

Dear ROOTer’s,

I want to plot an unbinned dataset using this simple script (ROOT 5.22):

void test(){

  TString p_bkg = "/afs/cern.ch/user/x/xprudent/scratch1/MC_SUSY/ttbar.root";
  TFile* f_bkg = TFile::Open( p_bkg );
  TTree* t_bkg = (TTree*) f_bkg->Get( "tree" ); 

  RooRealVar MT( "MT", "MT", 0., 1000. );
  RooRealVar Meff( "Meff", "Meff", 0., 3000. );
  RooDataSet* d_bkg = new RooDataSet( "d_bkg", "d_bkg", t_bkg, RooArgList( MT, Meff ) );

  RooPlot* frame1 = MT.frame();
  TCanvas* c1 = new TCanvas("c1", "c1", 900,600); 
  c1->cd(); 
  frame1->Draw();
 d_bkg->plotOn( frame1, XErrorSize(0),  MarkerSize(1.0), DataError(RooAbsData::SumW2), MarkerColor(2) );

  frame1->Draw();
  return;
}

But I got the error
Error: Function XErrorSize(0) is not defined in current scope test.C:17:
for all the options I include.
It works fine only if I plot the dataset with :
d_bkg->plotOn( frame1);

Do you have an idea why ?

Thanks in advance,

Xavier

Hi,

We recommend that you post RooFit question on the Stat and Math Tools forum rather than the generic ROOT Support.

Philippe.