diff --git a/Core/src/Geometry/CuboidVolumeBuilder.cpp b/Core/src/Geometry/CuboidVolumeBuilder.cpp index a795325993a..2fe4f0e7666 100644 --- a/Core/src/Geometry/CuboidVolumeBuilder.cpp +++ b/Core/src/Geometry/CuboidVolumeBuilder.cpp @@ -152,30 +152,6 @@ std::shared_ptr Acts::CuboidVolumeBuilder::buildVolume( auto bounds = std::make_shared( cfg.length.x() * 0.5, cfg.length.y() * 0.5, cfg.length.z() * 0.5); - if (cfg.layerCfg.empty()) { - // Build dummy layer if no layer is given (tmp solution) - SurfaceConfig sCfg; - sCfg.position = cfg.position; - // Rotation of the surfaces: +pi/2 around axis y - Vector3 xPos(0., 0., 1.); - Vector3 yPos(0., 1., 0.); - Vector3 zPos(-1., 0., 0.); - sCfg.rotation.col(0) = xPos; - sCfg.rotation.col(1) = yPos; - sCfg.rotation.col(2) = zPos; - // Bounds - sCfg.rBounds = std::make_shared( - RectangleBounds(cfg.length.y() * 0.5, cfg.length.z() * 0.5)); - - LayerConfig lCfg; - lCfg.surfaceCfg = {sCfg}; - lCfg.envelopeX = {0.1 * UnitConstants::mm, 0.1 * UnitConstants::mm}; - lCfg.envelopeY = {0.1 * UnitConstants::mm, 0.1 * UnitConstants::mm}; - lCfg.envelopeZ = {0.1 * UnitConstants::mm, 0.1 * UnitConstants::mm}; - - cfg.layerCfg.push_back(lCfg); - } - // Gather the layers LayerVector layVec; if (cfg.layers.empty()) { diff --git a/Core/src/Geometry/LayerArrayCreator.cpp b/Core/src/Geometry/LayerArrayCreator.cpp index f814799b6eb..cfc49623eb0 100644 --- a/Core/src/Geometry/LayerArrayCreator.cpp +++ b/Core/src/Geometry/LayerArrayCreator.cpp @@ -134,7 +134,7 @@ std::unique_ptr Acts::LayerArrayCreator::layerArray( double navigationValue = 0.5 * (boundaries.at(boundaries.size() - 1) + max); // create navigation layer only when necessary - if (navigationValue != max) { + if (navigationValue != max && lastLayer != nullptr) { // create the navigation layer surface from the layer std::shared_ptr navLayerSurface = createNavigationSurface(gctx, *lastLayer, bValue,