Hello,
I have a big tree with somthing like 90 different branch which contains the same leaf. See example:
One of the branch:
JetIC_TR_DR30_size = 5
JetIC_TR_DR30.E = 212.257843, 135.838760, 227.203079, 37.975430, 22.027512
JetIC_TR_DR30.Px = -140.315536, -1.380136, -18.705088, 29.495493, -7.386530
JetIC_TR_DR30.Py = 158.080704, -60.837593, -46.806648, -22.121532, -6.835046
JetIC_TR_DR30.Pz = -14.499918, -121.257324, -221.510529, 8.405622, -19.575159
…
Another one
JetIC_TR_DR35_size = 6
JetIC_TR_DR35.E = 212.257843, 135.838760, 227.203079, 45.725357, 22.027512, 34,4234432
JetIC_TR_DR35.Px = -140.315536, -1.380136, -18.705088, 35.674442, -7.386530, 654,4323
JetIC_TR_DR35.Py = 158.080704, -60.837593, -46.806648, -26.679886, -6.835046, 54,12332
JetIC_TR_DR35.Pz = -14.499918, -121.257324, -221.510529, 7.398261, -19.575159, 786,432443
…
I have to reapeat the same peace of code on each branch. The rough algo would be something like this:
A) choose branch
B) assign:
for (int n0=0;n0<chooseBranch_size;n0++) {
myPx[n0]= chooseBranch_Px[n0]
myPy[n0]= chooseBranch_Py[n0]
…
}
C) do whatever I need using myPx, myPy, myPz…
On option would be using a switch reapting step B) and using 90 case… but I hope there is a more efficient way, like define a variable name from a charcter array.
Any idea, suggestion, example on a better way to deal with this problem?
Thanks
Attilio