From ef92f5232594d142600a691f603b1752b6ec6db8 Mon Sep 17 00:00:00 2001
From: Markus Frank <Markus.Frank@cern.ch>
Date: Thu, 5 Apr 2018 21:09:44 +0200
Subject: [PATCH] Fix dd4hep units as discussed in the meeting.

---
 DDCore/CMakeLists.txt | 4 ++++
 DDG4/python/DDG4.py   | 9 ++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/DDCore/CMakeLists.txt b/DDCore/CMakeLists.txt
index 1bf5fa1c3..08ea41d59 100644
--- a/DDCore/CMakeLists.txt
+++ b/DDCore/CMakeLists.txt
@@ -78,3 +78,7 @@ dd4hep_add_plugin ( DDCorePlugins SOURCES src/plugins/*.cpp )
 dd4hep_add_plugin(DDGDMLPlugins
   OPTIONAL    [ROOT REQUIRED COMPONENTS Gdml SOURCES src/gdml/*.cpp]
 )
+#
+#
+#---Package installation procedure(s) ----------------------------------------------
+dd4hep_install_files(FILES python/*.py DESTINATION python)
diff --git a/DDG4/python/DDG4.py b/DDG4/python/DDG4.py
index 30e9381b1..2d6f38007 100644
--- a/DDG4/python/DDG4.py
+++ b/DDG4/python/DDG4.py
@@ -44,7 +44,7 @@ def _import_class(ns,nam):
 #---------------------------------------------------------------------------
 #
 try:
-  dd4hep     = loadDDG4() 
+  dd4hep = loadDDG4() 
 except Exception as X:
   logging.info('+--%-100s--+',100*'-')
   logging.info('|  %-100s  |','Failed to load DDG4 library:')
@@ -59,8 +59,11 @@ Simulation = dd4hep.sim
 Kernel     = Sim.KernelHandle
 Interface  = Sim.Geant4ActionCreation
 Detector   = Core.Detector
-from DD4hep import std, std_vector, std_list, std_map, std_pair
-
+#
+from   dd4hep_base import std, std_vector, std_list, std_map, std_pair
+from   dd4hep_base import TGeoUnits
+import g4units     as     G4Units
+#
 #---------------------------------------------------------------------------
 def _constant(self,name):
   return self.constantAsString(name)
-- 
GitLab