Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Seltzer-Berger max xs for positrons #922

Merged
merged 3 commits into from
Sep 5, 2023

Conversation

amandalund
Copy link
Contributor

@amandalund amandalund commented Sep 4, 2023

This reverts to using the max electron Seltzer-Berger DCS for positrons instead of the first DCS value (which I had mistakenly based on a zero production cut in #401). The xs scaling factor depends on the production cut, and will approach 1 as the exiting gamma energy approaches the cutoff value -- so in the extreme case the max positron xs will be the same as for electrons.

This should resolve the failure in #892, which occurs for low energy positrons when the sampled exiting gamma energy is very close to the production cut.

@amandalund amandalund added bug Something isn't working physics Particles, processes, and stepping algorithms labels Sep 4, 2023
@amandalund amandalund requested a review from sethrj September 4, 2023 18:57
static double const expected_avg_engine_samples[] = {4.0791015625,
4.060546875, 5.13623046875, 4.6572265625, 4.43115234375, 4.35791015625,
9.3740234375, 4.65478515625};
137.044921875, 4.060546875, 15.74169921875, 5.103515625, 5.26953125,
Copy link
Member

Choose a reason for hiding this comment

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

That's a lot of rejection, especially considering the comment above:

Note: the first point has a very low cross section compared to ionization so won't be encountered in practice. The differential cross section distribution is much flatter there, so there should be lower rejection.

Do you have any plots of the maximum cross section versus the actual distribution?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I'll update the comment since it only applies to the electron DCS -- for low incident energies the positron DCS deviates a lot. These are cross sections for a 1 keV incident particle (same as that first point in the test) and a few different cutoff energies (0.9 keV is used in the test):
sb_dcs

So, the sampling efficiency for the positrons here will be quite poor. For higher incident energies though the positron DCS will be much closer to the electron DCS.

Copy link
Member

Choose a reason for hiding this comment

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

Yuck, that rejection rate is high indeed, but it should be a very unusual case indeed. Thanks for the plot!

@sethrj sethrj linked an issue Sep 5, 2023 that may be closed by this pull request
@sethrj sethrj merged commit c04ca33 into celeritas-project:develop Sep 5, 2023
sethrj pushed a commit that referenced this pull request Sep 5, 2023
* Add failing SB test
* Revert to using Seltzer-Berger electron max DCS for positrons
* Update comment
@amandalund amandalund deleted the sb-max-xs-fix branch September 5, 2023 15:37
@sethrj sethrj added the backport Pull request duplicated across version branches label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Pull request duplicated across version branches bug Something isn't working physics Particles, processes, and stepping algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate a rare crash from SBEnergyDistribution
2 participants