Manipulate RooRealVar

Hi,

I have the following problem.
I have a variable x in a tree T.
I need to create a RooDataSet Data in which I would need to include the logarithm of x, instead of x.

If I want to include x, I would write:

RooRealVar x(“x”,“x”,min,max,“units”)
RooArgSet arg(x,…other variables…)
RooDataSet Data(“Data”,“Data”,T,arg,“cuts”)

where “x” is exactly the name of the variable stored in T. But I need Log(x)!

How can I proceed?

Thank you.
Vincenzo

Hi,

I think you need to loop on the tree entries and call RooDataSet::add to add each entry using the log of x.

Best Regards

Lorenzo

[quote=“moneta”]Hi,

I think you need to loop on the tree entries and call RooDataSet::add to add each entry using the log of x.

Best Regards

Lorenzo[/quote]

Ok,

thank you for your answer.

Cheers,
Vincenzo.