From 511e49efa9387e6c303db00133635cce89c4b50b Mon Sep 17 00:00:00 2001
From: Maximilian Sackel <maximilian.sackel@tu-dortmund.de>
Date: Fri, 26 Jun 2020 10:30:29 +0000
Subject: [PATCH] add ecut which is neccessary for proposal

---
 Processes/ParticleCut/ParticleCut.h | 4 +++-
 Processes/Proposal/Interaction.cc   | 4 +++-
 Processes/Proposal/Interaction.h    | 3 +++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Processes/ParticleCut/ParticleCut.h b/Processes/ParticleCut/ParticleCut.h
index 53571551c..f298f484e 100644
--- a/Processes/ParticleCut/ParticleCut.h
+++ b/Processes/ParticleCut/ParticleCut.h
@@ -26,7 +26,8 @@ namespace corsika::process {
       unsigned int fInvCount = 0;
 
     public:
-      ParticleCut(const units::si::HEPEnergyType vCut);
+      ParticleCut(const units::si::HEPEnergyType eCut)
+          : fECut(eCut) {}
 
       bool ParticleIsInvisible(particles::Code) const;
       EProcessReturn DoSecondaries(corsika::setup::StackView&);
@@ -38,6 +39,7 @@ namespace corsika::process {
 
       void ShowResults();
 
+      units::si::HEPEnergyType GetECut() const { return fECut; }
       units::si::HEPEnergyType GetInvEnergy() const { return fInvEnergy; }
       units::si::HEPEnergyType GetCutEnergy() const { return fEnergy; }
       units::si::HEPEnergyType GetEmEnergy() const { return fEmEnergy; }
diff --git a/Processes/Proposal/Interaction.cc b/Processes/Proposal/Interaction.cc
index 834f2a133..fcd3609df 100644
--- a/Processes/Proposal/Interaction.cc
+++ b/Processes/Proposal/Interaction.cc
@@ -37,8 +37,10 @@ namespace corsika::process::proposal {
 
   template <>
   Interaction::Interaction(SetupEnvironment const& _env, CORSIKA_ParticleCut const& _cut)
-      : cut(make_shared<const PROPOSAL::EnergyCutSettings>(_cut.GetCutEnergy() / 1_GeV, 1,
+      : cut(make_shared<const PROPOSAL::EnergyCutSettings>(_cut.GetECut() / 1_MeV, 1,
                                                            false)) {
+          std::cout << "corsika set cut to " << _cut.GetECut() / 1_GeV << " [GeV]" << std::endl;
+      std::cout << "proposal set ecut to " << cut->GetEcut() << " [MeV]" << std::endl;
     auto all_compositions = std::vector<const NuclearComposition*>();
     _env.GetUniverse()->walk([&](auto& vtn) {
       if (vtn.HasModelProperties()) {
diff --git a/Processes/Proposal/Interaction.h b/Processes/Proposal/Interaction.h
index 336324457..6f1aeb501 100644
--- a/Processes/Proposal/Interaction.h
+++ b/Processes/Proposal/Interaction.h
@@ -55,6 +55,7 @@ namespace corsika::process::proposal {
     auto BuildCalculator(particles::Code corsika_code, NuclearComposition const& comp) {
       auto medium = media.at(&comp);
       if (corsika_code == particles::Code::Gamma) {
+          std::cout << "Build gamma tables" << std::endl;
         auto cross =
             GetStdCrossSections(PROPOSAL::GammaDef(), media.at(&comp), cut, true);
         auto inter_types = PROPOSAL::CrossSectionVector::GetInteractionTypes(cross);
@@ -66,6 +67,7 @@ namespace corsika::process::proposal {
         return insert_it;
       }
       if (corsika_code == particles::Code::Electron) {
+          std::cout << "Build electron tables" << std::endl;
         auto cross =
             GetStdCrossSections(PROPOSAL::EMinusDef(), media.at(&comp), cut, true);
         auto inter_types = PROPOSAL::CrossSectionVector::GetInteractionTypes(cross);
@@ -77,6 +79,7 @@ namespace corsika::process::proposal {
         return insert_it;
       }
       if (corsika_code == particles::Code::Positron) {
+          std::cout << "Build positron tables" << std::endl;
         auto cross =
             GetStdCrossSections(PROPOSAL::EPlusDef(), media.at(&comp), cut, true);
         auto inter_types = PROPOSAL::CrossSectionVector::GetInteractionTypes(cross);
-- 
GitLab