Let's face it: young people entering the field of medical physics don't know FORTRAN and are not inclined to like FORTRAN, let alone its dialects that are used in some Monte Carlo codes for medical physics. Popular Monte Carlo codes in medical physics research - such as EGS, MCNP and PENELOPE - are all written in FORTRAN. This was the situation until recently. Enter GEANT4 (GEometry ANd Tracking; S Agostinelli et al. 2003), a fully object-oriented Monte Carlo "toolkit" (as the authors prefer to call it) written entirely in C++.

GEANT4, just like the older MCNP and EGS codes, was created for purposes outside the field of medical physics. The main players in its development are in the discipline of high-energy physics, combining the efforts of more than 100 workers from facilities such as CERN in Europe, KEK in Japan and SLAC in the US (where EGS was originally developed).

Development of GEANT4 started in 1993 and resulted in a first release in 1998. It was quickly picked up by scientists in medical physics. The oldest medical physics paper we could find dates from 2002 and describes a modelling study in brachytherapy. Since then, more than 30 papers have been published on the use of GEANT4 on widely varying topics, such as modelling of PET, SPECT and CT scanners, external-beam radiotherapy with photons and light particles, and brachytherapy.

Among GEANT4's impressive list of capabilities are the easy handling of incredibly complex geometries (e.g. the high-energy physics detectors BaBar at SLAC and ATLAS at CERN); interfaces for importing computer-aided design (CAD) geometries; and a wide choice of visualization tools. Physics models are available for interactions and transport of many types of particle, ranging from the mundane photons and electrons to the more exotic kaons and pions, and many more particles with names we’re not even sure how to pronounce.

There is even a curious particle that GEANT4 can transport but that you won’t find in any other Monte Carlo code or, indeed, in any physics textbook. This is the "geantino", which is a non-interacting particle serving to verify geometry coding. GEANT4 can also transport optical photons and simulate time-dependent geometries. Its openness to the users is an example of good programming practice.

Where next?

If it's so good, is GEANT4 destined to make other Monte Carlo codes in medical physics obsolete in the near future? Not very likely. For starters, with great choice comes great responsibility. GEANT4 offers a broad selection of physics models. This makes it at the same time very powerful and flexible but also very sensitive to the "junk in, junk out" syndrome - much more so than other Monte Carlo codes. For example, it is legitimate to combine the standard model for photoelectric effect with the low-energy model for Compton scattering. Whether this is wise is left to the user to decide.

Bear in mind that in medical physics we often strive to achieve an accuracy of 1-2%, especially in dosimetry applications. In imaging or high-energy physics applications, this may be more relaxed and the user needs to be aware of the accuracy limitations of the physics models. An extensive study (E Poon and F Verhaegen 2005) published by our team revealed several serious and less-serious discrepancies in the transport algorithm for electrons and in some of the photon and electron cross-section databases. This led us to conclude that it was unwise to use the then-current version of GEANT4 for problems where electron transport is critical.

These "childhood diseases" were found not to be unlike older versions of, say, EGS4. Having said that, the GEANT4 team releases several new, improved versions every year, so it's up to the user to verify the accuracy of the latest release.

The truth is, GEANT4 is indeed very powerful, but also very complex. The learning curve is both steep and long. A superficial knowledge of C++ is insufficient to optimally use the toolkit. You shouldn't expect to be up and running in a few days; just the installation process can be tedious and lead to strings of incomprehensible errors that only experts can understand.

Equally significant, and this is why it won't replace the existing Monte Carlo codes just yet: GEANT4 simulations are painfully slow. It is acknowledged that efforts are being made to improve calculation speed by the developers, but currently it can take up to thousands of hours on your fastest computer to accurately simulate problems such as patient-dose calculations in radiotherapy.

Using GEANT4 for radiotherapy treatment planning would constitute a major step backwards in terms of simulation time compared with fast Monte Carlo codes. Further research in efficient geometry definitions and variance-reduction techniques is definitely needed.

And where then?

So if GEANT4 won't make other Monte Carlo codes in medical physics obsolete in the near future, what about in, say, 10 years? In our opinion, it's very likely that GEANT4 will become our major workhorse, but it may require one or more dedicated teams of medical physics researchers to support the development.

One example of such a team already exists with the GATE collaboration. Those familiar with medical-accelerator beam modelling and radiotherapy dose calculations will know the BEAM code. This is a user interface to the EGS code that allows one – without any programming – to build accelerator models really fast. The success story of BEAM has led to several hundreds of papers published in just one decade. The GATE collaboration is now doing the same for the use of GEANT4 in the modelling of PET and SPECT imaging.

If emission tomography is your field, the use of GEANT4 might not be so overwhelming for you: GATE stands for GEANT4 Application for Tomographic Emission and has been developed as a user-friendly interface for the application of GEANT4 in nuclear medicine. GATE works by feeding commands to the GEANT4 idle prompt through scripts, which implies that the users have only to learn the logic and semantics of the GATE scripting language and then they are good to go.

Making use of the object-oriented nature of C++ in which GEANT4 is developed, GATE consists of hundreds of classes to take care of the specific needs in PET or SPECT studies. No C++ is involved (unless you need to be so clever to create new GATE classes for your study), and the code takes care of the phantom and the scanner geometry, its visualization, the physics, timing aspects, radioactive decay and outputs. GATE is used extensively to simulate and predict scanner performance. Its first job was to support the development of the clearPET small-animal PET scanner in Lausanne, Switzerland.

How can GATE be useful for imaging research? Let's consider an example. OPET is an optical PET – a scanner able to detect both high-energy gamma rays and optical-wavelength photons – that is under investigation at the Crump Institute for Molecular Imaging at the University of California Los Angeles (UCLA). The purpose of such a system is to help in the design of new molecular-imaging probes. GATE was used to investigate the system characteristics (sensitivity, depth of interaction, spatial resolution, etc) in order to plan the camera hardware. The simulations showed that the system sensitivity was within the range of the state-of-the-art small animal scanners with a comparable spatial resolution of 2 mm.

As a feasibility study, two crystal designs were compared: flat versus curved scintillator detectors. It was proved that curved detectors were going to achieve higher focus of the optical photons when compared with the flat scintillators. In addition, GSO and LSO detectors were shown to yield no differences in performance. Rotation of the gantry was determined to be important to reduce the noise introduced by the intradetectors' gaps.

OPET is just one example of where GATE has already proved its worth. In the future, GATE will be important in image quantification for dosimetry and pharmacokinetics calculations (although several studies on image quantification have already been published). It's our take that GATE is an excellent tool to face new challenges in nuclear medicine, thanks to its ready-to-use scanner, phantom, source and data-collection modules. Furthermore, because of similarities in geometry, applications of GATE in CT imaging are not unimaginable.

In conclusion, GEANT4 is definitely a cool tool that you should look into. Maybe you or your next graduate student could be part of the further development that is needed to turn GEANT4 into the workhorse for medical physics particle simulations.

• The next GEANT4 course in North America is to be held at McGill University in Montreal, Canada, on 25-28 September 2006.