Skip to content

Fix a bug in compton scattering shell and angle selection#3874

Open
GuySten wants to merge 13 commits intoopenmc-dev:developfrom
GuySten:pick-correct-shell
Open

Fix a bug in compton scattering shell and angle selection#3874
GuySten wants to merge 13 commits intoopenmc-dev:developfrom
GuySten:pick-correct-shell

Conversation

@GuySten
Copy link
Contributor

@GuySten GuySten commented Mar 12, 2026

Description

Currently, in compton scatter openmc select electron to interact with irrespectively of the incident photon energy. This PR change that to resample the shell until the incident photon energy is higher than the electron binding energy.

This PR also resample the compton scattering angle such that enough energy is transfered to be able to eject the outer electron.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 18) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@GuySten GuySten added the Bugs label Mar 12, 2026
@GuySten GuySten changed the title Fix a bug in compton scattering shell selection Fix a bug in compton scattering shell and angle selection Mar 12, 2026
@GuySten GuySten marked this pull request as ready for review March 12, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant