RooAbsReal -> createHistogram

Hello

I want to create a 2d histo:

TH1* hh = model->createHistogram("hh", *parameter ,Binning(40),YVar(*variable,Binning(40)),Scaling(kFALSE)) ;

where “parameter” is a RooAddition, which is NOT RooAbsRealLValue. So I cannot use the createHistogram method.

It seems to me that I should be allowed to do this. Is there a workaround for this?

Akira

Hi Akira,

Let me understand what you want.

You have a function F(x) and a transformation y(x) and now you want to plot F(y)
rather than F(x).

If the function y(x) is invertible this is straightforward as I can construct a scan in
F(y) by simpling looking up the corresponding value of x for each y.
This is implemented, RooAbsRealLValue is the base class for invertible functions).

If y(x) is not invertible, the general case is difficult, and currently not implemented.
One could use a numeric root finder to invert the function brute force, but one has
to handle cases where there are multiple solution for x, or no solution for x, so it
is not so easy.

If you know how to invert the function yourself, it is possible to make the plot
you want in a relatively straightforward way: From your RooAbsPdf object
F(x) and the inversion function (RooAbsReal) x(y) you create a new object
F’(x(y)) by simpling plugging function x(y) in the place where you’d put variable x
in your original F. At that point you have a F’(y) where y is a variable and you
can use createHistogram to make the plot.

Wouter

Hi Wouter

Thanks for your reply. I understand your point, I’ll try to implement it.

Cheers
Akira