Skip to content

Commit 84aac74

Browse files
mainegrartownson
authored andcommitted
Stop adding RM to e- energy
- For e- sources was adding the e- rest mass to the e- kinetic energy which is actually done in the EGS_AdvancedApplication::shower method
1 parent 3b28c20 commit 84aac74

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

HEN_HOUSE/user_codes/egs_kerma/egs_kerma.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -253,21 +253,23 @@ class APP_EXPORT EGS_KermaApplication : public EGS_AdvancedApplication {
253253
int simulateSingleShower() {
254254
last_case = current_case;
255255
EGS_Vector x,u;
256+
256257
current_case = source->getNextParticle(rndm,p.q,p.latch,p.E,p.wt,x,u);
258+
257259
if (p.q == 0) {
258260
Eph_ave += p.wt*p.E;
259261
Nph += p.wt;
260262
}
261263
else {
262264
Eel_ave += p.wt*p.E;
263265
Nel += p.wt;
264-
p.E += the_useful->rm;// source provides K.E.
265266
}
266267

267268
int err = startNewShower();
268269
if (err) {
269270
return err;
270271
}
272+
271273
EGS_BaseGeometry *save_geometry = geometry;
272274
for (ig=0; ig<ngeom; ig++) {
273275
geometry = geoms[ig];

0 commit comments

Comments
 (0)