KAHIBARO
Discord Login Register

20.1. Simulation Output

Statistics

Every GATE simulation produces summary statistics that describe what actually happened during the run. These numbers are essential to judge whether your outputs are usable or if you need more events or a different configuration.

At the end of a run, GATE prints basic statistics in the terminal. Typical values include the number of events simulated, the number of tracks, and sometimes the number of steps. When you use a dedicated statistics actor, you can also save this information to a file, usually in text or ROOT format, with fields such as total number of primaries, number of secondary particles, and CPU time.

Always check that the number of events used for analysis matches what you intended to simulate. If you requested a given activity and acquisition time, the corresponding number of primaries is reported in these statistics. These values let you estimate statistical uncertainty and compare different runs in a consistent way.

Key rule: Always save and inspect simulation statistics alongside your main output. Never interpret spectra, images, or dose maps without knowing how many events were simulated and how many were recorded by your actors.

For most workflows, simulation statistics are regarded as a small, lightweight output that accompanies all the other, heavier data files such as hits, singles, coincidences, and dose images.

Hits

Hits are the most direct description of how particles interacted with your geometry. A hit corresponds to an energy deposition or interaction step in a sensitive volume. When you add a hits actor to a detector or phantom, GATE records one line of data for each hit, often into a ROOT tree or another tabular format.

Each hit typically contains attributes such as deposited energy, position coordinates, time, particle type, volume or crystal identifier, and event identifier. These fields allow you to reconstruct the full history of how particles traversed your detector and where they lost energy. Because one event can produce many hits, hit files are usually much larger than the number of primary events.

Hits are the starting point for most detector modeling. Digitizers use them to build detector signals, and dose actors can be seen as a processed summary of energy deposition over space. If you plan to change detector electronics or thresholds later, keeping hit output makes it possible to rerun the digitization step without repeating the full Monte Carlo simulation.

Important: Hit output can be extremely large. Before running a long simulation, verify that the selected volumes are really needed as sensitive volumes and that the output format and compression are appropriate for your storage and analysis tools.

Singles

Singles represent detector-level events that already include a model of the detector response. They are built from hits by summing energy in a crystal or channel, applying energy and time blurring, and assigning detector identifiers. The singles output is typically much smaller and cleaner than raw hits, because many low-level interactions have been merged into one detector event.

Each single usually contains fields such as total energy in the detector element, timestamp, detector identifiers such as ring, module, and crystal ID, and sometimes additional flags from the digitizer chain. This kind of output is useful when you want to analyze detector performance directly, for example by building energy spectra, checking uniformity across crystals, or computing count rates.

Singles are also the main input for coincidence sorting in PET simulations. In that context, you keep the singles ROOT file or similar table and pass it to a coincidence sorter actor or post-processing tool, which will search for pairs of singles in time.

Key point: Singles output corresponds to what an idealized detector channel measures. If your singles do not look realistic, it usually indicates a problem in the digitizer configuration rather than in the underlying physics.

Coincidences

Coincidence data describe pairs of detector events that occurred within a defined coincidence timing window. In PET, this is the central output for image reconstruction, because each coincidence corresponds to one line of response between two detectors. Coincidences are built from the singles stream, either within GATE or in external analysis.

A coincidence entry usually contains energy for each participating detector, time stamps and their difference, detector identifiers on both sides of the pair, and sometimes information about the true relationship to the original event when you enable truth labeling. From this output you can compute coincidence spectra, time difference distributions, and image reconstruction inputs such as lines of response.

Coincidence output is typically smaller than the singles output, because most singles do not find a partner in the timing window and are discarded. For PET simulations, this reduction is one of the reasons it is common to store both singles and coincidences, so that you can compare count rates and evaluate true, scatter, and random fractions.

Important rule: The coincidence timing window used during sorting strongly affects the coincidence output. Always record this window value in your simulation metadata and keep it consistent across runs that you want to compare.

Dose

Dose output summarizes how much energy per unit mass was absorbed in different regions of your geometry. When you use a dose actor, GATE accumulates deposited energy in a voxel grid or in selected volumes and converts it to absorbed dose, typically in units of gray. This information is central for radiotherapy and internal dosimetry applications.

Many dose actors produce voxelized images as output, such as MHD or NIfTI files, which can be visualized with medical imaging software or analyzed with Python tools. These images contain the dose value in each voxel and often a corresponding uncertainty map, usually represented as the standard deviation or relative error. You can also output integral dose values for specific organs or volumes of interest, depending on your actor configuration.

Dose output is different from hits in that it is already spatially aggregated. Instead of one row per interaction, you get one value per voxel, which is convenient for quantitative analysis and comparison with treatment planning systems. Because dose values depend directly on the amount of simulated statistics, you should always interpret them together with the number of primary events or histories stored in your statistics output.

Essential formula: Absorbed dose is defined as
$$D = \frac{E_{\text{dep}}}{m}$$
where $D$ is dose in gray, $E_{\text{dep}}$ is deposited energy in joules, and $m$ is mass in kilograms.

Phase-space data

Phase-space data record the full state of particles crossing a surface or region, usually for later reuse. A phase-space actor saves position, direction, energy, particle type, and time for each particle that passes through a scoring plane or volume. This output is particularly useful when you want to split a simulation into stages, for example beam generation followed by patient or detector simulation.

A phase-space file typically resembles a hits file in structure, but it contains the state of particles rather than detector interactions. Common formats are ROOT trees or specialized phase-space formats that can be read back by GATE as a phase-space source. When you reuse such a file as a source, you bypass upstream geometry and physics, which saves time when you perform multiple studies with the same incident particle distribution.

Phase-space data are often large, because they store many attributes for each particle, and they may cover a wide range of particle types and energies. It is common to restrict recorded quantities through filters, for example by recording only photons above a given energy threshold, or only particles in a specified region that is relevant to your application.

Key practice: When you create phase-space output that you plan to reuse, always save its exact configuration along with the file. This includes the scoring plane location, applied filters, and physics list, since any change in these settings invalidates comparisons across different phase-space files.

All these output types statistics, hits, singles, coincidences, dose, and phase-space data together form the core of how GATE records simulation results. In later chapters you will learn how to choose, configure, and analyze each of them for specific medical imaging and therapy applications.

Views: 9

Comments

Please login to add a comment.

Don't have an account? Register now!