Hello Rooters,
I have a ntuple with two branches, let’s name them “AOP1” and “AOP2”, and I want to add to this same ntuple a third branch with entries given by a function of AOP1 and AOP2. The function defined by a string.
I would like to know if there is any of these two options availabe in ROOT:
-
to evaluate a function (defined by a string) with arguments given by the branches (e.g.: “AOP1+AOP2*AOP2”) and insert the output to the original ntuple as a new branch.
-
the method TTree::Draw(), allows me to calculate the function using the TCut in the selection argument, but I can’t get the result for each entry, but rather for each bin (not useful). Is it possible to get the output of the evaluation of its function for each entry?
Many thanks in advance,
H.