{ // observables RooRealVar x("x", "random var x", 0.0, 1.0); RooRealVar y("y", "random var y", 0.0, 1.0); // Gaussian model of x RooRealVar mu("mu", "mean parameter", 0.5, 0.0, 1.0); RooRealVar sigma("sigma", "width parameter", 0.1, 0.0, 0.3); RooGaussian gaus("gaus", "Gaussian PDF", x, mu, sigma); // Polynomial of y: 1 + p1*y + p2*y^2 RooRealVar p1("p1", "coeff. of y^1", +0.3, -10., 10.); RooRealVar p2("p2", "coeff. of y^2", -0.8, -10., 10.); RooPolynomial poly("poly", "2nd order poly.", y, RooArgSet(p1,p2)); // product: Gaussian(x) * Polynomial(y) RooProdPdf model("model","PDF model", gaus,poly); TH1* model_hist = model.createHistogram("x,y",50,50); model_hist->Draw("surf"); }