EGS4 Bug Alert
Vacuum Discard in ELECTR

Status of Bug

This bug has been corrected in the latest unix
(Jan 2, 1997 version 3) and PC distributions of
of the EGS4 code.

The bug relates to a user requested deferred discard (IDISC < 0) in the vacuum transport section of the electron transport routine SUBROUTINE ELECTR and also the positioning of the check for ECUT discards during transport through vacuum. Here is the offending code:

IF(EIE.LE.ECUT(IRL)) [GO TO :ECUT-DISCARD:;]
IF(USTEP.NE.0.0) [$AUSCALL($TRANAUSA);]
NEXT :TSTEP: ;] "GO TRY ANOTHER BIG STEP IN (POSSIBLY) NEW MEDIUM"

and here is the patch:

IF(USTEP.NE.0.0) [$AUSCALL($TRANAUSA);]
IF(EIE.LE.ECUT(IRL)) [GO TO :ECUT-DISCARD:;]
IF(USTEP.NE.0.AND.IDISC.LT.0) [GO TO :USER-ELECTRON-DISCARD:;]
NEXT :TSTEP: ;] "GO TRY ANOTHER BIG STEP IN (POSSIBLY) NEW MEDIUM"

The previous version discards based on ECUT after the transport takes place but BEFORE having informed the scoring routine. This was originally noted by Charlie Ma in 1994 and a patch provided by Dave Rogers in the non-vacuum sector of the code. The above patch makes the vacuum transport consistent with the non-vacuum transport.

So, if your applications involve vaccum transport and you define different ECUT's for different geometrical regions (IR's), or if your applications involve vacuum transport and deferred electron discards then apply the patch now.


Bug Fame Goes To...

Paul Magnuson of Imatron Inc. located in South San Francisco for spotting the vacuum discard bug and providing a patch. The description and bug patch was posted to the EGS listserver (EGS4-L) by Alex F Bielajew Questions regarding the aforementioned bug should be directed to Alex.

return to main EGS web page
Webmasters

last updated 09/28/01