Hi all,
I have a TTree with several array branches, and I’d like to make aliases out of them.
Say I have two array branches px and py, I define a pT alias as:
T->SetAlias(“pT”,“sqrt(px2+py2)”);
This new variable works fine if I want to sum over it. This is
T->Scan("Sum$(pt)")
T->Scan("Sum$(sqrt(px**2+py**2))")
give identical results. But it doesn’t work if I want to access individual values:
T->Scan("pt[3]")
T->Scan("sqrt(px[3]**2+py[3]**2)")
The former gives the error message
How should I define the alias so it is equivalent to “(px[3]^2+py[3]^2)” instead?
Thanks,
Alberto