How do I read my leafs in this case of tchain

So, I have a code that reads to me variables of a specific Tree format using TChain, as is the case with MC2016.root.
The code in question is this
trigEffStudy.C (40.8 KB)
Where on line 62 I access the tree, using TChain, and on line 196 I link the tree variables into a set of variables defined in a struct.h.
I want to modify the code so that I can link the variables in the same way, only now in a tree with the following format:
I tried in different ways, and I was not successful, I must be forgetting something very silly, but this step already consumed me a lot of time, if anyone knows how I could do this, I appreciate it! And before anything else, thanks for your attention.

…and out of the wealth of wisdom shared by Wile_E: do yourself a favor and skip everything, advancing directly to RDataFrame: it will be much faster for you, less weird corner cases, faster analysis, and you can have it grow gradually from a simple “just some leaves” to a full-blown physics analysis.

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