28.11.2014 Views

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IBRSPL and NBRSPL The parameters IBRSPL and NBRSPL allow the user to improve the efficiencies<br />

of simulations in which low-probability bremsstrahlung photon production is important by splitting<br />

the secondary particles. The method is similar to that described above for splitting in x-ray<br />

production following electron-impact ionization. When the parameter IBRSPL, which has a default<br />

value of 0 and is found in COMMON BREMPR, is set to 1, each electron bremsstrahlung event will result<br />

in the generation of NBRSPL appropriately weighted photons.<br />

CEXPTR The parameter CEXPTR, found in COMMON USERVR, is a scaling factor which can be used<br />

to either force or inhibit photon collisions in regions with cross section that are very small or very<br />

large. If λ is the photon mean free path and we use C to represent the scaling factor CEXPTR, we<br />

have for the interaction probability distribution:<br />

˜p(λ)dλ = (1 − Cµ)e −λ(1−Cµ) dλ,<br />

where the overall multiplier 1 − Cµ is introduced to ensure that the probability is correctly normalized,<br />

i.e. ∫ ∞<br />

0<br />

˜p(λ)dλ = 1. For C = 0, we have the unbiased probability distribution e −λ dλ. One sees<br />

that for 0 < C < 1, the average distance to an interaction is stretched and for C < 0, the average<br />

distance to the next interaction is shortened. Note that the average number of mean free paths to<br />

an interaction, 〈λ〉, is given by 〈λ〉 = ∫ ∞<br />

0<br />

λ˜p(λ)dλ = 1<br />

1−Cµ .<br />

NOMSCT The user may override all treatment of electron multiple-scattering in a given region by<br />

setting the switch NOMSCT(MXREG) to be 1 for that region. NOMSCT which is a part of COMMON MISC<br />

and is initialized 0, is used primarily as a debugging and code development tool, and is included in<br />

this description for completeness only.<br />

Random number generator initialization<br />

Whenever EGS (including any part of the user code) requires a floating point random number taken<br />

uniformly from the interval (0,1) to be returned to a variable (all <strong>EGS5</strong> routines use the variable<br />

name RNNOW), the following statement is required:<br />

call randomset(rnnow)<br />

<strong>EGS5</strong> employs the random number generator RANLUX, implemented by James. Depending on<br />

the input specification, called the “luxury level,” RANLUX provides random sequences which pass<br />

different levels of tests for randomness and execute at different speeds. Independent random sequences<br />

for the same luxury level can be generated with RANLUX by simply specifying a different<br />

input “seed,” any integer in the range from 1 to 2 31 . The default luxury level, as defined in the variable<br />

LUXLEV of COMMON RLUXDAT in file include/randomm.f, is 1, and the default seed, INSEED,<br />

is 314159265. RANLUX is initialized by HATCH using the defaults for LUXLEV and INSEED unless the<br />

user specifies different values prior to the HATCH call. In addition, users may initialize the generator<br />

themselves at any time by invoking<br />

330

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!