Plotting the Bragg curve after numerically integrating the Bethe-Bloch formula

PHYS291 Project Lars Sandnes

Project description
The goal of this project was to create a program that numerically integrates the Bethe-Bloch formula, and then plots the result as a function of depth in a desired material. The resulting curve, called the Bragg curve, shows how a charged particle loses energy when it moves through a material. The Bragg curve is of particular interest in medical physics, specifically in radiotherapy.

Theory
A high-energy charged particle moving through a material will lose some of its energy. The amount of energy deposited in the material (often called stopping power) depends on the type of charged particle, its energy and the material through which it moves. The stopping power can be found by solving the Bethe-Bloch formula:

Where:

where M is the mass of the charged particle.

There are several corrections one can make to the Bethe-Bloch formula, such as density- and shell-corrections. However, the errors introduced by such corrections are considered negligible compared with the errors already present in radiotherapy, and they have therefore been ignored in this project.

The Bethe-Bloch formula as stated above has units of [MeV/cm], and is a function of energy (expressed through the charged particle's velocity). However, the Bragg curve gives the stopping power as a function of the particle's depth in the material. In this project the desired curve was obtained by numerically integrating the Bethe-Bloch formula.

From the Bethe-Bloch formula it is clear that the energy lost by a charged particle is inversely proportional to the square of its velocity, which means that the stopping power increases with decreasing energy. This leads to a characteristic peak of maximum energy deposition, called the Bragg peak, which occurs right before the particle comes to a stop. Beyond this point little to no energy is deposited, something that is of great use in radiotherapy.

The Bragg curve typically does not drop off right away because the energy loss of a beam of charged particles is a statistical process. Bethe-Bloch eventually breaks down as energy is lost through other processes, such as multiple scattering, and the Bragg curve typically has a small tail. In this project these statistical processes haven't been considered, which is why the produced curves drop off immediately, and no such tail is present.

Program description
The program consists of a single file, called braggCurve.cpp, which contains the necessary methods and variables for producing a Bragg curve. It can be found here. The program is run by entering "root braggCurve.cpp" into the terminal (provided one is in the correct folder). braggCurve.cpp consists of the following methods:

• braggCurve(): This method creates the GUI, which consists of a canvas divided into two pads - one for the menu, and one for the graph itself. The menu-pad consists of buttons used for changing the graph/quitting the program.
• updateEnergy(), updateMaterial(), updateParticle(): these methods are connected to certain buttons, and will update the current values for energy, absorbing material or particle, respectively.
• drawGraph(): This method takes the information stored about the current particle, material and energy, and uses it to numerically integrate the Bethe-Bloch equation, before plotting the result, which is the Bragg curve.
• getTMax(), getBeta(): These methods are used by the drawGraph()-method to obtain values needed for calculating Bethe-Bloch.
• noNullValues() and various global variables: The variables hold information about the current particle, material and energy, and the noNullValues()-method makes sure none of these variables are null.

The data needed for the different particles and materials were obtained from the Particle Data Group (pdg.gov.lbl).

Results
Below are two examples of the Bragg curves the program produced. The first one also includes the GUI.

Conclusion and discussion
As one can see in the graphs above, the Bragg curves have their characteristic shape, and the program seems to be working well in this regard. However, the curves do not completely match reality, since the energy deposition won't actually come to a complete stop right at the peak.

As mentioned in the theory-section, the actual Bragg curve will often have a slight tail, caused by the statistical nature of the processes involved. One way to improve the program would therefore be to implement this into the code, which would result in a more precise curve.
The GUI, and the options available there, could be improved by introducing a wider range of choices. In addition, save/load buttons might be desirable.

Having worked with neither C++ nor Root previously, this project served as a great introduction for me. The language itself was more straightforward than I expected, in addition to being fast and flexible. Root is great for displaying data, as well as for setting up a simple GUI. I can see myself using it again in the future.

References