IAP GITLAB

Skip to content
Snippets Groups Projects
Commit a5c98f4c authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

Merge branch 'fix_cross_builder_cuts' into 'master'

Fix treatment of energy cut settings in ProposalProcessBase.hpp

See merge request !433
parents 033d7f92 2fd4625f
No related branches found
No related tags found
1 merge request!433Fix treatment of energy cut settings in ProposalProcessBase.hpp
Pipeline #9308 canceled
......@@ -14,14 +14,13 @@
namespace corsika {
inline HEPEnergyType constexpr get_kinetic_energy_propagation_threshold(
Code const code) {
inline HEPEnergyType get_kinetic_energy_propagation_threshold(Code const code) {
if (is_nucleus(code)) return particle::detail::threshold_nuclei;
return particle::detail::propagation_thresholds[static_cast<CodeIntType>(code)];
}
inline void constexpr set_kinetic_energy_propagation_threshold(
Code const code, HEPEnergyType const val) {
inline void set_kinetic_energy_propagation_threshold(Code const code,
HEPEnergyType const val) {
if (is_nucleus(code))
particle::detail::threshold_nuclei = val;
else
......@@ -33,12 +32,11 @@ namespace corsika {
return particle::detail::masses[static_cast<CodeIntType>(code)];
}
inline HEPEnergyType constexpr get_energy_production_threshold(Code const p) {
inline HEPEnergyType 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) {
inline void set_energy_production_threshold(Code const p, HEPEnergyType const val) {
particle::detail::production_thresholds[static_cast<CodeIntType>(p)] = val;
}
......
......@@ -121,27 +121,26 @@ namespace corsika {
* this, they are discarded and removed. Sensible default values must be configured for
* a simulation.
*/
HEPEnergyType constexpr get_kinetic_energy_propagation_threshold(Code const);
HEPEnergyType get_kinetic_energy_propagation_threshold(Code const);
/**
* Set the kinetic energy propagation threshold object.
*/
void constexpr set_kinetic_energy_propagation_threshold(Code const,
HEPEnergyType const);
void set_kinetic_energy_propagation_threshold(Code const, HEPEnergyType const);
/**
* Get the particle production energy threshold.
*
* The (total) energy below which a particle is only handled stoachastically (no
* production below this energy). This is for example important for stachastic discrete
* Bremsstrahlung versus low-enregy Bremsstrahlung as part of continuous energy losses.
* The (total) energy below which a particle is only handled stoachastically (no
* production below this energy). This is for example important for stochastic discrete
* Bremsstrahlung versus low-energy Bremsstrahlung as part of continuous energy losses.
*/
HEPEnergyType constexpr get_energy_production_threshold(Code const); //!<
HEPEnergyType get_energy_production_threshold(Code const); //!<
/**
* Set the particle production energy threshold.
* Set the particle production energy threshold in total energies.
*/
void constexpr set_energy_production_threshold(Code const, HEPEnergyType const);
void set_energy_production_threshold(Code const, HEPEnergyType const);
//! Particle code according to PDG, "Monte Carlo Particle Numbering Scheme"
PDGCode constexpr get_PDG(Code const);
......
......@@ -46,8 +46,8 @@ namespace corsika::proposal {
corsika::units::si::HEPEnergyType
emCut) { //!< Stochastic losses smaller than the given cut
//!< will be handeled continuously.
auto p_cut = std::make_shared<const PROPOSAL::EnergyCutSettings>(
0.5 * emCut / 1_MeV, 1, false);
auto p_cut =
std::make_shared<const PROPOSAL::EnergyCutSettings>(emCut / 1_MeV, 1, false);
return PROPOSAL::GetStdCrossSections(T(), m, p_cut, true);
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment