From bf06d77e53ada94e606c31c66f7d14d79a1d4c48 Mon Sep 17 00:00:00 2001
From: Frank Gaede <frank.gaede@desy.de>
Date: Fri, 4 Dec 2015 14:01:20 +0000
Subject: [PATCH]  - fixed drawing of helper disks w/ origin not at z-axis

---
 DDRec/src/Surface.cpp | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/DDRec/src/Surface.cpp b/DDRec/src/Surface.cpp
index 555b8822d..74375d750 100644
--- a/DDRec/src/Surface.cpp
+++ b/DDRec/src/Surface.cpp
@@ -816,7 +816,7 @@ namespace DD4hep {
       const DDSurfaces::Vector3D& lu = _volSurf.u() ;
       //      const DDSurfaces::Vector3D& lv = _volSurf.v() ;
       const DDSurfaces::Vector3D& ln = _volSurf.normal() ;
-      const DDSurfaces::Vector3D& lo = _volSurf.origin() ;
+      DDSurfaces::Vector3D lo = _volSurf.origin() ;
       
       Volume vol = volume() ; 
       const TGeoShape* shape = vol->GetShape() ;
@@ -880,8 +880,15 @@ namespace DD4hep {
           TGeoCone* cone = ( TGeoCone* ) shape  ;
 
           // can only deal with special case of z-disk and origin in center of cone
-          if( type().isZDisk() && lo.rho() < epsilon ) {
+          if( type().isZDisk() ) { // && lo.rho() < epsilon ) {
 	    
+	    if( lo.rho() > epsilon ) {
+	      // move origin to z-axis 
+	      lo.x() = 0. ; 
+	      lo.y() = 0. ;
+	    }
+
+
             double zhalf = cone->GetDZ() ;
             double rmax1 = cone->GetRmax1() ;
             double rmax2 = cone->GetRmax2() ;
-- 
GitLab