We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ad741c commit 960af09Copy full SHA for 960af09
_episodes/01-dd4hep.md
@@ -81,12 +81,12 @@ print(f"Read {fname}:{tree_name}. \n {tree.num_entries} events in total")
81
> Exercise 1.2: inspect available branches in a rootfile
82
> - use ```tree.keys(filter_name="*",recursive=False)``` to display all branches
83
> - extract a given branch to dataframe
84
- ```console
+```console
85
bname = "MCParticles"
86
df = tree[bname].array(library="ak")
87
df = ak.to_dataframe(df)
88
print(df)
89
- ```
+```
90
{: .challenge}
91
92
@@ -99,7 +99,6 @@ pdg_id = part.pdgid.abspid
99
condition1 = df["MCParticles.PDG"]==pdg_id
100
# select primary particles
101
condition2 = df["MCParticles.generatorStatus"]==1
102
-
103
# extract momentum and plot
104
# all electrons
105
df_new = df[condition1]
0 commit comments