The plotting example shows how one can extract pdf sub-components for a given discriminating variable (the example above uses the variable 't', and the fit component for signal). Once you have obtained this PDF, if you have a sample of reference data or Monte Carlo simulated data, it is trivial to fit the PDF to the data using:
pdf->fitTo(data, "tm")
where if you're interested in fitting the signal PDF for variable t only to some Monte Carlo, you would replace 'pdf' with 'sigpdf_t', and would make sure that the data sample fitted corresponded to the sample you're interested in.
More information on making and using RooDataSets is given in the RooFit introductory tutorial.
This page is maintained by Adrian Bevan.