Sie sind auf Seite 1von 21

Phys. Med. Biol. 45 (2000) 21632183.

Printed in the UK

PII: S0031-9155(00)09205-8

Investigation of variance reduction techniques for Monte

Carlo photon dose calculation using XVMC
Iwan Kawrakow and Matthias Fippel
Institute for National Measurement Standards, National Research Council, Ottawa,
Ontario K1A 0R6, Canada
Received 1 November 1999
Abstract. Several variance reduction techniques, such as photon splitting, electron history
repetition, Russian roulette and the use of quasi-random numbers are investigated and shown to
significantly improve the efficiency of the recently developed XVMC Monte Carlo code for photon
beams in radiation therapy. It is demonstrated that it is possible to further improve the efficiency
by optimizing transport parameters such as electron energy cut-off, maximum electron energy step
size, photon energy cut-off and a cut-off for kerma approximation, without loss of calculation
accuracy. These methods increase the efficiency by a factor of up to 10 compared with the initial
XVMC ray-tracing technique or a factor of 50 to 80 compared with EGS4/PRESTA. Therefore, a
common treatment plan (6 MV photons, 1010 cm2 field size, 5 mm voxel resolution, 1% statistical
uncertainty) can be calculated within 7 min using a single CPU 500 MHz personal computer. If
the requirement on the statistical uncertainty is relaxed to 2%, the calculation time will be less
than 2 min. In addition, a technique is presented which allows for the quantitative comparison of
Monte Carlo calculated dose distributions and the separation of systematic and statistical errors.
Employing this technique it is shown that XVMC calculations agree with EGSnrc on a sub-per cent
level for simulations in the energy and material range of interest for radiation therapy.

1. Introduction
The uncertainty of semianalytical dose calculation procedures for external beam photon
radiotherapy (e.g. Mackie et al 1985, Ahnesjo et al 1987) is mainly given by the approximations
used. This uncertainty can be decreased by implementing more accurate physical models. This,
however, generally leads to longer calculation times. On the other hand, the accuracy of Monte
Carlo (MC) dose calculation (e.g. Nelson et al 1985) is mainly restricted by the statistical noise,
because the influence of MC model approximations should be much smaller. This statistical
noise can be decreased by a larger number of histories leading to longer calculation times as
well. However, there are a variety of methods to decrease the statistical fluctuations of MC
calculations without increasing the number of particle histories. These techniques are known
as variance reduction (Bielajew and Rogers 1988).
This paper deals with some of these techniques to decrease the variance of the recently
developed XVMC photon dose calculation code (Fippel 1999, henceforth referred to as paper I).
An experimental investigation of this code has been performed by Fippel et al (1999).
In the next section the variance reduction techniques as well as the methods of
implementation are described. In section 3 the influence of these methods is tested with regards
Permanent address: Abteilung fur Medizinische Physik, Radiologische Universitatsklinik, Hoppe-Seyler-Strasse 3,
72076 Tubingen, Germany.

2000 IOP Publishing Ltd



I Kawrakow and M Fippel

to dose, calculation time and statistical fluctuations. The results are discussed in section 4 and
summarized in section 5.
2. Methods
2.1. XVMC improvements
In the course of the investigations presented here we have implemented a series of
improvements into the XVMC algorithm concerning the modelling of the underlying scattering
processes. Although in many (but not all) cases these improvements had a negligible effect
on the calculated dose distributions, their effect on the calculation time was also negligible or
very small and so it was concluded that it is worthwhile to keep these improvements in the
final version of the code. A short description of these improvements is given below:
(a) Photoelectric absorption was neglected in the original XVMC version (see paper I).
As atomic relaxations play no role in the energy and material range of interest, the
photoelectric effect is fairly simple and is therefore now implemented into XVMC. Total
photoelectric cross sections are taken from the International Committee for Radiological
Units tabulations (ICRU 1992). The inclusion of photoelectric absorption has a small, subper cent effect on calculated dose distributions for energies of 12 MeV and is entirely
negligible for higher energies.
(b) In the original VMC version (see Kawrakow et al 1996) Mller scattering was
approximated by the leading term 1/E 2 (E  is the energy of the delta particle). This
approximation is now removed and replaced by sampling from the exact Mller cross
section (Mller 1932) but found not to have any effect on the calculated dose distributions.
(c) In the original VMC version the energy distribution of bremsstrahlung photons was
modelled by the leading 1/k dependence only. This approximation is now removed and
replaced by sampling from the BetheHeitler cross section (see e.g. equation (2.7.7) in
Nelson et al (1985)). Again, no effect on the calculated dose distributions was observed.
(d) In the original VMC version for electron beams, bremsstrahlung photons were produced
but then immediately discarded. After the simulation the dose distribution was corrected
for photon background for both contaminant photons from the accelerator and photons
produced in the phantom. This approximation was found to cause about 1% dose underprediction for high-energy photon beams and is therefore removed. The associated 10%
increase in CPU time can be cancelled by the use of the Russian roulette technique (see
sections 2.4.4 and 4.2).
An additional modification concerns the treatment of track-ends. In the original XVMC
version, electrons with energies below the threshold transport energy were deposited locally.
During the course of the investigations described here we have implemented a new approach
according to which track-end electrons are transported by their residual range as a normal
condensed history step. This modification increases the CPU time by 1025% but allows for
the use of higher cut-off energies (see sections 2.5.4 and 3.2). The use of a higher electron cutoff energy more than offsets the reduction of calculation speed due to the modified treatment
of track-ends.
2.2. Phantom
The investigations are performed on the basis of a 202030 cm3 phantom consisting of water
(density: = 1.0 g cm3 ) with inflated lung ( = 0.26 g cm3 , dimension: 8 4 15 cm3 )

Investigation of variance reduction techniques


Figure 1. Schematic representation of the phantom and irradiation geometry used to perform the
efficiency tests. See text for more details.

and bone ( = 1.85 g cm3 , dimension: 4 4 5 cm3 ) substitutes (see figure 1). These
materials are selected because they cover the usual mass density and atomic number range
encountered in tissues relevant for radiation therapy. The inhomogeneities begin at a depth of
z = 5 cm and they are centred with respect to the beam axis. The voxel resolution is 0.5 cm
for the three directions. The irradiation is simulated using 2 MeV and 10 MeV monoenergetic
photon beams and one beam with an energy distribution of 6 MV. A point source beam with
field size 10 10 cm2 and a sourcesurface distance of 100 cm is used to estimate the initial
photon fluence. The use of such a simple source is motivated by the desire to separate issues
related to the accurate modelling of photon beams in radiation therapy from the influence of
various reduction techniques on the calculation efficiency, which is the main topic of this paper.

2.3. Definition of efficiency

The efficiency  of an MC simulation is given by (e.g. Bielajew and Rogers 1988):



where s and T are the statistical uncertainty and CPU time respectively. Application of
(1) is straightforward for the calculation of a single quantity. In the case of the calculation
of a three-dimensional dose distribution Dij k for use in radiation treatment planning, the
statistical uncertainties Dij k must be mapped into a single number in order to employ (1).
One possibility to accomplish this task is to introduce a function F (Dij k ) which measures
the relative importance of the knowledge of the dose in the voxel (ij k). Such a function
could be, for instance, a cost function associated with a treatment plan optimization procedure.
The efficiency of the MC simulation can then be measured using the statistical uncertainty


I Kawrakow and M Fippel

of F (Dij k ), i.e.

  F 2
s F =
Dij2 k
Dij k
ij k
(Dij k Di  j  k  Dij k Di  j  k ).
ij k
i  j  k
ij k i  j  k  =ij k


If the doses in different voxels are uncorrelated, the double sum cancels out and s 2 is simply
the weighted sum of the statistical uncertainties squared. It is then clear that s can also
be constructed from the statistical uncertainties directly, without the involvement of a cost
function. In the present study we are interested in an overall efficiency and employ throughout
the paper the average statistical uncertainty in all voxels with a dose larger than % of the
maximum dose Dmax as a measure of the overall uncertainty, i.e.

Dij k
s =
N Dij k >%Dmax Dmax
where N is the number of voxels satisfying the condition Dij k > %Dmax . The choice to
normalize with respect to Dmax (instead of Dij k ) is motivated by the generally accepted accuracy
requirements of dose calculation algorithms which are expressed in percentage deviation from
the maximum dose (Brahme et al 1988). Values of = 20, 50 and 90 are used in this
investigation. The corresponding efficiencies are denoted by 20 , 50 and 90 respectively.
By dividing the simulation into Nbatch batches the statistical uncertainties were calculated
according to
Dij2 k =

Dij2 k  Dij k 2
Nbatch 1


where Dij k  is the average dose and Dij2 k  the average dose squared. For the investigations
described in this paper the number of batches is Nbatch = 10.
2.4. Variance reduction techniques
In general, the efficiency of MC simulations can be increased by (a) reducing the variance
or (b) reducing the CPU time per particle simulated. Techniques leading to efficiency
increase, although not always associated with variance reduction, are called variance reduction
techniques (VRT, see e.g. Bielajew and Rogers (1988)).
Decrease of the variance per particle simulated can be achieved, for instance, by a uniform
distribution of the primary interaction sites of the incoming photon beam or by increasing the
importance of particles with a large influence on the dose. Reduction of the CPU time per
particle history is possible by reusing certain quantities, particle splitting, interaction forcing,
In the following sections various variance reduction techniques will be discussed and their
influence on the simulation efficiency presented.
2.4.1. Interaction forcing. If the number of mean-free paths (MFP) to the next photon
interaction site is larger than the phantom thickness, the photon will leave the geometry of
interest without interacting and depositing energy. The occurrence of such events cannot be
predicted in advance and therefore the photon must be traced through the geometry performing
all associated arithmetic operations (calculation of the distance to the next region boundary
and the total attenuation coefficient in the current region) until it escapes the phantom. The

Investigation of variance reduction techniques


CPU time spent on the transport of escaping photons is then wasted. If the fraction of escaping
photons is very large, the simulation will be very inefficient.
Interaction forcing is a technique that attempts to improve the efficiency by taking into
account only the fraction of photons that interact in the phantom. In the usual implementation
the particle is first traced through the geometry and the total number of MFPs, , is calculated.
The actual number of MFPs is then sampled from
= ln[1 (1 e )]


( is a uniformly distributed random number between zero and unity) and the photon weight
modified by the factor 1 exp(). Interaction forcing will improve the efficiency if the CPU
time tIF spent per interaction is less than the time tnF spent per interaction in the no forcing
situation. Let t0 be the CPU time necessary to trace the photon through the entire geometry.
As this time is proportional to the number of voxels passed, the time necessary to transport a
photon by MFPs will be t0 / for   and t0 for   in the no-forcing case. Averaging
this time for all photons gives


d e + t0
d e = (1 e ).

Division of the above equation by the fraction of interacting photons [1 exp()] leads to
tnF , i.e.
tnF = .

In the case of interaction forcing the time necessary is the sum of the time for the initial tracing
and the time necessary to transport to the actual interaction site, i.e. t0 + t0 / for  
and 0 for > . Again, averaging for all photons and division by the fraction of interacting
photons provides tIF , i.e.
tIF =

t0 1 +  (1 + 2) exp()

1 exp()


A simple calculation shows that tIF < tnF if  < ln 2. For a phantom consisting of 25 cm
of water, for instance, this condition is satisfied only for photons with an energy larger than
6 MeV. In addition, the use of interaction forcing in an inhomogeneous phantom introduces
additional statistical fluctuations because the weights of particles passing through different
regions vary. The situation can be somewhat improved if, after calculating , the photon is
split into Nsplit identical photons, each with the weight 1/Nsplit , and the knowledge of  is
reused Nsplit times. In this case interaction forcing is faster if
 < ln(1 + Nsplit ).


Numerical experiments show, however, that the splitting technique discussed in section 2.4.6
is substantially more efficient.
2.4.2. Initial calculation of the primary interaction density. This method has been introduced
already in paper I. During a preprocessing step, taking only 1 to 5 s of CPU time, the number
of primary photon interactions in each voxel is calculated by ray tracing. The MC simulation
proceeds then by starting the given number of scattered photon and electron histories from
each voxel. This technique increases the simulation efficiency by reducing the variance of the
primary interaction sites and by saving CPU time for the ray tracing of the primary photons.
As shown in paper I the efficiency improvement is of the order of a factor of two compared
with an MC simulation without any VRT.


I Kawrakow and M Fippel

The main disadvantage of this method is that it limits the applicability of the code to
relatively simple sources, such as point sources or parallel beams (where the primary interaction
density can easily be calculated). Use with phase space files is not possible. The initial
ray tracing technique could be employed in connection with beam characterization models
provided that the models were simple enough or a mixed procedure is implemented, which
includes direct simulation for the source fractions for which the precalculation of the primary
interaction density is difficult or not possible. In either case the flexibility of the code will
be reduced and the subdivision of the calculation process into an accelerator-specific and a
patient-specific part made difficult or impossible.
We shall see in the subsequent sections that a comparable or even better efficiency is
achievable with other VRTs that do not restrict the generality of the code.
2.4.3. Sobol random numbers. Consider a photon with energy E0 and direction u
0 entering
the phantom at a position x
0 . To simplify the notation in the following equations we assume
that the photon interacts with the phantom via the Compton process only, generalization to the
situation with pair production and photoelectric absorption is straightforward. The dose D(

deposited by this photon at x

D(E0 , x
0 , u
0 , x
) = dtP (

x0 , u
0 , t) dE d(E0 , E)Ds (E0 , E, , x
1 , x
where P (

x0 , u
0 , t) is the probability for an interaction at a distance t from the entry point

P (

x0 , u
0 , t) = (

x0 + u
0 t) exp
dt  (

x0 + u
0 t  ) .

(E0 , E) is the Compton scattering differential cross section normalized to unity, is the
azimuthal scattering angle, x
1 = x
0 + u
0 t the interaction position and the linear attenuation
coefficient. Ds denotes the dose deposited at x
by the scattered particles set in motion at
1 . This dose can be split into a Compton electron component, De (E0 E, x
1 , u
1,e , x
), and
a scattered photon component, D (E, x
1 , u
1, , x
) (

u1,e and u
1, are the directions resulting
from u
0 , and the polar angle corresponding to the scattering E0 E). The latter can be
written in a form analogous to (10), i.e.

D (E, x
1 , u
1, , x
) = dt  P (

x1 , u
1 , t  ) dE  d  (E, E  )Ds (E, E   , x
2 , x
In addition, to calculate the total dose D(

x ) one has to convolve D(E0 , x

0 , u
0 , x
) with the
five-dimensional function F (E0 , x
0 , u
0 ) describing the source. It then becomes clear that a
series of d = (5+3n)-dimensional integration has to be carried out in order to perform a photon
dose calculation, where n = 1, 2, 3, . . . is the order of scattering. If the relative contributions
from the various order of scattering terms and the number of photons to be simulated are
known in advance, some of these integrations could be carried out with deterministic methods,
reducing in this way the variance of the simulation. It can be anticipated that in most practical
situations the goal of the MC simulation is to calculate the dose distribution to a desired
statistical uncertainty rather than using a given number of photon histories. A deterministic
integration is then not possible. Note also that Monte Carlo integration techniques frequently
outperform deterministic integrations for high-dimensional problems. The knowledge of the
dimensionality of the problem, however, can be employed in connection with so called quasirandom numbers to improve the efficiency of MC simulations.
Sequences of d-tuples that fill d-dimensional space more uniformly than uncorrelated
pseudo-random numbers are called quasi-random sequences. These sequences are known to
substantially improve the integration efficiency in certain type of problems. For a general

Investigation of variance reduction techniques


discussion of quasi-random numbers we refer the reader to Press et al (1997) and references
For the investigations presented here, we implemented into XVMC a Sobol quasi-random
number generator for up to d = 12 dimensions. To determine how these quasi-random numbers
influence the efficiency, we replaced some of the pseudo random numbers by Sobol sequences.
We started by replacing the two random numbers providing the starting position of the primary
photon (note that a simple point source was used in this study, see section 2.2). The third Sobol
number samples the number of mean-free paths to the first-order interaction. A fourth number
returns the interaction type (Compton scattering, pair production or photoelectric absorption)
and a fifth number selects the azimuthal scattering angle. The next Sobol number is taken to
choose the Compton or pair electron energy. Furthermore, it is possible to pass these numbers
to secondary photons also. In this case all 12 Sobol numbers have been used.
2.4.4. Russian roulette. Approximately 50% of CPU time is consumed to track secondary
and higher-order photons and the electrons they set in motion. It is possible to remove a part
of these photons by Russian roulette. That is, such photons are simulated only if a uniformly
distributed random number between 0 and 1 is smaller than the value 1/fweight specified by the
user. In this case the weight of the photon must be increased by the factor fweight . Application
of Russian roulette to scattered photons reduces the CPU time but introduces an additional
source of variance (because of varying weights). It is therefore not a priori clear whether this
technique increases the efficiency.
2.4.5. Woodcock tracing. The main advantage of the so-called Woodcock technique (Lux and
Koblinger 1991), also known as fictitious interaction method (Nelson et al 1985, pp 16, 17),
is that the time-consuming photon ray tracing through the heterogeneous geometry is not
necessary. The maximum cross section max (E) of the whole treatment volume must be
known for this technique. According to paper I this is the cross section for the voxel
with maximum density. Therefore, for a given photon energy E, max (E) can be easily
calculated by equations (2) and (3) of paper I. The simulation is then performed in a cube
with uniform attenuation max (E), i.e. in each voxel a fictitious interaction with cross
section max (E) (, E) is added. Because the geometry is homogeneous with respect
to attenuation, the photons can be transported without ray tracing. Once at the interaction
site, the interaction type is sampled (Compton, pair, photoelectric absorption or the fictitious
interaction). In the case of a fictitious interaction, photon energy and direction are left
unchanged and the process repeated. In the case of a real interaction, secondary particles
are simulatedCompton photons by Woodcock tracing again, electrons and positrons by the
usual electron MC.
For the investigations presented here, this technique was slightly modified in an attempt to
increase its efficiency. This is realized by having the photon interact every time. Therefore, the
weight of the secondary charged particles must be changed by the factor (, E)/max (E).
The Russian roulette technique is employed with fweight = (, E)/max (E) for the scattered
Compton photon and with fweight = 1 (, E)/max (E) for the remaining original photon,
leading in both cases to the original photon weight.
A further efficiency gain for this technique can be achieved by using Sobol random
2.4.6. Photon splitting and electron history repetition. One important feature of the VMC
electron beam Monte Carlo code (Kawrakow et al 1996) is the history repetition technique.


I Kawrakow and M Fippel

This technique doubles the efficiency of electron dose calculation by reusing a precalculated
history in water. The starting positions and directions of the recycled electrons are different
when they are applied to the patient geometry. In combination with photon splitting, this
technique can also be used for photon Monte Carlo. For this purpose the photon is split into
nsplit subphotons, each of them carrying a weight of 1/nsplit . The effective distance zeff (E)
(distance in water, see paper I) of the first subphoton to the interaction point is then sampled
z1eff (E) =

ln(1 1 )
w (E)

1 =



with w (E) and being the total attenuation coefficient in water and a uniformly distributed
random number between 0 and 1 respectively. Accordingly, the path length of the ith subphoton
is sampled by:
zieff (E) =

ln(1 i )
w (E)

i = 1 +



In this manner only one random number is necessary to get a scattered depth distribution
of several interaction points. All secondary particles (photons, electrons, positrons) carry a
weight of 1/nsplit . The Monte Carlo simulation is then performed by repeating the following
(a) Photon trace from zi1
to zieff (for the primary photon and i = 1 trace from the cube
surface to z1eff ) through the inhomogeneous voxel geometry.
(b) Sample interaction type (Compton scattering, pair production or photoelectric absorption).
(c) When Compton scattering happens for the first time, sample the scattered particles energy
and direction, create a Compton electron history in water and store the parameters.
(d) When a pair production happens for the first time, sample the electrons and positrons
energy and direction, create two further electron histories in water and store the parameters.
(e) When a photoelectric absorption happens for the first time, sample the photoelectron
direction, create a corresponding particle history in water and store the parameters.
(f) Apply the electron history or histories to the patient geometry starting at the ith interaction
(g) In the case of Compton scattering, play Russian roulette with the secondary photon using
the probability 1/nsplit and store its parameters if it survives.
(h) Take the next subphoton (i.e. i = i + 1, go to step (a)).

This procedure stops when the cube boundary is reached or i = nsplit . Then, the remaining
Compton photons are simulated by executing this subroutine recursively. For the investigations
described here, nsplit has been varied between 1 and 100 to find an optimum value. Furthermore,
Sobol random numbers are used whenever possible.
Note that the algorithm given by (a)(h) corresponds to changing the order of the t and
E integrations in (10). This is possible because for the energy and material range of interest
the differential Compton scattering and pair production cross sections are independent of the
material. Note also that the above algorithm reduces the variance of the primary and higherorder scattering interaction sites. In addition it is the fastest photon splitting technique, as only
one tracing through the geometry is required. The CPU time is also reduced because of reusing
various sampled quantities (scattered particles energies and directions and electron histories).

Investigation of variance reduction techniques


2.5. Transport parameter optimization

The accuracy and speed of coupled electronphoton transport MC simulations depends
crucially on the selection of various transport parameters such as particle transport cut-off
energies, particle production threshold energies and condensed history electron step-sizes.
The influence of these parameters has been investigated to find optimum parameters that
give an acceptable accuracy. The procedure employed for a quantitative comparison between
distributions corrupted by a statistical noise is described in the next subsection.
2.5.1. Comparisons between MC calculated dose distributions. All XVMC dose calculations
presented in section 3 have been benchmarked against EGSnrc (Kawrakow 2000a) calculations.
EGSnrc is an improved version of the popular EGS4 system (Nelson et al 1985) that
incorporates a series of improvements in the implementation of the condensed history
technique and was shown to allow for an accurate and artefact-free Monte Carlo simulation of
coupled electron photon transport at the 0.1% level beyond uncertainties in the cross sections
(Kawrakow 2000b).
A quantitative comparison between MC calculated dose distributions is not a
straightforward task. If one takes, for instance, the maximum difference found as a measure
for the agreement, there is no separation between stochastic and systematic deviations. The
probability p(y, N) to find a difference of y standard deviations in at least one out of N voxels

y N
p(y, N) = 1 Erf
even if the differences are purely statistical (Erf is the error function). In the situations
investigated in this paper there are of the order of 25 000 voxels with a significant dose.
We have then p(3, 25 000) = 1, p(4, 25 000) = 0.793, p(5, 25 000) = 0.025, i.e. even the
probability for five standard deviations is non-vanishing! We have therefore adopted the
procedure described below for a quantitative comparisons between EGSnrc and VMC.
Let xij k
xij k =



Dij k

be the dose difference in the voxel ij k measured in units of the combined statistical uncertainty
Dij k . If the differences were purely statistical, the probability distribution f (x) to find a
voxel with a deviation given by x would be a Gaussian. If this distribution is not Gaussian,
there are systematic differences between the two dose distributions. To separate systematic
errors from statistical fluctuations we write xij k = yij k + zij k where yij k is the statistical part
and zij k the systematic part of the difference. If we now calculate the moments x n ,
x n  =
(xij k )n
N ij k
and use the known expressions for the moments of a Gaussian distribution, we can obtain the
moments of the distribution g(z) which gives the probability to find a voxel with a systematic
deviation z. One has, for instance
x = z

x 2  = 1 + z2 

x 3  = 3z + z3 

x 4  = 3 + 6z2  + z4 .


Calculating a sufficient number of moments z  gives, in principle, a complete knowledge

of the distribution g(z). In practical applications, we have used only the first four moments
because, given the finite number of voxels available, the uncertainties on even higher-order


I Kawrakow and M Fippel

moments become comparable with the moments themselves. The simplest possible ansatz for
a distribution which is completely determined by its first four moments is
g(z) = 1 (z 1 ) + 2 (z 2 ) + (1 1 2 )(z)


i.e. a fraction 1 of all voxels has a systematic deviation 1 and a fraction 2 a systematic
deviation 2 (measured in units of the statistical uncertainty), the remaining 1 1 2
voxels show no systematic deviations. Here, is Diracs delta function. The parameters
1 , 2 , 1 , 2 are determined from the equation system
1 1 + 2 2 = z
1 21 + 2 22 = z2 
1 1 + 2 42 = z4 .

1 31 + 2 32 = z3 

With this simple ansatz, the probability distribution f (x) to find a voxel with a deviation x is
given by

(x 1 )2
(x 2 )2
f (x) =
+ 2 exp
1 exp

+(1 1 2 ) exp
We shall see in section 3.2 that (21) gives a very good representation of the observed difference
2.5.2. Variation of Pcut . Pcut is the photon energy cut-off parameter. It means, if a scattered
photon is created with an energy less than Pcut that the photon will not be transported but the
energy deposited locally. The smaller Pcut the more accurate are the results. There are two
possible criteria for selecting Pcut : (a) the MFP of photons with energy equal or less than Pcut is
small compared with the voxel sizes or (b) the energy fraction carried by photons with energy
less than Pcut is negligible compared with the energy fraction deposited. In the latter case, the
energy of cut-off photons can be deposited locally or ignored altogether. In terms of efficiency
considerations it is clear that the higher Pcut is selected the shorter the CPU time will be. On
the other hand, too a high Pcut may become a source of additional statistical fluctuations if it
becomes comparable or even bigger than the average energy deposited by electrons.
2.5.3. Kerma approximation. The energy released by low energetic photons is deposited
near the photon path. Therefore, it is possible to switch off the electron transport (kerma
approximation). These photons are transported from one interaction point to the next by ray
tracing. In each voxel (mass density ) along its path the photon deposits the dose:
Dij k = Een (, E) sij k ,


with en (, E) being the energy absorption coefficient and sij k the path-length in the voxel
ij k. The energy absorption coefficient for mass density can be calculated from the energy
absorption coefficient in water, the latter being taken from ICRU (1992), by employing the
interaction cross-section scaling functions discussed in paper I. After reaching the interaction
point and sampling the interaction parameters, the resulting scattered photons are transported
again by this method if the energy is above Pcut .
We have applied the kerma approximation only to secondary or higher-order photons.
Furthermore, we have introduced a kerma cut-off energy Kcut , i.e. only secondary photons
with energy below Kcut are approximated in this manner, high-energy photons are transported
normally. For this investigation we started without kerma approximation, i.e. Kcut = 0, and
varied Kcut = 0 to infinity (i.e. all scattered photons transported in kerma approximation).

Investigation of variance reduction techniques


2.5.4. Electron cut-off energy. In VMC the secondary electron production threshold energy
and the transport cut-off energy are identical and are denoted by Ecut . A speed-up of the
whole simulation can be realized by increasing Ecut because fewer secondary electrons are
produced and also because electrons need, on average, fewer condensed history steps until
local absorption. The range of cut-off electrons should be small compared with the voxel
size. Contrary to the popular EGS4 system (Nelson et al 1985), where the energy of track-end
electrons is deposited locally, in XVMC track-end electrons are now transported on straight
lines by their range. This approach avoids strong statistical fluctuations when low-density
materials (air, lung) are involved in the simulation.
Generally, it is difficult to derive precise limits on acceptable electron cut-off energies
from theoretical considerations. We have therefore studied the Ecut influence on accuracy and
speed to determine optimum values for radiation therapy type calculations. The starting value
for Ecut was 200 keV kinetic energy which has a residual range of 0.45 mm in water.
2.5.5. Condensed history step-sizes. As in EGS4, a Class II condensed history algorithm is
used in VMC to simulate electron transport (see Berger (1963) which introduces the technique
and coins the terminology). An important parameter in condensed history MC electron
algorithms is the step size (or the procedure used to determine the actual step size depending
on energy, material, geometry, etc). Step sizes in the original VMC implementation were
optimized for electron beams in the radiation therapy range (650 MeV). In this investigation
we have re-examined the step-size restrictions and studied the influence of the Estep parameter
(maximum fractional energy loss per step) on the calculation accuracy and efficiency in the
case of photon beams.
3. Results
All calculations reported here have been performed on a single CPU 200 MHz PentiumPro
personal computer running Linux. Shortly before the submission of the manuscript a new PC
was installed in our institution (PIII, 500 MHz, Linux). We repeated some of the simulations
on the new system and found that it is faster by a factor of 2.55. All efficiencies reported here
can therefore be transformed to a more up-to-date system by multiplying by this factor.
3.1. Notation
The variance reduction techniques studied in this paper and the notation used in the following
paragraphs are summarized in table 1. Various methods have been combined to find an optimum
efficiency and to study their influence on the statistical uncertainties. These are the photon
splitting and electron history repetition technique (section 2.4.6), the use of Sobol random
numbers (section 2.4.3), Russian roulette (section 2.4.4), Woodcock tracing (section 2.4.5), and
the transport parameter optimization described in section 2.5. The new techniques have been
benchmarked compared with XVMC without additional variance reduction (denoted as NVR),
the initial ray tracing (IRT) described in section 2.4.2 and paper I, and EGSnrc simulations.
The original XVMC implementation without additional variance reduction techniques (NV0)
is included in the tables in order to demonstrate the influence of the modifications described in
section 2.1. Efficiencies of EGS4 calculations with the DOSXYZ user code (Ma et al 1999)
which incorporates the PRESTA algorithm (Bielajew and Rogers 1987), denoted as EGS, can
serve as a comparison with an accepted general-purpose code.
Nevent is the number of initial photons and nsplit is the splitting factor explained in
section 2.4.6. The product of Nevent and nsplit is approximately the number of initial photon


I Kawrakow and M Fippel

Table 1. Variance reduction techniques and parameters used to perform the investigations. More
explanations are given in text.


(106 )



Original XVMC, no VRT








no additional VRT
Initial ray tracing
NVR, Sobol
Woodcock, Sobol
Splitting, repetition,
Russian roulette, Sobol
SPL, changed Pcut
PCT, changed Kcut
KCT, changed Ecut


ECT, changed Estep





























Figure 2. The difference distribution for a comparison between a XVMC/EST and EGSnrc dose
distributions for the 6 MV photon beam in the waterbonelung phantom. The error bars represent
one standard deviation. The fit is the result of (21) with 1 = 0.446, 1 = 0.5, 2 = 0.

histories necessary for simple Monte Carlo calculations (MC without splitting) to achieve
comparable statistical accuracy. In each simulation this product was 100 million histories.
3.2. Accuracy
An important part of this study was to establish the accuracy of the XVMC algorithm for
radiotherapy type calculations, especially when increasing particle transport and production
threshold energies and condensed history step sizes (see section 2.5).
All EGSnrc simulations were performed using AP = PCUT = 10 keV (photon production
and transport threshold energies) and AE = ECUT = 561 keV (electron production and

Investigation of variance reduction techniques


Figure 3. A comparison between the central axis depth dose curve of a 6 MV photon beam in the
waterbonelung phantom calculated with XVMC/EST (solid line) or XVMC with Ecut = 2 MeV,
Estep = 0.25 (dashed line) and EGSnrc (circles). The only region with visible differences between
the three calculations is the region around the bonelung interface pointed to by the arrows.

transport energies including the electron rest energy). All other parameters were set to default
In this section we will present two typical results of the comparisons between XVMC and
EGSnrc dose distributions in the waterbonelung phantom described in section 2.2 for 6 MV
beams. Results for other energies and phantoms are qualitatively similar.
Application of the analysis technique described in section 2.5.1 to a dose distribution
calculated with the EST method (see table 1) resulted in 1 = 0.446, 1 = 0.5 and an 2
value compatible with zero. A comparison between the difference distribution, calculated
for all voxels where the dose was larger than 50% of the maximum dose, and (21) with
the above parameters, is shown in figure 2. The good agreement indicates that the simple
ansatz discussed in section 2.5.1 is sufficient for our purposes. It is therefore established that
there is a systematic difference between XVMC/EST and EGSnrc in 44.6% of all voxels.
This difference is, however, only 0.5 standard deviations and, given the combined statistical
uncertainty of 0.8%, corresponds to only 0.4% of the maximum dose. This is well below the
stated accuracy goal of 2%/2 mm for radiotherapy calculations and not even detectable in a
visual inspection of the dose distributions, as can be seen in figure 3. Note that the systematic
difference of 0.4% is not just the result of the use of substantially higher cut-off energies and
the slightly less accurate condensed history electron-step algorithm employed in XVMC, but
also includes deviations resulting from the use of fit formulae to calculate photon attenuation
coefficients and electron stopping and scattering powers from the mass density (see paper I
and Kawrakow et al 1996).
As a counter example we present in figure 4 the difference distribution for the situation
where the XVMC dose calculation was performed using Ecut = 2 MeV and Estep = 0.25.
Note that the 6 MV spectrum employed has an average photon energy of 2.12 MeV so that
most of the electrons are slowed down until local absorption, just in one step in this case.
The error analysis resulted in 1 = 0.568, 1 = 0.81, 2 = 0.028, 2 = 4.46. Again, (21)
with the above parameters reproduces the observed difference distribution very well. The
accuracy of this calculation is deemed unacceptable because there is a significant fraction


I Kawrakow and M Fippel

Figure 4. The same as in figure 2 for the situation where the XVMC dose calculation was performed
with Ecut = 2 MeV and Estep = 0.25. In this case 1 = 0.568, 1 = 0.81, 2 = 0.028,
2 = 4.46.

of voxels with a systematic dose over-prediction of 3.6% (4.46 times 0.8) of the maximum
dose. This dose over-prediction occurs mainly at the bonelung interface as can be seen in
figure 3. It is worth noticing that, although unacceptable for the final treatment plan dose
calculation, such a simplified MC simulation could be used in the planning process in order to
have a rapid dose calculation while trying to select a good beam configuration. A preliminary
investigation indicates that an additional efficiency increase by a factor of three to four could
be achieved compared with the efficiencies reported in tables 2, 3 and 4 in the next section.
Note also that such a simplified Monte Carlo simulation in which electrons take just one step
is essentially identical to a convolution/superposition calculation where the energy is spread
from the interaction site using pre-calculated kernels (but it is more accurate in calculating the
dose from scattered photons).
A systematic comparison between EGSnrc and XVMC dose distributions calculated with
various cut-off energies and electron step-sizes in the phantom described in section 2.2 and in
phantoms containing air and different bone materials shows that XVMC agrees with EGSnrc
on a 0.5% level for the parameters shown in table 1 (i.e. Ecut = 500 keV, Pcut = 50 keV,
Kcut = 2 MeV, Estep = 12%). A 12% accuracy is achievable with even longer condensed
history steps and higher cut-offs.
3.3. Efficiency
Tables 2, 3 and 4 summarize the results with respect to efficiency. Figure 5 shows a
graphic representation of the high dose region efficiency 90 , normalized to the corresponding
EGS4/PRESTA efficiency. Note that a logarithmic scale was used in this figure in order to
better visualize the factor of improvement due to the various techniques. Note also that the
EGS4/PRESTA calculations were optimized compared with the investigation presented in
paper I in order to allow for a fair comparison. The efficiency increase in the EGS4/PRESTA
calculations results from (a) use of 50 keV instead of 10 keV photon production and transport
threshold energy which was found to give the best efficiency (see section 4.5), (b) use of
EGS4/PRESTA default step-sizes as opposed to 9% ESTEPE restriction employed in paper I

Investigation of variance reduction techniques


Table 2. CPU time, average standard deviation s50 for all voxels with D > 50%, and efficiencies,
defined in section 2.3, for the 2 MeV monoenergetic beam example.
20 (s1 )

50 (s1 )

90 (s1 )


TCPU (s)

s50 (%)


13 330
65 650






16 036
13 107
15 831
22 018











Table 3. Same as table 2 but for the 10 MeV monoenergetic beam.

20 (s1 )

50 (s1 )

90 (s1 )


TCPU (s)

s50 (%)


14 276
144 800






15 264
11 555
15 448
22 866











and motivated by the desire for equal transport parameters and (c) use of the electron range
rejection technique in the present EGS4/PRESTA calculations. These optimizations have only
a minor effect for the 10 MeV beam but improve the efficiency by a factor of 1.6 to 1.8 for the
lower energy beams (2 MeV and 6 MeV).
If we compare the newly implemented VRTs without changing the transport parameters
(SPL) to the initial ray-tracing (IRT) method, we notice that using these techniques it is possible
to achieve much better efficiencies. The main effect comes from the photon splitting and
electron history repetition technique. This offers the chance to develop or use more complex
beam models, because the point source restriction is no longer necessary. For instance, a phase
space file generated by the BEAM code (Rogers et al 1995) can be taken as starting point for
photon dose calculations.

4. Discussion
In this section we will discuss the influence on efficiency of using the different techniques and
varying the parameters.


I Kawrakow and M Fippel

Table 4. Same as table 2 but for the 6 MV spectrum.
50 (s1 )

90 (s1 )













TCPU (s)

s50 (%)


13 302
62 882



16 774
13 099
16 334
21 799


20 (s1 )

Figure 5. Efficiencies in the high dose region, 90 for the 2 MeV (grey bars), 6 MV (black bars) and
10 MeV (no-fill bars) photon beams normalized to the corresponding EGS4/PRESTA efficiencies.

4.1. Effect of Sobol random numbers

The main efficiency gain due to quasi or Sobol random numbers comes from using the first
three of these numbers to sample the primary source position (two random numbers) and the
primary photons mean free path (one random number). This leads to the optimum distribution
of primary interaction sites and is therefore similar to the IRT method. The gain is about a
factor of 2 for 2 MeV, a factor of 1.3 for 10 MeV, but only a factor of 1.1 for the 6 MV spectrum.
In the spectrum case, we have additional fluctuations because of the varying energies. The
gain for the 10 MeV beam is smaller compared with 2 MeV because the electron transport
through the geometry has more influence on the efficiency than the photon transport part of
the simulation. The use of 6 or even 12 Sobol numbers instead of 3 brought only a marginal
improvement in efficiency (20% for the 2 MeV case). This observation indicates that the
implementation of a quasi-random number generator for arbitrary high number of dimensions
will have no additional effect on the efficiency.

Investigation of variance reduction techniques


4.2. Influence of Russian roulette

A straightforward application of the Russian roulette technique in association with NVR
decreased the efficiency independent of the value of fweight used. An efficiency increase
using Russian roulette could be achieved only together with the modified Woodcock transport
scheme (see section 2.4.5) and the photon splitting technique (see section 2.4.6) by carefully
selecting fweight to ensure identical, or at least similar, weights for all electrons.
It should be noted that the use of Russian roulette makes the difference between 20 and
90 smaller (20 is more than twice as large as 90 for the NVR technique and 2 MeV photon
energy, for instance, but only 1.5 times as large for the SPL technique, see table 2), i.e. it leads
to a redistribution of efficiency. This effect is desirable as in most cases the primary interest
in the dose calculation will be the high-dose region.
4.3. Effect of Woodcock tracing
Woodcock tracing improves the efficiency by about 20% compared with simple Monte Carlo
with ray tracing. The efficiency gain is slightly higher if we have a grid with higher spatial
resolution, but even then is not comparable with the efficiency improvement due to the SPL
method. We have also investigated the use of Woodcock tracing in conjunction with photon
splitting and electron history repetition (section 2.4.6), but in the end, this was less efficient
than SPL as discussed in section 2.4.6. These results are therefore not presented here.
4.4. Variation of nsplit
Larger splitting numbers improve the efficiency due to the increased number of electron history
repetitions and reusing the sampling of photon interactions. If nsplit becomes too large, however,
the starting positions of the same electron history will be too close to each other, thus reducing
the information gain and so the efficiency. This effect is demonstrated in figure 6 showing the
efficiencies plotted versus the number of splittings. The behaviour is similar for the 2 MeV and
10 MeV cases. Although the splitting number that leads to a maximum efficiency is somewhat
energy dependent, this dependence is rather weak. Because of this fact and in view of the broad
nsplit region surrounding the best value we have decided to use nsplit = 40 for all energies in
the further investigations.

Figure 6. Efficiencies as a function of nsplit for the 6 MV spectrum. The transport parameters are
Pcut = 10 keV, Kcut = 0, Ecut = 200 keV and Estep = 9%, i.e the same as for method SPL.


I Kawrakow and M Fippel

Figure 7. Efficiency as a function of Pcut for a 2 MeV photon beam in the waterbonelung

The efficiency increase due to the splitting and repetition technique is somewhere between
2.5 and 5 compared with the IRT method, depending on energy. Compared with an XVMC
simulation without other VRTs (NVR), SPL gives an improvement of a factor of 5 to 9 and is
therefore the most successful VRT investigated here.
4.5. Influence of transport parameter optimization
The calculation time can always be decreased by increasing Pcut , Kcut , Ecut or Estep . Generally,
changing these parameters does not lead to changing standard deviations. This statement,
however, is not quite true for Pcut . If we increase this value, the increasing amount of energy
deposited at a point by cut-off photons leads to more fluctuations in low-density regions and
thus to a lower efficiency. This effect is demonstrated in figure 7 where the efficiency for the
PCT method is shown as a function of Pcut for the 2 MeV photon beam.
The optimum parameters are summarized in table 1 (method EST). The dose distributions
for this set of parameters agree at a 0.5% level with EGSnrc calculations as discussed in
section 3.2.
The gain in efficiency due to transport parameter optimization is somewhere between
a factor of 1.6 and 2.4. The transport parameter optimization is therefore the second most
successful VRT after SPL.
4.6. Simplifications and VRT in general purpose Monte Carlo codes
Arguably, some of the variance reduction techniques could be implemented in general
purpose Monte Carlo codes such as EGS4. This is not a straightforward task, though. The
implementation of the photon splitting technique discussed in section 2.4.6, for instance,
would require a complete recoding of the EGS4 photon transport routine. Implementation
of the electron history repetition option would require a complete recoding of the electron
transport routine as well. Use of higher cut-off energies is not necessarily beneficial in the
case of EGS4 because of the local energy deposition (unless, again, the electron transport

Investigation of variance reduction techniques


Figure 8. The EGS4 versus EGSnrc difference distribution for the 6 MV photon beam in the
waterbonelung phantom. The fit is the result of (21) with 1 = 0.17, 1 = 1.8, 2 = 0.075,
2 = 2.4. The Gaussian distribution is shown in order to better visualize the deviation from a
purely statistical error distribution.

routine is recoded). Larger condensed history step sizes will have a little impact on the
calculation speed because, due to the EGS4 or PRESTA (Bielajew and Rogers 1987) boundary
crossing algorithms, in the energy range of interest step sizes are determined mainly by the
voxel resolution. Finally, turning off PRESTA and using standard EGS4 is dangerous and may
lead to a significant loss in accuracy. To demonstrate this fact we have performed a 6 MV
dose calculation in the waterbonelung phantom with DOSXYZ (Ma et al 1999), with and
without PRESTA. Not using PRESTA decreased the simulation time by a factor of two. An
analysis of the dose distribution according to the technique discussed in section 2.5.1 resulted
in 1 = 0.17, 1 = 1.8, 2 = 0.075, 2 = 2.4, i.e. the stated accuracy goal of of 2% of the
maximum dose is not satisfied in 7.5% of all voxels (the combined statistical uncertainty in
this case was 1%) and close to not satisfied in 17% of the voxels! The EGS4 versus EGSnrc
difference distribution, together with (21) with the above parameters, is shown in figure 8.
The Gaussian curve (dashed) is shown in order to better visualize the deviation from a purely
statistical differences distribution.
The systematic deviations between DOSXYZ using PRESTA and EGSnrc were below
0.7%. It is worth noticing that additional increase of cut-off energies and electron step sizes
in XVMC compared with the EST parameter set that resulted in an improvement in speed by
a factor of two had a similar decrease in accuracy as the one observed in the transition EGS4
with PRESTA to EGS4 without PRESTA.
5. Conclusion
The main result of this investigation is an increased photon beam dose calculation efficiency
by a factor of 3.5 (10 MeV) to 11 (2 MeV) compared with the starting point (XVMC with
initial ray tracing). Taking into account the factor of 7.4 (2 MeV) to 16 (10 MeV) for the
XVMC/IRT technique compared with a partially optimized EGS4/PRESTA calculation (see
section 3), the XVMC efficiency is 50 to 80 times higher than EGS4/PRESTA.


I Kawrakow and M Fippel

The main efficiency gain comes from the SPL technique (a factor of 2 to 5 compared with
IRT or 5 to 9 compared with NVR). The remaining gain results from the careful optimization
of the electron and photon transport parameters. The techniques developed here do not impose
restrictions on the complexity of the beam model. A slight loss in efficiency (approximately
a factor of 1.21.5) will result from the use of phase space files as the starting point of the
calculations, however. This is due to the fact that in this case the use if a quasi-random sequence
(see section 2.4.3 and section 2.4.6) does not result in an improved efficiency.
The efficiency in the high-dose region of the 6 MV calculation is about 9 s1 on a single
PentiumPro 200 MHz CPU or 23 s1 on a PIII 500 MHz system. This means that a full 3D
dose calculation for a 10 10 cm2 field and a 5 mm voxel resolution can be performed in
1100 or 434 seconds for a 1% statistical uncertainty. If the statistical uncertainty requirement
is relaxed to 2%, the CPU time decreases by an additional factor of 4. If in addition less
stringent requirements on the systematic accuracy of the algorithm are imposed, higher cut-off
energies and longer condensed history step sizes could be used and thus the efficiency further
increased. Such approximate Monte Carlo simulations, which require less than a minute of
CPU time on a PIII 500 MHz system, can be used in the initial radiation treatment planning
phase, for instance. It is also worth noticing that the efficiency of a Monte Carlo calculation is
nearly independent of the complexity of the treatment plan. It can therefore be expected that
the efficiency of XVMC dose calculations for plans with many beams, gantry rotations, etc
can become comparable to or even outperform deterministic dose calculation algorithms.
The second main result of this investigation is the technique presented in section 2.5.1.
This technique allows for the quantitative comparison of MC calculated dose distribution
and the separation of statistical and systematic deviations. Using this technique it could be
demonstrated that XVMC/EST calculations agree with EGSnrc on a sub-per cent level.
Partial financial support for the work presented here was provided by the Deutsche
Forschungsgemeinschaft under contract number FI 757. One of us (Matthias Fippel) would
like to thank the NRC, especially the IRS group, Dave Rogers and Iwan Kawrakow, for their
kind hospitality during his stay in Ottawa. Dave Rogers is also acknowledged for many useful
comments on this manuscript.
Ahnesjo A, Andreo P and Brahme A 1987 Calculation and application of point spread functions for treatment planning
with high energy photon beams Acta Oncol. B 26 4955
Berger M 1963 Monte Carlo Calculation of the penetration and diffusion of fast charged particles Methods in
Computational Physics ed B Alder, S Fernbach and M Rotenberg (New York: Academic) pp 135215
Bielajew A F and Rogers D W O 1987 PRESTA: the parameter reduced electron-step transport algorithm for electron
Monte Carlo transport Nucl. Instrum. Methods B 18 16581
1988 Variance-reduction techniques Proc. Int. School of Radiation Damage and Protection, Eighth Course:
Monte Carlo Transport of Electrons and Photons below 50 MeV ed T M Jenkins, W R Nelson and A Rindi
(New York: Plenum) pp 40719
Brahme A, Chavaudra J, Landberg T, McCullough E C, Nusslin F, Rawlinson J A, Svensson G and Svensson H 1988
Accuracy requirements and quality assurance of external beam therapy with photons and electrons Acta Oncol.
(suppl 1) 176
Fippel M 1999 Fast Monte Carlo dose calculation for photon beams based on the VMC electron algorithm Med. Phys.
26 146675
Fippel M, Laub W, Huber B and Nusslin F 1999 Experimental investigation of a fast Monte Carlo photon beam dose
calculation algorithm Phys. Med. Biol. 44 303954

Investigation of variance reduction techniques


ICRU 1992 Photon, electron, proton and neutron interaction data for body tissues ICRU Report 46
Kawrakow I 2000a Accurate condensed history Monte Carlo simulation of electron transport, I. EGSnrc, the new
EGS4 version Med. Phys. 27 48598
2000b Accurate condensed history Monte Carlo simulation of electron transport, II. Application to ion chamber
response simulations Med. Phys. 27 499513
Kawrakow I, Fippel M and Friedrich K 1996 3D electron dose calculation using a voxel based Monte Carlo algorithm
(VMC) Med. Phys. 23 44557
Lux I and Koblinger L 1991 Monte Carlo Particle Transport Methods: Neutron and Photon Calculations (Boca Raton,
FL: CRC Press) p 222
Ma C M, Reckwerdt P, Holmes M, Rogers D W O, Geiser B and Walters B 1999 DOSXYZ Users Manual NRCC
Report PIRS-0509B
Mackie T R, Scrimger J W and Battista J J 1985 A convolution method of calculating dose for 15 MeV x-rays
Med. Phys. 12 18896
Mller C 1932 Passage of hard beta rays through matter Ann. Phys., Lpz. 14 531
Nelson W R, Hirayama H and Rogers D W O 1985 The EGS4 code system SLAC Report SLAC-265
Press W H, Teukolsky S A, Vetterling W T and Flannery B P 1997 Numerical Recipes in Fortran 77 (Cambridge:
Cambridge University Press)
Rogers D W O, Faddegon B A, Ding G X, Ma C M, Wie J and Mackie T R 1995 BEAM: a Monte Carlo code to
simulate radiotherapy treatment units Med. Phys. 22 50324