Get Mean and RMS from unbinned ASCII Dataset

is there an elegant way to get the Mean and RMS values from an unbinned Dataset?
I searched for quiet some time now and all I got was the RooMoment class where you can call a mean, but the values from it didn’t make any sense.

The relevant parts of my code look like this, where I want to get the Mean and RMS for zeta

RooRealVar mes("mes","M_{inv}(#bar{p}#pi^{+})",mes_min,mes_max,"GeV") ;
RooRealVar zeta("zeta","#zeta",0,0.1) ;

RooDataSet* data = RooDataSet::read("Datasets/antilambda",RooArgSet(mes,zeta),"Q") ;

Thanks in advance,


There are RooDataSet::mean(…) and RooDataSet::sigma(…) :

double zetaMean = data->mean(zeta);
double zetaStDev = data->sigma(zeta); 


Hi Lorenzo,
Thanks for your quick response. That was exactly what I was looking for.
Best regards,