RooAddPdf.plotOn with negative components

Hi,
I think this is a limitation of plotting “Components”.
When selecting a components, instead of plotting the corresponding pdf, the evaluation of the RooAddPdf is modified to include the selected components.
See ROOT: roofit/roofitcore/src/RooAddPdf.cxx Source File

This will then result in a negative pdf, that will make RooFit complaining. I don’t know how to fix this easily. It would be great if you can open a GitHub issue on this and we can address in the future. I don’t think is high priority, since workaround exists, for example plotting directly the corresponding component pdf’s.

Cheers
Lorenzo

1 Like