CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
Particle Properties

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

Typedefs

using corsika::CodeIntType = int32_t std::underlying_type< Code >::type
 The Code enum is the actual place to define CORSIKA 8 particle codes. More...
 
using corsika::PDGCodeType = std::underlying_type< PDGCode >::type
 

Functions

int16_t constexpr corsika::get_charge_number (Code const)
 electric charge in units of e
 
ElectricChargeType constexpr corsika::get_charge (Code const)
 electric charge
 
HEPMassType constexpr corsika::get_mass (Code const)
 mass
 
HEPEnergyType constexpr corsika::get_kinetic_energy_threshold (Code const)
 get kinetic energy threshold below which the particle is discarded, by default set to zero
 
void constexpr corsika::set_kinetic_energy_threshold (Code const, HEPEnergyType const)
 set kinetic energy threshold below which the particle is discarded
 
void corsika::set_kinetic_energy_threshold (std::pair< Code const, HEPEnergyType const > p)
 
void corsika::set_kinetic_energy_thresholds (std::unordered_map< Code const, HEPEnergyType const > const &eCuts)
 
PDGCode constexpr corsika::get_PDG (Code const)
 Particle code according to PDG, "Monte Carlo Particle Numbering Scheme".
 
PDGCode constexpr corsika::get_PDG (unsigned int A, unsigned int Z)
 
std::string_view constexpr corsika::get_name (Code const)
 name of the particle as string
 
TimeType constexpr corsika::get_lifetime (Code const)
 lifetime
 
bool constexpr corsika::is_nucleus (Code const)
 true iff the particle is a hard-coded nucleus or Code::Nucleus
 
bool constexpr corsika::is_hadron (Code const)
 true iff particle is hadron
 
bool constexpr corsika::is_em (Code const)
 true iff particle is electron, positron or photon
 
bool constexpr corsika::is_muon (Code const)
 true iff particle is mu+ or mu-
 
bool constexpr corsika::is_neutrino (Code const)
 true iff particle is (anti-) neutrino
 
int constexpr corsika::get_nucleus_A (Code const)
 returns A for hard-coded nucleus, otherwise 0
 
int constexpr corsika::get_nucleus_Z (Code const)
 returns Z for hard-coded nucleus, otherwise 0
 
HEPMassType corsika::get_nucleus_mass (unsigned int const, unsigned int const)
 returns mass of (A,Z) nucleus, disregarding binding energy
 
Code corsika::convert_from_PDG (PDGCode const)
 convert PDG code to CORSIKA 8 internal code
 
std::initializer_list< Code > constexpr corsika::get_all_particles ()
 
std::ostream & corsika::operator<< (std::ostream &, corsika::Code)
 the output stream operator for human-readable particle codes
 

Detailed Description

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

There is a enum corsika::Code to identify each particles, and each individual particles 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.

Typedef Documentation

◆ CodeIntType

using corsika::CodeIntType = typedef int32_t std::underlying_type<Code>::type
strong

The Code enum is the actual place to define CORSIKA 8 particle codes.

Specifically for PDG ids

Definition at line 67 of file ParticleProperties.hpp.