Dear all,
I can’t explain what’s happening other than posting an example.
KstJPsEE_L0H_fitAndRes.pdf (32 KB)
I’m trying to draw “stacked” backgrounds with the filled style.
Fist one background and the the sum of the first and second background,
then the sum of first second and third, etc.
The thing works. If I just plot lines everything is fine.
But if I use the fill style it seems RooFit draws a line connecting
the points at the extremes and the colors the difference between
my PDF and that line. What am I doing wrong?
The code line is
model->plotOn(frame, range2, Components(curBkg), DrawOption("F"),
FillColor(col),
FillStyle(1001),
LineWidth(0.),
LineStyle(0),
LineColor(col),
Name(myBkgName),
MoveToBack());
Instead the following, using just lines works perfectly
model->plotOn(frame, Components(curBkg), range2, DrawOption("L"),
LineColor(colors[counter]),
LineStyle(styles[counter]),
Name(myBkgName),
MoveToBack());
Thanks,
Luca