Skip to content

Conversation

@GuySten
Copy link
Contributor

@GuySten GuySten commented Dec 9, 2025

Description

This PR extend Level Scattering to support incident photons.
This is a small step in implementing photonuclear physics.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) 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 changed the title extend level scattering to support incident photon Extend level scattering to support incident photons Dec 9, 2025
@GuySten GuySten marked this pull request as ready for review December 9, 2025 23:55
@GuySten GuySten requested a review from paulromano as a code owner December 9, 2025 23:55
Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GuySten Thanks for starting with a small PR to get us toward support for photonuclear physics. This PR just needs some documentation but otherwise it looks good to me.

double LevelInelastic::sample(double E, uint64_t* seed) const
{
return mass_ratio_ * (E - threshold_);
return a_ * (E - b_ - c_ * (E * E));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This equation should be documented somewhere in our theory/methodology guide (probably docs/source/methods/photon_physics.rst) since the functional form is different than the neutron-nucleus case. You would need to either cite a reference that has this equation or provide a derivation from first principles.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added documentation in docs/source/methods/photon_physics.rst.

Comment on lines 64 to 66
double a_;
double b_;
double c_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to have comments on these data members so someone looking at the class declaration knows what they are.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've documented these data members.

@GuySten GuySten requested a review from paulromano December 13, 2025 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants