KAHIBARO
Discord Login Register

45.6. Recording Energy Deposition

Understanding Energy Deposition in the Detector

When you simulate a gamma ray detector, one of the first meaningful physical quantities you will want to record is how much energy is deposited inside the sensitive material of the detector. In this project, that material is the scintillation crystal. Recording energy deposition is the bridge between abstract particle transport and the measurable energy spectrum that a real detector would produce.

In GATE, energy deposition is not inferred indirectly. Every time a particle loses energy in the crystal, an interaction step is recorded and the lost energy can be summed. You will use this to build a per-event energy deposit that later becomes the detector energy spectrum.

Energy Deposition vs Detector Signal

It is important to distinguish between microscopic energy deposition and the macroscopic signal that a real detector would produce. At the Geant4 level, particles travel in small steps. Each step can deposit a portion of the particle’s energy into the material. These deposits are the fundamental interaction data.

For the gamma ray detector example, you are interested in the total energy deposited in the crystal for each simulated event. In a real scintillation detector, that deposited energy would be converted to optical photons and then to an electrical signal. In this introductory project, you skip the detailed optical processes and instead treat the total deposited energy per event as the ideal signal of the detector.

Energy deposition in a volume is the sum of all microscopic energy loss events that occur inside that volume during one simulated event. For this project, the detector signal is taken as the total energy deposited in the crystal per event.

Later chapters on digitizers and optical photon simulation explain how to model the detector response more realistically. Here you only need to record how much energy is deposited in the scintillator volume.

Adding an Energy Deposition Actor

In GATE, actors are tools that observe the simulation and record selected quantities. To record energy deposition in your detector, you attach an energy deposition actor to the scintillation crystal volume. This actor will collect information each time a particle deposits energy in that volume.

Conceptually, adding the actor involves several steps. First you tell the simulation that you want to create an actor of type energy deposition. Then you assign it a unique name so that you can refer to it in the Python script and identify its output files. Next you attach it to the detector volume that you created in the earlier chapter. Finally you configure the actor options such as which quantities to record, the output file name, and how often the data should be written.

An energy deposition actor can operate in different modes. In this project, you will use it to record per-event information. For each simulated primary event, the actor adds up all energy deposits in the selected volume and stores the total. This total energy per event is exactly what you will need later to build an energy spectrum.

To record detector energy for this project, attach an energy deposition actor to the scintillation crystal and configure it to store the total deposited energy per event in an output file.

Make sure that the actor is attached to the correct volume. If you accidentally attach it to the world or to an air volume, you will not obtain the desired detector spectrum.

Choosing What to Record

Energy deposition actors can record several related quantities. For a simple gamma detector, the most useful are the total energy deposited per event and, if desired, spatial information about where the energy was deposited.

For the energy spectrum that you will compute later, the only strictly necessary quantity is the total energy deposited in the crystal in each event. This can be written as a single number per event to an output file. That file might contain a list of energies like $E_1, E_2, E_3, \ldots$ in a unit such as keV or MeV. You will then build a histogram from these values.

Sometimes it is also useful to record the number of hits or steps that contributed to the total energy or the time of the deposits. Those details are not essential for the first spectrum but become useful if you later want to study interaction patterns or timing. For now, focus on the simplest configuration that gives you a clean list of deposited energies.

For the basic gamma ray detector example, configure the energy deposition actor to output a single total deposited energy value per event for the crystal volume. This list will be the basis of the energy spectrum.

Always check that the output file includes an event index or equivalent identifier, so that each energy value can be associated with one simulated event.

Units and Interpretation of Deposited Energy

GATE and Geant4 use internal base units and then allow you to specify and read values in convenient units such as keV or MeV. When recording energy deposition, you must be explicit about which unit you use both in the simulation configuration and in your later analysis.

If the energy deposition actor writes its output in MeV, then each recorded value corresponds to the total energy in MeV deposited in the detector for that event. Many gamma ray detector spectra are plotted in keV, so you might convert $E$ from MeV to keV using
$$
E_{\text{keV}} = 1000 \times E_{\text{MeV}}.
$$

You will later compare the peak position in your spectrum to the initial gamma energy that you configured in the source chapter. If you simulated monoenergetic photons of energy $E_\gamma$, a full energy peak near $E_\gamma$ in the spectrum suggests that your energy deposition recording is working correctly.

Always track the energy units used by the energy deposition actor. If the actor outputs MeV and your source energy is given in keV, convert consistently using $E_{\text{keV}} = 1000 \times E_{\text{MeV}}$ before interpreting the spectrum.

Be careful not to confuse energy deposition in a single crystal with dose. Dose involves dividing deposited energy by mass and is treated separately in dose calculation chapters.

Output Files and Basic Checks

When you run the simulation with the energy deposition actor enabled, the actor creates one or more output files. These files typically contain one line per event with at least one column for the total deposited energy in the detector. The file format depends on the actor configuration. Common formats include text-based tables or ROOT trees, which you will analyze in later chapters.

Before proceeding to spectrum creation, it is useful to perform a few basic sanity checks on the energy deposition data. Confirm that the number of entries in the output matches the number of simulated events, or at least that it is consistent with your source configuration. If you simulate, for example, $N$ primary gamma events and your geometry allows some events to miss the detector, the number of entries with nonzero energy may be less than $N$, but the total number of rows should still reflect all processed events.

You should also verify that the typical energy values are physically reasonable. For a monoenergetic gamma beam with energy $E_\gamma$, you expect many events with partial energy deposition below $E_\gamma$, and some events where the total deposited energy is close to $E_\gamma$. Values far above the source energy usually indicate unit mistakes or misconfigured actors.

After running the simulation, verify that:

  1. The output file contains one entry per simulated event or a clearly documented subset.
  2. The recorded energies are in the expected unit and do not exceed the source energy without a clear physical reason.

Once you have a reliable file of total deposited energies per event, you are ready for the next steps in the project. In the following chapter you will introduce energy resolution and see how to convert these ideal deposited energies into more realistic detector signals. After that, you will use those signals to construct and analyze the energy spectrum of your gamma ray detector.

Views: 9

Comments

Please login to add a comment.

Don't have an account? Register now!