Dear ROOT experts,
This might be an unusual question, but is there a way to have a TBranch in a TTree that is the function of a second TBranch in a TTree?
E.g. let’s say I have a TBranches of integers in my TTree that is like
myInt = [1,2,3,4,5]
and I want to store a second TBranch whose entries are the squares of the entries of myInt. I could just calculate the squares of myInt when I analyze the TTree or save a 2nd TBranch like
myIntSq = [1,4,9,16,25]
But let’s say I do not want to store this extra information and also don’t want to have to calculate myIntSq explicitly when analyzing the TTree.
Instead I want each entry of myIntSq to be a function of the corresponding entry of myInt.
Is that possible?
Best,
Christian