Skip to content

Commit 960af09

Browse files
authored
Update 01-dd4hep.md
1 parent 4ad741c commit 960af09

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

_episodes/01-dd4hep.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ print(f"Read {fname}:{tree_name}. \n {tree.num_entries} events in total")
8181
> Exercise 1.2: inspect available branches in a rootfile
8282
> - use ```tree.keys(filter_name="*",recursive=False)``` to display all branches
8383
> - extract a given branch to dataframe
84-
```console
84+
```console
8585
bname = "MCParticles"
8686
df = tree[bname].array(library="ak")
8787
df = ak.to_dataframe(df)
8888
print(df)
89-
```
89+
```
9090
{: .challenge}
9191

9292

@@ -99,7 +99,6 @@ pdg_id = part.pdgid.abspid
9999
condition1 = df["MCParticles.PDG"]==pdg_id
100100
# select primary particles
101101
condition2 = df["MCParticles.generatorStatus"]==1
102-
103102
# extract momentum and plot
104103
# all electrons
105104
df_new = df[condition1]

0 commit comments

Comments
 (0)