From edebfc24c052c9de2f90749d0277dc763c70a177 Mon Sep 17 00:00:00 2001
From: Markus FRANK <Markus.Frank@cern.ch>
Date: Mon, 2 Nov 2020 10:47:27 +0100
Subject: [PATCH] Fix python warnings

---
 .../ClientTests/scripts/Check_reflection.py     | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/examples/ClientTests/scripts/Check_reflection.py b/examples/ClientTests/scripts/Check_reflection.py
index cf34151d5..20f5184be 100644
--- a/examples/ClientTests/scripts/Check_reflection.py
+++ b/examples/ClientTests/scripts/Check_reflection.py
@@ -12,6 +12,7 @@ import sys
 import os
 from g4units import rad, GeV, MeV, mm, m
 from ddsix.moves import range
+from math import pi
 
 logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
 logger = logging.getLogger(__name__)
@@ -89,13 +90,15 @@ def run():
   geant4.setupROOTOutput('RootOutput', 'Reflections_' + time.strftime('%Y-%m-%d_%H-%M'), mc_truth=True)
   #
   # Setup particle gun
-  geant4.setupGun(name = "Gun",
-                  particle = 'e-',
-                  energy = 1000 * GeV,
-                  multiplicity = 1,
-                  position = (0*m, 0*m, 0*m),
-                  PhiMin = 0.0*rad, PhiMax = 3.141*2.0*rad,
-                  ThetaMin = 0.0*rad, ThetaMax = 3.141*rad)
+  geant4.setupGun(name="Gun",
+                  particle='e-',
+                  energy=1000*GeV,
+                  multiplicity=1,
+                  position=(0*m, 0*m, 0*m),
+                  PhiMin=0.0*rad,
+                  PhiMax=math.pi*2.0*rad,
+                  ThetaMin=0.0*rad,
+                  ThetaMax=math.pi*rad)
 
   logger.info("#  ....and handle the simulation particles.")
   part = DDG4.GeneratorAction(kernel, str('Geant4ParticleHandler/ParticleHandler'))
-- 
GitLab