24 for (
int i=0; i <
data.numEntries() && i < 20; ++i) {
26 for (
const auto var : *
data.get(i)) {
27 std::cout << std::setprecision(3) << std::right << std::fixed << std::setw(8) << static_cast<const RooAbsReal*>(var)->getVal() <<
", ";
29 std::cout <<
")\tweight=" << std::setw(10) <<
data.weight() << std::endl;
36 std::cout <<
"mean(x) = " <<
data.mean(
x) <<
"\tsigma(x) = " << std::sqrt(
data.moment(
x, 2.))
37 <<
"\n" <<
"mean(y) = " <<
data.mean(
y) <<
"\tsigma(y) = " << std::sqrt(
data.moment(
y, 2.)) << std::endl;
48 .Define(
"y", [](){
return gRandom->
Gaus(1., 3.); });
71 auto rooDataSet = dd.Book<
double,
double>(
89 auto rooDataHist = dd.Book<
double,
double>(std::move(rdhMaker), {
"x",
"y"});
98 printData(*rooDataSet);
99 printData(*rooDataHist);
RooAbsDataHelper< RooDataSet > RooDataSetHelper
Helper for creating a RooDataSet inside RDataFrame.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
R__EXTERN TRandom * gRandom
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
This is a helper for an RDataFrame action, which fills RooFit data classes.
Abstract base class for binned and unbinned datasets.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooRealVar represents a variable that can be changed from the outside.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).