diff --git a/Plugins/GeoModel/src/GeoModelToDetectorVolume.cpp b/Plugins/GeoModel/src/GeoModelToDetectorVolume.cpp index cf392c19903..edd6b84550b 100644 --- a/Plugins/GeoModel/src/GeoModelToDetectorVolume.cpp +++ b/Plugins/GeoModel/src/GeoModelToDetectorVolume.cpp @@ -30,7 +30,7 @@ namespace Acts::GeoModel { Volume convertVolume(const Transform3& trf, const GeoShape& shape) { - std::shared_ptr bounds; + std::shared_ptr bounds; GeoTrf::Transform3D newTrf = trf; if (shape.typeID() == GeoTube::getClassTypeID()) { const GeoTube* tube = dynamic_cast(&shape); @@ -44,7 +44,7 @@ Volume convertVolume(const Transform3& trf, const GeoShape& shape) { newTrf = trf * GeoTrf::RotateZ3D(tubs->getSPhi() + 0.5 * tubs->getDPhi()); } else if (shape.typeID() == GeoBox::getClassTypeID()) { const GeoBox* box = dynamic_cast(&shape); - bounds = std::make_shared( + bounds = std::make_shared( box->getXHalfLength(), box->getYHalfLength(), box->getZHalfLength()); } else if (shape.typeID() == GeoTrd::getClassTypeID()) { const GeoTrd* trd = dynamic_cast(&shape); @@ -121,7 +121,6 @@ Volume convertVolume(const Transform3& trf, const GeoShape& shape) { } else { throw std::runtime_error("FATAL: Unsupported GeoModel shape"); } - return Volume(newTrf, bounds); } @@ -140,8 +139,7 @@ std::shared_ptr convertDetectorVolume( Volume vol = convertVolume(transform, shape); // TODO change the casting // return Experimental::DetectorVolumeFactory::construct( - portalGenerator, context, name, vol.transform(), - std::const_pointer_cast(vol.volumeBoundsPtr()), + portalGenerator, context, name, vol.transform(), vol.volumeBoundsPtr(), sensSurfaces, std::vector>{}, Experimental::tryNoVolumes(), Experimental::tryAllPortalsAndSurfaces());