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

Add gibuu weight to an additional field in w2list

parent 269bed3a
No related branches found
No related tags found
No related merge requests found
Pipeline #23124 passed with warnings
This commit is part of merge request !16. Comments created here will be created in the context of that merge request.
...@@ -201,6 +201,7 @@ W2LIST_LOOKUP = { ...@@ -201,6 +201,7 @@ W2LIST_LOOKUP = {
"TARGETZ": 16, "TARGETZ": 16,
"VERINCAN": 17, "VERINCAN": 17,
"LEPINCAN": 18, "LEPINCAN": 18,
"GIBUU_WEIGHT": 19
} }
W2LIST_LENGTH = len(W2LIST_LOOKUP) W2LIST_LENGTH = len(W2LIST_LOOKUP)
...@@ -646,6 +647,7 @@ def write_detector_file(gibuu_output, ...@@ -646,6 +647,7 @@ def write_detector_file(gibuu_output,
evt.w2list[W2LIST_LOOKUP["ICHAN"]] = event.evType evt.w2list[W2LIST_LOOKUP["ICHAN"]] = event.evType
evt.w2list[W2LIST_LOOKUP["VERINCAN"]] = 1 evt.w2list[W2LIST_LOOKUP["VERINCAN"]] = 1
evt.w2list[W2LIST_LOOKUP["LEPINCAN"]] = 1 evt.w2list[W2LIST_LOOKUP["LEPINCAN"]] = 1
evt.w2list[W2LIST_LOOKUP["GIBUU_WEIGHT"]] = event.weight
# Vertex Position # Vertex Position
vtx_pos = np.array(geometry.random_pos()) vtx_pos = np.array(geometry.random_pos())
......
...@@ -130,3 +130,5 @@ class TestAANET(unittest.TestCase): ...@@ -130,3 +130,5 @@ class TestAANET(unittest.TestCase):
np.testing.assert_equal(evt.w2list[9], 34) np.testing.assert_equal(evt.w2list[9], 34)
# CC/NC # CC/NC
np.testing.assert_equal(evt.w2list[10], 2) np.testing.assert_equal(evt.w2list[10], 2)
# GiBUU weight
np.testing.assert_almost_equal(evt.w2list[19], 0.8167222969153614)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment