diff --git a/DDCore/src/Shapes.cpp b/DDCore/src/Shapes.cpp index 914fc21cb9bfb4a4ff03d426da2f8c24f6883d93..a51d41a3cef24a86ee285efb83f0f601e2d1fe2c 100644 --- a/DDCore/src/Shapes.cpp +++ b/DDCore/src/Shapes.cpp @@ -268,7 +268,7 @@ void Polycone::addZPlanes(const std::vector<double>& rmin, const std::vector<dou TGeoPcon* sh = *this; std::vector<double> params; std::size_t num = sh->GetNz(); - if (rmin.size() < 2) { + if (num + rmin.size() < 2) { except("PolyCone","++ addZPlanes: Not enough Z planes. minimum is 2!"); } params.emplace_back(sh->GetPhi1());