Skip to content

Commit

Permalink
Stop adding RM to e- energy
Browse files Browse the repository at this point in the history
- For e- sources was adding the e- rest mass to the e- kinetic energy
  which is actually done in the EGS_AdvancedApplication::shower method
  • Loading branch information
mainegra authored and rtownson committed Jan 14, 2025
1 parent 3b28c20 commit 84aac74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion HEN_HOUSE/user_codes/egs_kerma/egs_kerma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,21 +253,23 @@ class APP_EXPORT EGS_KermaApplication : public EGS_AdvancedApplication {
int simulateSingleShower() {
last_case = current_case;
EGS_Vector x,u;

current_case = source->getNextParticle(rndm,p.q,p.latch,p.E,p.wt,x,u);

if (p.q == 0) {
Eph_ave += p.wt*p.E;
Nph += p.wt;
}
else {
Eel_ave += p.wt*p.E;
Nel += p.wt;
p.E += the_useful->rm;// source provides K.E.
}

int err = startNewShower();
if (err) {
return err;
}

EGS_BaseGeometry *save_geometry = geometry;
for (ig=0; ig<ngeom; ig++) {
geometry = geoms[ig];
Expand Down

0 comments on commit 84aac74

Please sign in to comment.