I’m trying to plot some quantities from my tree for “electron PID == 11.” However, when I print the values,
I find unexpected results (too small) for some variables like Py, Pz, and E, while the values for Px appear to be as expected.
Could you please provide a solution to this issue?
Here is my macro which also contains the Tree Branches. Lepton_Theta.cc (13.4 KB)
and this is what you expect? What happens if you plot them with your code? If the values in the files are good, perhaps with debugging you can find the problem in your code…
Hi,
For energy (E), Py or Pz, it gave me zero, so they may not be read from the tree. However, for other variables like Px, it gave me the same value I obtained using TBrowser, which confuses me.
Maybe the issue is somwehre in your special code to get the branch (TClonesArray *branch = treeReader->UseBranch("Particle");, so check what’s happening there. Also, it could be an alignment issue; maybe you can try changing the order of variables in your class, from bigger to smaller (in bytes):