24void rf304_uncorrprod()
34 RooRealVar meanx(
"mean1",
"mean of gaussian x", 2);
35 RooRealVar meany(
"mean2",
"mean of gaussian y", -2);
36 RooRealVar sigmax(
"sigmax",
"width of gaussian x", 1);
37 RooRealVar sigmay(
"sigmay",
"width of gaussian y", 5);
39 RooGaussian gaussx(
"gaussx",
"gaussian PDF",
x, meanx, sigmax);
40 RooGaussian gaussy(
"gaussy",
"gaussian PDF",
y, meany, sigmay);
52 std::unique_ptr<RooDataSet> data{gaussxy.generate({
x,
y}, 10000)};
57 gaussxy.plotOn(xframe);
60 RooPlot *yframe =
y.frame(
Title(
"Y projection of gauss(x)*gauss(y)"));
62 gaussxy.plotOn(yframe);
65 TCanvas *
c =
new TCanvas(
"rf304_uncorrprod",
"rf304_uncorrprod", 800, 400);
68 gPad->SetLeftMargin(0.15);
69 xframe->GetYaxis()->SetTitleOffset(1.4);
72 gPad->SetLeftMargin(0.15);
RooArgList is a container object that can hold multiple RooAbsArg objects.
Plot frame and a container for graphics objects within that frame.
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
Efficient implementation of a product of PDFs of the form.
Variable that can be changed from the outside.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
RooCmdArg Title(const char *name)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...