Hi everyone,
I have a question on how to build a “triangle PDF” in RooFit. Currently, I am trying the following:
// This is the variable
RooRealVar trueInvMass("trueInvMass","True invariant ll mass", 0.0, 130.0, "GeV");
// These are the parameters
RooRealVar leftCut("leftCut","left cut",1.0, 0.0, 3.0);
RooRealVar middleCut("middleCut","middle cut",99.0, 90.0, 105.0);
RooRealVar rightVar("rightVar","right var",3.0, 0.0, 11.0);
// I do this so that the right cut is always to the right of the middle cut
RooFormulaVar rightCut("rightCut", "@0+@1", RooArgList(middleCut, rightVar));
RooGenericPdf trianglePdf("trianglePdf", "my triangle",
"(@0 > @1)*(@0 < @2)*(@0 - @1)+(@0 > @2)*(@0 < @3)*(@3 - @0)",
RooArgList(trueInvMass, leftCut, middleCut, rightCut));
But with this method, the two lines (left and right) don’t meet at the top, the apex of the triangle. So my question is: How do I build in the constraint that the two lines should meet at the top to actually form a triangle PDF???
Thanks a lot for your advice,
Karsten