How does GetEntry work?

I’m trying to pass values from two branches to two variables in order to perform computations with the two values, and if the values end up lower than a number, that event is stored.
However, when I tried to use a GetEntry for both branches, such as collecting the value of phi for event 4, I just get an arbitrary number, such as (int)360 or (int)444. Is GetEntry supposed to be used differently, or is there another function that does this?

What you are doing is not very clear.
Can you post a reproducer ?

Let’s say I have the following tree, with each column being a separate branch.
njets Jets_phi Jets_eta Jets_pt
And each branch is filled in with corresponding entries. I want to access the first value of Jets_eta, measure it and see if it’s less than a certain value, then move on to the next one. This would be easier with a histogram, but I want to output each entry in print format. So how would I access a single leaf at a time?

and Header files for Trees

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