Roy and Niels

Roy and Niels

Monday, March 21, 2011

The "ideal" Monte Carlo user interface

If you have read many of our posts, you probably know that radiation Monte Carlo software plays a large role in both Niels' and my research efforts. Niels wrote an insightful and entertaining overview of the available Monte Carlo engines relevant for particle therapy. I'm going to talk about one of the things that most MC users have surely thought about or at least been frustrated by: user interfaces.

I'll start by making a disclaimer. Monte Carlo for radiation / particle transport is not a simple problem. It takes many person years worth of effort to produce a codebase that gives reasonable results. This post is mostly my musings about some ideal user interface. I am the proverbial beggar who also wants to be a chooser :)

Most interaction with MC programs is performed by creating input files of some sort (in Geant4 these are called macro files and can function in largely the same way). Usually these input files allow you to set the majority of important parameters relevant to your simulation (e.g. beam parameters, target geometry, detector geometry, scoring parameters, etc). While initially cryptic (see Fluka and MCNP input files), these text input files are extremely flexible and can be generated programatically or with a GUI. The problem of course, is that your typical input file format is not very intuitive, designed to be machine parsible, rather than human friendly. And as all new MC users know, input files and their syntax are one of the major hurdles in getting up and running.

A Fluka input file.

So what would the ideal MC user interface look like? Radiation physics users of MC engines want to irradiate something and score some quantity. For medical physics users, that usually means irradiating a human or water phantom and scoring dose or fluence. To me the obvious interface for MC codes would be identical to 3D CAD (computer-aided design).

The open source FreeCAD CAD program.

A 3D CAD style interface would put you directly in the geometry of the simulation world. Build your target from simple shapes or import existing geometries (e.g. DICOM files), graphically designate your beam source, type, and direction, and set up your detector geometries. More importantly, you would be able to manage your simulation end-to-end in the interface.

It can be argued that 3D CAD is as hard or harder to learn than a given MC engine. My approach for a user interface would be to expose the minimum useful controls, making advanced options discoverable through menus and configurable with shortcuts.

The follow-up disclaimer is that 3D CAD is also not an easy problem, so we are unlikely to see this soon. In fact many of the MC programs can import geometries from CAD programs (see SimpleGeo), but I'm unaware of any that have attempted to fully integrate a CAD-style GUI as a primary user interface.

What's your ideal Monte Carlo user interface? Leave us a comment and let us know.

Monday, March 14, 2011

How to Produce Antiprotons

Both Roy and I work on the AD-4/ACE project at CERN where we investigate antiprotons as candidate particles for use in cancer therapy. We have about one week of beam time every year where we conduct radiobiological and dosimetric experiments at the beam line in a very interdisciplinary team consisting of physicists, radiobiologists and radiation oncologists from more than 10 universities and university hospitals.

CERN is the only place in the world, where we have a antiproton beam at sufficiently *low* energy, that is, around 100 MeV which corresponds to a range of ~10 cm in water. The LHC is not involved in the production at all. In fact, for antiproton production only a relatively small amount of the CERN complex is used. However, the production is still very cumbersome. First a high energy proton beam must be made. This happens at the Proton Synchrotron (PS), the old workhorse of CERN. It was inaugurated by our great Dane Niels Bohr in 1959.
The proton beam is accelerated up to 26 GeV, and then dumped into a target followed by a so-called magnetic horn.

Antiproton production target.

Basically, it is an air cooled iridium target. When the beam is dumped, two protons are converted into three protons and an antiproton. During the dump a powerful current is sent along the beam axis, which generates a magnetic field, keeping as many antiprotons as possible on axis. Immediately after the target there is a “lithium lens” (a Russian invention), which tries to capture even more of the very precious antiprotons. The created antiprotons have a very high energy of several GeV and are then captured by the Antiproton Decelerator (AD). It then takes more than 80 seconds for the beam to slow down. The deceleration is actually not the time consuming issue, but rather shaping the beam, making it small and narrow, so antiprotons are not lost during the deceleration process.
This is realized using stochastic cooling. Along with electron cooling (which was invented by G.I. Budker, and is widely applied), this will remove energy from the transverse movements of the antiprotons, thereby reducing the emittance of the beam.

Yesterday (while following Dag Rune Olsens twitter account) I learned that Simon van der Meer, inventor of stochastic cooling - and winner of the Nobel Prize, died on 4 March 2011.
From our last antiproton run at CERN I have a large amount of video material of technicians working at the AD, which also demonstrates antiproton production and stochastic cooling of the resulting beam. Check out the excerpt below:

And yes, of all those computers, only one of them was running windows. :)

At 1:49 you can see the AD hall. The antiproton decelerater is under that ring of concrete. Those large coils at the far end, which can be seen at 1:54, are delay coax cables which “short circuit” the AD ring across the middle.
At 2:00 you see the bullseye of the production target and at 2:20 the 26 GeV proton beam hits the target as the antiprotons are made. These are slowed down, and the oscilloscope shows how emittance is reduced by stochastic cooling. The beam is then stepwise ramped down to 126 MeV, and cooled in between those steps. Finally the 126 MeV antiproton beam is extracted.
(I plan to produce more videos about the AD-4/ACE experiments, but currently kdenlive crashes frequently and corrupts my project files. It took me almost one entire day to edit those 4 min of video.)

Here is another video which shows the construction of the antiproton production target and the collector. The white cylindrical object behind the target is the lithium lens.

This is one of the “hottest” sites at CERN. Things are designed to require minimal human intervention. Here is a very old video of how a faulty magnet had to replaced near the production target. People have to plan each step in advance before they enter the zone.