Hi,
I have saved the dataset (RooAbsData), the fit to this dataset (RooAbsPDF)
and the fit result (RooFitResult) to a root file.
How can I plot 1 sigma error band to this fit?
I am trying to do like this:
[code] RooWorkspace *ws = (RooWorkspace *)f->Get(“workspace”);
RooAbsData *data = ws->data(“data_obs_cat1”);
RooRealVar *mass = ws->var("mass");
RooAbsPdf *extbkg = ws->pdf("pdf_bgr_cat1");
RooFitResult *r = (RooFitResult *)extbkg->fitTo(*data);
RooPlot *plot = mass->frame();
data->plotOn(plot);
extbkg->plotOn(plot);
extbkg->plotOn(plot,VisualizeError(*r,1),FillColor(kCyan-6));
extbkg->plotOn(plot,VisualizeError(*r,2),FillColor(kCyan-10));
[/code]
But it does not plot the error bands. What would you suggest?
Thanks in advance,
Shilpi