From cc4491b901a2c867be2b47bc498d9b8d816b440a Mon Sep 17 00:00:00 2001 From: Andre Sailer <andre.philippe.sailer@cern.ch> Date: Thu, 22 Jun 2017 16:41:42 +0200 Subject: [PATCH] Shapes: Polyhedron: use c'tor with parameters directly this constructor registers the shape with the geoManager --- DDCore/src/Shapes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DDCore/src/Shapes.cpp b/DDCore/src/Shapes.cpp index 865c7e0a4..790f8f245 100644 --- a/DDCore/src/Shapes.cpp +++ b/DDCore/src/Shapes.cpp @@ -399,15 +399,15 @@ Trap& Trap::setDimensions(double z, double theta, double phi, double y1, double return *this; } -/// Helper function to create holy hedron +/// Helper function to create poly hedron void PolyhedraRegular::_create(int nsides, double rmin, double rmax, double zpos, double zneg, double start, double delta) { if (rmin < 0e0 || rmin > rmax) throw runtime_error("dd4hep: PolyhedraRegular: Illegal argument rmin:<" + _toString(rmin) + "> is invalid!"); else if (rmax < 0e0) throw runtime_error("dd4hep: PolyhedraRegular: Illegal argument rmax:<" + _toString(rmax) + "> is invalid!"); - _assign(new TGeoPgon(), "", "polyhedra", false); double params[] = { start, delta, double(nsides), 2e0, zpos, rmin, rmax, zneg, rmin, rmax }; - _setDimensions(¶ms[0]); + _assign(new TGeoPgon(params), "", "polyhedra", false); + //_setDimensions(¶ms[0]); } /// Constructor to be used when creating a new object -- GitLab