Skip to content

Commit

Permalink
Merge pull request #64 from hsf-training/eduardo-particle-update
Browse files Browse the repository at this point in the history
Update of episode on Particle package
  • Loading branch information
eduardo-rodrigues authored Feb 9, 2024
2 parents 279dcc4 + 96a9522 commit f5c8aa9
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions _episodes/06-lorentz-vectors.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Lorentz vectors, particle PDG, jet-clustering, oh my!"
title: "Lorentz vectors, particle PDG IDs, jet-clustering, oh my!"
teaching: 15
exercises: 0
questions:
Expand Down Expand Up @@ -81,24 +81,32 @@ mu1.deltaR(mu2)
muons.to_rhophieta()
```

# Particle PDG
# Particle properties and PDG identifiers

The Particle library provides all of the particle masses, decay widths, etc.
The Particle library provides all of the particle masses, decay widths and more from the PDG.
It further contains a series of tools to programmatically query particle properties and use several identification schemes.

```python
import particle
from hepunits import GeV

particle.Particle.findall("p~")
particle.Particle.findall("pi")

z_boson = particle.Particle.from_string("Z0")
z_boson = particle.Particle.from_name("Z0")
z_boson.mass / GeV, z_boson.width / GeV

print(z_boson.describe())

particle.Particle.from_pdgid(111)

particle.Particle.findall(
lambda p: p.pdgid.is_meson and p.pdgid.has_strange and p.pdgid.has_charm
)

print(particle.PDGID(211).info())

pdgid = particle.Corsika7ID(11).to_pdgid()
particle.Particle.from_pdgid(pdgid)
```

# Jet clustering
Expand Down

0 comments on commit f5c8aa9

Please sign in to comment.