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 energy deposition for killed looping positrons #708

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

amandalund
Copy link
Contributor

This adds the missing 2 * rest mass to the deposited energy for positrons that were killed while looping.

@amandalund amandalund added bug Something isn't working physics Particles, processes, and stepping algorithms labels Mar 29, 2023
@amandalund amandalund requested a review from sethrj March 29, 2023 23:33
@@ -34,6 +34,7 @@ struct ParticleRecord
units::MevMass mass; //!< Rest mass [MeV / c^2]
units::ElementaryCharge charge; //!< Charge in units of [e]
real_type decay_constant; //!< Decay constant [1/s]
bool is_antiparticle; //!< Antiparticle (negative PDG number)
Copy link
Member

Choose a reason for hiding this comment

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

Probably a basic/dumb physics question: antiprotons and antielectrons obviously annihilate with regular matter. Do unstable antiparticles decay entirely to stable antiparticles? If not then it's not ideal to dump twice the rest mass into local energy deposition in all cases...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since only stable particles can be killed we should be safe either way.. but maybe since we really want to check if it's a positron we should just store the positron ID somewhere?

Copy link
Member

Choose a reason for hiding this comment

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

Well, I think this is certainly good enough for the time being since the only antiparticle we have is positron 🙃. The code in the loop is clear enough that when we add other antiparticles we'll know to revisit it.

🙃 + 🙂 → 💥💥

@sethrj sethrj merged commit 18968ee into celeritas-project:develop Mar 30, 2023
@amandalund amandalund deleted the fix-energy-conservation branch July 23, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working physics Particles, processes, and stepping algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants