From 0a73d5e5dfe54ac328391fed6b2d4b8d3f8eb208 Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Thu, 22 Jun 2017 16:36:20 +0200
Subject: [PATCH] Shapes: EllipticalTube: call constructor with arguments
 directly so shape is registered

---
 DDCore/src/Shapes.cpp | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/DDCore/src/Shapes.cpp b/DDCore/src/Shapes.cpp
index b094904be..865c7e0a4 100644
--- a/DDCore/src/Shapes.cpp
+++ b/DDCore/src/Shapes.cpp
@@ -294,15 +294,7 @@ Tube& Tube::setDimensions(double rmin, double rmax, double z, double startPhi, d
 
 /// Constructor to be used when creating a new object with attribute initialization
 void EllipticalTube::make(double a, double b, double dz) {
-  _assign(new TGeoEltu(), "", "elliptic_tube", true);
-  setDimensions(a, b, dz);
-}
-
-/// Set the tube dimensions
-EllipticalTube& EllipticalTube::setDimensions(double a, double b, double dz) {
-  double params[] = { a, b, dz };
-  _setDimensions(params);
-  return *this;
+  _assign(new TGeoEltu("", a, b, dz), "", "elliptic_tube", true);
 }
 
 /// Constructor to be used when creating a new object with attribute initialization
-- 
GitLab