From 0e1061487e25b921794fa7544e93722e6c026271 Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Fri, 18 May 2018 13:50:27 +0200
Subject: [PATCH] DDSim: replace deprecated SystemOfUnits with g4units

---
 DDG4/python/DDSim/DD4hepSimulation.py       | 4 ++--
 DDG4/python/DDSim/Helper/Filter.py          | 2 +-
 DDG4/python/DDSim/Helper/Gun.py             | 2 +-
 DDG4/python/DDSim/Helper/MagneticField.py   | 2 +-
 DDG4/python/DDSim/Helper/ParticleHandler.py | 2 +-
 DDG4/python/DDSim/Helper/Physics.py         | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py
index 52a2b4667..bcb5019aa 100644
--- a/DDG4/python/DDSim/DD4hepSimulation.py
+++ b/DDG4/python/DDSim/DD4hepSimulation.py
@@ -7,7 +7,7 @@ Based on M. Frank and F. Gaede runSim.py
 
 """
 __RCSID__ = "$Id$"
-from SystemOfUnits import *
+from g4units import *
 import argparse
 try:
   import argcomplete
@@ -649,7 +649,7 @@ class DD4hepSimulation(object):
     """print the parameters formated as a steering file"""
 
     steeringFileBase="""from DDSim.DD4hepSimulation import DD4hepSimulation
-from SystemOfUnits import mm, GeV, MeV
+from g4units import mm, GeV, MeV
 SIM = DD4hepSimulation()
 
 """
diff --git a/DDG4/python/DDSim/Helper/Filter.py b/DDG4/python/DDSim/Helper/Filter.py
index e7d24ba4b..fe724f7c0 100644
--- a/DDG4/python/DDSim/Helper/Filter.py
+++ b/DDG4/python/DDSim/Helper/Filter.py
@@ -6,7 +6,7 @@ The default filters are a GeantinoRejector and a 1keV minimum energy cut
 """
 
 from DDSim.Helper.ConfigHelper import ConfigHelper
-from SystemOfUnits import keV
+from g4units import keV
 
 class Filter( ConfigHelper ):
   """Configuration for sensitive detector filters
diff --git a/DDG4/python/DDSim/Helper/Gun.py b/DDG4/python/DDSim/Helper/Gun.py
index fb3fcde02..d5af78bd9 100644
--- a/DDG4/python/DDSim/Helper/Gun.py
+++ b/DDG4/python/DDSim/Helper/Gun.py
@@ -1,7 +1,7 @@
 """Helper object for particle gun properties"""
 
 from DDSim.Helper.ConfigHelper import ConfigHelper
-from SystemOfUnits import GeV
+from g4units import GeV
 
 class Gun( ConfigHelper ):
   """Configuration for the DDG4 ParticleGun"""
diff --git a/DDG4/python/DDSim/Helper/MagneticField.py b/DDG4/python/DDSim/Helper/MagneticField.py
index 60465351e..81e107a1b 100644
--- a/DDG4/python/DDSim/Helper/MagneticField.py
+++ b/DDG4/python/DDSim/Helper/MagneticField.py
@@ -1,5 +1,5 @@
 """Helper object for Magnetic Field properties"""
-from SystemOfUnits import mm, m
+from g4units import mm, m
 from DDSim.Helper.ConfigHelper import ConfigHelper
 
 class MagneticField( ConfigHelper ):
diff --git a/DDG4/python/DDSim/Helper/ParticleHandler.py b/DDG4/python/DDSim/Helper/ParticleHandler.py
index 5a50d0361..f66c4b02e 100644
--- a/DDG4/python/DDSim/Helper/ParticleHandler.py
+++ b/DDG4/python/DDSim/Helper/ParticleHandler.py
@@ -1,5 +1,5 @@
 """Configuration Helper for ParticleHandler"""
-from SystemOfUnits import MeV, mm
+from g4units import MeV, mm
 
 from DDSim.Helper.ConfigHelper import ConfigHelper
 
diff --git a/DDG4/python/DDSim/Helper/Physics.py b/DDG4/python/DDSim/Helper/Physics.py
index b868f1e8c..f84f0a69b 100644
--- a/DDG4/python/DDSim/Helper/Physics.py
+++ b/DDG4/python/DDSim/Helper/Physics.py
@@ -3,7 +3,7 @@
 import os
 
 from DDSim.Helper.ConfigHelper import ConfigHelper
-from SystemOfUnits import mm
+from g4units import mm
 
 class Physics( ConfigHelper ):
   """Configuration for the PhysicsList"""
-- 
GitLab