I have a total p.d.f. which is the RooAddPdf of two RooKeysPdfs. I fit this total p.d.f. to a histogram of data as a function of LogX, which is just log(X), where X is another observable in my list.
After the fit, I can view the fit to the distribution of LogX and it looks fine.
Now I would like to plot X, and then show the total p.d.f. as a function of X plotted on the data points.
Plotting X is of course easy.
Plotting the p.d.f. seems a bit harder. I think one method is to recall:
P(x) = P(y) dy/dx for a p.d.f. P
I may define y = log(X) = LogX, so P(X) = P(log(X))/X
However, I cannot seem to write anything that returns P(X)
I have tried using RooClassFactory, but RooAbsPdf won’t accept another p.d.f. as input, for example.
I am hoping there is a simple way to do it, as it would be really useful. Any advice?
Thanks in advance,