Skip to content
Snippets Groups Projects
Commit 88e22b07 authored by Johannes Schumann's avatar Johannes Schumann
Browse files

Timestep option

parent e390f69d
No related branches found
No related tags found
1 merge request!48Timestep option
......@@ -60,6 +60,13 @@ ARGPARSE_GENERAL_PARAMS = [{
"help": "The number of nucleons/protons in the target nucleus",
"metavar": ("A", "Z"),
"required": True
}, {
"option_strings": ["--timesteps", "-x"],
"dest": "timesteps",
"type": int,
"help": "The number of timesteps performed by GiBUU",
"required": False
"default": -1
}, {
"option_strings": ["--geometry", "-g"],
"dest":
......@@ -208,7 +215,8 @@ def main():
args.target,
seed=args.seed,
fluxfile=fluxfile,
do_decay=args.decay)
do_decay=args.decay,
timesteps=args.timesteps)
jc["neutrinoanalysis"]["outputEvents"] = True
jc["neutrinoanalysis"]["inclusiveAnalysis"] = False
......
......@@ -109,6 +109,7 @@ def generate_neutrino_jobcard(events,
photon_propagation=True,
fluxfile=None,
seed=None,
timesteps=-1,
input_path=INPUT_PATH): # pragma: no cover
"""
Generate a jobcard for neutrino interaction
......@@ -138,6 +139,9 @@ def generate_neutrino_jobcard(events,
seed: int (default: 0)
Input seed for the random number generator in GiBUU
(0: some seed will be drawn based on system time)
timesteps: int (default: -1)
Number of timesteps done by GiBUU
(-1: Default value from GiBUU is used)
input_path: str
The input path pointing to the GiBUU lookup data which should be used
"""
......@@ -151,6 +155,9 @@ def generate_neutrino_jobcard(events,
jc["target"]["a"] = target[0]
# EVENTS
run_events = int(100000 / target[1])
# FSI
if timesteps >= 0:
jc["input"]["numTimeSteps"] = timesteps
if events < run_events:
run_events = events
runs = 1
......
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