Page 1

VMC++ versus BEAMnrc: A comparison of simulated linear accelerator

heads for photon beams

F. Hasenbalg,a?M. K. Fix, E. J. Born, and R. Mini

Division of Medical Radiation Physics, Insel Hospital, University of Berne, Berne 3010, Switzerland

I. Kawrakow

Ionizing Radiation Standards, National Research Council of Canada, Ottawa K1A OR6, Canada

?Received 24 September 2007; revised 16 January 2008; accepted for publication 28 January 2008;

published 20 March 2008?

BEAMnrc, a code for simulating medical linear accelerators based on EGSnrc, has been bench-

marked and used extensively in the scientific literature and is therefore often considered to be the

gold standard for Monte Carlo simulations for radiotherapy applications. However, its long com-

putation times make it too slow for the clinical routine and often even for research purposes without

a large investment in computing resources. VMC++ is a much faster code thanks to the intensive use

of variance reduction techniques and a much faster implementation of the condensed history tech-

nique for charged particle transport. A research version of this code is also capable of simulating the

full head of linear accelerators operated in photon mode ?excluding multileaf collimators, hard and

dynamic wedges?. In this work, a validation of the full head simulation at 6 and 18 MV is per-

formed, simulating with VMC++ and BEAMnrc the addition of one head component at a time and

comparing the resulting phase space files. For the comparison, photon and electron fluence, photon

energy fluence, mean energy, and photon spectra are considered. The largest absolute differences

are found in the energy fluences. For all the simulations of the different head components, a very

good agreement ?differences in energy fluences between VMC++ and BEAMnrc ?1%? is obtained.

Only a particular case at 6 MV shows a somewhat larger energy fluence difference of 1.4%.

Dosimetrically, these phase space differences imply an agreement between both codes at the ?1%

level, making VMC++ head module suitable for full head simulations with considerable gain in

efficiency and without loss of accuracy. © 2008 American Association of Physicists in Medicine.

?DOI: 10.1118/1.2885372?

Key words: Monte Carlo simulations, VMC??, BEAMnrc, treatment head

I. INTRODUCTION

Monte Carlo ?MC? simulations are currently considered the

most accurate way to calculate the dose to be delivered to

patients in radiotherapy treatments. Its importance is espe-

cially relevant when small fields such as those found in in-

tensity modulated radiation therapy are considered or when

inhomogeneities in the treated volumes are present. A correct

computation of the dose to be delivered to the patient not

only involves the right description of the patient in terms of

geometry and element composition but also a detailed mod-

eling of the photon source, namely, the linear accelerator

?linac? head. Although full linac head simulations have been

reported widely in the literature ?see, e.g., the review articles

by Verhaegen and Seuntjens1and by Ma and Jiang2?, they are

often considered impractical for clinical implementation due

to the long simulation times required. Another approach is

based on empirical or semiempirical source models,3–8which

substitute the whole linac head by just a few subsources. The

main advantage of empirical or semiempirical source models

is that their free parameters such as subsource intensities and

positions can be adjusted relatively easy to give dose distri-

butions matching a specific set of measured data without

the excessive simulation times needed by full linac head

simulations.

In a recent publication Kawrakow and Walters9have

shown that when photon beam linac simulations with

BEAMnrc ?Refs. 10 and 11? employing directional brems-

strahlung splitting12?DBS? are combined with photon split-

ting for the transport in the phantom, the time taken by the

linac head simulation becomes only a relatively small frac-

tion of the overall calculation time. In addition, the overall

simulation time is significantly reduced compared to previ-

ous studies with BEAM and BEAMnrc. An even faster MC

simulation tool may therefore offer the opportunity of per-

forming a full linac simulation for each treatment plan with

acceptable calculation times.

VMC++ ?Ref. 13? ?VMC++ is only available by direct re-

quest to the National Research Council of Canada? is a fast

MC code optimized for external beam radiation treatment

planning. Recently, the accuracy of VMC++ for performing

dose calculations in the patient has been validated in an ar-

ticle by Gardner et al.14The purpose of this work is to

complement this previous effort comparing VMC++ against

BEAMnrc for the simulation of medical linacs. Considering

BEAMnrc ?based on the EGSnrc ?Refs. 15 and 16? code

which uses accurate electron transport algorithms? as the

gold standard, simulations of a 6 and a 18 MV Varian-like

machines were performed covering the energy range nor-

mally encountered in radiotherapy. For each energy, simula-

15211521Med. Phys. 35 „4…, April 20080094-2405/2008/35„4…/1521/11/$23.00© 2008 Am. Assoc. Phys. Med.

Page 2

tions involving the successive addition of the several ele-

ments of the linac head were done and phase space files were

generated with both codes. Phase space files contain the

charge, energy, position, direction, and statistical weight of

all particles reaching a user-defined scoring plane. These

phase space files were analyzed and compared using the

BEAMDP ?Ref. 17? utility of the 2007 BEAMnrc distribution.

Although the generic VMC++ simulation routines can also

be used to transport particles through beam modifiers such as

hard wedges, blocks, and multileaf collimators ?MLCs?, in

the present study the focus is on static fields collimated with

jaws only that are useful in the initial commissioning pro-

cess. The use of the optimized transport algorithms em-

ployed by VMC++ in the upper portion of the treatment head

and in the photon jaws for beam modifiers such as MLCs or

wedges is currently under investigation.

Since the fast VMC++ treatment head simulation has not

yet been published elsewhere, a brief description of the vari-

ance reduction techniques implemented in the code are given

in Sec. II.

II. MATERIALS AND METHODS

Our linac head model resembles a Varian accelerator head

?Varian Medical Systems, Palo Alto, CA? operated in photon

mode. In this model, the accelerator head is composed of an

electron target ?made of tungsten and copper?, a primary

tungsten collimator, a beryllium vacuum window, a flattening

filter, a simplified kapton monitor chamber, X−Y tungsten

jaws, and a light reticle. The flattening filter is made of cop-

per for the 6 MV beam and of iron and tantalum for the 18

MV beam. In this study, the correct geometry and composi-

tion of the head components are not crucial and therefore

they do not exactly correspond to that of an actual

Varian machine. The input files used for the BEAMnrc and

VMC++ simulations, on the other hand, should be as similar

as possible ?within the constraints imposed by each code?.

Therefore, for this comparative study, a simplified monitor

chamber has been assumed and the mirror, which is not

implemented in the VMC++ treatment head simulation, has

been omitted. Since VMC++ has no medium defined as

vacuum, all vacuum parts were assumed to be filled with air

in both codes.

Simulations were run with VMC++ and BEAMnrc to ob-

tain phase space files. To check VMC++ against BEAMnrc

and to observe the effect of each of the head components,

five different phase space files were generated with each

code for 6 and 18 MV for a total of 20 phase space files.

First, only the electron target is simulated surrounded by air

up to the scoring plane. Second, the electron target, the pri-

mary collimator, and the beryllium vacuum window are

simulated, surrounded by air until the scoring plane. Third,

the flattening filter is added. A fourth phase space file simu-

lates the whole head, adding monitor chamber, jaws and light

reticle for the field size of 10?10 cm2. The fifth phase

space file corresponds to the whole head simulation and a

field size of 40?40 cm2. In all these phase space files, the

scoring plane was located at a source-to-surface distance

?SSD? of 100 cm. We chose SSD=100 cm in order to mag-

nify any small differences that could show up in the phase

space files.

BEAMDP was used with 40 equal area circular bins for the

first three type of phase space files where cylindrical sym-

metry is granted and 40 equal area square bins for the phase

space files of the full head simulations. For each of the simu-

lations the quantities: all particles estimated real fluence,

??r?, all particles energy fluence, ??r?, all particles mean

energy and photon energy spectrum were studied. The pho-

ton spectrum was integrated over the radial or square dis-

tance depending on the case. To avoid redundancy, we con-

centrate on energy fluence and mean energy and show the

photon spectra when appropriate. Each phase file contained

enough particles to obtain smooth curves of the studied

quantities. The largest relative differences between the codes

were observed in the energy fluences. The relative uncertain-

ties in the energy fluences and in the mean energies varied

from case to case and between regions of high and low par-

ticle fluence. Relative uncertainties are generally larger at

large radii ?large square distances? where the bins of equal

area are narrower. To get an idea of the typical error bars

involved, these are shown in the mean energy curves in the

results section. To quantify the differences between both

codes VMC++ and BEAMnrc?, we make use of the relative

energy fluence differences between the two simulation meth-

ods with respect to the maximum of one of these

methodsconsideredasthe

?=??VMC++?r?−?BEAMnrc?r??/?BEAMnrc

reference

.

?BEAMnrc?,

?max?

II.A. Simulations with VMC++

VMC++ is based on the original ideas of Kawrakow,

Fippel, and Friedrich18for electron transport and later ex-

tended and improved by Fippel19and Kawrakow20for the

transport of photons. VMC++ is written in C++ and incorpo-

rates several improvements in the transport efficiency as well

as in the modeling of the underlying physical processes ?e.g.,

the exact multiple scattering theory of Kawrakow and

Bielajew21is employed including spin effects in the same

way as the EGSnrc code,22instead of the small-angle ap-

proximation used in

VMC/XVMC, the history repetition

method found in VMC/XVMC is replaced with STOPS ?Ref. 13?

thus removing the VMC/XVMC limitation to be applicable in

low-Z materials only, etc.?. A research version of the VMC+

+ code ?National Research Council of Canada? which dy-

namically loads a particle source shared library ?a full linac

head simulation module in this case? at run time is used in

this study. The linac simulation can be easily configured us-

ing a set of input files which define the head geometry and

control the MC transport and variance reduction ?VR? pa-

rameters. For details about the VR techniques already imple-

mented in previous versions of VMC++, the reader is referred

to Ref. 20 where these are described more deeply. The set of

transport and variance reduction parameters used in this

study is listed in Table I. The most important variance reduc-

tion parameter is the radiative splitting number, with the

highest value for the 6 MV 10?10 cm2field and the lowest

1522

Hasenbalg et al.: VMC++ versus BEAMnrc: Comparison of simulated accelerator heads1522

Medical Physics, Vol. 35, No. 4, April 2008

Page 3

for the 18 MV 40?40 cm2field. We modified the VMC++

code to be able to generate phase space data files in a scoring

plane at a given SSD. The five different phase space files for

each energy were then simply obtained by adapting the input

files to the desired geometries.

The fast VMC++ head simulation for photon beams uses

several tricks and four main VR techniques to improve simu-

lation efficiency: bremsstrahlung cross section enhancement

?BCSE?, directional radiative splitting ?DRS?, rotational

splitting, and electron importance ?EI?. A simplified and con-

cise description of these four VR techniques follows.

BCSE: The idea behind BCSE is to increase the frequency

of bremsstrahlung interactions by artificially increasing the

bremsstrahlung cross section by a given factor fBCSE. The

correct number of bremsstrahlung photons is recovered by

decreasing the photon weights by fBCSE. The correct energy

loss experienced by the electron due to radiative processes is

obtained by only deducting the bremsstrahlung photon en-

ergy in one out of fBCSEevents on average. VMC++ uses an

energy dependent enhancement factor fBCSE=1+?E4with ?

as a free parameter to be adjusted for optimum efficiency and

E as the electron kinetic energy. This form is motivated by

the fact that higher energy electrons are more likely to emit

photons toward the field of interest and therefore it is better

to sample their bremsstrahlung interactions more frequently.

Note that a BCSE implementation in BEAMnrc using a con-

stant enhancement factor has been recently reported by Ali

and Rogers.23

DRS and rotational splitting: DRS and rotational splitting

are closely related and work together, however, one can trick

the code to turn these parts on and off independently. DRS

combined with rotational splitting is an extension of the di-

rectional bremsstrahlung splitting ?DBS? technique found in

BEAMnrc.12The scoring plane is divided into a given num-

ber of rings between radii Riand Ri+1. As in DBS, all radia-

tive interactions ?bremsstrahlung, annihilation, characteristic

x-ray production? are split n?times. The treatment of pho-

tons not aimed at the field of interest, as well as interactions

not occurring within the cylindrically symmetric part of the

treatment head, is similar to DBS. However, in interactions

within the cylindrically symmetric part of the treatment head

?i.e., above the jaws in this investigation?, the projected po-

sition at the scoring plane of each photon is computed and

the ring i in which this position falls is determined. If i?2,

the photon is subjected to Russian Roulette with a surviving

probability of 1/i. The weight of surviving photons is in-

creased by i and when such photons cross the plane where

the cylindrical symmetry ends, they are split i times, rotating

the jth copy ?j=1,...,i−1? by an angle of 2?j/i. If R, Ri

?R?Ri+1, denotes the distance from the central axis of a

photon reaching the scoring plane, the approach outlined

above causes two rotated copies of a surviving photon to

reachthescoringplane

=R?2?1−cos?2?/i?? from each other. Thus, the condition

d??, with ? a free parameter to be determined for optimum

efficiency, determines the radii Riof the scoring plane rings.

Having a minimum distance between two rotated copies is

needed to guarantee that they do not start their transport in

the same voxel or end up being in the same scoring zone

when determining photon fluence. The result of DRS com-

bined with rotational splitting is that much fewer photons

need to be transported in the upper portion of the treatment

head to obtain the same number of photons reaching the

jaws. It is worth noting that this technique is only advanta-

geous when using the treatment head simulation for a phan-

atadistance of

d

TABLE I. List of relevant transport and variance reduction parameters used in

VMC++.

Head transport

Delta particle production threshold, ae

Bremsstrahlung production threshold, ap

Maximum energy loss/step

Maximum electron step, smax

Spin effects

Photon cross sections

Bremsstrahlung cross sections

0.25 MeV

0.01 MeV

0.25 MeV

8 cm

On ?2?

XCOM

Bethe–Heitler

Variance reduction

Radiative splitting number

Electron splitting number

Rotational parameter, ?

BCSE parameter, ? ?6 MV?

BCSE parameter, ? ?18 MV?

Electron importances, EI

4096–16 384

128–256

0.6 cm

3.5?10−3MeV−4

6.2?10−5MeV−4

2nn=0,1,...,9

TABLE II. List of transport and variance reduction parameters used in

BEAMnrc.

Head transport

Cutoff for electron transport, ECUT

Electron production threshold, AE

Cutoff for photon transport, PCUT

Photon production threshold, AP

Electron-step algorithm

Maximum fractional energy loss/step, ESTEPE

Maximum first elastic moment/step, XIMAX

Boundary crossing algorithm

Skin-depth for boundary crossing

Pair angular sampling

Photon cross sections

Bound Compton scattering

Rayleigh scattering

Atomic relaxations

Photoelectron angular sampling

Bremsstrahlung cross sections

Bremsstrahlung angular sampling

Spin effects

0.761 MeV

0.761 MeV

0.010 MeV

0.010 MeV

PRESTA–II

0.25

0.5 cm

EXACT

3 mfp

Simple

XCOM

Off

Off

Off

Off

Bethe–Heitler

Simple

On

Variance reduction

Directional bremsstrahlung splitting

Electron splitting

Bremsstrahlung splitting number

Range rejection ON, ESAVE

On

On

400–1000

1 MeV ?target?

2 MeV ?elsewhere?

1523

Hasenbalg et al.: VMC++ versus BEAMnrc: Comparison of simulated accelerator heads1523

Medical Physics, Vol. 35, No. 4, April 2008

Page 4

tom dose calculation or for computing photon fluences in a

nonrotationally symmetricarrangement.

VMC++ must be “tricked” into not using the technique when

performing comparisons of phase space files after the target,

after the primary collimator, or after the flattening filter.

EI: As in DBS, the simulation methodology outlined

above results in a poor statistics for contaminant electrons.

This problem is solved in DBS by introducing a Russian

Roulette ?RR? plane and a splitting plane so that electrons

created in photon interactions below the RR plane are not

subjected to Russian Roulette, and electrons surviving the

RR game above the RR plane are split when they cross the

splitting plane.12Although this approach improves the con-

taminant electron statistics, it leads to a significant loss of

efficiency for the photons compared to a simulation without

electron splitting ?typically a factor of 3−4?.12Thus, in VMC

++ a better approach is pursued: every region of the treat-

ment head is assigned an “electron importance” ?EI?. Unless

the EI of a region is equal or greater than the splitting num-

ber n?, electrons created in photon interactions are subjected

to RR with survival probability EI/n?. When EI?n??typi-

cally only in the air region below the jaws?, then the photon

interaction is split EI/n?times. Electrons moving from a

region with EI=I1to a region with EI=I2are split I2/I1

Thisis why

times, if I2?I1, or are subjected to RR with survival prob-

ability I2/I1, if I2?I1. Ideally, EIs should be set to be pro-

portional to the fraction of electrons originating from the

given region reaching the scoring plane. VMC++ does not

have the capability to do this automatically, so the user is

responsible for setting EIs on a region-by-region basis so that

an optimum efficiency is achieved. In general, EIs should

increase when moving down the beam axis, with the lower

edge of the flattening filter, the inner faces of the photon jaws

and the air column below the filter having the highest impor-

tances within the treatment head. Notice that the DBS ap-

proach implemented in BEAMnrc is a special case of the

VMC++ technique and can be obtained in VMC++ by setting

EIs to unity everywhere above the DBS RR plane and to n?

everywhere below the RR plane. It is also worth mentioning

that when a good choice for the EIs has been found, a

VMC++ linac simulation with electron splitting and therefore

good statistics for contaminant electrons is only marginally

slower ??10% for a 10?10 cm2field and less for larger

fields? than a VMC++ simulation without electron splitting.

In the rest of this work, the use of the term variance

reduction methods will refer specifically to this set of four

VR techniques.

0.0e+00

1.0e-05

2.0e-05

3.0e-05

4.0e-05

5.0e-05

6.0e-05

7.0e-05

8.0e-05

05 10 1520 25 30

Energy fluence/inc. part. (MeV/cm2)

r (cm)

target

prim.

collim.

flat filt.

no VR

with VR

0.0e+00

2.0e-04

4.0e-04

6.0e-04

8.0e-04

1.0e-03

1.2e-03

1.4e-03

1.6e-03

0510 15 2025 30

Energy fluence/inc. part. (MeV/cm2)

r (cm)

target

prim.

collim.

flat filt.

no VR

with VR

FIG. 1. Energy fluences of all particles for the different VMC++ head simulations with ?with VR? and without ?no VR? variance reduction techniques switched

on. 6 MV ?left? and 18 MV ?right? energy fluences scored at SSD=100 cm in radial bins from the calculated VMC++ phase space files.

0.9

1.0

1.1

1.2

1.3

1.4

1.5

1.6

1.7

05 10152025 30

Mean energy (MeV)

r (cm)

target

prim. collimator

flat filt.

no VR

with VR

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

0510152025 30

Mean energy (MeV)

r (cm)

target

prim. collimator

flat filt.

no VR

with VR

FIG. 2. Mean energy of all particles for the different VMC++ head simulations with ?with VR? and without ?no VR? variance reduction techniques switched on.

6 MV ?left? and 18 MV ?right? mean energies scored at SSD=100 cm in radial bins from the calculated VMC++ phase space files.

1524

Hasenbalg et al.: VMC++ versus BEAMnrc: Comparison of simulated accelerator heads1524

Medical Physics, Vol. 35, No. 4, April 2008

Page 5

II.B. Simulations with BEAMnrc

We used the 2007 release of BEAMnrc which is based on

EGSnrcMP V4-2.2.5.22The set of transport parameters uti-

lized in the simulations is given in Table II and were chosen

to give a set of phase space files equivalent to that of VMC++.

VMC++ does not calculate Rayleigh scattering, nor atomic

relaxations, and the head simulation part of the code uses the

Bethe–Heitler formulae to compute bremsstrahlung cross

sections. Since VMC++ uses the more recent XCOM photon

cross section tabulations for photoabsorption and pair/triplet

production total cross sections, we also used the XCOM op-

tion in BEAMnrc. As suggested in Ref. 24 we used range

rejection with a value of ESAVE of 1 MeV ?in the target? for

all beams and a value of 2 MeV in the rest of the linac. The

most critical parameter, when comparing absolute values of

depth dose curves obtained with both codes, turned out to be

the bremsstrahlung angular sampling algorithm. In BEAM-

nrc, setting the bremsstrahlung angular sampling to KM im-

plies that Eq. 2BS from Ref. 25 with slight modifications is

used.22Since in VMC++ this is not available for the fast head

simulation, we set this parameter to SIMPLE in BEAMnrc

which corresponds to what is implemented in VMC++. Note

that Eq. 2BS from Ref. 25 is based on an extreme relativistic

approximation and therefore its superiority over SIMPLE in

the radiotherapy energy range is not clear from a theoretical

point of view. In addition, the difference between the photon

angular distributions resulting from the use of the KM and

SIMPLE options is smaller than the uncertainty of experimen-

tal data available for this energy range. The use of the SIMPLE

option in both codes is therefore not a limitation of this

study.

Since we consider BEAMnrc as our “base line,” the fig-

ures presented in the results section show VMC++ with VR

compared to BEAMnrc without DBS, except for those simu-

lations including the jaws, where no DBS would have made

the computation times extremely long and except for the

efficiency comparison presented in the results. Due to the

considerable reduction in CPU time, range rejection was

used in all our BEAMnrc calculations.

III. RESULTS

III.A. Variance reduction checks

VMC++ simulations were done with and without VR tech-

niques just to check the proper functioning of the algorithms.

Phase space files for the different head components for 6 and

18 MV, were generated with the VR methods ?with VR?:

BCSE, DRS, rotational splitting, and EI switched on. The

0.0e+00

1.0e-05

2.0e-05

3.0e-05

4.0e-05

5.0e-05

6.0e-05

7.0e-05

8.0e-05

05 10 15202530

Energy fluence/inc. part. (MeV/cm2)

r (cm)

target

prim.

collim.

flat filt.

BEAMnrc

VMC++

0.0e+00

2.0e-04

4.0e-04

6.0e-04

8.0e-04

1.0e-03

1.2e-03

1.4e-03

1.6e-03

0510 152025 30

Energy fluence/inc. part. (MeV/cm2)

r (cm)

target

prim.

collim.

flat filt.

BEAMnrc

VMC++

FIG. 3. Energy fluences of all particles for the different head simulations. 6 MV ?left? and 18 MV ?right? energy fluences scored at SSD=100 cm in radial bins

from the calculated BEAMnrc and VMC++ ?with VR methods on? phase space files.

0.9

1.0

1.1

1.2

1.3

1.4

1.5

1.6

1.7

05101520 2530

Mean energy (MeV)

r (cm)

target

prim. collimator

flat filt.

BEAMNnrc

VMC++

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

05 10152025 30

Mean Energy (MeV)

r (cm)

target

prim. collimator

flat filt.

BEAMNnrc

VMC++

FIG. 4. Mean energy of all particles for the different head simulations. 6 MV ?left? and 18 MV ?right? mean energies scored at SSD=100 cm in radial bins

from the calculated BEAMnrc and VMC++ ?with VR methods on? phase space files.

1525

Hasenbalg et al.: VMC++ versus BEAMnrc: Comparison of simulated accelerator heads1525

Medical Physics, Vol. 35, No. 4, April 2008