IAP GITLAB

Skip to content
Snippets Groups Projects

Adding a particle resolution.

Merged Maximilian Sackel requested to merge particle_energy_resolution into master
Files
10
@@ -14,17 +14,18 @@
@@ -14,17 +14,18 @@
namespace corsika {
namespace corsika {
inline HEPEnergyType constexpr get_kinetic_energy_threshold(Code const code) {
inline HEPEnergyType constexpr get_kinetic_energy_propagation_threshold(
 
Code const code) {
if (is_nucleus(code)) return particle::detail::threshold_nuclei;
if (is_nucleus(code)) return particle::detail::threshold_nuclei;
return particle::detail::thresholds[static_cast<CodeIntType>(code)];
return particle::detail::propagation_thresholds[static_cast<CodeIntType>(code)];
}
}
inline void constexpr set_kinetic_energy_threshold(Code const code,
inline void constexpr set_kinetic_energy_propagation_threshold(
HEPEnergyType const val) {
Code const code, HEPEnergyType const val) {
if (is_nucleus(code))
if (is_nucleus(code))
particle::detail::threshold_nuclei = val;
particle::detail::threshold_nuclei = val;
else
else
particle::detail::thresholds[static_cast<CodeIntType>(code)] = val;
particle::detail::propagation_thresholds[static_cast<CodeIntType>(code)] = val;
}
}
inline HEPMassType constexpr get_mass(Code const code) {
inline HEPMassType constexpr get_mass(Code const code) {
@@ -32,6 +33,15 @@ namespace corsika {
@@ -32,6 +33,15 @@ namespace corsika {
return particle::detail::masses[static_cast<CodeIntType>(code)];
return particle::detail::masses[static_cast<CodeIntType>(code)];
}
}
 
inline HEPEnergyType constexpr get_energy_production_threshold(Code const p) {
 
return particle::detail::production_thresholds[static_cast<CodeIntType>(p)];
 
}
 
 
inline void constexpr set_energy_production_threshold(Code const p,
 
HEPEnergyType const val) {
 
particle::detail::production_thresholds[static_cast<CodeIntType>(p)] = val;
 
}
 
inline bool constexpr is_charged(Code const c) { return get_charge_number(c) != 0; }
inline bool constexpr is_charged(Code const c) { return get_charge_number(c) != 0; }
inline bool constexpr is_nucleus(Code const code) { return code >= Code::Nucleus; }
inline bool constexpr is_nucleus(Code const code) { return code >= Code::Nucleus; }
Loading