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 egs++ iaea phsp scoring electron energy #1077

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -254,20 +254,30 @@ void EGS_PhspScoring::storeParticle(EGS_I64 ncase) {
if (app->top_p.q==0) {
countg++;
}
if (app->top_p.E-abs(app->top_p.q)*prm > emax) {
emax = app->top_p.E-abs(app->top_p.q)*prm;
double ke = app->top_p.E-abs(app->top_p.q)*prm;
if (ke > emax) {
emax = ke;
}
if (app->top_p.q != 0 && app->top_p.E - prm < emin) {
emin = app->top_p.E - prm;
}

//store particle data in p_stack

// Store kinetic energy for IAEA format phsp, and total energy for egsphsp
double E;
if (oformat == 0) {
E = app->top_p.E;
} else if (oformat == 1) {
E = ke;
}

//set -ve energy marker if this is a new primary hist.
double E = app->top_p.E;
if (ncase != last_case) {
E = -E;
last_case = ncase;
}

//store particle data in p_stack
p_stack[phsp_index].E = E;
p_stack[phsp_index].wt = app->top_p.wt;
p_stack[phsp_index].x = app->top_p.x.x;
Expand Down