using namespace RooFit; void ArgusPlot() { RooRealVar x("x", "x", 5.25, 5.29); RooRealVar argpar("argpar", "argus shape parameter", -0.5, -3.0,-0.01 ); RooRealVar cutoff("cutoff", "argus cutoff", 5.29); RooArgusBG argus("argus", "Argus PDF", x, cutoff, argpar); // Plot PDF RooPlot * xframe = x.frame(); argus.plotOn(xframe, Name("myArgus")); xframe-> Draw(); //Generate a toy MC sample RooDataSet * data = argus.generate(x, 10000); //Plot PDF RooPlot * xframe = x.frame(); data-> plotOn (xframe); xframe->Draw(); //ML fit of gauss to data argus.fitTo(*data); RooPlot * xframe2 = x.frame(); data->plotOn(xframe2); argus.plotOn(xframe2); argus.paramOn(xframe2); xframe2->Draw(); }