Adding a Branch to an Existing Tree

Hi, I want to add a branch to an Existing Tree.I saw follow links and create it but i can’t fill my branch in my root file.

root.cern.ch/download/doc/ROOTUs … 12s16.html
In second link, first i had a problem with thisline
TTree t3 = (TTree)f->Get(“t3”);
and i change ‘’ → ‘’ with " . ‘’ .my problem was solved and a branch was added.

Realy i want to add pt and eta branch to this rootfile. I had px,py,pz,e from root file but i cant read them and calculate pt and eta for filling the pt and eta branch.i don’t know how do it?.

I attached my rootfile and addbranch code.
plz.propose a way to make them.
kapu.root (1.81 MB)
addBranch.C (406 Bytes)

I’v solved it.
I alwayes think about this site that it create for helping who donot know somethings about root!!!
Now,I found that i was wrong!!!
Thanks for your answer!!! =D> =D> =D>