Repository navigation
Conversation
Source particles with energy below the cutoff for their particle type were previously transported until their first collision. They are now killed at initialization (still counting toward the total source weight) and are not dispatched in event-based mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011TspbrV3dSyNnBADnfLjP1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011TspbrV3dSyNnBADnfLjP1
Photons below the energy cutoff now collide immediately at their current position instead of being killed at source initialization, so the existing cutoff check in sample_photon_reaction deposits their energy locally, as it does for photons that fall below the cutoff during transport. In a void they are killed without deposition. Electrons and positrons already collide at their birth site, and source neutrons below the cutoff are still killed at initialization. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011TspbrV3dSyNnBADnfLjP1
GuySten
marked this pull request as ready for review
September 23, 2026 18:26
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Source particles born below the energy cutoff for their type used to be transported until their first collision. Particles created during transport are checked against the cutoff when they are made, and existing particles are checked after each collision, but source particles were never checked. With this change, below-cutoff source particles are handled the same way as particles that fall below the cutoff during transport:
initialize_particle_track, with no energy deposited. This matches neutrons killed after a collision. Their weight still counts towardtotal_weight, so tally normalization is unchanged. They skip weight windows, so they can't be split. In event-based mode, dead source particles are no longer queued for transport (process_init_events).event_advance. They collide where they are born, and the existing cutoff check insample_photon_reactionkills them and deposits their energy locally, which heating and pulse-height tallies score. In a void they are killed without depositing energy. This check applies at every step, so photons made below the cutoff by neutron reactions or atomic relaxation also deposit where they're made instead of travelling to a collision first.Checklist
I have made corresponding changes to the documentation (if applicable)test_source_below_energy_cutoffintests/unit_tests/test_energy_cutoff.pyNote: this code has not been compiled or run locally, because the build environment had no HDF5. CI will be the first check.