diff --git a/Processes/Proposal/Interaction.cc b/Processes/Proposal/Interaction.cc index f84ea98b5d129608d509fb9202013fb920c44b41..97364849368ec7509f3de53ae80ea08b6d66e563 100644 --- a/Processes/Proposal/Interaction.cc +++ b/Processes/Proposal/Interaction.cc @@ -8,10 +8,8 @@ #include <corsika/units/PhysicalUnits.h> #include <corsika/utl/COMBoost.h> #include <limits> -#include <map> #include <memory> #include <random> -#include <set> #include <tuple> using Component_PROPOSAL = PROPOSAL::Components::Component; @@ -21,7 +19,6 @@ namespace corsika::process::proposal { using namespace corsika::environment; using namespace corsika::units::si; - template <> std::unordered_map<particles::Code, PROPOSAL::ParticleDef> Interaction::particles{ {particles::Code::Gamma, PROPOSAL::GammaDef()}, {particles::Code::Electron, PROPOSAL::EMinusDef()}, @@ -36,15 +33,14 @@ namespace corsika::process::proposal { auto search = particles.find(pcode); if (search != particles.end()) return true; return false; - }; + } template <> - Interaction::Interaction(SetupEnvironment const& env, CORSIKA_ParticleCut const& e_cut) - : fEnvironment(env) - , cut(make_shared<const PROPOSAL::EnergyCutSettings>(e_cut.GetCutEnergy() / 1_GeV, - 1, false)) { + Interaction::Interaction(SetupEnvironment const& _env, CORSIKA_ParticleCut const& _cut) + : cut(make_shared<const PROPOSAL::EnergyCutSettings>(_cut.GetCutEnergy() / 1_GeV, 1, + false)) { auto all_compositions = std::vector<NuclearComposition>(); - fEnvironment.GetUniverse()->walk([&](auto& vtn) { + _env.GetUniverse()->walk([&](auto& vtn) { if (vtn.HasModelProperties()) all_compositions.push_back(vtn.GetModelProperties().GetNuclearComposition()); }); @@ -63,10 +59,8 @@ namespace corsika::process::proposal { } } - template <> void Interaction::Init() {} - template <> template <> corsika::process::EProcessReturn Interaction::DoInteraction( setup::StackView::StackIterator& vP) { @@ -109,7 +103,6 @@ namespace corsika::process::proposal { return process::EProcessReturn::eOk; } - template <> template <> corsika::units::si::GrammageType Interaction::GetInteractionLength( setup::Stack::StackIterator& vP) { diff --git a/Processes/Proposal/Interaction.h b/Processes/Proposal/Interaction.h index 6eff905a8599ad77b10cdd5c85903cc20588c97b..0598aef9ce0c00d86884cd8e664bf9f5a3c23d76 100644 --- a/Processes/Proposal/Interaction.h +++ b/Processes/Proposal/Interaction.h @@ -17,7 +17,6 @@ #include <corsika/process/particle_cut/ParticleCut.h> #include <corsika/random/RNGManager.h> #include <corsika/random/UniformRealDistribution.h> -#include <random> #include <unordered_map> #include "PROPOSAL/PROPOSAL.h" @@ -29,14 +28,13 @@ namespace corsika::process::proposal { class Interaction : public corsika::process::InteractionProcess<Interaction> { - private: shared_ptr<const PROPOSAL::EnergyCutSettings> cut; static std::unordered_map<particles::Code, PROPOSAL::ParticleDef> particles; std::unordered_map<const NuclearComposition*, PROPOSAL::Medium> media; corsika::random::RNG& fRNG = - corsika::random::RNGManager::GetInstance().GetRandomStream("p_rndm"); + corsika::random::RNGManager::GetInstance().GetRandomStream("proposal"); bool CanInteract(particles::Code pcode) const noexcept;