IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 54eb6341 authored by Felix Riehn's avatar Felix Riehn Committed by Maximilian Reininghaus
Browse files

allow Lead-Lead interactions in epos

parent a2a4cd91
No related branches found
No related tags found
1 merge request!449Fix epos again again
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <string> #include <string>
#include <tuple> #include <tuple>
#include <cmath> #include <cmath>
#include "corsika/framework/core/ParticleProperties.hpp"
namespace corsika::epos { namespace corsika::epos {
...@@ -64,7 +65,8 @@ namespace corsika::epos { ...@@ -64,7 +65,8 @@ namespace corsika::epos {
if (!is_nucleus(targetId) && targetId != Code::Neutron && targetId != Code::Proton) { if (!is_nucleus(targetId) && targetId != Code::Neutron && targetId != Code::Proton) {
return false; return false;
} }
if (is_nucleus(targetId) && (get_nucleus_A(targetId) >= maxTargetMassNumber_)) { if (is_nucleus(targetId) &&
(get_nucleus_A(targetId) >= get_nucleus_A(maxNucleus_))) {
return false; return false;
} }
if ((minEnergyCoM_ > sqrtS) || (sqrtS > maxEnergyCoM_)) { return false; } if ((minEnergyCoM_ > sqrtS) || (sqrtS > maxEnergyCoM_)) { return false; }
...@@ -141,9 +143,10 @@ namespace corsika::epos { ...@@ -141,9 +143,10 @@ namespace corsika::epos {
strcpy(::epos::fname_.fncs, CS.data); strcpy(::epos::fname_.fncs, CS.data);
::epos::nfname_.nfncs = CS.length; ::epos::nfname_.nfncs = CS.length;
// initialiazes maximum energy and mass // initializes maximum energy and mass
initializeEventCoM(Code::Lead, Lead::nucleus_A, Lead::nucleus_Z, Code::Lead, initializeEventCoM(
Lead::nucleus_A, Lead::nucleus_Z, 1_PeV); maxNucleus_, get_nucleus_A(maxNucleus_), get_nucleus_Z(maxNucleus_), maxNucleus_,
get_nucleus_A(maxNucleus_), get_nucleus_Z(maxNucleus_), maxEnergyCoM_);
} }
inline void InteractionModel::initializeEventCoM(Code const idBeam, int const iBeamA, inline void InteractionModel::initializeEventCoM(Code const idBeam, int const iBeamA,
......
...@@ -109,8 +109,7 @@ namespace corsika::epos { ...@@ -109,8 +109,7 @@ namespace corsika::epos {
std::shared_ptr<spdlog::logger> logger_ = get_logger("corsika_epos_Interaction"); std::shared_ptr<spdlog::logger> logger_ = get_logger("corsika_epos_Interaction");
HEPEnergyType const minEnergyCoM_ = 6 * 1e9 * electronvolt; HEPEnergyType const minEnergyCoM_ = 6 * 1e9 * electronvolt;
HEPEnergyType const maxEnergyCoM_ = 2.e6 * 1e9 * electronvolt; HEPEnergyType const maxEnergyCoM_ = 2.e6 * 1e9 * electronvolt;
static unsigned int constexpr maxTargetMassNumber_ = 20; static Code constexpr maxNucleus_ = Code::Lead;
static unsigned int constexpr minNuclearTargetA_ = 4;
}; };
} // namespace corsika::epos } // namespace corsika::epos
......
...@@ -148,7 +148,7 @@ TEST_CASE("Epos", "modules") { ...@@ -148,7 +148,7 @@ TEST_CASE("Epos", "modules") {
CHECK_FALSE(model.isValid(Code::Proton, Code::Electron, 100_GeV)); CHECK_FALSE(model.isValid(Code::Proton, Code::Electron, 100_GeV));
CHECK(model.isValid(Code::Proton, Code::Hydrogen, 100_GeV)); CHECK(model.isValid(Code::Proton, Code::Hydrogen, 100_GeV));
CHECK(model.isValid(Code::Proton, Code::Helium, 100_GeV)); CHECK(model.isValid(Code::Proton, Code::Helium, 100_GeV));
CHECK_FALSE(model.isValid(Code::Proton, Code::Iron, 100_GeV)); CHECK_FALSE(model.isValid(Code::Proton, Code::Iron, 10_EeV));
CHECK(model.isValid(Code::Proton, Code::Oxygen, 100_GeV)); CHECK(model.isValid(Code::Proton, Code::Oxygen, 100_GeV));
} }
......
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