From fea61fc9b8070fc41621aff182469a7a96e9b395 Mon Sep 17 00:00:00 2001 From: Johannes Schumann <johannes.schumann@fau.de> Date: Tue, 23 Nov 2021 17:57:23 +0100 Subject: [PATCH] Fixes PROPOSAL interface --- km3buu/propagation.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/km3buu/propagation.py b/km3buu/propagation.py index c7f8fcd..61b59a9 100644 --- a/km3buu/propagation.py +++ b/km3buu/propagation.py @@ -18,6 +18,7 @@ import proposal as pp from particle import Particle import awkward as ak from collections import defaultdict +import pathlib from .config import Config @@ -40,8 +41,9 @@ PROPOSAL_TARGET = pp.medium.AntaresWater() def _setup_propagator(max_distance, particle_definition): - pp.InterpolationSettings.tables_path = Config().proposal_itp_tables - + itp_table_path = Config().proposal_itp_tables + pathlib.Path(itp_table_path).mkdir(parents=True, exist_ok=True) + pp.InterpolationSettings.tables_path = itp_table_path crosssection = pp.crosssection.make_std_crosssection( particle_def=particle_definition, target=PROPOSAL_TARGET, @@ -50,12 +52,12 @@ def _setup_propagator(max_distance, particle_definition): collection = pp.PropagationUtilityCollection() collection.displacement = pp.make_displacement(crosssection, True) collection.interaction = pp.make_interaction(crosssection, True) - collection.decay = pp.make_decay(crosssection, True) - collection.time = pp.make_time(crosssection, True) + collection.decay = pp.make_decay(crosssection, particle_definition, True) + collection.time = pp.make_time(crosssection, particle_definition, True) utility = pp.PropagationUtility(collection=collection) - geometry = pp.geometry.Sphere(pp.Vector3D(), max_distance, 0) + geometry = pp.geometry.Sphere(pp.Cartesian3D(), max_distance) density_distr = pp.density_distribution.density_homogeneous( PROPOSAL_TARGET.mass_density) -- GitLab