Corpuscles.jl
A Julia package to get access to the PDG particle data.
Corpuscles.PDGIDCorpuscles.ParticleBase.isvalidCorpuscles.ACorpuscles.JCorpuscles.LCorpuscles.SCorpuscles.ZCorpuscles._generatenameCorpuscles._hasquarkCorpuscles.available_catalog_filesCorpuscles.chargeCorpuscles.fundamentalidCorpuscles.hasbottomCorpuscles.hascharmCorpuscles.hasdownCorpuscles.hasfundamentalantiCorpuscles.hasstrangeCorpuscles.hastopCorpuscles.hasupCorpuscles.isQballCorpuscles.isRhadronCorpuscles.isSUSYCorpuscles.isbaryonCorpuscles.iscompositequarkorleptonCorpuscles.isdiquarkCorpuscles.isdyonCorpuscles.isfundamentalCorpuscles.isgaugebosonorhiggsCorpuscles.isgeneratorspecificCorpuscles.ishadronCorpuscles.isleptonCorpuscles.ismesonCorpuscles.isnucleusCorpuscles.ispentaquarkCorpuscles.isquarkCorpuscles.issmgaugebosonorhiggsCorpuscles.isspecialCorpuscles.isstandardCorpuscles.istechnicolorCorpuscles.jspinCorpuscles.lspinCorpuscles.particlesCorpuscles.sspinCorpuscles.threechargeCorpuscles.use_catalog_file
Corpuscles.PDGID — Type
PDG IDs consist of 7 digits prefixed by a sign, following the scheme:
+/- N Nr Nl Nq1 Nq2 Nq3 NjThose are accessible as fields. There are PDG IDs with more than 7 digits for non-standard particles such as Q-balls. To support those, we follow the implementation in the SciKit-HEP particle Python package, which introduced N8, N9 and N10.
Corpuscles.Particle — Type
Particle(name::String)Construct particles from PDG name.
Or commonly alias, alias do not cover all particles.
Base.isvalid — Method
isvalid(p::PDGID)Returns true if the PDG ID is valid.
Corpuscles.A — Method
A(p::Union{Particle, PDGID, Integer})Returns the atomic number A if the PDG ID corresponds to a nucleus, else it returns nothing.
Corpuscles.J — Method
J(p::Union{Particle, PDGID, Integer})Returns the total spin J.
Corpuscles.L — Method
L(p::Union{Particle, PDGID, Integer})Returns the orbital angular momentum L.
This is valid for mesons only. nothing is returned otherwise. Mesons with PDGIDs of the kind 9XXXXXX (N=9) are not experimentally well-known particles and nothing is returned too.
Corpuscles.S — Method
S(p::Union{Particle, PDGID, Integer})Returns the spin S.
This is valid for mesons only. nothing is returned otherwise. Mesons with PDGIDs of the kind 9XXXXXX (N=9) are not experimentally well-known particles and nothing is returned too.
Corpuscles.Z — Method
Z(p::Union{Particle, PDGID, Integer})Returns the charge Z if the PDG ID corresponds to a nucleus, else it returns nothing.
Corpuscles._generatename — Method
_generatename(name, pdgid, antiprop, charge)
Generate a name for the particle, adding tilde if anti and -/+ according to the charge.
Corpuscles._hasquark — Method
_hasquark(p:::Union{Particle, PDGID, Integer}, q::Integer)Note that q is always positive, so [1, 6] for Standard Model quarks and [7, 8] for fourth-generation quarks.
Corpuscles.available_catalog_files — Method
available_catalog_files()
Function to get the available catalog files which are available within the package and returns a list with the absolute filepaths.
Examples
julia> Corpuscles.available_catalog_files()
["/home/foobar/dev/Corpuscles.jl/data/particle2019.csv"]Corpuscles.charge — Method
charge(p::Union{Particle, PDGID, Integer})Returns the EM charge.
Corpuscles.fundamentalid — Method
fundamentalid(p::Union{Particle, PDGID, Integer})Corpuscles.hasbottom — Method
hasbottom(p::Union{Particle, PDGID, Integer})Corpuscles.hascharm — Method
hascharm(p::Union{Particle, PDGID, Integer})Corpuscles.hasdown — Method
hasdown(p::Union{Particle, PDGID, Integer})Corpuscles.hasfundamentalanti — Method
hasfundamentalanti(p::Union{Particle, PDGID, Integer})If this is a fundamental particle, does it have a valid antiparticle?
Notes
Based on the current list of defined particles/concepts in the PDG Monte Carlo Particle Numbering Scheme document.
Corpuscles.hasstrange — Method
hasstrange(p::Union{Particle, PDGID, Integer})Corpuscles.hastop — Method
hastop(p::Union{Particle, PDGID, Integer})Corpuscles.hasup — Method
hasdown(p::Union{Particle, PDGID, Integer})Corpuscles.isQball — Method
isQball(p::Union{Particle, PDGID, Integer})Does this PDG ID correspond to a Q-ball or any exotic particle with electric charge beyond the qqq scheme? Ad-hoc numbering for such particles is +/- 100XXXY0, where XXX.Y is the charge.
Corpuscles.isRhadron — Method
isRhadron(p::Union{Particle, PDGID, Integer})An R-hadron is of the form 10abcdj, 100abcj, or 1000abj, where j = 2J + 1 gives the spin; b, c, and d are quarks or gluons; and a (the digit following the zero's) is a SUSY particle.
Corpuscles.isSUSY — Method
isSUSY(p::Union{Particle, PDGID, Integer})Fundamental SUSY particles have N = 1 or 2.
Corpuscles.isbaryon — Method
isbaryon(p::Union{Particle, PDGID, Integer})Corpuscles.iscompositequarkorlepton — Method
iscompositequarkorlepton(p::Union{Particle, PDGID, Integer})Excited (composite) quarks and leptons have N = 4 and Nr = 0.
Corpuscles.isdiquark — Method
isdiquark(p::Union{Particle, PDGID, Integer})Corpuscles.isdyon — Method
isdyon(p::Union{Particle, PDGID, Integer})Magnetic monopoles and Dyons are assumed to have one unit of Dirac monopole charge and a variable integer number xyz units of electric charge, where xyz stands for Nq1 Nq2 Nq3. Codes 411xyz0 are used when the magnetic and electrical charge sign agree and 412xyz0 when they disagree, with the overall sign of the particle set by the magnetic charge. For now, no spin information is provided.
Corpuscles.isfundamental — Method
isfundamental(p::Union{Particle, PDGID, Integer})Corpuscles.isgaugebosonorhiggs — Method
isgaugebosonorhiggs(p::Union{Particle, PDGID, Integer})Corpuscles.isgeneratorspecific — Method
isgeneratorspecific(p::Union{Particle, PDGID, Integer})Codes 81-100 are reserved for generator-specific pseudoparticles and concepts. Codes 901-930, 1901-1930, 2901-2930, and 3901-3930 are for additional components of Standard Model parton distribution functions, where the latter three ranges are intended to distinguish left/right/longitudinal components. Codes 998 and 999 are reserved for GEANT tracking purposes.
Corpuscles.ishadron — Method
ishadron(p::Union{Particle, PDGID, Integer})Corpuscles.islepton — Method
islepton(p::Union{Particle, PDGID, Integer})Corpuscles.ismeson — Method
ismeson(p::Union{Particle, PDGID, Integer})Corpuscles.isnucleus — Method
isnucleus(p::Union{Particle, PDGID, Integer})Ion numbers are +/- 10LZZZAAAI. AAA is A - total baryon number ZZZ is Z - total charge L is the total number of strange quarks. I is the isomer number, with I=0 corresponding to the ground state.
Corpuscles.ispentaquark — Method
ispentaquark(p::Union{Particle, PDGID, Integer})Pentaquark IDs are of the form +/- 9 Nr Nl Nq1 Nq2 Nq3 Nj, where Nj = 2J + 1 gives the spin and Nr Nl Nq1 Nq2 Nq3 denote the quark numbers in order Nr >= Nl >= Nq1 >= Nq2 and Nq3 gives the antiquark number.
Corpuscles.isquark — Method
isquark(p::Union{Particle, PDGID, Integer})Corpuscles.issmgaugebosonorhiggs — Method
issmgaugebosonorhiggs(p::Union{Particle, PDGID, Integer})Corpuscles.isspecial — Method
isspecial(p::Union{Particle, PDGID, Integer})Special particle in the sense of the classification in the PDG MC particle numbering scheme document, hence the graviton, the DM (S = 0, 1/2, 1) particles, the reggeons (reggeon, pomeron and odderon), and all generator-specific pseudo-particles and concepts, see isgeneratorspecific.
Corpuscles.isstandard — Method
isstandard(p::Union{Particle, PDGID, Integer})Returns true if the PDG ID of the particle follows the standard numbering scheme.
Corpuscles.istechnicolor — Method
istechnicolor(p::Union{Particle, PDGID, Integer})Corpuscles.jspin — Method
jspin(p::Union{Particle, PDGID, Integer})Returns the total spin as 2J+1.
Corpuscles.lspin — Method
lspin(p::Union{Particle, PDGID, Integer})Returns the orbital angular momentum L as 2S+1.
This is valid for mesons only. nothing is returned otherwise. Mesons with PDGIDs of the kind 9XXXXXX (N=9) are not experimentally well-known particles and nothing is returned too.
Corpuscles.particles — Method
particles()
Returns the full list of particles from the currently selected catalog.
Corpuscles.sspin — Method
sspin(p::Union{Particle, PDGID, Integer})Returns the spin S as 2S+1.
This is valid for mesons only. nothing is returned otherwise. Mesons with PDGIDs of the kind 9XXXXXX (N=9) are not experimentally well-known particles and nothing is returned too.
Corpuscles.threecharge — Method
threecharge(p::Union{Particle, PDGID, Integer})Returns 3 times the EM charge.
Corpuscles.use_catalog_file — Method
use_catalog_file(filepath)
This function reads a given catalog file and sets it as reference
Arguments
filepath::AbstractString: filepath to the catalog file
Examples
julia> Corpuscles.use_catalog_file("/home/foobar/dev/Corpuscles.jl/data/particle2019.csv")