From 1b8664d1e0fb87e814d4a4509c91b997f8f3f050 Mon Sep 17 00:00:00 2001
From: FaserMC <fasermc@cern.ch>
Date: Tue, 31 Jan 2023 04:37:57 +0100
Subject: [PATCH] Add FLUKA crossing angle shift

---
 .../Simulation/scripts/submit_faser_simulate.sh       | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Control/CalypsoExample/Simulation/scripts/submit_faser_simulate.sh b/Control/CalypsoExample/Simulation/scripts/submit_faser_simulate.sh
index 6a285a7f..6e4d4df2 100755
--- a/Control/CalypsoExample/Simulation/scripts/submit_faser_simulate.sh
+++ b/Control/CalypsoExample/Simulation/scripts/submit_faser_simulate.sh
@@ -35,6 +35,11 @@ do
 	  xangle=1 
 	  shift;;  # This 'eats' the argument
 
+      --fshift)
+	  echo "Applying FLUKA crossing-angle shift"
+	  xangle=2
+	  shift;;
+
       -l | --log)
 	  logdest="$2";
 	  shift;
@@ -184,9 +189,13 @@ cd "${file_stem}"
 if [[ -z "$xangle" ]]; then
     faser_simulate.py  --skip "$skip_events" -n "$nevts" "$infile" "$outfile"
     sim_code=$?
-else
+elif [[ $xangle == 1 ]]; then
     faser_simulate.py  --yangle -0.000160 --yshift 12.0 --skip "$skip_events" -n "$nevts" "$infile" "$outfile"
     sim_code=$?
+else
+    echo "Applying double crossing-angle shift for FLUKA!"
+    faser_simulate.py  --yangle -0.000310 --yshift 12.0 --skip "$skip_events" -n "$nevts" "$infile" "$outfile"
+    sim_code=$?
 fi
 echo "Return code: $sim_code"
 #
-- 
GitLab