From cd4d9720555c344c3083edfaef861f4ae4f6bc66 Mon Sep 17 00:00:00 2001 From: nuclearkevin <66632997+nuclearkevin@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:45:43 -0500 Subject: [PATCH 1/2] Set all tally estimators to collision in RR simulations. --- src/random_ray/random_ray_simulation.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/random_ray/random_ray_simulation.cpp b/src/random_ray/random_ray_simulation.cpp index 6d6f2c743de..0374b1793fc 100644 --- a/src/random_ray/random_ray_simulation.cpp +++ b/src/random_ray/random_ray_simulation.cpp @@ -50,6 +50,17 @@ void validate_random_ray_inputs() } } + // Silently set tally estimators to collision to ensure that source + // regions correctly map to tally bins. This is required as source regions + // only store a single position to use for determining which tally they map + // to, so r() == r_last() and bins_crossed(...) may fail to match due to the + // zero segment length. This has no impact on the results as random ray + // simulations are MOC-based; tallies all use tracklength estimators regardless + // of the value of 'estimator_'. + for (auto& tally : model::tallies) { + tally->estimator_ = TallyEstimator::COLLISION; + } + // Validate filter types for (auto f : tally->filters()) { auto& filter = *model::tally_filters[f]; From a5707c2cea5f39c0538504d30f4a30e229f2c348 Mon Sep 17 00:00:00 2001 From: nuclearkevin <66632997+nuclearkevin@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:46:44 -0500 Subject: [PATCH 2/2] Formatting. --- src/random_ray/random_ray_simulation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/random_ray/random_ray_simulation.cpp b/src/random_ray/random_ray_simulation.cpp index 0374b1793fc..61bc3ef702b 100644 --- a/src/random_ray/random_ray_simulation.cpp +++ b/src/random_ray/random_ray_simulation.cpp @@ -55,8 +55,8 @@ void validate_random_ray_inputs() // only store a single position to use for determining which tally they map // to, so r() == r_last() and bins_crossed(...) may fail to match due to the // zero segment length. This has no impact on the results as random ray - // simulations are MOC-based; tallies all use tracklength estimators regardless - // of the value of 'estimator_'. + // simulations are MOC-based; tallies all use tracklength estimators + // regardless of the value of 'estimator_'. for (auto& tally : model::tallies) { tally->estimator_ = TallyEstimator::COLLISION; }