Getting a pdf R(x/1+d) from existing pdf R(x)

Dear Experts,
This might be a very silly question.

If I have a pdf R(x) on a RooRealVar ‘x’ then how can I get pdf R(x/1+d) and plot both on the same frame. Lets say ‘d’ is a small value ~ 0.01.


Suppose d is a constant variable, with value 0.01 and x is the RooRealVar you can do is using the RooFormulaVar:

RooRealVar d("d","d",0.01); 
RooFormulaVar xp("xp","xp","x/(1.+d)",RooArgSet(x,d)); 

and then you can pass xp to replace x when you build your pdf, e.g. in the constructor of a RooGaussian if you want a gaussian pdf.

Best regards


1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.