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

Change jobcard template to flux usage

parent 30873ef3
No related branches found
No related tags found
1 merge request!1Merge python environment
Pipeline #12691 failed
...@@ -52,7 +52,6 @@ class Jobcard(f90nml.Namelist): ...@@ -52,7 +52,6 @@ class Jobcard(f90nml.Namelist):
input_path: str input_path: str
The input path pointing to the GiBUU lookup data which should be used The input path pointing to the GiBUU lookup data which should be used
""" """
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
if "input_path" in kwargs: if "input_path" in kwargs:
self.input_path = "%s" % input_path self.input_path = "%s" % input_path
...@@ -84,8 +83,12 @@ def read_jobcard(filepath): ...@@ -84,8 +83,12 @@ def read_jobcard(filepath):
def generate_neutrino_jobcard_template( def generate_neutrino_jobcard_template(
process, flavour, energy, target, write_events=False, input_path=INPUT_PATH process,
): # pragma: no cover flavour,
energy_limits,
target,
write_events=False,
input_path=INPUT_PATH): # pragma: no cover
""" """
Generate a jobcard for neutrino interaction Generate a jobcard for neutrino interaction
...@@ -95,8 +98,8 @@ def generate_neutrino_jobcard_template( ...@@ -95,8 +98,8 @@ def generate_neutrino_jobcard_template(
Interaction channel ["CC", "NC", "antiCC", "antiNC"] Interaction channel ["CC", "NC", "antiCC", "antiNC"]
flavour: str flavour: str
Flavour ["electron", "muon", "tau"] Flavour ["electron", "muon", "tau"]
energy: float energy_range: (float, float)
Initial energy of the neutrino in GeV Energy range limits of the incoming neutrino flux in GeV
target: (int, int) target: (int, int)
(Z, A) describing the target nukleon (Z, A) describing the target nukleon
input_path: str input_path: str
...@@ -106,7 +109,8 @@ def generate_neutrino_jobcard_template( ...@@ -106,7 +109,8 @@ def generate_neutrino_jobcard_template(
# NEUTRINO # NEUTRINO
jc["neutrino_induced"]["process_ID"] = PROCESS_LOOKUP[process.lower()] jc["neutrino_induced"]["process_ID"] = PROCESS_LOOKUP[process.lower()]
jc["neutrino_induced"]["flavour_ID"] = FLAVOR_LOOKUP[flavour.lower()] jc["neutrino_induced"]["flavour_ID"] = FLAVOR_LOOKUP[flavour.lower()]
jc["neutrino_induced"]["nuXsectionMode"] = 6 jc["neutrino_induced"]["nuXsectionMode"] = XSECTIONMODE_LOOKUP[
"EXP_dSigmaMC"]
jc["neutrino_induced"]["includeDIS"] = True jc["neutrino_induced"]["includeDIS"] = True
jc["neutrino_induced"]["includeDELTA"] = True jc["neutrino_induced"]["includeDELTA"] = True
jc["neutrino_induced"]["includeRES"] = True jc["neutrino_induced"]["includeRES"] = True
...@@ -115,18 +119,25 @@ def generate_neutrino_jobcard_template( ...@@ -115,18 +119,25 @@ def generate_neutrino_jobcard_template(
jc["neutrino_induced"]["include2p2hQE"] = True jc["neutrino_induced"]["include2p2hQE"] = True
jc["neutrino_induced"]["include2pi"] = False jc["neutrino_induced"]["include2pi"] = False
jc["neutrino_induced"]["include2p2hDelta"] = False jc["neutrino_induced"]["include2p2hDelta"] = False
jc["neutrino_inducted"]["printAbsorptionXS"] = True jc["neutrino_induced"]["printAbsorptionXS"] = True
jc["neutrino_induced"]["nuExp"] = 99
# INPUT # INPUT
jc["input"]["numTimeSteps"] = 0 jc["input"]["numTimeSteps"] = 0
jc["input"]["eventtype"] = 5 jc["input"]["eventtype"] = 5
jc["input"]["numEnsembles"] = 100000 jc["input"]["numEnsembles"] = 10000
jc["input"]["delta_T"] = 0.2 jc["input"]["delta_T"] = 0.2
jc["input"]["localEnsemble"] = True jc["input"]["localEnsemble"] = True
jc["input"]["num_runs_SameEnergy"] = 1 jc["input"]["num_runs_SameEnergy"] = 1
# FLUX
jc["nl_fluxcuts"]["energylimit_for_Qsrec"] = True
jc["nl_neutrino_energyFlux"]["Eflux_min"] = energy_limits[0]
jc["nl_neutrino_energyFlux"]["Eflux_max"] = energy_limits[1]
# TARGET # TARGET
jc["target"]["Z"] = target[0] jc["target"]["Z"] = target[0]
jc["target"]["A"] = target[1] jc["target"]["A"] = target[1]
# MISC # MISC
jc["neutrinoAnalysis"]["outputEvents"] = write_events jc["neutrinoAnalysis"]["outputEvents"] = False
jc["EventOutput"]["EventFormat"] = 1
jc["EventOutput"]["WritePerturbativeParticles"] = True
jc["EventOutput"]["WriteRealParticles"] = False
return jc return jc
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