From e4c86a8cc0f8366cd4c56bc4c0f2586e6458a490 Mon Sep 17 00:00:00 2001
From: Frank Gaede <frank.gaede@desy.de>
Date: Thu, 19 Mar 2015 08:59:10 +0000
Subject: [PATCH]  - bug fixes provided by Shaojun Lu, DESY    - angle
 arguments in sphere constructors

---
 DDCore/src/Shapes.cpp               | 2 +-
 DDCore/src/plugins/ShapePlugins.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/DDCore/src/Shapes.cpp b/DDCore/src/Shapes.cpp
index 441f13f39..f8c00ba40 100644
--- a/DDCore/src/Shapes.cpp
+++ b/DDCore/src/Shapes.cpp
@@ -328,7 +328,7 @@ Hyperboloid& Hyperboloid::setDimensions(double rin, double stin, double rout, do
 
 /// Constructor to be used when creating a new object with attribute initialization
 Sphere::Sphere(double rmin, double rmax, double theta, double delta_theta, double phi, double delta_phi) {
-  _assign(new TGeoSphere(rmin, rmax, theta, delta_theta/dd4hep::deg, phi/dd4hep::deg, delta_phi/dd4hep::deg), "", "sphere", true);
+  _assign(new TGeoSphere(rmin, rmax, theta/dd4hep::deg, delta_theta/dd4hep::deg, phi/dd4hep::deg, delta_phi/dd4hep::deg), "", "sphere", true);
 }
 
 /// Set the Sphere dimensions
diff --git a/DDCore/src/plugins/ShapePlugins.cpp b/DDCore/src/plugins/ShapePlugins.cpp
index 070f31812..e2e982a81 100644
--- a/DDCore/src/plugins/ShapePlugins.cpp
+++ b/DDCore/src/plugins/ShapePlugins.cpp
@@ -96,7 +96,7 @@ DECLARE_XMLELEMENT(Torus__shape_constructor,create_Torus)
 
 static Ref_t create_Sphere(lcdd_t&, xml_h element)   {
   xml_dim_t e(element);
-  return Sphere(e.rmin(),e.rmax(),e.deltatheta(M_PI),e.phi(0e0),e.deltaphi(2.*M_PI));
+  return Sphere(e.rmin(),e.rmax(),e.theta(0e0),e.deltatheta(M_PI),e.phi(0e0),e.deltaphi(2.*M_PI));
 }
 DECLARE_XMLELEMENT(Sphere__shape_constructor,create_Sphere)
 
-- 
GitLab