Particle Properties

group Particles

The properties of all particles are saved in static and flat arrays.

There is a enum corsika::Code to identify each particle, and each individual particle has its own static class, which can be used to retrieve its physical properties.

The properties of all elementary particles are accessible here. The data are taken from the Pythia ParticleData.xml file.

Particle data can be accessed via global function in namespace corsika, or via static classes for each particle type. These classes all have the interface (example for the class corsika::Electron):

static constexpr Code code{Code::Electron};
static constexpr Code anti_code{Code::Positron};
static constexpr HEPMassType mass{corsika::get_mass(code)};
static constexpr ElectricChargeType charge{corsika::get_charge(code)};
static constexpr int charge_number{corsika::get_charge_number(code)};
static constexpr std::string_view name{corsika::get_name(code)};
static constexpr bool is_nucleus{corsika::is_nucleus(code)};

The names, relations and properties of all particles known to CORSIKA 8 are listed below.

Note on energy threshold on particle production as well as particle propagation. The functions:

HEPEnergyType constexpr get_energy_production_threshold(Code const);
void constexpr set_energy_production_threshold(Code const, HEPEnergyType const);
can be used to tune the transition where explicit production of new particles, e.g. in Bremsstrahlung, is simulated versus a continuous handling of low-energy particles as generic energy losses. The default value for all particle types is 1 MeV.

Furthermore, the functions:

HEPEnergyType constexpr get_kinetic_energy_propagation_threshold(Code const);
void constexpr set_kinetic_energy_propagation_threshold(Code const, HEPEnergyType
                                                        const);
are used to discard low energy particle during tracking. The default value for all particle types is 1 GeV.

Functions

int16_t constexpr get_charge_number(Code const)

electric charge in units of e

ElectricChargeType constexpr get_charge(Code const)

electric charge

HEPMassType constexpr get_mass(Code const)

mass

HEPEnergyType get_kinetic_energy_propagation_threshold(Code const)

Get the kinetic energy propagation threshold.

Particles are tracked only above the kinetic energy propagation threshold. Below this, they are discarded and removed. Sensible default values must be configured for a simulation.

void set_kinetic_energy_propagation_threshold(Code const, HEPEnergyType const)

Set the kinetic energy propagation threshold object.

HEPEnergyType get_energy_production_threshold(Code const)

Get the particle production energy threshold.

The (total) energy below which a particle is only handled stoachastically (no production below this energy). This is for example important for stochastic discrete Bremsstrahlung versus low-energy Bremsstrahlung as part of continuous energy losses.

void set_energy_production_threshold(Code const, HEPEnergyType const)

Set the particle production energy threshold in total energies.

PDGCode constexpr get_PDG(Code const)

Particle code according to PDG, “Monte Carlo Particle Numbering Scheme”.

PDGCode constexpr get_PDG(unsigned int const A, unsigned int const Z)
std::string_view constexpr get_name(Code const)

name of the particle as string

std::string get_name(Code, full_name)

get name of particle, including (A,Z) for nuclei

TimeType constexpr get_lifetime(Code const)

lifetime

bool constexpr is_hadron(Code const)

true if particle is hadron

bool constexpr is_em(Code const)

true if particle is electron, positron or photon

bool constexpr is_muon(Code const)

true if particle is mu+ or mu-

bool constexpr is_neutrino(Code const)

true if particle is (anti-) neutrino

bool constexpr is_charged(Code const)

true if particle is charged

Code constexpr get_nucleus_code(size_t const A, size_t const Z)

Creates the Code for a nucleus of type 10LZZZAAAI.

Returns:

internal nucleus Code

bool constexpr is_nucleus(Code const)

Checks if Code corresponds to a nucleus.

Returns:

true if nucleus.

Returns:

false if not nucleus.

size_t constexpr get_nucleus_A(Code const)

Get the mass number A for nucleus.

Returns:

int size of nucleus.returns A for hard-coded nucleus, otherwise 0

size_t constexpr get_nucleus_Z(Code const)

Get the charge number Z for nucleus.

Returns:

int charge of nucleus.returns Z for hard-coded nucleus, otherwise 0

HEPMassType constexpr get_nucleus_mass(Code const code)

Calculates the mass of nucleus.

Returns:

HEPMassType the mass of (A,Z) nucleus, disregarding binding energy.

HEPMassType constexpr get_nucleus_mass(unsigned int const A, unsigned int const Z)

Calculates the mass of nucleus.

Returns:

HEPMassType the mass of (A,Z) nucleus, disregarding binding energy.

inline std::string get_nucleus_name(Code const code)

Get the nucleus name.

Parameters:

code

Returns:

std::string_view

Code convert_from_PDG(PDGCode const)

convert PDG code to CORSIKA 8 internal code.

Returns:

Code internal code.

std::initializer_list<Code> constexpr get_all_particles()

Returns list of all non-nuclei particles.

Returns:

std::initializer_list<Code> constexpr

std::ostream &operator<<(std::ostream&, corsika::Code)

Code output operator.

The output stream operator for human-readable particle codes.

Returns:

std::ostream&

struct full_name
#include <ParticleProperties.hpp>

tag class for get_name()