An Implementation To Read and Write IAEA Phase Space Files in GEANT4 Based Simulations

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

International Journal of Radiation Biology

ISSN: 0955-3002 (Print) 1362-3095 (Online) Journal homepage: https://www.tandfonline.com/loi/irab20

An implementation to read and write IAEA phase-


space files in GEANT4-based simulations

Miguel Antonio Cortés-Giraldo, José Manuel Quesada, María Isabel Gallardo


& Roberto Capote

To cite this article: Miguel Antonio Cortés-Giraldo, José Manuel Quesada, María Isabel Gallardo
& Roberto Capote (2012) An implementation to read and write IAEA phase-space files in
GEANT4-based simulations, International Journal of Radiation Biology, 88:1-2, 200-208, DOI:
10.3109/09553002.2011.627977

To link to this article: https://doi.org/10.3109/09553002.2011.627977

Published online: 18 Nov 2011.

Submit your article to this journal

Article views: 369

View related articles

Citing articles: 7 View citing articles

Full Terms & Conditions of access and use can be found at


https://www.tandfonline.com/action/journalInformation?journalCode=irab20
International Journal of Radiation Biology, January–February 2012; 88(1–2): 200–208
© 2012 Informa UK, Ltd.
ISSN 0955-3002 print / ISSN 1362-3095 online
DOI: 10.3109/09553002.2011.627977

An implementation to read and write IAEA phase-space files


in GEANT4-based simulations
Miguel Antonio Cortés-Giraldo1, José Manuel Quesada1, María Isabel Gallardo1 & Roberto Capote2
1Department of Atomic, Molecular and Nuclear Physics, University of Seville, Seville, Spain and 2NAPC – Nuclear Data Section,

International Atomic Energy Agency, Vienna, Austria

Abstract therapy units, in most of the calculations some parts of the


Purpose: To develop a stand-alone code to make any linac treatment head are repeated (e.g., target, primary col-
application coded with the GEANT4 (GEometry ANd Tracking, limator and flattening filter). For this reason, along with
version 4) toolkit capable of reading and writing phase-space the need of saving CPU (Central Processing Unit) time, the
(phsp) files in the format created by the IAEA (International capability of using phase-space (phsp) files obtained and
Atomic Energy Agency), so that the exchange of phsp files validated previously is extremely useful. A phsp file is a col-
between other validated Monte Carlo (MC) codes and GEANT4 lection of data specifying the particle position, direction,
is possible. Methods: We present a stand-alone code, written energy, type and extra variables for each particle crossing a
in C object-oriented language, developed in a way that plane defined as phase-space plane (or scoring plane). Its
ensures the compatibility with future versions of the IAEA phsp use as a primary generator in a simulation avoids the need
format. The aim of the reader part is to get the information of a detailed description of machine geometry and materials,
from a given IAEA phsp file and create the primary particles which are often a commercial secret and are seldom shared
in a GEANT4 user application. On the other hand, the writer with users. The availability of phsp data also allows an easy
part of the code is the responsible for writing the IAEA phsp use of different beam qualities in dosimetry studies, such as
files during a run of the GEANT4 application. Results: A testing detector characterisation or development of dose protocols.
simulation was written with GEANT4 to verify the performance The International Atomic Energy Agency (IAEA) has pro-
of this code, with satisfactory results. An example of use in moted a project aimed to build a database to disseminate
a GEANT4 application which simulates the treatment head representative phsp files of linear accelerators and Co-60
of a radiotherapy linear electron accelerator (linac) is also units used in external radiotherapy by compiling existing
shown, comparing dose calculations with experimental data. data that have been properly validated (see the IAEA phsp
Conclusions: This stand-alone package, which can be used in project web site at http://www-nds.iaea.org/phsp). The IAEA
any GEANT4 application, allows the exchange of validated phsp phsp format has been designed and agreed by an interna-
files between different MC codes and the use of phsp data from tional expert committee for its use in medical applications
many different accelerators and fields in dosimetry studies. (Capote et al. 2006). Such a format has been implemented in
Furthermore, it also offers additional utilities of interest in recent releases of general purpose MC codes like BEAMnrc/
medical applications. EGSnrc (‘EGS’ stands for ‘Electron Gamma Shower’ and ‘nrc’
stands for ‘National Research Council of Canada’; ‘BEAMnrc’
Keywords: GEANT4, phase-space file, IAEA phsp format,
is just the name of a user code of EGSnrc) (Rogers et al. 1995,
radiotherapy
Kawrakow 2000, Kawrakow et al. 2009) and PENELOPE (PEN-
etration and Energy LOss of Positrons and Electrons) (Salvat
et al. 2008), which are considered the state-of-the-art for
Introduction
the coupled electron-photon transport in medical applica-
The use of Monte Carlo (MC) techniques has become a stan- tions. The work described here is the implementation of two
dard tool in recent years for the computer simulation of the classes, written in C object-oriented language, to read
clinical components of linear accelerators (linacs), notably and write IAEA phsp files in GEANT4 (GEometry ANd Track-
beam generation and collimation, and for the study of the ing, version 4) (Agostinelli et al. 2003, Allison et al. 2006) user
interaction of radiation beams with patients and dosimetric applications. In object-oriented programming, a class is an
materials (Rogers 2006). The improvement of the accuracy of expanded concept of a data structure which, instead of hold-
radiotherapy treatment plannings requires a well characterised ing only data, holds both data and functions, usually known
radiation source. As there is a limited number of commercial as methods.

Correspondence: Miguel Antonio Cortés-Giraldo, Dep. Física Atómica, Molecular y Nuclear, University of Sevilla, PO Box 1065, Sevilla 41080, Spain.
Tel:  34 954550928. Fax:  34 954554445. E-mail: [email protected]
(Received 30 March 2011; revised 17 September 2011; accepted 23 September 2011)
200
IAEA phase-space files in GEANT4 201

The GEANT4 toolkit is a MC code for the simulation of simulation and with a GEANT4 application which simulates
the passage of particles through matter. Although GEANT4 the treatment head of a real radiotherapy linac. Finally, the
was originally created for applications in high-energy phys- conclusions are drawn in the fourth section.
ics, it has been used in many other fields nowadays, namely
nuclear physics, medical and space applications. The
IAEA phsp classes for GEANT4
GEANT4 validation for electromagnetic and medical appli-
cations has been undertaken by several groups (Larsson A design scheme of the IAEA phsp implementation for
et al. 2005, Poon and Verhaegen 2005, Faddegon et al. 2008a, GEANT4, following the UML (Unified Modelling Language)
2008b, 2009, Cirrone et al. 2010, Lechner et al. 2010); further- notation, is shown in Figure 1. The public functions of the
more, the GEANT4 toolkit is being extensively used in proton IAEA classes (available at the IAEA phsp project web site),
therapy applications (Paganetti et al. 2004, 2008, Aso et al. are used directly in our classes coded for GEANT4, called
2005, Newhauser et al. 2005). Therefore, built-in capabilities G4IAEAphspReader and G4IAEAphspWriter. Since it was not
to store proton and/or secondary electron phsp files in the necessary to reimplement the IAEA functions in GEANT4, our
IAEA format are welcome, as they allow the exchange of phsp work is protected against future internal changes or upgrades
data which could be used for charged particle detector stud- of the IAEA phsp format, provided that the IAEA public func-
ies and for dosimetry in proton, electron and photon irradia- tions never change their names and/or arguments.
tions, among other applications. To use our classes in a GEANT4 user application, one
We present a code created for reading and writing IAEA needs to compile it together with our classes and the IAEA
phsp files with GEANT4. This code has been endorsed by the files. Figure 1 also shows the relationship of use between the
IAEA as a general and portable implementation. The classes user actions (UA) of the GEANT4 specific application and the
presented in this work use directly the public functions of classes described in this work. Details of such relationships
the IAEA classes (a public function can be invoked out of are given in the following subsections.
the scope of the class where it is implemented), without a Table I presents a list of the public functions defined in
reimplementation of the IAEA format in the GEANT4 classes. the IAEA phsp classes. Their descriptions can be found in the
This approach ensures the compatibility with future versions IAEA phsp source files. These functions are used in our classes
of the IAEA phsp format as long as public function calls are as follows. In the right column, an ‘R’ stands for IAEA func-
maintained. The capability to read and write IAEA phsp tions used in the reader class (G4IAEAphspReader), whereas
files was included in the GEANT4-based framework called a ‘W’ stands for IAEA functions invoked in the writer class
GAMOS (Geant4-based Architecture for Medicine-Oriented (G4IAEAphspWriter). The reader interested in further details
Simulations), which has been developed to simulate medical about the IAEA phsp format may find additional information
devices without the need of coding in C (Arce et al. 2008), at the IAEA phsp project website (http://www-nds.iaea.org/
but the classes developed to read and write IAEA phsp files phsp).
are not available as an independent package.
The next section presents a description of the classes Reading phase-space files
including instructions regarding its use in a GEANT4 appli- There are several primary particle generators available
cation. The third section shows results obtained with a test in GEANT4, being those defined in G4ParticleGun and

Figure 1. Scheme in UML notation of the main relationship between our classes (G4IAEAphspReader and G4IAEAphspWriter), classes of a GEANT4
user application and the IAEAphsp classes. G4IAEAphspReader class is derived from G4VPrimaryGenerator class of the GEANT4 toolkit (solid line
with a triangular empty arrowhead), uses methods implemented in the IAEAphsp classes and accesses an IAEA phsp file (dashed arrows); further, a
pointer to a G4IAEAphspReader object must be included among the data members of the UserPrimaryGeneratorAction class (solid line with a black
diamond on the right side and an arrowhead on the left side). G4IAEAphspWriter is used by three UA of the GEANT4 application and uses methods
of the IAEAphsp classes as well (dashed arrows). With this configuration, the GEANT4 application is able to create IAEA phsp files (solid arrow at
the bottom).
202 M. A. Cortés-Giraldo et al.

Table I. Usage of the public functions defined in the IAEA classes. number of original histories employed to get a given
IAEA function Class particle after the one stored previously in the phsp.
iaea_check_file_size_byte_order() R Thus, n_stat  0 means that both previous and current
iaea_copy_header() W particle come from the same original history (and hence
iaea_destroy_source() R/W
iaea_get_constant_variable() R are correlated). In our class, this variable is kept if it is
iaea_get_extra_numbers() R defined in the IAEA phsp file which is being read, with
iaea_get_max_particles() R the aim of book-keeping the number of original histories
iaea_get_maximum_energy() R
iaea_get_particle() R simulated.
iaea_get_total_original_particles() R · The phsp file can be divided into fragments with
iaea_get_type_extra_variables() R SetTotalParallelRuns(G4int) method, where obviously
iaea_get_used_original_particles() R
iaea_new_source() R/W G4int refers to the integer variable passed as argument,
iaea_print_header() W which sets the number of fragments. Therefore, one can
iaea_set_constant_variable() W prepare parallel runs with the same phsp file by using
iaea_set_extra_numbers() W
iaea_set_paralell() R different fragments for different runs. The particular
iaea_set_record() R fragment can be selected with SetParallelRun(G4int)
iaea_set_total_original_particles() W method.
iaea_set_type_extrafloat_variable() W
iaea_set_type_extralong_variable() W · Translations and rotations can be applied to the positions
iaea_update_header() W and momenta stored in the phsp file. Rotations can be
iaea_write_particle() W performed around the Cartesian axes of the global refer-
ence frame in any order. In addition, it is possible to define
the position of the isocentre and the vector of the rotation
G4GeneralParticleSource classes the most widely used. Both axis of the gantry and the treatment head of the medical
are derived from G4VPrimaryGenerator abstract base class linac which created the phsp file, so that rotations around
(an abstract base class contains at least one method which the isocentre can be applied in a straightforward way.
must be implemented in a derived class) and can be used in
the UserPrimaryGeneratorAction of the GEANT4 concrete In order to use an IAEA phsp as a primary generator in a
application. G4IAEAphspReader class was also derived from GEANT4 concrete application, the following requirements
G4VPrimaryGenerator with the goal of retrieving the infor- must be fulfilled in the Primary Generator class of such an
mation from an IAEA phsp file and create the corresponding application:
primary particles for the GEANT4 simulation.
1) Declare a pointer to a G4IAEAphspReader object in the
Among the utilities that G4IAEAphspReader class has, the
header file as a data member of the Primary Generator
main ones are:
class.
· To perform a statistical analysis properly, it is manda- 2) In the Primary Generator class constructor: A G4IAE-
tory to take correlations between particles into account. AphspReader object must be instantiated with the proper
To keep correlations, this class generates all the particles argument (name of the IAEA phsp file). Only one IAEA
that may be correlated in the same event of the simula- phsp file can be used for a generator.
tion. Two different types of correlations are considered: 3) In the GeneratePrimaries() method of Primary Genera-
(a) When different particles come from the same original tor class: The pointer to the G4IAEAphspReader object
history, and (b) when the same particle is reused (recy- must be used to invoke the GeneratePrimaryVertex()
cled) several times to increase statistics. In other words, method of our class.
all the particles belonging to the same original history
A reference guide for this class can be found in the user’s
are created as primaries at the same event, and each
guide of our classes (Cortés-Giraldo et al. 2009b) as well as
one is repeated (recycled) the number of times set in the
examples on the use of the G4IAEAphspReader utilities.
GEANT4 simulation. Although it has been documented
that recycling of particles should be avoided if possible
(Walters et al. 2002), recycling of particles stored in a Writing phase-space files
phsp file is often used in Monte Carlo simulations. The The writing of IAEA phsp files is managed by G4IAEAphsp-
number of times that each particle is recycled can be set Writer class, which can create several IAEA phsp files during
by means of SetTimesRecycled(G4int n) method, where the same run. It has been designed following a singleton class
n indicates that each particle will be used (n  1) times. pattern, since the same object of this class must be used in
Furthermore, in cases for which the phsp presents sym- three different UA of the GEANT4 application. The single-
metry around the central axis, it is possible to perform ton is accessed with a static method called GetInstance().
recycling taking into account such symmetry by random- In software engineering, a singleton is a design pattern
izing the azimuthal angle. which restricts the instantiation of a class to only one object;
· The IAEA phsp format offers the possibility of defining an because of this restriction, the object must be accessed by
extra-integer variable called incremental history number means of a static method, which is a type of method that acts
(also known as n_stat), which can be used in EGSnrc at the class level instead of at the instance level, so that it can
and PENELOPE simulations. This variable indicates the be used even when no instantiations have taken place yet.
IAEA phase-space files in GEANT4 203

As it is explained in the IAEA documentation (Capote The reference guide and further explanations on how to use
et al. 2006), the phsp is written in a binary file of extension G4IAEAphspWriter class are provided in the user’s guide as
“.IAEAphsp”. For each particle crossing the phsp plane, well (Cortés-Giraldo et al. 2009b).
it stores the energy E, statistical weight w, the Cartesian
components of the position (x, y, z), the direction cosines
of the linear momentum (u, v, w) and extra variables, Results
either of integer (extraints) or floating point (extrafloats) Testing
type. To avoid particles passing multiple times through Our developed classes have been tested with phsp files
the phsp plane (multiple passers), G4IAEAphspWriter obtained from the IAEA database (see IAEA phsp project web
class stores each particle only the first time it crosses the site). It is a good test to verify that the IAEA phsp file created
phsp plane. Certain variables can be declared as constant with our code is identical to the original IAEA phsp file read
to save space in disk. This class defines z as constant and in the GEANT4 application. With this purpose, we coded a
includes the incremental history number as an integer very simple GEANT4 application. The geometry consists of
extra variable. In total, each record is allocated in 33 bytes a 1-micrometer-thick slab made of vacuum placed perpen-
with the default configuration. The requested IAEA phsp dicular with respect to the z axis at z  zphsp, where zphsp is
files are generated at the end of the run. the source-to-surface distance (SSD) recorded in the original
To write IAEA phsp files with a given GEANT4 application, IAEA phsp file; therefore, the particles read from the IAEA
G4IAEAphspWriter class must be used as indicated below: phsp file were generated exactly in the central plane of the
vacuum slab. The physics list, which is the name used in the
(1) The following three UA must be defined: “Run
GEANT4 terminology for the class where the set of physics
Action” class (derived from G4UserRunAction),
models and processes is defined, included only transport of
“Event Action” class (derived from G4UserEventAc-
particles, since our only interest was the transport of parti-
tion) and “Stepping Action” class (derived from
cles through the scoring plane. Thus, the generated particles
G4UserSteppingAction).
were transported up to the boundary of the slab (at
(2) In the “Run Action” class:
z  zphsp  0.5 mm) in one step. By means of G4IAEAphsp-
   · In BeginOfRunAction() method: The SetZStop()
Writer class, we defined a scoring plane at zscore  zphsp  0.25
method of the singleton should be called once for
mm, so that we ensured that all the particles crossed the scor-
each scoring plane, passing the z value as argument.
ing plane during their first step. The analysis of the results
Finally, the particular method of the singleton, also
obtained was realized using the data processing framework
called BeginOfRunAction(), must be used.
ROOT (see ROOT website), developed at CERN (in French,
   · In EndOfRunAction() method: The EndOfRunAc-
Centre Européen pour la Recherche Nucléaire, Geneva,
tion() method of the singleton must be invoked.
Switzerland).
(3) In the BeginOfEventAction() method of the “Event This testing application was run for two phsp files, avail-
Action” class, the BeginOfEventAction() method of able in the IAEA database, corresponding to a 3  3 cm2 and
G4IAEAphspWriter singleton must be used. a 10  10 cm2 radiation field, respectively. Both were gener-
(4) Similarly, in the UserSteppingAction() method of the ated by a BEAMnrc/EGSnrc application which simulates the
“Stepping Action” class, the UserSteppingAction() treatment head of a PRIMUS linac (Siemens AG, Munich,
method of G4IAEAphspWriter singleton must be Germany) working at the 6-megavolt (MV) photon mode.
invoked. The phsp plane was placed at SSD  95 cm and directional

Figure 2. Histograms of particle weights obtained with a phsp file stored in the IAEA database (code PHSP 109) which characterises a 3  3 cm2
field at SSD  95 cm. Histograms of the original and output file are plotted in black and grey, respectively, but they are not distinguishable since, as
expected, they exactly overlap. The histogram values are normalised to the number of original histories stored in the file. The statistical uncertainty
associated to each bin is represented with error bars. Left: Energy distribution of photons with radial coordinate, r, lower than 1 cm; bin values
are calculated in units of megaelectronvolt. Centre: Distribution of photons according to the x coordinate; each bin represents the integral of
the fluence from y  25 mm to y  5 mm; values are presented in units of centimetre. Right: Radial coordinate histogram; the value of each bin
corresponds to the integral of the fluence from the lower to the upper limit for all values of the azimuthal angle; the histogram values are presented
in units of centimetre.
204 M. A. Cortés-Giraldo et al.

Figure 3. Histograms of particle weights obtained with a phsp file stored in the IAEA database (code PHSP 100) which characterises a 10  10 cm2
field at SSD  95 cm. Histograms of the original and output file are plotted in black and grey, respectively, but they are not distinguishable since, as
expected, they exactly overlap. The histogram values are normalised to the number of original histories stored in the file. The statistical uncertainty
associated to each bin is represented with error bars. Left: Energy distribution of photons with radial coordinate, r, lower than 1 cm; bin values
are calculated in units of megaelectronvolt. Centre: Distribution of photons according to the x coordinate; each bin represents the integral of
the fluence from y  25 mm to y  5 mm; values are presented in units of centimetre. Right: Radial coordinate histogram; the value of each bin
corresponds to the integral of the fluence from the lower to the upper limit for all values of the azimuthal angle; the histogram values are presented
in units of centimetre.

bremsstrahlung splitting (DBS) was applied. DBS is a vari-


ance reduction technique which splits each photon created
by bremsstrahlung and pointing to a previously defined
region of interest into a certain number of photons, Nsplit,
of statistical weight 1/Nsplit. In this case, the region of inter-
est (splitting field) was a circle placed at the isocentre plane
(SSD  100 cm) and centred at the intersection point with
the central axis. For the 3  3 cm2 radiation field the splitting
radius was 4 cm and for the 10  10 cm2 field the splitting
radius was 8 cm.
Figure 2 shows three spectra characterizing the photon
fluence of the 3  3 cm2 field, obtained for both the phsp
file available at the IAEA database and the phsp file created
with our testing application. In these plots, the direction of
the beam is oriented along the z axis. The left plot represents
the energy distribution of photons crossing the scoring plane
within r  1 cm, being r  (x2  y2)1/2 the radial coordinate
(distance to the central axis). The central plot represents
the distribution in the x coordinate integrated from y 5
mm to y  5 mm (X profile). Both plots look exactly as
expected. The right plot shows the distribution in the radial
coordinate, where the value of each bin is given by the flu-
ence integrated from its lower limit (rlow) to its upper limit
(rhigh) for all values of the azimuthal angle. It can be observed
that the bins corresponding to r  4 cm present larger statis-
tical uncertainties. This effect occurs because DBS was not
applied for these photons during the simulation (they are out
Figure 4. Geometry model of the Siemens PRIMUS linac treatment
head, 6-MV photon mode, installed at the Virgen Macarena Hospital of the splitting field); thus their statistical weights are much
(Seville, Spain). It is composed by the following component modules higher compared to those photons crossing with r  4 cm;
(from top to bottom): tungsten target (gray), primary collimator consequently the statistical uncertainty of the bins out of the
(orange-brown), flattening filter (white cone), monitor chamber
(purple), tilted mirror (yellow), jaws (orange) and multi-leaf collimator splitting field increases. These photons with larger weights
(orange). Each component module is placed within a mother box are usually referred as fat photons. The number of particles
(white lines) to achieve a good hierarchy in the geometry model. The stored was the same for both the original and the IAEA phsp
electron beam enters from the upper side. The trajectories of gammas
recorded in a phsp file defined by a scoring plane placed perpendicular file created with our testing application (3,109,575), as well
to the central axis below the flattening filter (SSD  9.97 cm) are also as all the statistical information (concerning total weight,
shown (green lines); a total of 100 original histories are plotted. This energy and other variables) included in their corresponding
figure is reproduced in colour in the online version of International
Journal of Radiation Biology. IAEA header files.
IAEA phase-space files in GEANT4 205

Figure 5. PDD curve obtained in water for a 10  10 cm2 field (SSD  100 cm). The dose normalised to the maximum value is plotted as a function of
the depth, d, in water. The experimental values are depicted with a solid black line; dotted lines show the 2% level of the experimental values of dose.
GEANT4 calculations are represented with grey empty circles; error bars show the 1σ level of the statistical uncertainties of the MC calculations.

Figure 3 shows the same histograms as in Figure 2 for the (39,641,628) and was confirmed to be identical to the origi-
simulation of a 10  10 cm2 radiation field at SSD  95 cm. nal phsp file as well.
The energy distribution and the X profile look as expected. In
this case, the radius of the splitting field (8 cm) explains the Implementation in a GEANT4 radiotherapy application
appearance of bins with higher uncertainties for r  8 cm, as Our classes were implemented in a GEANT4 application devel-
it was previously discussed. The new phsp file created with oped to simulate the treatment head of a Siemens PRIMUS
the testing application stored the same number of particles linac used at the Virgen Macarena Hospital (Seville, Spain).

Figure 6. Lateral profiles (inplane direction) obtained in water for a 10  10 cm2 field (SSD  100 cm). The relative dose is plotted as a function of
the x coordinate for depths in water of 1.5 cm (blue), 5.0 cm (red), 10.0 cm (green) and 20.0 cm (orange). For each case, the experimental values are
depicted with a line (solid, dashed, dashed-dotted and dashed double-dotted, respectively); dotted lines show the  2% level of the experimental
values of dose. GEANT4 calculations are represented with empty symbols (diamonds, triangles, inverted triangles and circles, respectively); error
bars show the 1σ level of the statistical uncertainties of the MC calculations. This figure is reproduced in colour in the online version of International
Journal of Radiation Biology.
206 M. A. Cortés-Giraldo et al.

Figure 7. Lateral profiles (crossplane direction) obtained in water for a 10  10 cm2 field (SSD  100 cm). The relative dose is plotted as a function of
the y coordinate for depths in water of 1.5 cm (blue), 5.0 cm (red), 10.0 cm (green) and 20.0 cm (orange). For each case, the experimental values are
depicted with a line (solid, dashed, dashed-dotted and dashed double-dotted, respectively); dotted lines show the 2% level of the experimental
values of dose. GEANT4 calculations are represented with empty symbols (diamonds, triangles, inverted triangles and circles, respectively); error
bars show the 1σ level of the statistical uncertainties of the MC calculations. This figure is reproduced in colour in the online version of International
Journal of Radiation Biology.

The employed geometry model of the 6 MV photon mode of central axis is oriented along the z axis, the inplane direction
the linac is shown in Figure 4, where the different component (direction of movement of the jaws) along the x axis and the
modules can be distinguished; from top to bottom: tungsten crossplane direction (direction of movement of the multi-leaf
target, primary collimator, flattening filter, monitor chamber, collimator) along the y axis. The tungsten target is placed at
tilted mirror, jaws and multi-leaf collimator. In this model, the z  0 and the beam propagates towards positive values of z.

Figure 8. Lateral profiles (inplane direction) obtained in water for a 5  5 cm2 field (SSD  100 cm). The relative dose is plotted as a function of the
x coordinate for depths in water of 1.5 cm (blue), 5.0 cm (red), 10.0 cm (green) and 20.0 cm (orange). For each case, the experimental values are
depicted with a line (solid, dashed, dashed-dotted and dashed double-dotted, respectively); dotted lines show the 2% level of the experimental
values of dose. GEANT4 calculations are represented with empty symbols (diamonds, triangles, inverted triangles and circles, respectively); error
bars show the 1σ level of the statistical uncertainties of the MC calculations. This figure is reproduced in colour in the online version of International
Journal of Radiation Biology.
IAEA phase-space files in GEANT4 207

Figure 9. Lateral profiles (crossplane direction) obtained in water for a 5  5 cm2 field (SSD  100 cm). The relative dose is plotted as a function of
the y coordinate for depths in water of 1.5 cm (blue), 5.0 cm (red), 10.0 cm (green) and 20.0 cm (orange). For each case, the experimental values are
depicted with a line (solid, dashed, dashed-dotted and dashed double-dotted, respectively); dotted lines show the 2% level of the experimental
values of dose. GEANT4 calculations are represented with empty symbols (diamonds, triangles, inverted triangles and circles, respectively); error
bars show the 1σ level of the statistical uncertainties of the MC calculations. This figure is reproduced in colour in the online version of International
Journal of Radiation Biology.

Further details are described elsewhere (Cortés-Giraldo Photon Dosimetry Diode (Radiation Products Design, Inc.,
et al. 2009a). The MC simulation of the treatment head was Albertville, Minnesota, USA).
performed in three steps: Figure 5 shows the experimental PDD curve obtained
along the central axis for a 10  10 cm2 radiation field and the
(1) Simulation of the motionless part of the treatment corresponding MC calculations. The dose values were norma-
head devoted to characterise the fluence after the lised to the maximum value, obtained at a depth, d, of 1.5 cm.
flattening filter; with this purpose, we defined a phsp The statistical uncertainty of the values calculated with MC
plane at the end of it (z  9.97 cm), which stored is between 0.7% and 0.9% (1σ level). In the figure, it is clearly
4  109 original histories. observed that the relative dose calculated with our GEANT4
(2) Simulation along the remaining part of the treatment application agrees within 2% with the experimental data.
head with the aim of producing phsp files to charac- Lateral profiles along the inplane and crossplane direc-
terise the fluence at the exit of a given radiation field. tions at several depths (1.5 cm, 5.0 cm, 10.0 cm and 20.0 cm)
The phsp stored during the first step is used here as are shown in Figures 6 and 7, respectively, for the same
primary generator with our code. Another scoring radiation field. In these figures, relative dose values were
plane is defined at z  70 cm to create the phsp files calculated with the normalisation factor used for the PDD.
of the field. Each particle of the initial phsp file was The statistical uncertainty (1σ) for the MC calculations at the
recycled 5 times with rotational symmetry around the centre of the profiles is between 0.7% (d  1.5 cm) and 0.9%
central axis. (d  20.0 cm). Again, the agreement of our calculations with
(3) Finally, the phsp file created at z  70 cm is used the experimental data is within a tolerance of 2%.
to simulate the irradiation of a water tank used for Finally, Figures 8 and 9 present inplane and crossplane
dosimetry measurements. In this step, each particle profiles, respectively, obtained for a 5  5 cm2 radiation field
was recycled 25 times. at the depths indicated previously (SSD  100 cm). In this
case, the relative dose values were calculated with respect to
The upper surface of the water tank (50  50  40 cm3) was the dose value at the centre of the profiles at d  1.5 cm. The
placed on the isocentre plane (SSD  100 cm) for dose cal- statistical uncertainty of the MC calculated dose is similar to
culations. A percentage depth dose (PDD) curve and lateral the previous case, as well as the agreement achieved between
profiles along inplane and crossplane directions were cal- our GEANT4 calculations and the experimental values.
culated and compared with experimental data. In our MC
simulations, the dose was calculated using cylindrical water
Summary and conclusion
voxels with a radius of 4 mm and height of 1 mm, with its cen-
tral axis oriented parallel to the direction of measurement. A new code has been developed to make GEANT4 user
The experimental data were measured with a PTW 60008 ­applications capable of reading and writing IAEA phsp files.
208 M. A. Cortés-Giraldo et al.

The inheritance from G4VPrimaryGenerator abstract base Becker J, Brunckhorst E, Schmidt R. 2007. Photoneutron production of a
Siemens Primus linear accelerator studied by Monte Carlo methods
class and a proper use of the public functions of the IAEA
and a paired magnesium and boron coated magnesium ionization
classes guarantee the performance and portability of the code chamber system. Physics in Medicine and Biology 52:6375–6387.
presented in this work. G4IAEAphspReader class includes the Capote R, Jeraj R, Ma C-M, Rogers DWO, Sánchez-Doblado F, Sempau J,
Seuntjens J, Siebers JV. 2006. Phase-space database for external beam
possibility of applying any kind of spatial transformations,
radiotherapy. IAEA (International Atomic Energy Agency) Technical
including rotations around the isocentre. The GEANT4 user Report INDC(NDS)-0484. Available from the website: http://www-
has total freedom to define rotation axes and the isocentre nds.iaea.org/phsp/documents/indc-nds-0484.pdf.
Cirrone GAP, Cuttone G, Di Rosa F, Pandola L, Romano F, Zhang Q.
position according to the simulated geometry. Correlations
2010. Validation of the Geant4 electromagnetic photon cross-
among particles in the phsp file coming from the same origi- sections for elements and compounds. Nuclear Instruments and
nal history and correlations due to recycling are taken into Methods in Physics Research Section A 618:315–322.
Cortés-Giraldo MA, Quesada JM, Gallardo MI. 2009a. Geant4 applica-
account. This allows the GEANT4 user to make a rigorous
tion for the simulation of the head of a Siemens Primus linac. AIP
statistical analysis to obtain an accurate uncertainty estimate Conference Proceeding Series 1231:209–210.
of simulated physical quantities (e.g., dose). The IAEA phsp Cortés-Giraldo MA, Quesada JM, Gallardo MI, Capote R. 2009b. Geant4
interface to work with IAEA phase-space files. Available from: http://
file can be divided into fragments for runs in parallel CPU.
www-nds.iaea.org/phsp/Geant4/G4IAEAphsp HowTo.pdf.
The code described in this work is available online at the Faddegon BA, Asai M, Perl J, Ross C, Sempau J, Tinslay J, Salvat F.
IAEA phsp project web site and aims to help GEANT4 users 2008a. Benchmarking of Monte Carlo simulation of bremsstrahl-
ung from thick targets at radiotherapy energies. Medical Physics 35:
working in the field of dosimetry for radiotherapy. New
4308–4317.
aspects of interest and concern favour the use of GEANT4 Faddegon BA, Kawrakow I, Kubyshin Y, Perl J, Sempau J, Urban L. 2009.
applications in radiotherapy, namely the study of neutron The accuracy of EGSnrc, Geant4 and PENELOPE Monte Carlo sys-
tems for the simulation of electron scatter in external beam radio-
contamination from high energy photon beams (Becker
therapy. Physics in Medicine and Biology 54(20):6151–6163.
et al. 2005 ), as GEANT4 is capable to deal with the transport Faddegon BA, Perl J, Asai M. 2008b. Monte Carlo simulation of large
of all kind of particles through matter. electron fields. Physics in Medicine and Biology 53:1497–1510.
GAMOS project website: http://fismed.ciemat.es/GAMOS/.
IAEA phsp project website: http://www-nds.iaea.org/phsp.
Acknowledgements Kawrakow I. 2000. Accurate condensed history Monte Carlo simula-
tion of electron transport. I. EGSnrc, the new EGS4 version. Medical
The authors are grateful to F. R. Palomo, from the School of Physics 27:485–498.
Kawrakow I, Mainegra-Hing E, Rogers DWO, Tessier F, Walters BRB.
Engineering, University of Sevilla (Seville, Spain), for his kind 2009. The EGSnrc code system: Monte Carlo simulation of electron
and useful suggestions during the preparation of this article and photon transport. National Research Council of Canada Tech-
and to Dr R. Arráns, from Virgen Macarena Hospital (Seville, nical Report PIRS-701. Available from: http://www.irs.inms.nrc.ca/
inms/irs/EGSnrc/EGSnrc.html.
Spain), for providing us with the experimental data used in Larsson S, Svensson R, Gudowska I, Ivanchenko V, Brahme A. 2005.
this work. This work was supported by Junta de Andalucía Radiation transport calculations for 50 MV photon therapy beam
and the Spanish Ministerio de Ciencia e Innovación under using the Monte Carlo code GEANT4. Radiation Protection Dosim-
etry 115(1–4):503–507.
contracts P07-FQM-02894, FIS2008-04189 and FPA2008- Lechner A, Ivanchenko VN, Knobloch J. 2010. Validation of recent
04972-C03. Geant4 physics models for application in carbon ion therapy. Nuclear
Instruments and Methods in Physics Research B 268:2343–2354.
Newhauser W, Koch N, Hummel S, Ziegler M, Titt U. 2005. Monte
Declaration of interest Carlo simulations of a nozzle for the treatment of ocular tumours
with high-energy proton beams. Physics in Medicine and Biology
The authors report no conflicts of interest. The authors alone 50:5229–5249.
are responsible for the content and writing of the paper. Paganetti H, Jiang H, Lee S-Y, Kooy HM. 2004. Accurate Monte Carlo
simulations for nozzle design, commissioning and quality assurance
for a proton radiation therapy facility. Medical Physics 32:2107–2118.
References Paganetti H, Jiang H, Parodi K, Slopsema R, Engelsman M. 2008. Clini-
cal implementation of full Monte Carlo dose calculation in proton
Agostinelli S, Allison J, Amako K, Apostolakis J, Araujo H, Arce P, Asai M, beam therapy. Physics in Medicine and Biology 53:4825–4853.
Axen D, Banerjee S, Barrand G, Behner F, Bellagamba L, Boudreau J, Poon E, Verhaegen F. 2005. Accuracy of the photon and electron
Broglia L, Brunengo A et al. (Geant4 Collaboration). 2003. GEANT4– physics in GEANT4 for radiotherapy applications. Medical Physics
a simulation toolkit. Nuclear Instruments and Methods in Physics 32:1696–1711.
Research A 506:250–303. Rogers DWO. 2006. Fifty years of Monte Carlo simulations for medical
Allison J, Amako K, Apostolakis J, Araujo H, Arce Dubois P, Asai M, physics. Physics in Medicine and Biology 51:R287–301.
Barrand G, Capra R, Chauvie S, Chytracek R, Cirrone GAP, Rogers DWO, Faddegon BA, Ding GX, Ma C-M, We J, Mackie TR. 1995.
Cooperman G, Cosmo G, Cuttone G, Daquino GG et al. (Geant4 BEAM: A Monte Carlo code to simulate radiotherapy treatment
Collaboration). 2006. Geant4 developments and applications. IEEE units. Medical Physics 22:503–524.
Transactions in Nuclear Science 53(1):270–278. ROOT data analysis framework website: http://root.cern.ch.
Arce P, Rato P, Cañadas M, Lagares JI. 2008. GAMOS: A GEANT4-based Salvat F, Fernández-Varea JM, Sempau J. 2008. PENELOPE-2008: A
easy and flexible framework for nuclear medicine applications. In: code system for Monte Carlo simulation of electron and photon
IEEE Nuclear Science Symposium Conference Record. 2008 October transport. In: Workshop Proceedings. Barcelona, 30 June to 3 July
19–25. Dresden, Germany. pp 3162–3168. 2008. Available from: http://www.nea.fr/html/science/pubs/2009/
Aso T, Kimura A, Tanaka S, Yoshida H, Kanematsu N, Sasaki T, nea6416-penelope.pdf.
Akagi T. 2005. Verification of the dose distribution with GEANT4 Walters BRB, Kawrakow I, Rogers DWO. 2002. History by history
simulation for proton therapy. IEEE Transactions on Nuclear statistical estimators in the BEAM code system. Medical Physics
Science 52(4):896–901. 29:2745–2752.

You might also like