RooFit: RooRealVar x("log(x)", "log(x)", -5, 5) Doesn't work


I’m importing some data from an NTuple and want to fit to the log of the value.
I’ve tried to import the log of a value and apply it to a RooRealVar as follows:

Where x is also a branch in my NTuple.
This doesn’t work and all values are -1.

Is it possible to do this, and if not, what’s the best alternative?

Thanks in advance.

May be you can provide a small script reproducing the issue ?