[ANN] Corpuscles.jl - Particle properties and encodings via PDG tables

I’d like to announce a tiny package which was created by Johannes Schumann and myself to deal with PDG particle data and different particle encodings in physics software.
The package converts Pythia and Geant3 codes to PDG codes and provides access to particle properties like mass, spin, charge, quark composition etc. and also LaTeX codes.

GitHub repository: https://github.com/KM3NeT/Corpuscles.jl
Docs: https://km3net.github.io/Corpuscles.jl/dev

We hope some of you find it useful, at least as a reference :wink:

pkg> add Corpuscles

julia> using Corpuscles

julia> p = Particle(12)
Particle(12) 'nu(e)'

julia> Particle(Geant3ID(5))
Particle(-13) 'mu'

julia> particles()
536-element Array{Particle,1}:
 Particle(-21114) 'Delta(1920)'
 Particle(12) 'nu(e)'
 Particle(-11) 'e'
 ⋮
 Particle(43122) 'Lambda(1800)'
 Particle(-4332) 'Omega(c)'
 Particle(2126) 'Delta(1905)'

julia> p = Particle(221)
Particle(221) 'eta'

julia> p.mass
547.862 MeV ± 0.017 MeV

We decided to use Unitful.jl for the quantities mass and width in struct which also has the lower_limit and upper_limit.

Corpuscles.jl

5 Likes

Looks useful, but how did you come up with that name?
That’s not near the top of the list of names I would search for…
Is ParticleProperties too boring?

Well, 1) it’s kind of short and 2) has a bit of physics history https://en.wikipedia.org/wiki/Corpuscularianism 3) Particles was the first choice but was already taken by a non-registered package, but we didn’t want to steal the name.

I think most people who need it would search for PDG or Geant, so I guess that should be fine thanks to the full text search :wink:

Interesting, thanks for the wiki link. Have a degree in particle physics, but didn’t know about corpuscularianism…
I hope I get an excuse to use your package soon. Waiting for a project to get approved…

1 Like