21 #include <string_view> 22 #include <type_traits> 23 #include <unordered_map> 85 enum class Code : int32_t;
92 enum class PDGCode : int32_t;
97 typedef std::underlying_type<Code>::type CodeIntType;
102 typedef std::underlying_type<PDGCode>::type PDGCodeIntType;
106 #include <corsika/framework/core/GeneratedParticleProperties.inc> 146 PDGCode constexpr
get_PDG(Code
const);
147 PDGCode constexpr
get_PDG(
unsigned int const A,
unsigned int const Z);
148 std::string_view constexpr
get_name(Code
const);
154 bool constexpr
is_em(Code
const);
155 bool constexpr
is_muon(Code
const);
233 std::ostream&
operator<<(std::ostream&, corsika::Code);
239 #include <corsika/detail/framework/core/ParticleProperties.inl> 242 #include <corsika/framework/core/GeneratedParticleClasses.inc> TimeType constexpr get_lifetime(Code const)
lifetime
bool constexpr is_em(Code const)
true if particle is electron, positron or photon
void set_kinetic_energy_propagation_threshold(Code const, HEPEnergyType const)
Set the kinetic energy propagation threshold object.
Import and extend the phys::units package.
Code constexpr get_nucleus_code(size_t const A, size_t const Z)
Creates the Code for a nucleus of type 10LZZZAAAI.
void set_energy_production_threshold(Code const, HEPEnergyType const)
Set the particle production energy threshold in total energies.
std::initializer_list< Code > constexpr get_all_particles()
Returns list of all non-nuclei particles.
std::string_view constexpr get_name(Code const)
name of the particle as string
std::ostream & operator<<(std::ostream &, corsika::Code)
Code output operator.
size_t constexpr get_nucleus_A(Code const)
Get the mass number A for nucleus.
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 if particle is hadron
bool constexpr is_muon(Code const)
true if particle is mu+ or mu-
`, since they are used everywhere as integral part of the framework.
HEPEnergyType get_kinetic_energy_propagation_threshold(Code const)
Get the kinetic energy propagation threshold.
HEPEnergyType get_energy_production_threshold(Code const)
Get the particle production energy threshold.
size_t constexpr get_nucleus_Z(Code const)
Get the charge number Z for nucleus.
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)
Checks if Code corresponds to a nucleus.
bool constexpr is_charged(Code const)
true if particle is charged
HEPMassType constexpr get_nucleus_mass(Code const code)
Calculates the mass of nucleus.
bool constexpr is_neutrino(Code const)
true if 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".
std::string get_nucleus_name(Code const code)
Get the nucleus name.