47.7. Recording Hits
Table of Contents
Understanding Hits in a PET Scanner Simulation
In a PET simulation, hits form the essential bridge between the physics of particle interactions and the detector response modeled later by the digitizer. In this chapter you will focus on what hits represent, how they are produced in a PET geometry, and how to configure GATE actors to record them in a useful way for later singles and coincidence processing.
What Hits Represent in PET
In GATE, a hit is a record of a particle interaction inside a sensitive detector volume. For PET, the interactions you care about are usually gamma interactions in the scintillator crystals, such as photoelectric absorption or Compton scattering. Each time a particle deposits energy in one of these volumes, GATE can store information about that interaction as a hit.
Hits exist before any modeling of scintillation light, electronics, or energy resolution. They describe the true, underlying physical events that occur in the detector material. The digitizer, configured in later steps of the PET example, will take these hits and transform them into detector signals such as singles and coincidences.
You should think of hits as detailed, low-level data. At this stage they still carry information about every step in the particle history that passes through your sensitive detector geometry.
Making PET Crystals Sensitive
To record hits, the detector crystals must be declared sensitive volumes in your PET scanner geometry. This is usually done when you define or finalize the crystal volumes, so that any energy deposition inside those crystals is captured by a hit actor.
In OpenGATE, you typically assign a "sensitive detector" type or role to the crystal volumes. Once a volume is declared sensitive, GATE will monitor every step in which a particle deposits energy inside that volume. You do not yet decide how those deposits are merged or interpreted, only that they are observed and potentially written out as hits.
The key point is that the sensitivity is typically set on the smallest detector elements that you want to resolve at the hit level, normally the individual scintillator crystals in a PET ring.
Configuring a Hits Actor
To actually record the interactions in your sensitive crystals, you attach a hits actor to the corresponding volume or volumes. The hits actor collects information for every energy deposition event in the selected volumes and writes it to an output file.
In a PET simulation, you generally attach a hits actor to the crystal volume name that you used when building the scanner. The same actor can collect hits from all repeated crystals if they share the same logical volume, because each hit record will carry the identifiers that distinguish crystals and their position in the detector hierarchy.
A typical configuration step includes creating a hits actor in the Python simulation object, assigning it a name, specifying that its type is a hits actor, and attaching it to the crystal volume. You also choose an output format such as a ROOT file, since hits are usually inspected and filtered later using ROOT or Python tools.
Hit Attributes for PET
For PET applications, some hit attributes are particularly important. Each hit usually stores the deposited energy, the position of the interaction, the time of the interaction, the particle type, and identifiers that link the hit to the event and to the detector element where it occurred.
The most relevant quantities include:
Position, which lets you see where in the crystal or within the scanner ring the interaction occurred.
Deposited energy, which is the basic quantity that later contributes to the energy of a detected event in a crystal.
Time, which is essential for time of flight PET and also for coincidence sorting, because hits that are close in time may correspond to the same physical detection.
Event and track identifiers, which allow you to identify which hits belong to the same simulated annihilation or decay and which follow the same particle track.
Volume identifiers, which encode the crystal, module, and ring indices corresponding to the physical layout of the PET scanner.
You can usually select which attributes to write, and the choice is a trade off between file size and the level of detail you want to preserve for analysis.
In PET simulations, always include at least position, time, deposited energy, event ID, and detector volume IDs in your hits, otherwise you will not be able to reconstruct detector responses and coincidence relationships correctly.
Managing Hit Data Size
Recording every individual hit can generate large output files, especially for long PET acquisitions or fine crystal segmentation. For a first test you can enable all standard attributes, but for practical studies you may need to balance detail and file size.
There are two common strategies to manage the amount of hit data.
First, you can restrict hits to only the relevant volumes. In PET this means attaching the hits actor only to the scintillator crystals and avoiding upstream components such as support structures or shielding. That way the actor does not record interactions that cannot lead to useful detector signals.
Second, you can limit the recorded attributes to those that you will actually use in later analysis. For instance, if you only need deposited energy and time to feed a digitizer, you may skip less critical fields such as particle name or process name. If you are debugging or validating physics, you might temporarily include more attributes and then reduce them once you are confident in your setup.
Using Hits in the PET Workflow
The hits you record in this step are not yet the final PET data. They are the raw physical interactions that the digitizer, configured in later subchapters, will process into detector-level signals.
In the PET scanner example, hits are used in several ways:
They are grouped per crystal and per event to form singles with realistic energy and timing properties.
They carry enough positional information to map each detected event to a specific crystal, module, and ring index.
They can be analyzed directly to validate the geometry and physics, by inspecting energy deposition patterns or interaction positions inside the scanner.
Later, singles and coincidences are derived from the hits, and those will be the main basis for PET performance metrics and reconstructed images. For now, your goal is to ensure that hits are correctly recorded, with the attributes and sensitivity that your PET workflow will need.
By the end of this step in the practical example, you should have a simulation that produces a hits file where each entry corresponds to an energy deposition in a PET crystal, ready to be used as input for singles creation and coincidence sorting in the subsequent parts of the PET scanner project.
Views: 10
KAHIBARO