40 c.defineType(
"Plus",+1) ;
41 c.defineType(
"Minus",-1) ;
57 for (i=0 ; i<1000 ; i++) {
60 c.setLabel((i%2)?
"Plus":
"Minus") ;
78 d.get(900)->Print(
"v") ;
87 cout << endl <<
">> d1 has only columns x,c" << endl ;
91 cout << endl <<
">> d2 has only column y" << endl ;
95 cout << endl <<
">> d3 has only the points with y>5.17" << endl ;
99 cout << endl <<
">> d4 has only columns x,c for data points with y>5.17" << endl ;
104 cout << endl <<
">> merge d2(y) with d1(x,c) to form d1(x,c,y)" << endl ;
109 cout << endl <<
">> append data points of d3 to d1" << endl ;
121 cout <<
">> construct dh (binned) from d(unbinned) but only take the x and y dimensions," << endl
122 <<
">> the category 'c' will be projected in the filling process" << endl ;
136 cout <<
">> number of bins in dh : " << dh.numEntries() << endl ;
137 cout <<
">> sum of weights in dh : " << dh.sum(
kFALSE) << endl ;
138 cout <<
">> integral over histogram: " << dh.sum(
kTRUE) << endl ;
142 cout <<
">> retrieving the properties of the bin enclosing coordinate (x,y) = (0.3,20.5) " << endl ;
143 cout <<
" bin center:" << endl ;
145 cout <<
" weight = " << dh.weight() << endl ;
151 cout <<
">> Creating 1-dimensional projection on y of dh for bins with x>0" << endl ;
164 cout << endl <<
">> Persisting d via ROOT I/O" << endl ;
165 TFile
f(
"rf402_datahandling.root",
"RECREATE") ;
175 new TCanvas(
"rf402_datahandling",
"rf402_datahandling",600,600) ;
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
RooAbsData * reduce(const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg())
Create a reduced copy of this dataset.
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooCategory represents a fundamental (non-derived) discrete value object.
RooDataSet is a container class to hold N-dimensional binned data.
virtual RooPlot * plotOn(RooPlot *frame, PlotOpt o) const
Back end function to plotting functionality.
RooDataSet is a container class to hold unbinned data.
void append(RooDataSet &data)
Add all data points of given data set to this data set.
Bool_t merge(RooDataSet *data1, RooDataSet *data2=0, RooDataSet *data3=0, RooDataSet *data4=0, RooDataSet *data5=0, RooDataSet *data6=0)
A RooPlot is a plot frame and a container for graphics objects within that frame.
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
RooCmdArg MarkerColor(Color_t color)
RooCmdArg LineColor(Color_t color)
RooCmdArg Bins(Int_t nbin)