#include "RooMyPdf.h" #include "RooRealVar.h" #include "TCanvas.h" #include "RooPlot.h" #include "RooGlobalFunc.h" #include "TROOT.h" int main() { gROOT->SetBatch(kTRUE); gROOT->SetStyle("Plain"); RooRealVar x("x", "x", -10, 10); RooRealVar alpha("alpha", "alpha", 1, 0, 10); RooMyPdf pdf("pdf", "custom PDF", x, alpha); RooPlot * xFrame = x.frame(); pdf.plotOn(xFrame, RooFit::LineColor(kRed)) ; TCanvas c; xFrame->Draw(); c.SaveAs("04-customPDF.pdf"); return 0; }