@@ -57,6 +57,10 @@ Acts::MutableLayerPtr Acts::LayerCreator::cylinderLayer(
5757 const Transform3& transform, std::unique_ptr<ApproachDescriptor> ad) const {
5858 ProtoLayer protoLayer =
5959 _protoLayer ? *_protoLayer : ProtoLayer (gctx, surfaces);
60+ if (!_protoLayer) {
61+ protoLayer.envelope [AxisDirection::AxisR] = m_cfg.defaultEnvelopeR ;
62+ protoLayer.envelope [AxisDirection::AxisZ] = m_cfg.defaultEnvelopeZ ;
63+ }
6064
6165 // Remaining layer parameters - they include the envelopes
6266 double layerR = protoLayer.medium (AxisDirection::AxisR);
@@ -130,6 +134,10 @@ Acts::MutableLayerPtr Acts::LayerCreator::cylinderLayer(
130134 const Transform3& transform, std::unique_ptr<ApproachDescriptor> ad) const {
131135 ProtoLayer protoLayer =
132136 _protoLayer ? *_protoLayer : ProtoLayer (gctx, surfaces);
137+ if (!_protoLayer) {
138+ protoLayer.envelope [AxisDirection::AxisR] = m_cfg.defaultEnvelopeR ;
139+ protoLayer.envelope [AxisDirection::AxisZ] = m_cfg.defaultEnvelopeZ ;
140+ }
133141
134142 // remaining layer parameters
135143 double layerR = protoLayer.medium (AxisDirection::AxisR);
@@ -204,6 +212,10 @@ Acts::MutableLayerPtr Acts::LayerCreator::discLayer(
204212 const Transform3& transform, std::unique_ptr<ApproachDescriptor> ad) const {
205213 ProtoLayer protoLayer =
206214 _protoLayer ? *_protoLayer : ProtoLayer (gctx, surfaces);
215+ if (!_protoLayer) {
216+ protoLayer.envelope [AxisDirection::AxisR] = m_cfg.defaultEnvelopeR ;
217+ protoLayer.envelope [AxisDirection::AxisZ] = m_cfg.defaultEnvelopeZ ;
218+ }
207219
208220 double layerZ = protoLayer.medium (AxisDirection::AxisZ);
209221 double layerThickness = protoLayer.range (AxisDirection::AxisZ);
@@ -270,6 +282,10 @@ Acts::MutableLayerPtr Acts::LayerCreator::discLayer(
270282 const Transform3& transform, std::unique_ptr<ApproachDescriptor> ad) const {
271283 ProtoLayer protoLayer =
272284 _protoLayer ? *_protoLayer : ProtoLayer (gctx, surfaces);
285+ if (!_protoLayer) {
286+ protoLayer.envelope [AxisDirection::AxisR] = m_cfg.defaultEnvelopeR ;
287+ protoLayer.envelope [AxisDirection::AxisZ] = m_cfg.defaultEnvelopeZ ;
288+ }
273289
274290 double layerZ = protoLayer.medium (AxisDirection::AxisZ);
275291 double layerThickness = protoLayer.range (AxisDirection::AxisZ);
@@ -334,6 +350,10 @@ Acts::MutableLayerPtr Acts::LayerCreator::planeLayer(
334350 std::unique_ptr<ApproachDescriptor> ad) const {
335351 ProtoLayer protoLayer =
336352 _protoLayer ? *_protoLayer : ProtoLayer (gctx, surfaces);
353+ if (!_protoLayer) {
354+ protoLayer.envelope [AxisDirection::AxisR] = m_cfg.defaultEnvelopeR ;
355+ protoLayer.envelope [AxisDirection::AxisZ] = m_cfg.defaultEnvelopeZ ;
356+ }
337357
338358 // remaining layer parameters
339359 double layerHalf1 = 0 , layerHalf2 = 0 , layerThickness = 0 ;
0 commit comments