Skip to content

Commit

Permalink
Fix rest mass and energy in DOSXYZnrc source 20
Browse files Browse the repository at this point in the history
If a BEAMnrc shared library geometry was interposed between the source
and the phantom and the source in the BEAMnrc input file (specifying the
shared library geometry) was not a phase space or a BEAM simulation
source (source 21, 23 or 24), then: 1) if the source was monoenergetic,
the rest mass was erroneously added to the energies of all charged
particles passing through the shared library geometry or 2) if the
source had an energy spectrum, charged particles and photons were
erroneously reassigned a new energy from the spectrum specified in the
BEAMnrc input file before passing through the shared library geometry.
  • Loading branch information
blakewalters authored and ftessier committed Sep 5, 2017
1 parent 7b517f8 commit ca35d90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HEN_HOUSE/omega/beamnrc/beamnrc.mortran
Expand Up @@ -4480,9 +4480,9 @@ CALL SRCHST(XIN,YIN,ZIN,UIN,VIN,WIN,IRIN,WEIGHT);
"for ISOURC=21 EIN and IQIN are passed via comin score"
ICMNEW = ICM; "set equal to suppress full phase-space output until
"particle crosses a scoring plane
IF( ISOURC ~= 21 & ISOURC ~=23 & ISOURC~=24) [
IF( ISOURC ~= 21 & ISOURC ~=23 & ISOURC~=24 & dosxyz2beam_index >= 0) [
IF( MONOEN = 1 ) CALL EN_SAMPLE(EIN);
IF(IQIN = 0)[EI=EIN;]ELSE[EI=EIN+RM;]
IF(IQIN = 0)[EI=EIN;]ELSE[EI=EIN+PRM;]
] ELSE [ EI = EIN; ]

"set initial energy for beam models";
Expand Down

0 comments on commit ca35d90

Please sign in to comment.