pdg.particle module

Definition of top-level particle container class.

class pdg.particle.PdgItem(api, pdgitem_id, edition=None)[source]

Bases: object

A class to represent an “item” encountered in e.g. a description of a decay’s products. An item can correspond directly to one particle, indirectly to one particle (as an alias), to a set of particles (as a generic name), or to an arbitrary string. When possible, a PdgItem can be queried (via the particle/particles properties) for the associated particle(s).

property has_particle

Whether the PdgItem is associated with exactly one particle. The property has_particles indicates whether it is associated with one or more.

property has_particles

Whether the PdgItem is associated with at least one particle.

property item_type

The type of the PdgItem. A single character with the following meanings: ‘P’: specific state (e.g. “pi+”), ‘A’: “also” alias, ‘W’: “was” alias, ‘S’: shortcut, ‘B’: both charges (e.g. “pi+-“), ‘C’: both charges, conjugate (e.g. “pi-+”), ‘G’: generic state (e.g. “pi”), ‘L’: general list (e.g. “leptons”), ‘I’: inclusive indicator (e.g. “X”), ‘T’: arbitrary text

property name

The name of the PdgItem.

property particle

The particle associated with the PdgItem, if there is exactly one such particle. Raises PdgAmbiguousValueError if there are more than one, in which case the particles property can be used instead.

property particles

The list of all particles associated with the PdgItem.

class pdg.particle.PdgParticle(api, pdgid, edition=None, set_mcid=None, set_name=None)[source]

Bases: PdgData

Container class for all information about a given particle.

In addition to access to basic particle properties such as mass, charge, quantum numbers and PDG MC ID, this class provides methods to iterate over the data on all particle properties listed in Particle Listings and Summary Tables, including branching fractions, masses, life-times, etc.

branching_fractions(data_type_key='BF%', require_summary_data=True)[source]

Return iterator over given type(s) of branching fraction data.

With data_type_key=’BF%’ (default), all branching fractions, including subdecay modes, are returned.

require_summary_data can be set False to include branching fractions where the current edition has no summary value(s) in the Particle Listings or Summary Table.

property charge

Charge of particle in units of e.

exclusive_branching_fractions(include_subdecays=False, require_summary_data=True)[source]

Return iterator over exclusive branching fraction data.

Set include_subdecays to True (default is False) to also include subdecay modes (i.e. modes shown indented in the Summary Tables).

require_summary_data can be set False to include branching fractions where the current edition has no summary value(s) in the Particle Listings or Summary Table.

property has_lifetime_entry

Whether the particle has at least one defined lifetime.

property has_mass_entry

Whether the particle has at least one defined mass.

property has_width_entry

Whether the particle has at least one defined decay width.

inclusive_branching_fractions(include_subdecays=False, require_summary_data=True)[source]

Return iterator over inclusive branching fraction data.

Set include_subdecays to True (default is False) to also include subdecay modes (i.e. modes shown indented in the Summary Tables).

require_summary_data can be set True to request only branching fractions where the current edition has summary value(s) in the Particle Listings or Summary Table.

property is_baryon

True if particle is a baryon.

property is_boson

True if particle is a gauge boson.

property is_lepton

True if particle is a lepton.

property is_meson

True if particle is a meson.

property is_quark

True if particle is a quark.

property lifetime

Lifetime of the particle in seconds.

property lifetime_error

Symmetric error on lifetime of particle in seconds, or None if lifetime error are asymmetric or lifetime is a limit.

lifetimes(require_summary_data=True)[source]

Return iterator over lifetime data.

property mass

Mass of the particle in GeV.

property mass_error

Symmetric error on mass of particle in GeV, or None if mass error are asymmetric or mass is a limit.

masses(require_summary_data=True)[source]

Return iterator over mass data.

For most particles, there is only a single mass property, and so the particle’s PDG best mass value in GeV can be obtained e.g. from

list(some_particle.masses())[0].best_value_in_GeV()

For other particles (e.g. for the top quark) there are different ways to determine the mass and the user needs to decide which mass value is the most appropriate for their use case.

property mcid

Monte Carlo ID of particle.

property name

Name of particle (ASCII format).

properties(data_type_key=None, require_summary_data=True, in_summary_table=None, omit_branching_ratios=False)[source]

Return iterator over specified particle property data.

By default, all properties excluding branching fractions and branching fraction ratios are returned.

data_type_key can be set to select specific properties. Possible keys are given by the list printed by PdgApi.doc_data_type_keys. The SQL wildcard character (‘%’) is allowed, so to select all properties, including branching fractions and ratios, set data_type_key=’%’. As another example, to get all mass properties, use data_type_key=’M’.

require_summary_data can be set False to also include properties, where the selected edition of the Review of Particle Physics has no summary value(s) in Particle Listings or Summary Table.

in_summary_table can be set to select properties, where a summary value is (True) or is not (False) included in the Summary Table for the selected edition. Setting in_summary_table to a value other than None implies require_summary_data=True.

omit_branching_ratios can be set to True to exclude any branching fraction ratio properties that would be selected otherwise.

property quantum_C

Quantum number C (C parity) of particle.

property quantum_G

Quantum number G (G parity) of particle.

property quantum_I

Quantum number I (isospin) of particle.

property quantum_J

Quantum number J (spin) of particle.

property quantum_P

Quantum number P (parity) of particle.

property width

Width of the particle in GeV.

property width_error

Symmetric error on width of particle in GeV, or None if width error are asymmetric or width is a limit.

widths(require_summary_data=True)[source]

Return iterator over width data.

class pdg.particle.PdgParticleList(api, pdgid, edition=None)[source]

Bases: PdgData, list

A PdgData subclass to represent a list of PdgParticles. A PdgParticleList is returned when PdgApi.get is called with the PDGID of a (group of) particles.