Feb 2, 2017 - not refer to the original EGS4 User Manual[11] although it is on-line and available ...... holds), and com
The EGSnrc Code System: Monte Carlo Simulation of Electron and Photon Transport I. Kawrakow E. Mainegra-Hing, D.W.O. Rogers, F. Tessier and B.R.B. Walters Ionizing Radiation Standards, National Research Council Canada, Ottawa, Canada
June 1, 2018 NRCC Report PIRS-701
60
ion chamber response in Co beams
calculated response/expected
1.02
EGSnrc: both walls
1.01 1.00 0.99 0.98
EGS4/PRESTA graphite wall
0.97 0.96 0.95 0.94 0.00
EGS4/PRESTA, aluminum wall 0.05
0.10
0.15
ESTEPE
c
NRC Canada, 2001–2015
0.20
0.25
EGSnrc Code System
1
Preface Sixth printing: May 2011 A long time has passed since the last update to this document. Although no fundamental changes have been made to the system, there have been a number of important additions and improvements to the system since 2009. Numerous bugs have been corrected and a new user code for free-air chamber (FAC) correction calculations was added to the distribution. • Use of arbitrary electron impact ionization (EII) cross section compilations. Added a tutor2.mortran" "********************************************************************" " " SUBROUTINE AUSGAB(IARG); " " " In this AUSGAB routine for tutor2, we score the energy deposited " " in the various regions. This amounts to the total energy " " reflected,deposited and transmitted by the slab. " " " " For IARG=0, an electron or photon step is about to occur and we " " score the energy deposited, if any. Note that only electrons " " deposit energy during a step, and due to our geometry, electrons " " only take steps in region 2 - however there is no need to check. " " For IARG=1,2 and 4, particles have been discarded for falling " " below various energy cutoffs and all their energy is deposited " " locally (in fact EDEP = particles kinetic energy). " " For IARG=3, we are discarding the particle since it is in " " region 1 or 3, so score its energy. " " " "********************************************************************" IMPLICIT NONE; INTEGER IARG,IRL; COMIN/EPCONT,SCORE,STACK/; "we use EDEP from EPCONT,IR(NP) from STACK" " ESCORE is passed in user defined COMIN SCORE" IF(IARG 0 ) CALL WATCH(IARG,IWATCH); " " 3)The routine may be called at the end of each history with IARG = - 1 so " " a message will get printed stated history is complete " " " " Since WATCH cannot output values related to the initial values in a " " shower call, it is useful to also put something like the following " " immediately prior to the CALL SHOWER stmt " " IF((IWATCH ~= 0) & (IWATCH ~= 4))[ " " OUTPUT 1,EIN,IQI,IRI,XI,YI,ZI,UI,VI,WI,LATCHI,WTI; " " (/’ INITIAL SHOWER VALUES’,T36,’:’, " " I5,F9.3,2I4,3F8.3,3F7.3,I10,1PE10.3); " " ] " " Note EIN is the kinetic energy of the incident particle. " " " " The routine uses up to 132 columns for output. " " " "*****************************************************************************"
4: Tutorial programs
EGSnrc Code System
179
Figure 29: Portions of output from tutor4.mortran (slightly edited for space). Start tutor4 CALL HATCH to get cross-section data RAYLEIGH DATA AVAILABLE FOR MEDIUM 1 BUT OPTION NOT REQUESTED. Reading screened Rutherford MS data ............... done Initializing spin data for medium 1 ..................... done Medium 1 sige = 1.79464114 1.78708148 Initializing tmxs for estepe = 0.25 and ximax = 0.5 Output from subroutine EDGSET: ============================== Atomic relaxations requested! Reading photo-absorption data ..... Done Reading relaxation data .... Done Reading photo cross section data .... Done Bound Compton scattering requested, reading data ...... Done Initializing Bound Compton scattering ...... Medium 1 has 21 shells: 1 861 1 0.02740 0.141E+01 67.413 2 862 2 0.02740 0.503E+01 11.680 | 21 881 7 0.01370 0.221E+03 0.008 ...... Done. EGSnrc SUCCESSFULLY ’HATCHED’ FOR ONE MEDIUM. knock-on electrons can be created and any electron followed down to 0.189 MeV kinetic energy brem photons can be created and any photon followed down to 0.010 MeV NP ENERGY
Q REGION X
Y
Z
U
V
W
LATCH
WEIGHT
INITIAL SHOWER VALUES :1 20.000 -1 2 0.000 0.000 0.000 bremsstrahlung about to occur:1 19.656 -1 2 0.001 0.002 0.020 Resulting electron :1 18.695 -1 2 0.001 0.002 0.020 Resulting photon :2 0.962 0 2 0.001 0.002 0.020 Discard -user request :2 0.962 0 3 -0.003 0.009 0.100 Now on top of stack :1 18.695 -1 2 0.001 0.002 0.020 bremsstrahlung about to occur:1 18.196 -1 2 0.003 0.007 0.049 Resulting electron :1 18.120 -1 2 0.003 0.007 0.049 Resulting photon :2 0.076 0 2 0.003 0.007 0.049 Discard AE,APB.AND.C>D) will be translated incorrectly.
8.5 8.5.1
User-Defined Macros String Replacement Macro definitions are written in the following form: REPLACE {pattern} WITH {replacement}
Last edited 2006/09/15 20:28:25
(A4.5-1) 8.5 User-Defined Macros
288
NRCC Report PIRS-701
Macro definitions are not statements and therefore need not be terminated by semicolons (if you put one in it will be ignored). Macro definitions are "free field" in the sense that you may write more than one definition on one line, or extend one definition to several lines. The pattern and replacement parts of a macro definition are character strings in the sense described in Section A4.2. Since embedded strings are permitted in macro definitions, the usual rules regarding the doubling of apostrophes apply. The simplest kind of macro is one which contains neither parameters nor embedded strings. For example, one could write REPLACE {ARRAYSIZE} WITH {50}
(A4.5-2)
after which all occurrences of the characters ARRAYSIZE in the program text would be replaced by 50. For example, DIMENSION X(ARRAYSIZE); ... DO J=1,ARRAYSIZE [...]... would produce the same FORTRAN program as if DIMENSION X(50);...
DO J=1,50 [...]...
had been written. Blanks are generally not significant when searching for occurrences of the pattern in the program text. For example, the macro REPLACE {SIGMA(1)} WITH {SIGMA1} would match the program text SIGMA (1) as well as SIGMA(1) In some cases it is desirable to require that one or more blanks be present in the program text in order that a match occur; this can be done by writing a single blank in the pattern part of the macro. For example the macro REPLACE {DUMP X;} WITH {OUTPUT X; (F10.2);} would match DUMP X; but not Y = DUMPX; 8: Users Guide to Mortran3
EGSnrc Code System
289
Normally, the text generated by a macro is itself elegible for replacement by other macros, or even by the the same macro that generated the text.
8.5.2
Parameters in Macros
The pattern part of a macro definition may contain up to nine formal (or "dummy") parameters, each of which represents a variable length character string. The parameters are denoted by the symbol #. For example, {EXAMPLE#PATTERN#DEFINITION}
(A4.5-3)
contains two formal parameters. The formal parameters are "positional". That is, the first formal parameter is the first # encountered (reading left to right), the second formal parameter is the second # encountered and so on. The corresponding actual parameters are detected and saved during the matching process. For example, in the string EXAMPLE OF A PATTERN IN A MACRO DEFINITION
(A4.5-4)
(assuming (A4.5-3) is the pattern to be matched), the first actual parameter is the string "OF A", and the second actual parameter is the string "IN A MACRO". The parameters are saved in a "holding buffer" until the match is completed. After a macro is matched, it is "expanded". The expansion process consists of deleting the program text which matched the pattern part of the macro and substituting for it the replacement part of the macro. The replacement part may contain an arbitrary number of occurrences of formal parameters of the form {Pi} (i=1,2,...,9). During expansion, each formal parameter {Pi} of the replacement part is replaced by the i-th actual parameter. A given formal parameter may appear zero or more times in the replacement part. For example, the pattern part of the macro definition REPLACE {PLUS #;} WITH {{P1}={P1}+1;}
(A4.5-5)
would match the program text PLUS A(I,J,K); Last edited 2006/09/15 20:28:25
(A4.5-6) 8.5 User-Defined Macros
290
NRCC Report PIRS-701
During the matching process the actual parameter A(I,J,K) is saved in the holding buffer. Upon completion of the matching process (that is when the semicolon in the program text matches the semicolon in the pattern part), the "expansion" of the macro takes place, during which the actual parameter A(I,J,K) replaces all occurrences of the corresponding formal parameter, producing A(I,J,K)=A(I,J,K)+1;
(A4.5-7)
Note that the single formal parameter {P1} occurs twice in the replacement part and therefore the single actual parameter A(I,J,K) occurs twice in the resulting string. The program text which may be substituted for the formal (dummy) parameter is arbitrary except for the following restrictions: 1. It may not be text containing an end-of-statement semicolon. This restriction prevents "run-away" macros from consuming large parts of the program. 2. Parentheses and brackets must be correctly matched (balanced). This facilitates the construction of macros which treat expressions as indivisible units. 3. Quoted character strings are considered to be indivisible units. If the opening apostrophe of a character string is part of the actual parameter, then the entire string must be within the actual parameter.
8.6
Control Cards
More properly called "processor control directives", Mortran3 control cards may appear anywhere within the program and fall into two categories: 1. Column-one-restricted directives 2. Free-form directives Column-one-restricted directives MUST begin in column one and only one directive per line is recognized. Free-form directives, on the other hand, may appear anywhere on a line and are not limited by number. Some of both types have been found to be useful with the EGS4 Code System and they will be presented next [additional information is provided in A. J. Cook, "Mortran3 8: Users Guide to Mortran3
EGSnrc Code System
291
User’s Guide", SLAC Computation Research Group Technical Memorandum CGTM-209 (1983)].
8.6.1
Column-One-Restricted Directives
Each of these control cards begins with a "%" in column 1, and should not contain embedded blanks or program text. Column 1 | V %% Signals end of Mortran input. This is the ONLY control card that is required. All others are optional. Unlike Mortran2, %% signals the final end of input and must not be used to signal end of input from this particular unit. %F
Switch to FORTRAN mode (initial mode is Mortran). While in FORTRAN mode, cards are read and written without any processing. This feature allows the interspersion of FORTRAN and Mortran text. If this feature is used, all FORTRAN statement labels should be restricted to four digits (or less) in order to avoid possible conflict with Mortran generated statement labels, all of which are five digits long (in the default mode).
%M
Switch back to Mortran mode (initial mode is Mortran).
%E
Eject (start new page) in Mortran listing.
%L
List (i.e., turn on Mortran listing (initally ON)).
%N %In
Nolist (i.e., turn off Mortran listing). Indent n places per nest level in Mortran listing, where n=0,1,2,...,99 (initally 0). (Note: leading blanks are automatically suppressed when n>0 so that "ragged" programs will be "straightened" by Mortran).
%Cn
Set input line width to n, where n=10,11,...,80 (initially n=72). Characters in columns n+1 thru 80 will appear in the Mortran listing, but will be ignored by the processor.
%An
Annotation mode switch. Controls the generation of Mortran source as comments in the generated FORTRAN as follows: n=0 Suppress Mortran text in FORTRAN file (initially n=0).
Last edited 2006/09/15 20:28:25
8.6 Control Cards
292
NRCC Report PIRS-701
n=1 Interleave Mortran text as comments in the FORTRAN program starting in column 2 and extending through column 80. If column 80 of the Mortran source line is not blank, a second comment line is generated containing the 80th character. n=2 Interleave the Mortran text as comments in the FORTRAN program in columns 40 thru 80. Each Mortran source line will appear as two comment lines in the FORTRAN listing, each of which contains one half of the Mortran source line. %Qn
Quote switch (initally n=0). Controls Mortran comments as follows: n=0 Comments must be fully enclosed in quotation marks ("). n=1 All comments not closed at the end of each line will be closed by Mortran.
%Un
8.6.2
Unit switch. Causes Mortran to switch to FORTRAN input unit n for further input, where n=1,2,3...99. When an end-of-file is read from unit n, input is switched back again to the unit from which the %Un was read. If another %Un is read before an end-of-file, the current input unit is stacked and the Mortran input unit is again switched. This control statement provides a facility similar to that implemented in other languages by "COPY" or "INCLUDE" statements. It is particularly convenient for introducing standard declarations, common blocks, or macro definitions from a predefined external file.
Free-Form Directives
Free-form directives begin with an exclamation point ("bang!") and end with a semicolon. The following are of particular use with EGS4/PEGS4: !ANNOTATE;
Interleave Mortran source in FORTRAN output. Mortran statements become COMMENTs in FORTRAN output. [!NOANNOTATE; means "Turn Off !ANNOTATE"].
!COMMENTS;
Print Mortran comments as FORTRAN comments. Mortran comments are output to FORTRAN file with ’C’ in column one. [!NOCOMMENTS; means "Turn
8: Users Guide to Mortran3
EGSnrc Code System
293
Off !COMMENTS"]. !INDENT Mn;
Set automatic indentation of Mortran listing to n columns per nesting level (same as %In above).
!INDENT Fn;
Set automatic indentation of FORTRAN source to n columns per nesting level (like !INDENT Mn;).
!INDENT Cn;
Set automatic indentation of FORTRAN comments to n columns per nesting level (but the ’C’ remains in column one).
!LIST;
Turn on Mortran listing. Same as %L above. [!NOLIST; means "Turn Off !LIST;"].
!LABELS n;
Reset FORTRAN statement label generator to n.
Last edited 2006/09/15 20:28:25
8.6 Control Cards
294
9
NRCC Report PIRS-701
EGSnrc System Considerations
This section is almost completely superceded by Report PIRS-877 which describes the EGSnrcMP environment or system for using the EGSnrc system[14]. This section is left here for old time’s sake! A few of the specific commands have been updated to avoid total confusion.
9.1
Introduction
The EGSnrc Code System works in a manner which is very similar to the EGS4 system so that those using the EGS4 system already should find this very familiar. The major changes are to make the user codes subdirectories of $EGS_HOME instead of $HOME/egs4 and to define the files related to specific runs as .egsinp instead of .egs4inp etc. These changes have been made to make it possible to run both systems in parallel for a while when making the transition, and to clearly identify which system various files refer to. This can be done by merely changing the definition of the environment variable HEN HOUSE to point at either the EGSnrc or the EGS4 area, and sourcing Cshrc additions for egsnrc instead of Cshrc additions for egs4 in your .cshrc file. If you are already an EGS_pert then the rest of this section will be of little interest. If you are new to EGS and the above makes no sense at all, then this is the section for you!
9.2
Overview
The EGSnrc system, which was originally developed for Unix based systems by Alex Bielajew, is very flexible and powerful. This comes at the expense of being somewhat complicated at first sight. However, the scripts which come with the system make it quite easy to use and flexible once you are familiar with the over-all design. The EGSnrc system consists of two major directory area. One area, the HEN_HOUSE, holds all the standard EGSnrc files and does not get changed. The structure of the HEN_HOUSE is shown in fig 40. The HEN_HOUSE can be maintained anywhere on the system that all local EGSnrc users can read. One useful approach in a multi-user environment is to have a user called egsnrc and make the HEN_HOUSE the $HOME directory of that user. If you are the only local EGSnrc user, you can make the HEN_HOUSE a subdirectory of your $HOME area. In either case, when you initiate the INSTALL EGS procedure, you should do so on the directory where you want the HEN_HOUSE to reside (see section 9.7 on page 303 for more on installation).
9: EGSnrc System Considerations
EGSnrc Code System
295
HEN_HOUSE bin
lib
config mortran3.dat mortran3.exe beam_build.exe pegs4.exe beamdp* other executables
makefiles beam_makefile standard_makefile
config
specs
machine.mortran machine.macros
config1.conf config2.conf unix.spec windows.spec
egs_config1.h egs_c_utils.o read_write_pardose.o
all_common.spec beamnrc.spec dosxyznrc_config1.spec dosxyznrc_config2.spec
one for each config supported
EGSnrcMP System
scripts
src
egsnrc_cshrc_additions egsnrc_bashrc_additions beamnrc_bashrc_additions beamnrc_cshrc_additions
egsnrc.mortran egs_utilities.mortran get_inputs.mortran egs_parallel.mortran ranmar.mortran ranlux.mortran lnblnk1.mortran
mortran_compile* run_user_code* run_user_code_batch* batch_options.at batch_options.nqs batch_options.pbs switch_config_bashrc* switch_config_cshrc* finalize_egs_foruser finalize_beam_foruser
utils nrcaux.mortran timing.macros xvgrplot.mortran phsp_macros.mortran iaea_phsp_macros.mortran
egsnrc.macros ranmar.macros ranlux.macros transportp.macros
cutils
spectra omega
pegs4
user_codes
data
See description of OMEGA_HOME
inputs
data
*.pegs4inp
*.pegs4dat
dosxyznrc Makefile dosxyznrc.make dosxyznrc.mortran srcxyznrc.mortran dosxyznrc_user_macros.mortran srcxyznrc.macros dosxyznrc.io
density_ corrections compounds elements
incoh.data msnew.data nist_brems.data photo_cs.data photo_relax.data spinms.data eii_ik.data
mortran3 Makefile mortran3.f mornew77.raw check77.raw
bareco60.spectrum mohan24.spectrum ir192bare.spectrum
egs_c_utils.c egs_c_utils.h load_beamlib.c
other ensrc format files
iaea_phsp iaea_config.h iaea_header.cpp iaea_header.h iaea_phsp.cpp iaea_phsp.h iaea_record.cpp iaea_record.h utilities.cpp utilities.h Makefile iaea_phsp.a
DOSXYZnrc_examples
Figure 40: The components of the HEN HOUSE area for the EGSnrc system. There are also subdirectories related to documentation and NRC user codes which are not shown here and the main HEN HOUSE box actually has multiple subdirectories which are not shown. See PIRS-877 for details[14].
Last edited 2011/03/09 20:45:06
9.2 Overview
296
NRCC Report PIRS-701
The second major directory area of the EGSnrc system is on the individual user’s area and holds all the user’s user codes and run associated files. It is mandatory that you set up a subdirectory which is referred to as $EGS_HOME (e.g., frequently $HOME/egsnrc) and for each user_code.mortran which you use or write, there must be a sub-directory with the same name as the user code, i.e. $EGS_HOME/user_code. A typical user’s area is shown in figure 41.
HOME
User’s EGSnrc area
egsnrc
user_code2
pegs4
data
inputs
bin
user_code2.configuration* user_code2.environment* user_code2.$my_machine_exe* user_code2.mortist run1.egsinp run1.egslst run1.egslog run1.egsdat run1.plotdat run1.egsrns
user_code1
alpha
sparc
Linux user_code1.exe user_code2.exe user_code3.exe other egs.exe
user_code3
Figure 41: Components of a typical EGS user’s area where, for this example, $EGS HOME is $HOME/egsnrc. On a given system there can be an arbitrary number of different user’s areas.
9.2.1
A complication for multi-architecture systems
The install scripts are clever enough to establish various machine or compiler dependencies and create the files $HEN HOUSE/lib/my config/machine.macros and $HEN HOUSE/lib/my config/machine.mortran where my config is the name of your particular configuration (eg, g77, gfortran, Mac). 9.2.2
System aliases and environment variables
The EGSnrc system is based on using csh C-shell scripts or sh, bash shell scripts and to facilitate this one should run from the C-shell (csh or tcsh) or the bash shell sh. To define the 9: EGSnrc System Considerations
EGSnrc Code System
297
aliases and other variables needed by the system, there are files called egsnrc cshrc additions and egsnrc bashrc additions available on $HEN HOUSE/scripts. However, one first needs to set the environment variable HEN HOUSE to point at the location of the HEN HOUSE. This is most conveniently done with a declaration in your .login file or .cshrc file or .bashrc file depending on which shell is your default. setenv HEN_HOUSE location_of_HEN_HOUSE (e.g. $HOME/HEN_HOUSE) or for .bashrc HEN_HOUSE=/absolute_location_of_your_HEN_HOUSE/ (e.g. $HOME/HEN_HOUSE) Then it is essential that in your .cshrc or .bashrc file you source the egsnrc cshrc additions or egsnrc bashrc additions file, i.e. add the statement: source $HEN_HOUSE/scripts/egsnrc_cshrc_additions} or, for those using bash: source $HEN_HOUSE/scripts/egsnrc_bashrc_additions} or source /absolute_location_of_your_HEN_HOUSE/scripts/egsnrc_bashrc_additions} These additions file set up many aliases and other variables for you. These are most easily seen by executing the commands alias, set and setenv although this will show you all of the systems definitions as well. We will explain the use of many of these definitions in the remainder of this section but the most important of the aliases are: mor MORTRAN a stand alone code m MORTRAN a specified users code mf MORTRAN and Fortran compile and link a specified users code f Fortran compile and link a specified users code ex execute an egs user code exb execute an egs user code in batch mode The use of these is described below in detail but note that the command make is now the easiest way to mortran and fortran user codes as described in PIRS-877[14].
Last edited 2011/03/09 20:45:06
9.2 Overview
298
9.3
NRCC Report PIRS-701
PEGS4
As described elsewhere in this report, PEGS4 is the program which prepares much of the material dependent cross section data sets required by EGSnrc to do the simulations (see section 6 on page 219). As discussed there, use of the egs gui greatly facilitates the use of the PEGS4 program. The user must have the directories $EGS HOME/pegs4, $EGS HOME/pegs4/inputs and $EGS HOME/pegs4/data. A user’s PEGS4 input file is on $EGS HOME/pegs4/inputs and has the name my_data.pegs4inp. The PEGS4 program outputs the data file for EGSnrc to $EGS_HOME/pegs4/data/my_data.pegs4dat. The listing file from the PEGS4 run is found on $EGS_HOME/pegs4 and is called my_data.pegslst. To invoke PEGS4 one enters: pegs4.exe -i inputfile [-o ofile] [-a] [-d density] [-x crosssection] [-e HEN_HOUSE] inputfile.pegs4inp the input file output defaults to $HEN_HOUSE/pegs4/data/inputfile.pegs4dat or, if ofile is given, to $HEN_HOUSE/pegs4/data/ofile.pegs4dat [-a] => append results to output file [-d density] => use density.density for density effect [-x crosssection] => use $HEN_HOUSE/pegs4/crosssection instead of $HEN_HOUSE/pegs4/pgs4pepr.dat [-e HEN_HOUSE] => use this absolute location as the HEN_HOUSE where my_data.pegsinp is the input file described in detail in section 6.2 (page 246) and density.density is a file containing the density effect information needed for this particular calculation IF it is needed by my_data.pegsinp. The PEGS4 script checks the following directories, in order, for the file density.density. $EGS_HOME/pegs4/inputs $EGS_HOME/pegs4/density_corrections/elements $EGS_HOME/pegs4/density_corrections/compounds $EGS_HOME/pegs4/density_corrections $HEN_HOUSE/pegs4/density_corrections/elements $HEN_HOUSE/pegs4/density_corrections/compounds 9.3.1
Where pegs4 data is kept
Note that PEGS4 can only create one material output file per run and if the simulation you want to run requires data for more than one material, these must be joined into one file.pegs4dat file, either by concatenation, by using an editor or by the -a option in the command line. The EGSnrc run scripts look for the data file requested (see section 9.5), first on $EGS_HOME/pegs4/data and if not found there, then it looks on $HEN_HOUSE/pegs4/data.
9: EGSnrc System Considerations
EGSnrc Code System
9.3.2
299
examin
The command: examin -p file (note there is no “e” at the end of examin) will allow you to plot and/or list much of the photon and electron cross section data in the file $EGS_HOME/pegs4/data/file.pegs4dat or if that is not present, then in the file $HEN_HOUSE/pegs4/data/file.pegs4dat. Note that examin no longer displays the photon cross section data from the PEGS4 data file but displays the data actually used by EGSnrc. The default dataset used by examin is xcom. If you are using something else in your user code, you must change the following line in the code: REPLACE {$XDATA-DEFAULT} WITH {’xcom’} The output is found on $EGS_HOME/examin. If requested, during execution examin pops open xmgrace (a 2-D graphing package), otherwise you have to use the listing files created. See section 3.13.3 (page 154).
9.4
Compilation (MORTRAN and Fortran)
The EGSnrc system is written in the Mortran3 language which is a pre-processor for Fortran. Mortran3 is itself written in Fortran. The Mortran3 processor is part of the EGSnrc distribution and is discussed in detail in section 8, page 274 of this report. In order to create an executable file from the mortran source files, there are two steps needed. The first step, converts the mortran source code into standard Fortran77. We call this MORTRAN compiling. The next step turns the Fortran source into an executable, using the standard Fortran compile and link process. Using the EGSnrcMP system (see PIRS-877[14]), the most direct way to do these steps is using the make command. The following are the old way to do it but they still work. To “compile” the user code user code.mortran, one issues the command: mf user_code a [opt0|opt1|opt2|opt3|opt4] or m user_code The mf command will MORTRAN, Fortran and link the entire user-code called user_code, including the EGSnrc system. The Fortran and the execute modules are machine specific (SUN vs SGI vs Linux etc) but this is handled in a transparent manner by the scripts. The m command will MORTRAN the entire user-code called user_code, including the EGSnrc system. The output is a Fortran file user_code_{my_machine}.f which is specific for the machine being used since the script picks up a set of macros which handles any differences between the machines. The f command will Fortran and link the entire Fortran version of the user-code called user_code_{my_machine}.f, which includes the EGSnrc system. The scripts automatically detect the value for my_machine and use the appropriate value. Last edited 2011/03/09 20:45:06
9.4 Compilation (MORTRAN and Fortran)
300
NRCC Report PIRS-701
user_code.mortran or user_code_{my_machine}.f must be present on area $EGS_HOME/user_code. The letter a after the user code name is a residual option which no longer exists, but which has been left for compatibility with a wide range of other scripts at NRC. This option was associated with a technique to avoid recompiling unchanged Fortran subroutines from one pass to the next, but this was removed since compilers have become so fast that it was not very useful and occasionally led to problems and always left many extra files around. Note that the standard make facility does not work because the date on the Fortran file is always more recent than that on the object module since MORTRAN creates a new version of the Fortran each time. The option [opt0|opt1|opt2|opt3|opt4|debug] allows selection of the optimisation level to be used. For production codes, be sure to use at least opt2 since these can save up to 50% over opt0, but they usually take much longer to compile and link.
9.4.1
The user code.configuration file (obsolete)
This approach has been completely revised and replaced by the user code.make file with SOURCES = formats. See PIRS-877[14]. The same general capabilities have been maintained in the new format. During the MORTRAN stage, the scripts still create a file, called .mortjob.mortran on $EGS_HOME/user_code. This file contains all the source code for this particular user code (macros, user code, and any other routines the user wants, etc). The files which are concatenated together to form .mortjob.mortran are defined by the user. The .configuration file (or new equivalent .make file) allows for very flexible options when compiling a given user code. For example, it is possible to change which random number generator is being used throughout the system by merely changing which pair of files are included in the configuration file, either ranlux.macros and ranlux.mortran or ranmar.macros and ranmar.mortran (see section 3.9, page 143). However if anything other than the default seeds and luxury levels are desired, there may be some minor changes needed n user code.mortran unless one is very careful (eg. DOSRZnrc is designed to use either rng).
9.4.2
Order is Important
The following still applies. When the file .mortjob.mortran is created, the order in which the various files are placed in the file is important. This is primarily because in Mortran3 the last definition of any macro is the one that is in force. Thus it is important that the egsnrc.macros file be read in early since this defines all of the default values of the macros. As long as it appears before the user code, then any macro redefinitions done in the user code take precedence. 9: EGSnrc System Considerations
EGSnrc Code System
9.4.3
301
machine.mortran files
Different compilers often have slightly different ways of handling certain things. The most common differences are regarding how files are opened (i.e., the format of the OPEN statement), and what is more difficult, how they handle time. EGSnrc itself has very few of these constructs within it, but the user codes cannot avoid them. To overcome these differences, there are a series of macros defined in machine.mortran files which are found on $HEN HOUSE/lib/$my machine/machine.mortran. It is even more complex for Linux machines where the machine.mortran files differ depending on what version of the compiler you are using. The default settings are for a fairly recent g77 compiler but if you are using a slightly older one you may need to edit the egs compile script to select a different default for the variable Linux compiler. The machine.mortran files define a macro $MACHINE which the user codes pick up. It is useful to define this properly in the machine.mortran which is picked up in your local environment. The above requirements are handled by a machine.mortran which is created for your system by the EGSnrcMP system as described in PIRS-877.
9.5
Execution
The following works mostly still,, but there are new ways described in PIRS-877[14] for the EGSnrcMP system. Once a user code has been compiled, it is executed by issuing: ex[b] user_code input data [queue|debug] $EGS_HOME/user_code/input.egsinp and $EGS_HOME/user_code/user_code.{my_machine}_exe must exist. The PEGS4 data is in data.pegs4dat which is located either on the users area or the system area, as discussed in section 9.3.1. If queue is not specified when the batch option “b” is being used, then the default que on your system is used. In interactive mode, the 4-th input can be debug if a debug run is wanted. There must be an execute module created with the debug switch set during compilation for this to work. Execution of EGSnrc jobs is handled by the script egs run which is on the HEN HOUSE. At the completion of the run, all output and batch output files are found on $EGS_HOME/user_code/ unless the user has specified something different in the environment file (see below). During execution, the egs run script creates a separate subdirectory area and only modifies the files there. This is usually a subdirectory of $EGS_HOME/user_code/ but on a Linux system is on /tmp (this is to make the subdirectory local to the machine running the job since on the NRC system, having the disk on another machine would seriously slow down Last edited 2011/03/09 20:45:06
9.5 Execution
302
NRCC Report PIRS-701
the job). All the files are moved back to $EGS_HOME/user_code/ after completion of the run. This can be confusing unless you are aware of this behaviour. 9.5.1
user code.environment file (obsolete)
This functionality is reworked and described in PIRS-877[14]. In particular the user code.io file is relevant although the general ideas below are still applicable. Almost all Fortran compilers associate a file called fort.n with any I/O unit n which is not attached explicitly within the code to some file name. Thus if HATCH read data from unit 12 without any open statement, then it looks for fort.12. The system must associate this file name to the real file name. There are a series of similar links established for files which have common names for all user codes. The following files are associated with a normal type of run with an NRC user code (although the environment files can add whatever files the user may want and the files below are not mandatory). For this example, the input file name is input.egsinp. input.egsinp: defined by the user. input.egslst: the output listing file from the run. Erased at start of next run if not renamed. input.egslog: The log file which echos the inputs and prompts when running in batch. Note, this has most of the error messages too, so get in the habit of reading this file. input.egsdat: A file containing all the information needed to allow a calculation to be restarted again. input.egsrns: Some codes allow a record of random number seeds at the start of each history to be kept (just most recent). These are kept in this file if requested. input.egsplot (etc): Plotting files for various routines, the most up to date are for xmgrace. input.egsgeom: file with output description of geometry for EGS_windows. input.egsgph: file with output phase space of each history for EGS_windows. 9.5.2
Batch Queues (obsolete)
See PIRS-877 for how this is handled now.
9.6
Parallel Processing
The following is replaced by a more sophisticated approach in the EGSnrcMP system and the standard NRC user codes. See PIRS-877[14]. 9: EGSnrc System Considerations
EGSnrc Code System
303
Monte Carlo calculations with EGSnrc are easily run in parallel and the results combined at the end of the runs because every history is completely independent, as long as the random number sequences are independent. One of the reasons for selecting the random number generators distributed with EGSnrc is that there is a simple procedure for ensuring independent sequences (see section 3.9 on page 143). The NRC user codes[112] have a parallel processing option built in. The system used requires the NQS batch submission system to be installed on all machines to be run in parallel. The option is implemented via a script, called pprocess which makes an arbitrary number of input files from the original file, ensuring different random number sequences for each and then submitting the job to an arbitrary number of machines. At the end of the runs, the main user code is run once more with instructions to combine the results of the previous runs. Although crude, it is highly effective. We routinely run using more than 30 of our 38 CPUs running in parallel. The script combine egsnrc has been written to automatically edit the required input file and execute the needed final run for the analysis of parallel runs with the NRC user codes. There is more discussion in reference [112]. Note that there is a useful script called clean after parallel which is found on $HEN HOUSE/scripts. Parallel runs create a huge number of files and this script helps clean them up, but only once they have been analysed.
9.7
Distribution / Installation of EGSnrc
This installation script requires that the environment variables HEN_HOUSE not be defined when the script is called and not be defined in the user’s .cshrc or .bashrc file. The installation will create the entire $HEN_HOUSE structure shown in fig 40 (page 295) and compile a variety of codes for the machine the user is doing the installation from (viz. Mortran3, PEGS4, DOSRZnrc). It also partially sets up the user’s area $EGS_HOME. Once the INSTALL_EGS script has been successfully executed, one must ensure that the environment variables HEN HOUSE and EGS HOME are defined to point at wherever you have placed the EGSnrc system and your EGSnrc user area. Most importantly, the installation leaves behind a file called egsnrc_cshrc_additions or egsnrc_bashrc_additions which MUST be sourced from the user’s .cshrc script or .bashrc script depending on which default shell is used. Once the installation is complete, add the following to your .cshrc file: source /explicit_path_to_your_HEN_HOUSE/egsnrc_cshrc_additions. or the following to your .bashrc file: source /explicit_path_to_your_HEN_HOUSE/egsnrc_bashrc_additions. The user should try to run the tutor codes to ensure the system is working.
Last edited 2011/03/09 20:45:06
9.7 Distribution / Installation of EGSnrc
304
NRCC Report PIRS-701
References [1] I. Kawrakow and A. F. Bielajew. On the representation of electron multiple elasticscattering distributions for Monte Carlo calculations. Nuclear Instruments and Methods, 134B:325 – 336, 1998. [2] A. F. Bielajew. A hybrid multiple-scattering theory for electron-transport Monte Carlo calculations. Nucl. Inst. Meth., B111:195 – 208, 1996. [3] I. Kawrakow. Electron transport: multiple and plural scattering. Nuclear Instruments and Methods, B108:23 – 34, 1996. [4] I. Kawrakow and A. F. Bielajew. On the condensed history technique for electron transport. Nuclear Instruments and Methods, 142B:253 – 280, 1998. [5] I. Kawrakow. Accurate condensed history Monte Carlo simulation of electron transport. I. EGSnrc, the new EGS4 version. Med. Phys., 27:485 – 498, 2000. [6] I. Kawrakow. Accurate condensed history Monte Carlo simulation of electron transport. II. Application to ion chamber response simulations. Med. Phys., 27:499 – 513, 2000. [7] Y. Namito, H. Hirayama, and S. Ban. Improvements of low-energy photon transport in EGS4. Radiation Phys. Chem., 53:283 – 294, 1998. [8] Y. Namito, S. Ban, and H. Hirayama. Compton scattering of 20 to 40-keV photons. Phys. Rev. A, 51:3036 – 3043, 1995. [9] Y. Namito, S. Ban, and H. Hirayama. Implementation of Doppler broadening of Compton-scattered photons into the EGS4 code. Nucl. Inst. Meth., A349:489 – 494, 1994. [10] Y. Namito, S. Ban, and H. Hirayama. Implementation of linearly-polarized photon scattering into the EGS4 code. Nuclear Instruments and Methods, A322:277 – 283, 1993. [11] W. R. Nelson, H. Hirayama, and D. W. O. Rogers. The EGS4 Code System. Report SLAC–265, Stanford Linear Accelerator Center, Stanford, California, 1985. [12] B. R. B. Walters, J. Treurniet, D. W. O. Rogers, and I. Kawrakow. QA tests and comparisons of the EGSnrc system with EGS4. Technical Report PIRS–703, National Research Council of Canada, Ottawa, Canada, 2000. [13] R. L. Ford and W. R. Nelson. The EGS code system – Version 3. Stanford Linear Accelerator Center Report SLAC-210, 1978. [14] I. Kawrakow, E. Mainegra-Hing, and D. W. O. Rogers. EGSnrcMP: the multi-platform environment for EGSnrc. Technical Report PIRS–877, National Research Council of Canada, Ottawa, Canada, 2003. References
EGSnrc Code System
305
[15] M. J. Berger. Monte Carlo Calculation of the penetration and diffusion of fast charged particles. In B. Alder, S. Fernbach, and M. Rotenberg, editors, Methods in Comput. Phys., volume 1, pages 135 – 215. Academic, New York, 1963. [16] A. F. Bielajew and D. W. O. Rogers. Electron Step-Size Artefacts and PRESTA. In T. M. Jenkins, W. R. Nelson, A. Rindi, A. E. Nahum, and D. W. O. Rogers, editors, Monte Carlo Transport of Electrons and Photons, pages 115 – 137. Plenum Press, New York, 1988. [17] A. F. Bielajew and D. W. O. Rogers. PRESTA: The Parameter Reduced ElectronStep Transport Algorithm for electron Monte Carlo transport. Nuclear Instruments and Methods, B18:165 – 181, 1987. [18] A. F. Bielajew, R. Mohan, and C. S. Chui. Improved bremsstrahlung photon angular sampling in the EGS4 code system. National Research Council of Canada Report PIRS-0203, 1989. [19] J. W. Motz, H. A. Olsen, and H. W. Koch. Pair production by photons. Rev. Mod. Phys., 41:581 – 639, 1969. [20] H. Davies, H. A. Bethe, and L. C. Maximon. Theory of bremsstrahlung and pair production. II. Integral cross sections for pair production. Phys. Rev., 93:788, 1954. [21] E. Storm and H. I. Israel. Photon cross sections from 1 keV to 100 MeV for elements Z=1 to Z=100. Atomic Data and Nuclear Data Tables, 7:565 – 681, 1970. [22] Y. S. Tsai. Pair Production and Bremsstrahlung of Charged Leptons. Rev. Mod. Phys., 46:815, 1974. [23] J. C. Butcher and H. Messel. Electron number distribution in electron-photon showers in air and aluminum absorbers. Nucl. Phys., 20:15 – 128, 1960. [24] Ingjald Øverbø, Kjell J. Mork, and A. Olsen. Pair production by photons: Exact calculations for unscreened atomic field. Phys. Rev. A, 8:668 – 684, 1973. [25] V. Votruba. Bull. Intern. Acad. Tcheque Sci., 49:19, 1948. [26] Kjell J. Mork. Pair production by photons on electrons. Phys. Rev., 160:1065 – 1071, 1967. [27] A. F. Bielajew. Improved angular sampling for pair production in the EGS4 code system. NRCC Report: PIRS-0287R, 1994. ¨ [28] O. Klein and Y. Nishina. Uber die Streuung von Strahlung durch freie Elektronen nach der neuen relativistischen Quantendynamik von Dirac. Z. f¨ ur Physik, 52:853–868, 1929. [29] R. Ribberfors. . Phys. Rev. B, 12:2067, 1975. [30] R. Ribberfors and K. F. Bergen. . Phys. Rev. A, 26:3325, 1982. [31] F. Biggs, L. B. Mendelsohn, and J. B. Mann. 16:201, 1975. Last edited 2011/03/09 20:45:06
. At. Data and Nucl. Data Tables,
References
306
NRCC Report PIRS-701
[32] D. Brusa, G. Stutz, J. A. Riveros, J. M. Fern´andez-Varea, and F. Salvat. Fast sampling algorithm for the simulation of photon Compton scattering. Nuclear Instruments and Methods, A379:167–175, 1996. [33] F. Salvat, J. M. Fernandez-Varea, J. Baro, and J. Sempau. PENELOPE, an algorithm and computer code for Monte Carlo simulation of electron-photon showers. University of Barcelona Report, 1996. [34] C. M. Lederer and V. S. Shirley (eds.). Table of Isotopes, 7th ed. (Wiley, New York), 1978. [35] M. Abramowitz and I. A. Stegun, editors. Handbook of mathematical functions with formulae, graphs and mathematical tables. Number 55 in Applied Mathematics. National Bureau of Standards, Washington, D.C., 1964. [36] L.M. Brown and R.P. Feynman. Radiative corrections to Compton scattering . Phys. Rev., 85:231–244, 1952. [37] M. J. Berger and J. H. Hubbell. XCOM: Photon Cross Sections on a Personal Computer. Report NBSIR87–3597, NIST, Gaithersburg, MD20899, 1987. [38] E. E. Lewis and W. F. Miller. Computational Methods of Neutron Transport. John Wiley and Sons, New York, 1984. [39] D. E. Cullen, M. H. Chen, J. H. Hubbell, S. T. Perkins, E. E. Plechaty, J. A. Rathkopf, and J. H. Scofield. Tables and Graphs of Photon-Interaction Cross Sections from 10 eV to 100 GeV Derived from the LLNL Evaluated Photon Data Library (EPDL), Part A: Z = 1 to 50, Part B: Z = 51 to 100. Lawrence Livermore National Laboratory Report UCRL-50400, Volume 6, Revision 4 (Livermore, Calif ), 1989. ¨ [40] F. Sauter. Uber den atomaren Photoeffekt in der K-Schale nach der relativistischen Wellenmechanik Diracs. Ann. Physik, 11:454 – 488, 1931. [41] A. F. Bielajew and D. W. O. Rogers. Photoelectron angular distribution in the EGS4 code system. National Research Council of Canada Report PIRS-0058, 1986. [42] J. H. Hubbell and I. Øverbø. Relativistic atomic form factors and photon coherent scattering cross sections. J. Phys. Chem. Ref. Data, 9:69, 1979. [43] D. E. Peplow and K. Verghese. Measured molecular coherent scattering form factors of animal tissues, plastics and human breast tissue. Phys. Med. Biol., 43:2431–52, 1998. [44] D.E. Cullen, J.H. Hubbell, and L. Kissel. EPDL97: The evaluated photon data library,97 version. Lawrence Livermore National Laboratory Report No. UCRL-50400, 1997. [45] S. T. Perkins, D. E. Cullen, M. H. Chen, J. H. Hubbell, J. A. Rathkopf, and J. H. Scofield. Tables and Graphs of Atomic Subshell and Relaxation Data Derived from the LLNL Evaluated Atomic Data Library (EADL), Z = 1–100. Lawrence Livermore National Laboratory Report UCRL-50400, Volume 30 (Livermore, Calif ), 1991. References
EGSnrc Code System
307
[46] P. V. Vavilov. . Soviet Physics JETP, 5:749, 1957. [47] H. W. Koch and J. W. Motz. Bremsstrahlung cross-section formulas and related data. Rev. Mod. Phys., 31:920 – 955, 1959. [48] S. M. Seltzer and M. J. Berger. Bremsstrahlung spectra from electron interactions with screened atomic nuclei and orbital electrons. Nucl. Inst. Meth. Phys. Res. B 12, 12:95 – 134, 1985. [49] S. M. Seltzer and M. J. Berger. Bremsstrahlung energy spectra from electrons with kinetic energy from 1 kev to 10 gev incident on screened nuclei and and orbital electrons of neutral atoms with z = 1-100. Atomic Data and Nuclear Data Tables, 35:345–418, 1986. [50] ICRU. Stopping powers for electrons and positrons. ICRU Report 37, ICRU, Washington D.C., 1984. [51] H. K. Tseng and R. H. Pratt. Exact screened calculations of atomic-field bremsstrahlung. Phys. Rev. A, 3:100–115, Jan 1971. [52] Frederic Tessier and Iwan Kawrakow. Calculation of the electron-electron bremsstrahlung cross-section in the field of atomic electrons . Nucl. Inst. Meth. B, 266:625 – 634, 2008. [53] D. W. O. Rogers, S. Duane, A. F. Bielajew, and W. R. Nelson. Use of ICRU-37/NBS radiative stopping powers in the EGS4 system. National Research Council of Canada report PIRS-0177, 1989. [54] C. Møller. Zur Theorie des Durchgangs schneller Elektronen durch Materie. Ann. Phys., 406:531–585, 1932. [55] H. J. Bhabha. . Proc. Royal Society London, A154:195, 1935. [56] A. F. Bielajew and D. W. O. Rogers. Effects of a Møller cross section error in the EGS4 code. Med. Phys. (abstract), 23:1153, 1996. [57] I Kawrakow. Electron impact ionization cross sections for egsnrc. Med. Phys. (abstract), 29:1230, 2002. [58] M. Gryzi´ nski. Two-particle collisions. I. General relations for collisions in the laboratory system. Phys. Rev. A, 138:305 – 321, 1965. [59] E. Casnati, A. Tartari, and C. Baraldi. An empirical approach to K-shell ionisation cross section by electrons. J. Phys. B, 15:155 – 167, 1982. [60] H. Kolbenstvedt. Simple theory for K-ionization by relativistic electrons. J. Appl. Phys., 38:4785 – 4787, 1967. [61] D. Bote and F. Salvat. Calculations of inner-shell ionization by electron impact with the distorted-wave and plane-wave Born approximations. Physical Review A, 77(4):42701, 2008. Last edited 2011/03/09 20:45:06
References
308
NRCC Report PIRS-701
[62] H. Messel and D. F. Crawford. Electron-photon shower distribution function. (Pergamon Press, Oxford), 1970. [63] M. J. Berger and S. M. Seltzer. Tables of energy losses and ranges of electrons and positrons. NASA Report SP-3012 (Washington DC), 1964. [64] H. A. Bethe. Theory of passage of swift corpuscular rays through matter. Ann. Physik, 5:325, 1930. [65] H. A. Bethe. Scattering of electrons. Z. f¨ ur Physik, 76:293, 1932. [66] F. Bloch. Stopping power of atoms with several electrons. Z. f¨ ur Physik, 81:363, 1933. [67] R. M. Sternheimer and R. F. Peierls. General expression for the density effect for the ionization loss of charged particles. Phys. Rev., B3:3681 – 3692, 1971. [68] M. J. Berger and S. M. Seltzer. Stopping power and ranges of electrons and positrons. NBS Report NBSIR 82-2550-A (second edition), 1983. [69] R. M. Sternheimer, S. M. Seltzer, and M. J. Berger. Density effect for the ionization loss of charged particles in various substances. Phys. Rev., B26:6067, 1982. [70] S. Duane, A. F. Bielajew, and D. W. O. Rogers. Use of ICRU-37/NBS collision stopping powers in the EGS4 system. NRCC Report PIRS-0173, Ottawa, March, 1989. [71] G. Z. Moli`ere. Theorie der Streuung schneller geladener Teilchen. II. Mehrfach- und Vielfachstreuung. Z. Naturforsch, 3a:78 – 97, 1948. [72] G. Z. Moli`ere. Theorie der Streuung schneller geladener Teilchen. I. Einzelstreuung am abgeschirmten Coulomb-Field. Z. Naturforsch, 2a:133 – 145, 1947. [73] X. A. Li and D. W. O. Rogers. Electron mass scattering powers: Monte Carlo and analytical calculations. Med. Phys., 22:531 – 541, 1995. [74] N. F. Mott. . Proc. Royal Society London, A124:425, 1929. [75] J. W. Motz, H. A. Olsen, and H. W. Koch. Electron scattering with atomic or nuclear excitation. Rev. Mod. Phys., 36:881 – 928, 1964. [76] N. F. Mott. . Proc. Royal Society London, A135:429, 1932. [77] M. J. Berger and R. Wang. Multiple-scattering angular deflections and energy-loss straggling. In T. M. Jenkins, W. R. Nelson, A. Rindi, A. E. Nahum, and D. W. O. Rogers, editors, Monte Carlo Transport of Electrons and Photons, pages 21 – 56. Plenum Press, New York, 1988. [78] S. M. Seltzer. An overview of ETRAN Monte Carlo methods. In T. M. Jenkins, W. R. Nelson, A. Rindi, A. E. Nahum, and D. W. O. Rogers, editors, Monte Carlo Transport of Electrons and Photons, pages 153 – 182. Plenum Press, New York, 1988. [79] M. E. Riley. Relativistic Elastic Electron Scattering from Atoms at Energies Greater than 1 keV. Report SLA–74-0107, Sandia Laboratories, 1974. References
EGSnrc Code System
309
[80] J. P. Desclaux. A Multiconfiguration Relativistic Dirack-Fock Program. Comp. Phys. Commun., 9:31–45, 1975. [81] J. A. Halbleib, R. P. Kensek, T. A. Mehlhorn, G. D. Valdez, S. M. Seltzer, and M. J. Berger. ITS Version 3.0: The Integrated TIGER Series of Coupled Electron/Photon Monte Carlo Transport Codes. Sandia report SAND91-1634, 1992. [82] W. T. Scott. The theory of small-angle multiple scattering of fast particles. Rev. Mod. Phys., 35:231 – 313, 1963. [83] U. Fano. Inelastic Collisions and the Moliere Theory of Multiple Scattering. Phys. Rev., 93:117 – 120, 1954. [84] I. Kawrakow. Improved modeling of multiple scattering in the Voxel Monte Carlo model. Med. Phys., 24:505 – 517, 1997. [85] S. A. Goudsmit and J. L. Saunderson. Multiple scattering of electrons. Phys. Rev., 57:24 – 29, 1940. [86] S. A. Goudsmit and J. L. Saunderson. Multiple scattering of electrons. II. Phys. Rev., 58:36 – 42, 1940. [87] G. J. Lockwood, L. E. Ruggles, G. H. Miller, and J. A. Halbleib. Calorimetric measurement of electron energy deposition in extended media—Theory versus measurement. Sandia report SAND79-0414, 1980. [88] D. W. O. Rogers, B. A. Faddegon, G. X. Ding, C.-M. Ma, J. Wei, and T. R. Mackie. BEAM: A Monte Carlo code to simulate radiotherapy treatment units. Med. Phys., 22:503 – 524, 1995. [89] E. W. Larsen. A theoretical derivation of the condensed history algorithm. Ann. Nucl. Energy, 19:701 – 714, 1992. [90] J. M. Fern´andez-Varea, R. Mayol, J. Bar´o, and F. Salvat. On the theory and simulation of multiple elastic scattering of electrons. Nuclear Instruments and Methods, B73:447 – 473, 1993. [91] I. Kawrakow. Electron transport: longitudinal and lateral correlation algorithm. Nuclear Instruments and Methods, B114:307 – 326, 1996. [92] H. W. Lewis. 1950.
Multiple scattering in an infinite medium. Phys. Rev., 78:526 – 529,
[93] A. F. Bielajew, D. W. O. Rogers, and A. E. Nahum. Monte Carlo simulation of ion chamber response to 60 Co – Resolution of anomalies associated with interfaces. Phys. Med. Biol., 30:419 – 428, 1985. [94] B. J. Foote and V. G. Smyth. The modelling of electron multiple-scattering in EGS4/PRESTA and its effect on ionization-chamber response. Nucl. Inst. Meth., B100:22 – 30, 1995. Last edited 2011/03/09 20:45:06
References
310
NRCC Report PIRS-701
[95] D. W. O. Rogers. Low energy electron transport with EGS. Nucl. Inst. Meth., 227:535 – 548, 1984. [96] C.-M. Ma and A. E. Nahum. A new algorithm for EGS4 low-energy electron transport to account for the change in discrete interaction cross-section with energy. Nucl. Instr. Meth., B72:319 – 330, 1992. ~ and B ~ Fields. In T. M. Jenkins, W. R. [97] A. F. Bielajew. Electron Transport in E Nelson, A. Rindi, A. E. Nahum, and D. W. O. Rogers, editors, Monte Carlo Transport of Electrons and Photons, pages 421 – 434. Plenum Press, New York, 1988. [98] A. J. Cook. Mortran3 user’s guide. SLAC Computa. Res. Group Tech. Memo. No. CGTM 209, 1983. [99] A. F. Bielajew. The effect of strong longitudinal magnetic fields on dose deposition from electron and photon beams. Med. Phys., 20:1171 – 1179, 1993. [100] D. W. O. Rogers, I. Kawrakow, J. P. Seuntjens, B. R. B. Walters, and E. MainegraHing. NRC User Codes for EGSnrc. Technical Report PIRS–702(RevB), National Research Council of Canada, Ottawa, Canada, 2003. [101] D. E. Cullen, S. T. Perkins, and J. A. Rathkopf. The 1989 Livermore Evaluated Photon Data Library (EPDL). Lawrence Livermore National Laboratory Report UCRL-ID103424 (Livermore, Calif ), 1990. [102] E. Casnati, A. Tartari, and C. Baraldi. An empirical approach to K-shell ionisation cross section by electrons. J. Phys. B, 16:505, 1983. [103] M. Gryzi´ nski. Two-particle collisions. II. Coulomb collisions in the laboratory system of coordinates. Phys. Rev. A, 138:322 – 335, 1965. [104] M. Gryzi´ nski. Classical theory of atomic collisions. I. Theory of inelastic collisions. Phys. Rev. A, 138:336 – 358, 1965. [105] B. A. Faddegon, C. K. Ross, and D. W. O. Rogers. Angular distribution of bremsstrahlung from 15 MeV electrons incident on thick targets of Be, Al and Pb. Med. Phys., 18:727 – 739, 1991. [106] A. F. Bielajew. HOWFAR and HOWNEAR: Geometry Modeling for Monte Carlo Particle Transport. National Research Council of Canada Report PIRS-0341, 1995. [107] G. Marsaglia and A. Zaman. A new class of random number generators. Annals of Applied Probability, 1:462 – 480, 1991. [108] G. Marsaglia, A. Zaman, and W. W. Tsang. Toward a universal random number generator. Statistics and Probability Letters, 8:35 – 39, 1990. [109] M. L¨ uscher. A portable high-quality random number generator for lattice field theory simulations. Computer Phys. Commun., 79:100 – 110, 1994. [110] F. James. RANLUX: A Fortran implementation of the high-quality pseudorandom number generator of L¨ uscher. Computer Phys. Commun., 79:111 – 114, 1994. References
EGSnrc Code System
311
[111] D. W. O. Rogers, C.-M. Ma, G. X. Ding, B. Walters, D. Sheikh-Bagheri, and G. G. Zhang. BEAM98 Users Manual. NRC Report PIRS 509(a)revC, 1998. [112] D. W. O. Rogers, I. Kawrakow, J. P. Seuntjens, and B. R. B. Walters. NRC User Codes for EGSnrc. Technical Report PIRS–702, National Research Council of Canada, Ottawa, Canada, 2000. [113] J. A. Treurniet and D. W. O. Rogers. EGS Windows4.0 User’s Manual. NRC Report PIRS–0669, 1999. [114] D. W. O. Rogers. More realistic Monte Carlo calculations of photon detector response functions. Nucl. Instrum. Meth., 199:531 – 548, 1982. [115] J. Sempau and A. F. Bielajew. Towards the elimination of Monte Carlo statistical fluctuations from dose volume histograms for radiotherapy treatment planning. Phys. Med. Biol., 45:131 – 157, 2000. [116] C.-M. Ma, D. W. O. Rogers, and B. Walters. DOSXYZnrc Users Manual. NRC Report PIRS 509b(revF), 2001. [117] A. F. Bielajew and D. W. O. Rogers. A standard timing benchmark for EGS4 Monte Carlo calculations. Med. Phys., 19:303 – 304, 1992. [118] D. W. O. Rogers and A. F. Bielajew. Monte Carlo techniques of electron and photon transport for radiation dosimetry. In K. R. Kase, B. E. Bj¨arngard, and F. H. Attix, editors, The Dosimetry of Ionizing Radiation,Vol III, pages 427 – 539. Academic Press, 1990. [119] J. H. Hubbell and S. M. Seltzer. Tables of X-Ray Mass Attenuation Coefficients and Mass Energy-Absorption Coefficients 1 keV to 20 MeV for Elements Z = 1 to 92 and 48 Additional Substances of Dosimetric Interest. Technical Report NISTIR 5632, NIST, Gaithersburg, MD 20899, 1995.
Last edited 2011/03/09 20:45:06
References
Index G1 , 91 $SELECT-LOW-ENERGY-PAIR-PRODUCTION, 23 Tmed , 71 $SELECT-PHOTOELECTRON-DIRECTION, .configuration file, 292 43, 204 .cshrc, 288, 295 $SET-BREMS-ANGLE, 204 .egs4inp, 286 .egsgph, 168 $SET-PAIR-ANGLE, 204 .egsinp, 184, 203, 208, 293 $SET-RHOF, 114, 118 .environment file, 168, 205, 294 $SKIN DEPTH FOR BCA, 93 example, 173 $STORE-RNG, 137 .login, 288 $USER-RANGE-DISCARD, 144, 201 .mederr file, 262 $egs fatal, 196 .pegs4dat, 290, 293 $egs info, 196 .pegs4inp, 290 $egs warning, 196 $CALL-HOWNEAR, 113, 129, 203 Moli`ere theory, 75 $CHARGED-TRANSPORT, 115 5mev e 1mm Ta.egsinp, 184 $CHECK-STACK, 131 acronym, 7 $COMIN-ELECTR, 203 $DECLARE-PEGS4-COMMON-BLOCKS, 265adapting user codes, 203 AE, 66, 106, 117 $DEFAULT-LL, 136 $DEFINE-LOCAL-VARIABLES-ELECT, 200 aliases, 288 $DEFINE-LOCAL-VARIABLES-XXXX, 192, allowed energy range, 8 AMOLTM, 66 198 angular deflections $EGS HOME, 286 inelastic collisions, 54–56, 76, 80 $FUDGEMS, 77 single elastic scattering, 77 $GET-PEGSLESS-XSECTIONS, 265 ANNIH, 192 $GET PEGSLESS XSECTIONS, 263 ANNIH AT REST, 196 $IMPLICIT-NONE, 113, 162, 192 annihilation, 69, 134 $INIT-PEGS4-VARIABLES, 265 at rest, 70 $INITIALIZE RNG USING, 114, 136 sampling of, 69 $INTEGER, 113, 162 single photon, 70 $MACHINE, 293 three photon, 70 $MXMED, 106, 113 AP, 106, 117 $MXREG, 113 APPEND vs REPLACE, 197 $MXSTACK, 106, 113, 131 apx, 195 $PARTICLE-SELECTION-, 133 associated documents, 15 $PLAN2P, 129 atomic relaxations, 33, 47, 142 $RANDOMSET, 136, 203 simulation of, 49 $RANGE-DISCARD, 144 Auger electrons, 119 $RAYLEIGH-CORRECTION, 204 Auger transitions, 47 $RAYLEIGH-SCATTERING;, 44 AUSGAB, 34, 49, 130, 144, 174 $REAL, 113, 150, 162 example, 130, 157, 163, 166, 178, 183 $RESET-RNG, 137 initialisation, 125 $RNG-INITIALIZATION, 203 response function, 165 $S, 116 312
EGSnrc Code System
313
specifications, 130
changes from EGS4, 11, 189, 210 changing transport options, 180, 184 Ban, 2 charged particle transport, 115 BCA ALGORITHM, 92, 93, 104, 122, 123 Class I scheme, 51 bca algorithm, 138, 181, 200 Class II scheme, 51, 53, 57 BEAM code, 145 multiple scattering, 80 Berger, Martin, 71, 72, 214 validity of, 71 BETA2, 103, 190 clean after parallel, 295 Bethe-Heitler, 120 coherent scattering, 44 BHABHA - subroutine, 192 sampling of, 44 Bhabha cross section, 68, 71 collision integral, 51 Bhabha scattering, 68, 71, 134 collision stopping powers, 71, 213, 214 sampling of, 68 combine egsnrc, 295 Bielajew, Alex, 2, 7, 10, 16, 26, 27, 43, 63, COMIN 65, 66, 68, 121, 129, 286 COMPTON-DATA, 191 binding effects, 66, 68 EDGE, 191 BLCC, 77 EGS-VARIANCE-REDUCTION, 125, 191 BLOCK DATA, 192 ET-Control, 191, 204 bound Compton scattering, 27, 32, 102, 109, MS-Data, 191 119, 133, 134, 140 NIST-BREMS, 191 user-supplied cross sections, 38 Spin-Data, 191 boundary crossing algorithm, 92, 122, 138 USER, 203, 204 fluence singularity, 92 USER-MISC, 204 single scattering, 92 USER-STEP-CONTROLS, 204 BOUNDS, 102 USER-VARIANCE-REDUCTION, 204 USERXT, 204 BREMPR, 109, 190 COMIN/CH steps, 194 BREMS, 192 COMIN/COMPTON-DATA, 194 brems angular sampling, 139 COMIN/EGS-IO, 195 brems cross section, 139 COMIN/EII-DATA, 195 bremsstrahlung, 57 COMIN/ELECIN, 194 angle, 109 COMIN/EPCONT, 194 angular distribution, 63 COMIN/MEDIA, 195 angular sampling, 121 COMIN/RAD COMPTON, 195 Bethe-Heitler, 57 COMIN/RAYLEIGH INPUTS, 195 Coulomb correction, 57 COMIN/RAYLEIGH SAMPLING, 195 cross section, 57, 59 COMINs, 109 differential photon cross section, 120 COMMON electron-electron, 120 BOUNDS, 102 NIST, 57 BREMPR, 109 NIST data base, 120 COMPTON-DATA, 109 NRC, 57 EDGE, 109 production, 109, 134 EGS-VARIANCE-REDUCTION, 102 simulation of, 60 ELECIN, 94 splitting, 65, 102, 134, 145 EPCONT, 103 capabilities of EGSnrc, 8 ET-Control, 104 ET Control, 93 catastrophic collisions, 51, 53, 56 Last edited 2011/03/09 20:45:06
Index
314
MEDIA, 105 MISC, 105 RANDOM, 105, 137, 203 STACK, 106 THRESH, 106 UPHIOT, 107 USEFUL, 107 USER, 107 COMMON BLOCKS, 102 COMMON blocks changes since 2005, 194 new since 2005, 195 comp xsections, 38, 119, 141, 195 comparison to experiment, 7 compiling, 291 options, 292 COMPT, 192 Compton cross sections user-defined, 119 compton cross sections, 141 Compton effect, 109 Compton profiles, 29 Compton scattering, 27, 134 simulation of, 32 COMPTON-DATA, 109 condensed history technique, 51, 57 configuration file, 292 cosine, 114 COSPHI, 107 Coster-Kronig electrons, 109, 119, 132 Coster-Kronig transitions, 47 COSTHE, 107 cross section, 52 annihilation, 53, 69 Bhabha, 68 bremsstrahlung, 53, 57 coherent, 44 differential, 56 elastic, 53, 75 incoherent, 27 inelastic collisions, 53 Møller, 66 pair production, 21 photo-electric absorption, 39 total, 56 cross section options, 137 CSDA, 55 Index
NRCC Report PIRS-701
Cshrc additions for egsnrc, 288, 295 debug, 293 defaults, 101 densities for PEGS4, 290 density changes, 114, 118 density effect, 71, 72, 248 discrete interactions, 51, 56 annihilation, 69 Bhabha scattering, 68 bremsstrahlung, 60 distances between, 56, 93 electron impact ionization, 68 inelastic collisions, 66 Møller scattering, 66 distance unit, 118 distribution, 295 DNEAR, 106, 126, 127 Doppler broadening, 28 Doppler effects, 109 DOSRZnrc, 188 double precision, 125, 198 DUNIT, 105, 117 E, 106 e max rr, 95, 102, 144 E RANGE, 103, 144 ECUT, 102, 117, 130, 131, 137 EDEP, 48, 103, 125 EDGE, 109, 191 EDGSET, 193 EGS-IO, 110, 111 EGS-VARIANCE-REDUCTION, 27, 102, 125, 144 EGS4, 11, 24, 26, 104, 108, 109, 113, 119–123, 129, 131, 135, 143, 145, 180, 189, 210 changes from, 11 changes in subroutines, 192 mimic, 93 EGS4/PRESTA, 123 egs check arguments, 265 egs init1, 265 egs init rayleigh, 196 egs init user photon, 196 egs rayleigh sampling, 196 egs rayleigh sigma, 196 egs scale photon xsection, 196
EGSnrc Code System
egs utilities.mortran, 265 EGS Windows, 146, 168 egsi get data, 196 egsnp, 286 EGSnrc features, 8 geometry, 9 physics processes, 8 summary capabilities, 8 system changes, 12 users area, 288 egsnrc.macros, 265 egsnrc.mortran, 265 egsnrc bashrc additions, 289, 295 egsnrc cshrc additions, 289, 295 EII-DATA, 110 eii flag, 121, 140 eii init, 196 eii xfile, 121, 195 EKE, 103 elastic scattering, 56, 75 moments, 83 spin effects, 77 ELECIN, 190 ELECTR, 192 electric field transport, 9 electric fields, 115 electron impact ionization, 66, 68, 121, 140 Bote and Salvat, 121 Casnati, 121 Gryzi´ nski, 121 inputs, 110 Kawrakow, 121 Kolbenstvedt, 121 electron range, 94 electron step algorithm, 138 electron step size, 122 electron transport, 51 general discussion, 51 electron-step algorithm, 57, 89 ELKE, 103 emf macros.mortran, 10 emulating EGS4, 93 EGS4/PRESTA, 93 emulating EGS4, 123 emulating EGS4/PRESTA, 123 Last edited 2011/03/09 20:45:06
315
energy loss, 93 energy loss straggling, 55 energy range, 8, 47 ENEW, 103 eno atbin array, 194 environment file, 168, 294 environment variables, 288 EOLD, 103 EPCONT, 103, 190 EPDL, 46, 120 EPSTFL, 72, 214 ESCD2, 191 ESTEPE, 91, 104, 122, 138, 204 ESTEPR, 123, 191 ET-Control, 104, 191 ET Control, 93 ex, 289 exact BCA, 122 exact bca, 138 EXAMIN, 146, 214, 291 examin, 289 example input file-tutor6, 184 examples .environment file, 168 use of input file, 184 user codes, 150 execution, 293 subdirectory during, 293 execution in batch, 293 explicit data typing, 192, 197, 198 f, 289 features of EGSnrc, 8 fluorescence, 109 fluorescent photons, 119 fluorescent X-rays, 38, 47 FLURZnrc, 188 Fortran, 291 general description of code system, 99 geometry, 124 GET INPUT, 264 GET INPUT PLUS, 264 GET INPUTS, 188 get media inputs, 264 get media inputs.mortran, 264 Index
316
get transport parameter, 115, 205 GLE, 103 Goudsmit-Saunderson theory, 83
NRCC Report PIRS-701
incompatibilities EGS4-EGSnrc, 189 inelastic collisions, 66 init compton, 32, 195, 196 HATCH, 192 init nist brems, 195 HATCH call, 124 inputfile.xsections, 120 HEN HOUSE, 286, 287, 295 INSTALL EGS, 286, 295 Hirayama, Hideo, 2, 216 installation, 286, 295 history, 7 INTEGER, 113 HOW to get xmgr, 146 intent of report, 7 HOWFAR, 124, 126 interactive execution, 293 example, 128, 129, 157 interogating EGSnrc, 130 initialisation, 124 ion chamber calculations, 7 specifications, 126 IPHTER, 43, 109, 121, 142, 191 HOWNEAR, 113, 124, 130, 200 IPRDST, 26, 27, 108, 109, 121, 124, 140, 190 example, 159 IQ, 106 IR, 106 initialisation, 124 iray ff file, 45, 118, 142 specifications, 129 iray ff media, 45, 118, 142 I/O file units, 110, 111 IRAYLM, 105 i do rr, 95, 102, 144 IRAYLR, 44, 105, 118, 141 i play RR, 27, 102, 145 IRNEW, 103, 126 i survived RR, 102, 134, 145 IROLD, 103 IAPRIM, 58, 59, 215 is ch step, 194 IARG, 130–132, 174 is pegsless, 265 25,26,27:, 49 iseed, 114 4, 34, 48 ISSB, 72, 240 IAUSFL, 103, 130–132, 174, 190 itriplet, 24, 139 IBCMP, 32, 33, 36, 38, 109, 119, 140 IUNRST, 213 IBLOBE, 191 IWATCH, 146, 168, 170–172 ibr nist, 57–59, 61, 109, 120, 139, 181, 190, IXX, 105 195, 215 JXX, 105 IBRDST, 65, 108, 109, 121, 124, 139, 190 ICRU, 191 Klein-Nishina, 27, 119 ICRU Report 37, 120, 214, 215 KMPI, 105 IDISC, 103, 126, 135 KMPO, 105 IEDGFL, 39, 42, 109, 119, 142 Koch and Motz, 109 implicit data typing, 197 IMPLICIT-NONE, 113 LATCH, 106, 174, 191 incident particles, 125 example, 178 incoherent scattering, 27 LATCHI, 106, 191 binding effects, 28 lateral correlation algorithm, 89 Compton profiles, 29 limitations Doppler broadening, 28 energy, 47 Russian Roulette, 37 M shell, 48 simulation of, 32 Linux compiler, 293 incoherent scattering function, 30 low energy limit Index
EGSnrc Code System
electron, 8 photon, 8, 47 luxury level, 114, 135 timing, 136 m, 291 machine.mortran, 293 macro $RANDOMSET, 136 $RANGE-DISCARD, 144 macroscopic cross section, 52 magnetic field transport, 9 magnetic fields, 115 mean ionization energy, 72 MED, 105, 116 MEDIA, 105, 116 MEDIUM, 107 MEDOLD, 107 mf, 289, 291 mfb, 289 MISC, 105 MIX, 264 MOLLER, 192 Moller scattering, 134 mor, 289 Mortran3, 99, 266, 291 blocks, 270 C preprocessor statements, 266 C-style comments, 266 coding rules, 269 column one restricted directives, 283 conditional statements, 271 control cards, 282 free form directives, 284 I/O abbreviations, 279 introoduction, 268 iteration, 273 macros, 279 mor mf m, 289 multiple assignment, 278 operators, 279 parameters in macros, 281 relational operators, 162, 279 statements, 270 string replacement, 279 structure, 270 UNTIL, 273 Last edited 2011/03/09 20:45:06
317
user defined macros, 279 WHILE, 273 Mott correction, 78–80 MSCAT, 192 msdist PI, 195 msdist PII, 195 multi-architecture system, 288 multiple elastic scattering, 57, 75, 80, 83 based on screened Rutherford, 84 energy loss, 86 sampling of, 86 small-angle approximation, 83 spin effects, 87 multiple scattering, 120 MULTS, 190 Møller cross section, 66, 71 Møller scattering, 66 sampling of, 66 n RR warning, 102 Namito, 2 nbr split, 65, 70, 102, 145 Nelson, Ralph, 3, 7, 20, 216, 266 new subroutines in EGSnrc, 193 NMED, 105 NOSCAT, 105 NP, 106 NPold, 106, 191 NQS, 294 NRC EGSnrc user’s area, 288 NRC User Codes, 188 nrcc4mac.mortran, 191 overview of code system, 99 PAIR, 192 pair angular sampling, 121, 140 pair cross sections, 141 NRC, 23 pair production, 21, 109, 134 angular distribution, 26 Russian Roulette, 27 simulation of, 24 pair nrc, 23, 141 parallel processing, 12, 135, 294 path-length, 55, 56 path-length correction, 89 PATHCM, 190 Index
318
PCUT, 102, 117, 130, 131, 137 pegless mode double precision, 265 single precision, 264 PEGS4, 289, 290 $FUDGEMS, 77 AMOLTM, 66 BHABTM, 68 bug, 215 CALL option, 256 COMPT option, 238 DECK option, 254 ELEM option, 238 ENER option, 250 EPSTFL, 72, 214 flow chart, 219, 220 functions, 224–227, 230–237 HPLT option, 257, 258 IAPRIM, 215 inputs, 238, 240–248 examples, 249, 250 introduction, 217 macros, 223 MIXT option, 238 options, 238, 239 PLT1 option, 256 PLTN option, 256 PWLF option, 251–253 structure, 218 subprograms, 221 subroutines, 222, 228, 229 TEST option, 255 where data is kept, 290 pegs4.mortran, 72 pegs4 macros.mortran, 263 pegs4 routines mortran, 264 pegsless mode AE, 261 AP, 261 bremsstrahlung correction, 261 bulk density, 261 changes to EGSnrc codes, 265 defining media in .egsinp file, 261 density correction file, 262 elements, 261 EPSTFL, 262 gas pressure, 262 Index
NRCC Report PIRS-701
GASP, 262 IAPRIM, 261 implementation, 263 is pegsless variable, 265 mass fractions, 261 material data file, 261 no. of atoms, 261 rho, 261 running code, 262 stopping power type, 261 UE, 261 UP, 261 PHOTO, 193 photo-electric absorption, 38 detailed simulation of, 39 direction of electron, 43 simplified simulation of, 42 photoelectric interactions, 109, 133 angular distribution, 109, 121 photoelectron angular sampling, 142 PHOTON, 193 photon cross section data changing, 46 photon cross sections, 141 changing from default, 120 output, 141 output to file, 120 user-defined, 120 photon xsections, 46, 120, 141, 195 physics processes in EGSnrc, 8 PI, 107 PLAN2P, 129 positron annihilation, 69, 126, 127 pprocess, 294 preface, 1 prepare rayleigh data, 196 PRESTA, 89, 90, 92–94, 180, 205 PRESTA-I, 122, 200 PRESTA-I BCA, 122 PRESTA-I transport, 122 PRESTA-II transport, 122 PRM, 107 PRMT2, 107 prob RR, 27, 102, 145 purpose of report, 7 PWA, 75, 77 PWLF1, 264
EGSnrc Code System
PZERO, 107 rad compton1.mortran, 195, 196 radc flag, 38, 119, 140, 194, 195 radc init, 196 radiative Compton corrections, 37, 119, 140 radiative splitting, 65, 70 radiative stopping powers, 57, 213, 215 RANDOM, 105, 136, 137, 203 random number generators, 135, 137 initialisation, 114, 203 portability, 146 seeds, 105 timing, 136 range, 94, 95 range rejection, 95, 102, 144, 201 range ep, 94 RANLUX, 105, 114, 135, 137, 190, 292 ranlux, 12 ranlux test.mortran, 146 RANMAR, 105, 114, 135, 137, 190, 292 ranmar, 12 ranmar test.mortran, 146 Rayleigh custom form factors, 110 Rayleigh scattering, 44, 134, 141 custom form factors, 45, 118, 141 files containing custom form factors, 118 new angular sampling, 44 turning on, 118 RAYLEIGH INPUTS, 109, 110 RAYLEIGH INPUTS common block, 46 REAL, 113 relational operators, 162 relativistic spin effects, 120 relaxation, 134, 190 relaxation events, 119 relaxation transitions, 49 relaxations, 33, 47, 69 simulation of, 49 REPLACE vs APPEND, 197 response function, 165 restricted stopping power, 54, 56 restricted stopping powers, 71, 213 RHO, 105, 118 RHOF, 103, 114, 118 RHOR, 105, 114, 118 RLC, 105 Last edited 2011/03/09 20:45:06
319
RLDU, 105 RM, 107 RMSQ, 106 RMT2, 106 Russian Roulette, 27, 37, 102, 134, 145, 146, 199 Rutherford scattering, 120 sample double compton, 196 Sauter distribution, 43 schematic of code system, 100 screened Rutherford cross section, 75, 84, 86, 87 screening parameter, 75, 80 Seltzer, Stephen, 71, 72, 80, 214 sequence of operations, 112 shell to use, 288 SHOWER, 52, 193 SHOWER call, 126 sig ismonotone, 194 sine, 114 sine evaluation, 193 single elastic scattering, 77 single scattering, 92, 120 single scattering mode, 93 SINPHI, 107 SINTHE, 107 skin depth for BCA, 138 SKINDEPTH FOR BCA, 92, 93, 104, 122, 124 skindepth for bca, 138 SLAC, 3 SLAC-265, 20, 34, 61, 66, 72 SMAX, 137, 191 SMAXIR, 104, 123, 191 spin effects, 75, 77, 120, 139 measurements, 88 SPIN EFFECTS, 75, 77, 82, 87, 104, 120 spin effects, 139 SPINIT, 264 STACK, 106 order, 131 STACK overflow, 131 Step 1: Override macros, 112 Step 2: pre-hatch, 115 Step 3: HATCH call, 124 Step 4: HOWFAR initialisation, 124 Index
320
Step 5: AUSGAB initialisation, 125 Step 6: incident particles, 125 Step 7: Shower call, 126 Step 8: output results, 126 step-size restrictions, 89 steps, 112 order, 112 stopping powers, 71, 72 Storm & Israel, 46, 120 subdirectory during execution, 293 SUBROUTINE BREMS, 195 SUBROUTINE COMPT, 195 SUBROUTINE ELECTR, 195 SUBROUTINE GET INPUTS, 188 SUBROUTINE HOWNEAR, 113 SUBROUTINE WATCH, 146, 168, 170–172 subroutines added since 2005, 196 changes since 2005, 195 table lookup sines, 114 TE, 66, 106 terminating particle history, 135 test RANLUX, 146 RANMAR, 146 THETA, 107 THMOLL, 106 THRESH, 106, 191 timing vs EGS4, 209, 210 transport algorithm, 89 transport equation, 51 solution by MC simulation, 55 transport options, 180, 184 transport parameter summary, 137 TRANSPORT ALGORITHM, 104, 122–124 transport algorithm, 138 triplet production, 21, 23, 139 Tsai’s radiation logarithms, 22 TSCAT, 190 TSTEP, 103 TUSTEP, 103 tutor1.mortran, 150 tutor2.mortran, 162 tutor3.mortran, 165 tutor4.mortran, 168 tutor5.mortran, 174 Index
NRCC Report PIRS-701
AUSGAB, 178 listing, 175 tutor6.mortran, 180, 184 tutor7.mortran, 188 tutor data.pegs4dat, 150 tutorial programs, 150 TWOPI, 107 U,V,W, 106 u final, 194 UE, 106 uncertainties, 183 unrestricted stopping powers, 213 UP, 106 upgrading from EGS4, 189, 210 UPHI, 193 UPHIOT, 107 upx, 195 USEFUL, 107, 191 USER, 107, 204 User codes, 13 user codes EXAMIN, 146 user’s area, 288 USER-ELECTRON-DISCARD, 144 USER-MISC, 204 USER-STEP-CONTROLS, 204 USER-VARIANCE-REDUCTION, 204 USTEP, 103, 126 v final, 194 VACDST, 102 variance reduction, 106, 143, 144 brem splitting, 65, 145 initialisation, 125 radiative splitting, 70 range rejection, 95, 144 Russian Roulette, 27, 37, 145 Vavilov processes, 55 VMC, 194 VSTEP, 103 w final, 194 WATCH, 146, 168 example, 171, 172 output, 171, 172 WATCH routine, 170 weight, 135
EGSnrc Code System
321
WT, 106 WT=0.0, 135 X,Y,Z, 106 x final, 194 XCC, 77 XCOM, 46, 120 XIMAX, 104, 123 XImax, 138 ximax, 91 xmgr, 146 xmgrace, 291, 294 xsec out, 120, 141 XSIF, 22 y final, 194 z final, 194
Last edited 2011/03/09 20:45:06
Index