IAP GITLAB

Skip to content
Snippets Groups Projects
Commit e183d945 authored by Maximilian Sackel's avatar Maximilian Sackel
Browse files

Now stores interpolation tables in...

Now stores interpolation tables in /home/maximilian/.local/opt/corsika/Data/PROPOSAL. PROPOSAL dir still have to be added to data submodule
parent e0b7c44c
No related branches found
No related tags found
No related merge requests found
......@@ -130,9 +130,6 @@ int main(int argc, char** argv) {
// setup processes, decays and interactions
// PROPOSAL processs proposal{...};
PROPOSAL::InterpolationDef::path_to_tables = "~/.local/share/PROPOSAL/tables/";
PROPOSAL::InterpolationDef::path_to_tables_readonly = "~/.local/share/PROPOSAL/tables/";
process::particle_cut::ParticleCut cut(10_GeV, false, true);
process::proposal::Interaction proposal(env, cut);
process::proposal::ContinuousProcess em_continuous(env, cut);
......
......@@ -185,9 +185,6 @@ int main(int argc, char** argv) {
decaySibyll.PrintDecayConfig();
// PROPOSAL processs proposal{...};
PROPOSAL::InterpolationDef::path_to_tables = "~/.local/share/PROPOSAL/tables/";
PROPOSAL::InterpolationDef::path_to_tables_readonly = "~/.local/share/PROPOSAL/tables/";
process::particle_cut::ParticleCut cut{60_GeV, false, true};
process::proposal::Interaction proposal(env, cut);
process::proposal::ContinuousProcess em_continuous(env, cut);
......
......@@ -18,6 +18,7 @@
#include <memory>
#include <random>
#include <tuple>
#include <cstdlib>
namespace corsika::process::proposal {
bool ProposalProcessBase::CanInteract(particles::Code pcode) const {
......@@ -50,6 +51,12 @@ namespace corsika::process::proposal {
PROPOSAL::InterpolationDef::order_of_interpolation = 2;
PROPOSAL::InterpolationDef::nodes_cross_section = 100;
PROPOSAL::InterpolationDef::nodes_propagate = 1000;
//! If corsika data exist store interpolation tables to the corresponding
//! path, otherwise interpolation tables would only stored in main memory if
//! no explicit intrpolation def is specified.
if(auto data_path = std::getenv("CORSIKA_DATA"))
PROPOSAL::InterpolationDef::path_to_tables = std::string(data_path) + "/PROPOSAL";
}
size_t ProposalProcessBase::hash::operator()(const calc_key_t& p) const noexcept {
......
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