Warning, /eic-spack/spack_repo/eic/packages/acts/pr5010.patch is written in an unsupported language. File is not indexed.
0001 diff --git a/Core/src/Material/SurfaceMaterialMapper.cpp b/Core/src/Material/SurfaceMaterialMapper.cpp
0002 index 80f3625be4f..5761e1fb913 100644
0003 --- a/Core/src/Material/SurfaceMaterialMapper.cpp
0004 +++ b/Core/src/Material/SurfaceMaterialMapper.cpp
0005 @@ -238,9 +238,16 @@ void SurfaceMaterialMapper::mapInteraction(
0006 mState.magFieldContext);
0007
0008 // Now collect the material layers by using the straight line propagator
0009 - const auto& result = m_propagator.propagate(start, options).value();
0010 - auto mcResult = result.get<MaterialSurfaceCollector::result_type>();
0011 - auto mvcResult = result.get<MaterialVolumeCollector::result_type>();
0012 + const auto& result = m_propagator.propagate(start, options);
0013 + if (not result.ok()) {
0014 + ACTS_ERROR("Encountered a propagator error for initial parameters : ");
0015 + ACTS_ERROR(" - Position: " << mTrack.first.first.transpose());
0016 + ACTS_ERROR(" - Momentum: " << mTrack.first.second.transpose());
0017 + return; // Skip track
0018 + }
0019 +
0020 + auto mcResult = result.value().get<MaterialSurfaceCollector::result_type>();
0021 + auto mvcResult = result.value().get<MaterialVolumeCollector::result_type>();
0022
0023 auto mappingSurfaces = mcResult.collected;
0024 auto mappingVolumes = mvcResult.collected;
0025 diff --git a/Core/src/Material/VolumeMaterialMapper.cpp b/Core/src/Material/VolumeMaterialMapper.cpp
0026 index 2d66ec33562..ef281d320bc 100644
0027 --- a/Core/src/Material/VolumeMaterialMapper.cpp
0028 +++ b/Core/src/Material/VolumeMaterialMapper.cpp
0029 @@ -372,9 +372,16 @@ void VolumeMaterialMapper::mapMaterialTrack(
0030 mState.magFieldContext);
0031
0032 // Now collect the material volume by using the straight line propagator
0033 - const auto& result = m_propagator.propagate(start, options).value();
0034 - auto mcResult = result.get<BoundSurfaceCollector::result_type>();
0035 - auto mvcResult = result.get<MaterialVolumeCollector::result_type>();
0036 + const auto& result = m_propagator.propagate(start, options);
0037 + if (not result.ok()) {
0038 + ACTS_ERROR("Encountered a propagator error for initial parameters : ");
0039 + ACTS_ERROR(" - Position: " << mTrack.first.first.transpose());
0040 + ACTS_ERROR(" - Momentum: " << mTrack.first.second.transpose());
0041 + return; // Skip track
0042 + }
0043 +
0044 + auto mcResult = result.value().get<BoundSurfaceCollector::result_type>();
0045 + auto mvcResult = result.value().get<MaterialVolumeCollector::result_type>();
0046
0047 auto mappingSurfaces = mcResult.collected;
0048 auto mappingVolumes = mvcResult.collected;