21 #include <string_view> 22 #include <type_traits> 23 #include <unordered_map> 62 enum class Code : int16_t;
65 enum class PDGCode : int32_t;
68 using PDGCodeType = std::underlying_type<PDGCode>::type;
78 Code const, HEPEnergyType const);
84 inline void set_kinetic_energy_thresholds(
85 std::unordered_map<Code const, HEPEnergyType const>
const& eCuts) {
90 PDGCode constexpr
get_PDG(Code
const);
91 PDGCode constexpr
get_PDG(
unsigned int A,
unsigned int Z);
93 std::string_view constexpr
get_name(Code
const);
99 bool constexpr
is_em(Code
const);
100 bool constexpr
is_muon(Code
const);
113 std::initializer_list<Code> constexpr get_all_particles();
116 std::ostream&
operator<<(std::ostream&, corsika::Code);
123 #include <corsika/framework/core/GeneratedParticleProperties.inc> 125 #include <corsika/detail/framework/core/ParticleProperties.inl> 128 #include <corsika/framework/core/GeneratedParticleClasses.inc> TimeType constexpr get_lifetime(Code const)
lifetime
bool constexpr is_em(Code const)
true iff particle is electron, positron or photon
int32_t std::underlying_type< Code >::type CodeIntType
The Code enum is the actual place to define CORSIKA 8 particle codes.
Import and extend the phys::units package.
int constexpr get_nucleus_A(Code const)
returns A for hard-coded nucleus, otherwise 0
int constexpr get_nucleus_Z(Code const)
returns Z for hard-coded nucleus, otherwise 0
HEPMassType get_nucleus_mass(unsigned int const, unsigned int const)
returns mass of (A,Z) nucleus, disregarding binding energy
std::string_view constexpr get_name(Code const)
name of the particle as string
std::ostream & operator<<(std::ostream &, corsika::Code)
the output stream operator for human-readable particle codes
class "quantity" is the heart of the library.
Code convert_from_PDG(PDGCode const)
convert PDG code to CORSIKA 8 internal code
bool constexpr is_hadron(Code const)
true iff particle is hadron
bool constexpr is_muon(Code const)
true iff particle is mu+ or mu-
The cascade namespace assembles all objects needed to simulate full particles cascades.
void constexpr set_kinetic_energy_threshold(Code const, HEPEnergyType const)
set kinetic energy threshold below which the particle is discarded
ElectricChargeType constexpr get_charge(Code const)
electric charge
int16_t constexpr get_charge_number(Code const)
electric charge in units of e
bool constexpr is_nucleus(Code const)
true iff the particle is a hard-coded nucleus or Code::Nucleus
bool constexpr is_neutrino(Code const)
true iff particle is (anti-) neutrino
HEPMassType constexpr get_mass(Code const)
mass
PDGCode constexpr get_PDG(Code const)
Particle code according to PDG, "Monte Carlo Particle Numbering Scheme".
HEPEnergyType constexpr get_kinetic_energy_threshold(Code const)
get kinetic energy threshold below which the particle is discarded, by default set to zero ...