The people that implemented RooMultiPdf had a doubt: they didn't dare to
implement RooMultiPdf::evaluate() because they were not sure how the
normalization set information is propagated.
The anser is: it's propagated in the base implementation of getValV()
via the proxies, like the RooListProxy with the pdf in this case. The
propagated normalization set can be queried from the proxy with
nset().
Hence, this PR suggests to implement evaluate() accordingly.
Furthermore, the selfNormalized() method needs to be overridden, to
indicate that the base implementation of RooAbsPdf::getValV() doesn't
need to create any normalization integrals implicitly, which would be a
huge performance hit.
This more standard implementation makes sure that the class is more
compatible with regular RooFit, which expects that evaluate() is
implemented.
It was validated with the following command that results and performance
remain unaffected:
The people that implemented RooMultiPdf had a doubt: they didn't dare to implement
RooMultiPdf::evaluate()
because they were not sure how the normalization set information is propagated.The anser is: it's propagated in the base implementation of
getValV()
via the proxies, like the RooListProxy with the pdf in this case. The propagated normalization set can be queried from the proxy withnset()
.Hence, this PR suggests to implement
evaluate()
accordingly.Furthermore, the
selfNormalized()
method needs to be overridden, to indicate that the base implementation ofRooAbsPdf::getValV()
doesn't need to create any normalization integrals implicitly, which would be a huge performance hit.This more standard implementation makes sure that the class is more compatible with regular RooFit, which expects that
evaluate()
is implemented.It was validated with the following command that results and performance remain unaffected:
Two additional commits in this PR fix a memory leak and refactor the code to be less verbose respectively.