IAP GITLAB

Skip to content
Snippets Groups Projects

Adding a particle resolution.

Merged Maximilian Sackel requested to merge particle_energy_resolution into master
Files
6
@@ -21,6 +21,14 @@ namespace corsika {
@@ -21,6 +21,14 @@ namespace corsika {
particle::detail::thresholds[static_cast<CodeIntType>(p)] = val;
particle::detail::thresholds[static_cast<CodeIntType>(p)] = val;
}
}
 
inline HEPEnergyType constexpr get_energy_resolution(Code const p) {
 
return particle::detail::resolutions[static_cast<CodeIntType>(p)];
 
}
 
 
inline void constexpr set_energy_resolution(Code const p, HEPEnergyType const val) {
 
particle::detail::resolutions[static_cast<CodeIntType>(p)] = val;
 
}
 
inline HEPMassType constexpr get_mass(Code const p) {
inline HEPMassType constexpr get_mass(Code const p) {
if (p == Code::Nucleus)
if (p == Code::Nucleus)
throw std::runtime_error("Cannot GetMass() of particle::Nucleus -> unspecified");
throw std::runtime_error("Cannot GetMass() of particle::Nucleus -> unspecified");
Loading