From f2bc1f217fee635ef8be5d39a84e6f17cc765d24 Mon Sep 17 00:00:00 2001
From: Frank Gaede <frank.gaede@desy.de>
Date: Thu, 26 Nov 2015 18:54:05 +0000
Subject: [PATCH]  - fixed compilation issue on Macos (pthread)  - fixed issue
 w/ outer surface materials

---
 DDG4/plugins/Geant4SensDet.cpp | 2 +-
 DDRec/src/Surface.cpp          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/DDG4/plugins/Geant4SensDet.cpp b/DDG4/plugins/Geant4SensDet.cpp
index 36669acc4..5061a4388 100644
--- a/DDG4/plugins/Geant4SensDet.cpp
+++ b/DDG4/plugins/Geant4SensDet.cpp
@@ -81,7 +81,7 @@ namespace DD4hep {
           Geant4Action(0,nam), Geant4ActionSD(nam), Base()
       {
         Geant4Kernel& master = Geant4Kernel::instance(lcdd);
-        Geant4Kernel& kernel = master.worker(::pthread_self());
+        Geant4Kernel& kernel = master.worker(Geant4Kernel::thread_self());
         m_sensitive   = lcdd.sensitiveDetector(nam);
         m_context     = kernel.workerContext();
         m_outputLevel = kernel.getOutputLevel(nam);
diff --git a/DDRec/src/Surface.cpp b/DDRec/src/Surface.cpp
index 614e9f596..555b8822d 100644
--- a/DDRec/src/Surface.cpp
+++ b/DDRec/src/Surface.cpp
@@ -607,7 +607,7 @@ namespace DD4hep {
 	
         MaterialManager matMgr ;
         
-	Vector3D p = _o - outerThickness() * _n  ;
+	Vector3D p = _o + outerThickness() * _n  ;
 
         const MaterialVec& materials = matMgr.materialsBetween( _o , p  ) ;
 
-- 
GitLab