From 8a6e16b90d13aa318b21560deb7675174edd7a23 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Thu, 25 Nov 2021 15:08:25 +0000
Subject: [PATCH] reconstruction.py: ionBeamEnergy = str(os.environ["PBEAM"])

---
 options/reconstruction.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/options/reconstruction.py b/options/reconstruction.py
index 904f3b4d..120befe8 100644
--- a/options/reconstruction.py
+++ b/options/reconstruction.py
@@ -23,6 +23,11 @@ if "JUGGLER_DETECTOR_VERSION" in os.environ:
 
 compact_path = os.path.join(detector_path, detector_name)
 
+if "PBEAM" in os.environ:
+    ionBeamEnergy = str(os.environ["PBEAM"])
+else:
+    ionBeamEnergy = 100
+
 # RICH reconstruction
 qe_data = [(1.0, 0.25), (7.5, 0.25),]
 
@@ -705,7 +710,7 @@ fast_ff = FFSmearedParticles("fast_ff",
         enableB0         = True,
         enableRP         = True,
         enableOMD        = True,
-        ionBeamEnergy    = 100,
+        ionBeamEnergy    = ionBeamEnergy,
         crossingAngle    = -0.025)
 algorithms.append(fast_ff)
 
-- 
GitLab