# How do we iterate through TrackParticles\_v1?

**URL:** <https://root-forum.cern.ch/t/how-do-we-iterate-through-trackparticles-v1/32042>\
**Category:** Newbie\
**Created:** [December 17, 2018, 11:02pm UTC](https://root-forum.cern.ch/t/how-do-we-iterate-through-trackparticles-v1/32042 "2018-12-17T23:02:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rychan](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/cab0a1/32.png) [@rychan](https://root-forum.cern.ch/u/rychan)\
**Post date:** [December 17, 2018, 11:02pm UTC](https://root-forum.cern.ch/t/how-do-we-iterate-through-trackparticles-v1/32042/1 "2018-12-17T23:02:30Z")

</div>

I have a root file that that has a branch with leaves of all sort. I want to iterate and plot histograms with specific headings.  
 ![image](https://root-forum.cern.ch/uploads/default/original/3X/b/9/b928d88463e1ab0bf0c83ff55bfeb259e7704bdb.png)

From this picture, I am attempting to read and plot data on everything that starts with “numberOf” within the InDetTrackParticles.

Right now I have:  
f = ROOT.TFile.Open(filename)  
t = ROOT.xAOD.MakeTransientTree(f, tree\_name)

for i in t:  
for j in i.InDetTrackParticles:

But I can’t iterate through j to grab out the stuff I want. Any help would be appreiciated

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [December 18, 2018, 9:01am UTC](https://root-forum.cern.ch/t/how-do-we-iterate-through-trackparticles-v1/32042/2 "2018-12-18T09:01:03Z")

</div>

Hi,

I understand your issue but unfortunately the solution is not related to ROOT but rather to ATLAS’ xAOD format. I think that this question would be better asked in an ATLAS specific Forum.

Cheers,  
Danilo

---

<div class="post-metadata">

**Author:** ![rychan](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/cab0a1/32.png) [@rychan](https://root-forum.cern.ch/u/rychan)\
**Post date:** [December 18, 2018, 4:38pm UTC](https://root-forum.cern.ch/t/how-do-we-iterate-through-trackparticles-v1/32042/3 "2018-12-18T16:38:33Z")

</div>

Hi Danilo,

I can’t seem to find an appropriate ATLAS forum. Do you know where in particular I should look in particular?

Thanks,  
Ryan

---

<div class="post-metadata">

**Author:** ![yus](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/9fc348/32.png) [@yus](https://root-forum.cern.ch/u/yus)\
**Post date:** [December 18, 2018, 5:27pm UTC](https://root-forum.cern.ch/t/how-do-we-iterate-through-trackparticles-v1/32042/4 "2018-12-18T17:27:04Z")

</div>

Hi Ryan,

try [the PAT forum](https://groups.cern.ch/group/hn-atlas-PATHelp/Lists/Archive/100.aspx).
