4.7. Inspecting the Results
Table of Contents
Statistics
Once your first GATE simulation finishes, the very first thing to look at is the statistics that GATE prints in the terminal. This is a quick way to check whether the simulation actually did what you intended.
For a basic OpenGATE Python simulation, the terminal output usually includes how many events were simulated and how many tracks and steps were processed. In simple terms, an event is one history of a primary particle, for example one gamma emitted from your source. A track is the complete path of one particle through the geometry, including secondary particles created by interactions. A step is one segment of a track between two interaction points or boundaries. For beginners, you do not need to interpret every detail, but you should know that more events and more tracks typically mean better statistics but longer simulation time.
Near the end of the run, GATE usually prints a short statistics report. This may include the total number of events requested, the number of events actually processed, and sometimes counts of specific particle types if relevant for your configuration. You should check that the number of processed events matches what you set in your simulation configuration, for example the number of primaries. If you see that very few events were processed or zero events, this is an indication that the source or physics or geometry may be misconfigured, or that the simulation stopped early.
In many simulations, at least one statistics actor is added explicitly. A statistics actor collects information such as the number of events, the number of tracks, and sometimes step counts or run time and writes this to a file at the end of the run. If you used such an actor in your first simulation, its output gives you a structured summary instead of only relying on the terminal. In later chapters, actors will be described in detail, but for now it is enough to know that you can open the statistics file, for example a text or CSV file, and confirm that the numbers look reasonable for the problem size you intended.
It is also helpful to compare the requested and completed number of events with your expectations about run time. If a very small number of events takes a long time, this could be an early hint that your geometry or physics settings are unnecessarily complex for a first test. At this stage you do not need to optimize, but you should begin to develop the habit of relating statistics, run time, and configuration.
Output files
In your first GATE simulation, the main results are usually written to files in an output directory that you specified in the Python script. Typical outputs for a simple example include text or ROOT files from actors, and sometimes image files if you used dose or energy deposition actors with voxel grids. The exact formats will be discussed in later chapters, but here the goal is to learn how to locate and inspect them at a basic level.
Most OpenGATE examples set an output folder in the simulation configuration. After the run, you should check that this folder exists and that files were created inside. Common file extensions you might see are .root for ROOT files, .csv or .txt for text-based outputs, and sometimes .mhd or .nii for image-like data. For your first run, simply listing the contents of the output directory and confirming that the expected files are present is already an important verification step.
If you used a statistics actor, look for its associated file and open it with a simple text editor or a spreadsheet tool. You should see at least the number of events or other counters. GATE does not require you to understand ROOT or specialized image formats at this stage, but you can still confirm that ROOT files and other outputs are non-empty by checking their file sizes. A file with size zero bytes is a sign that something went wrong, usually with actor configuration or attachment to volumes.
In many example scripts, actors are given descriptive names, and those names appear in the output file names. This is a useful convention because it allows you to recognize quickly which file corresponds to which quantity, such as hits, dose, or phase-space information. When you adapt an example, try to keep that naming clear so that, when you inspect the results, you can easily match output files to the parts of the simulation that produced them.
If your first simulation only uses the built-in statistics and no explicit actors, you may see fewer or no external output files. That is acceptable for a minimal test. In that case, the main result is the confirmation that the simulation runs without errors and that the terminal statistics look consistent. Subsequent chapters will show how to add actors and digitizers that produce more detailed output files for analysis.
Simulation summary
After running your first GATE simulation, it is helpful to build a simple mental summary of what happened from start to finish, and how the final results reflect your configuration. At a basic level, you defined a world volume, added at least one source and perhaps one actor, configured the physics implicitly or with default settings, and then asked GATE to simulate a number of events. The result is a set of statistics in the terminal and, optionally, output files that record quantities such as energy deposition or particle information.
A practical way to summarize the simulation is to connect each major configuration element to an observable result. The source definition controls how many primary particles are generated, where they start, their energies and directions. This choice directly influences the event count and the types of interactions that appear in the statistics and output. The geometry, including the world and any additional volumes, governs where tracks and energy depositions can occur. If you look at output that includes positions, you should see that events are located within the intended volumes and not outside of the defined physical space.
The physics configuration, even if you relied on defaults, determines which interaction processes are possible. In a first simulation, you usually accept the standard medical physics settings, but you should still be aware that they are responsible for creating secondary particles and for shaping the overall particle histories that the statistics count. In later chapters, when you change physics lists or production cuts, you will compare new statistics and outputs to these first results to understand their impact.
Finally, the actors you added, for example a statistics actor or an energy deposition actor, define what information is recorded. The presence or absence of their output files, and the values inside them, serve as a basic check that they were attached correctly to the intended volumes. For your first simulation, you can consider the run successful if the number of processed events matches your request, the run ends without errors, and the actor outputs or terminal statistics show non-zero, plausible values.
To close the loop, it is good practice to record, even in simple notes, which script you ran, which configuration parameters you used, and where the outputs were written. This habit will become important as your simulations become more complex and you start comparing results across different runs. At this beginner stage, being able to run a simulation, locate its results, and interpret the basic statistics is the essential outcome of your first experience with GATE.
Views: 12
KAHIBARO