Add a constraint to 2D fit model

Hi,
I want to add a constraint to the 2D fit model. The model is

RooRealVar x("x", "x", -10, 10);
RooRealVar y("y", "y", -10, 10);

RooPolynomial pdf1("pdf1", "pdf1", x, RooArgList(a0));
RooPolynomial pdf2("pdf2", "pdf2", y, RooArgList(b0));

RooProdPdf model("model", "model", RooArgList(pdf1, pdf2));

The constraint is that the model is 0 when (x+y) > A (constant). How can I add this to the model or in the fit process?

Hi,

You should multiply your model by a pdf(x+y) that is zero for x+y > A and uniform for x+y<A. You should have finite bounds for x and y in order to have this working

Lorenzo