Calculating pt from tree

Hello everyone,
I have a root file l, having a tree. Tree consist of multiple branches like En, Mass, px,py,pz etc.
Now I want to find pt and rapidity from these branches by applying mathematical formulas sqrt(px2+py2) and log(En+pz)/(En-pz). And want to plot there histograms. But having now idea how to do. Can anybody help?
Thanks in advance.

See the tree1r function:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.