CORSIKA Particles

Use this for particle identification for particles in CORSIKA

Particle codes as specified in CORSIKA user manual, Table 4.

This relates to the Description in Particles as:

particle id x 1000 + hadron generation x 10 + no. of observation level

So to find e+/e-:

from sapphire.corsika import particles = 2
if in ['positron', 'electron']:
    pass = 1206
if > 200:
    print('atom: %s' % particles.ATOMIC_NUMBER[ % 100])

Get the name for a CORSIKA particle code

Parameters:particle_id – code for the particle
Returns:name of the particle. In case of atoms the weight is added to the name.

Get the CORSIKA particle code for a partice name

Parameters:name – name of the particle/atom, for atoms the mass (neutrons + protons) can be appended to the name.
Returns:CORSIKA code for the particle. For atoms the code is: A x 100 + Z