From b409cee93537e8f88968a768654a1d98b3896e19 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Sat, 19 Jun 2021 14:19:16 -0400
Subject: [PATCH] max theta corresponds to min eta

---
 src/dd4pod/python/npsim/DDSim/Helper/Gun.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/dd4pod/python/npsim/DDSim/Helper/Gun.py b/src/dd4pod/python/npsim/DDSim/Helper/Gun.py
index 9fdde03b..ab1f58a8 100644
--- a/src/dd4pod/python/npsim/DDSim/Helper/Gun.py
+++ b/src/dd4pod/python/npsim/DDSim/Helper/Gun.py
@@ -122,9 +122,13 @@ class Gun(ConfigHelper):
       ddg4Gun.direction = self.direction
       ddg4Gun.Distribution = self.distribution
       if self.etaMin is not None:
-        self.thetaMin = str(2.0*atan(exp(-float(self.etaMin)))/deg)
+        self.thetaMax = str(2.0*atan(exp(-float(self.etaMin))))
+        ddg4Gun.ThetaMax = str(2.0*atan(exp(-float(self.etaMin))))
+        ddg4Gun.isotrop = True
       if self.etaMax is not None:
-        self.thetaMax = str(2.0*atan(exp(-float(self.etaMax)))/deg)
+        self.thetaMin = str(2.0*atan(exp(-float(self.etaMax))))
+        ddg4Gun.ThetaMin = str(2.0*atan(exp(-float(self.etaMax))))
+        ddg4Gun.isotrop = True
       if self.thetaMin is not None:
         ddg4Gun.ThetaMin = self.thetaMin
         ddg4Gun.isotrop = True
-- 
GitLab