47.4. Creating Detector Crystals
Table of Contents
Crystal role in a PET detector
In a PET scanner, detector crystals are the elements that actually stop the 511 keV photons and convert their energy into measurable signals. In GATE, crystals are regular volumes with a scintillator material and a proper position inside the detector modules and ring. For a practical PET example, you typically create many small crystals, arranged in arrays, that are repeated around the patient.
This chapter focuses on how to define the crystal volumes, their size, material, and their placement inside the already defined detector modules and ring, without revisiting the general PET geometry or digitizer concepts that are covered elsewhere.
Choosing crystal dimensions
Crystal dimensions strongly influence spatial resolution, sensitivity, and the number of readout channels. In a simple PET example, you usually fix three dimensions: radial thickness, axial length, and transaxial width. In GATE you specify these as half lengths in each Cartesian direction.
Suppose you want LYSO crystals of 4 mm width, 4 mm depth, and 20 mm axial length. If you align the crystals so that the shortest dimension is radial, the intermediate is tangential, and the longest is axial, you might map them as:
$x$ radial, $y$ tangential, $z$ axial.
In OpenGATE Python, the half lengths are then:
$2~\text{mm}$ in $x$, $2~\text{mm}$ in $y$, and $10~\text{mm}$ in $z$.
You set these values in the volume definition. For example, inside your geometry-building function where the ring and modules already exist, you create a crystal volume type "box" and assign these half sizes.
Important: GATE and Geant4 box dimensions are defined by half lengths. To obtain a crystal width of $d$, you must set the corresponding half size to $d/2$.
From a design point of view, smaller width improves spatial resolution but increases the number of crystals and readout channels. Thicker crystals improve sensitivity but increase parallax effects. In a first PET example, choose moderate sizes, for instance from 3 mm to 4 mm width and 15 mm to 25 mm length, and keep them consistent with the ring diameter and module pitch defined in the previous steps.
Assigning crystal materials
Crystals must be made from a scintillator material suitable for PET, such as LYSO, LSO, BGO, or similar. GATE provides standard scintillator materials, and you typically use them directly rather than defining custom materials in this example.
A common choice is LYSO, because it combines high stopping power, good light yield, and fast decay time. In the Python geometry, once the crystal volume is created, you set its material with the appropriate material name, such as "LYSO" if it is available in your material database.
Rule: Always assign a realistic scintillator material to PET crystals, such as LYSO, LSO, or BGO. Do not leave crystals with default or vacuum materials, otherwise photons will simply pass through without meaningful interactions.
The material affects gamma interaction probabilities, energy deposition, and ultimately the counts in your singles and coincidence data. For a teaching simulation, the exact optical or scintillation properties are usually not modeled in detail unless you explicitly enable optical physics, but the choice of high density, high atomic number material is still essential for realistic detection efficiency.
Arranging crystals inside detector modules
Detector modules are logical groupings of multiple crystals. In a simple ring-based PET example, each module may contain a 2D array of crystals, for instance $n_x$ crystals in the tangential direction and $n_z$ crystals in the axial direction. The module itself is then repeated around the ring to build the full scanner.
You first define the crystal as a child of the module volume. Then you create many copies of this crystal, positioned at regular intervals within the module. The spacing between crystals, usually called pitch, is often equal to or slightly larger than the crystal width to account for wrapping or gaps. For a crystal width of 4 mm, you might choose a pitch of 4 mm to 4.2 mm.
In OpenGATE, you can specify an array by using repetition or by filling indices in a loop. A typical pattern is to fix the module center at the origin of its local coordinate system, then place each crystal relative to that center using integer indices $i$ and $j$ for tangential and axial positions.
If you choose $N_y$ crystals tangentially and $N_z$ crystals axially, and a pitch of $p_y$ and $p_z$, the position of a crystal with indices $(i, j)$ can be computed as
$$
y_i = \left(i - \frac{N_y - 1}{2}\right) p_y, \qquad
z_j = \left(j - \frac{N_z - 1}{2}\right) p_z.
$$
This centers the crystal array in the module. The radial coordinate $x$ is usually fixed, because the module itself is placed at the ring radius. In the module frame, crystals might all sit at $x = 0$, while the module volume is placed at the appropriate ring radius in the global frame.
Rule: Center the crystal array inside the module by using symmetric indices around zero, to avoid systematic offsets in tangential or axial directions.
By carefully choosing the number of crystals and their pitch, the module dimensions automatically match the module volume defined earlier. This consistency helps prevent geometry overlaps and simplifies the assignment of detector IDs in the next chapter.
Repetition, naming, and indices
When you create many crystals, reproducible naming and indexing are essential for later analysis. Each crystal should have a clear volume name pattern and internal indices that can be retrieved in the output, especially when you want to map hits or singles back to specific locations along the ring.
The typical hierarchy is: ring, module, crystal. In your geometry definition you may specify that crystals are repeated inside each module using an array or parameterized volume. GATE stores indices such as crystal ID inside volume-specific attributes that later appear in hits and singles.
You can, for instance, assign:
Table: Example index scheme for a PET detector
| Level | Index name | Meaning |
|---|---|---|
| Ring | ringID | Position of the module around ring |
| Module | moduleID | Index of module within the ring |
| Crystal | crystalID | Index of crystal inside the module |
These IDs are typically propagated to the digitizer, and then to singles and coincidences. To make this work smoothly, ensure that you enable GATE's automatic assignment of copy numbers or indexing in the volume definition. Then, when you create digitizers, you can configure the readout to use these indices so that each recorded event can be mapped to a specific crystal.
Rule: Use a consistent indexing scheme (ring, module, crystal) from geometry to digitization. Geometry indices are the basis for reconstructing detector coordinates from hits, singles, and coincidences.
In the context of this practical PET example, you do not need a fully optimized or complex indexing strategy, but you must at least assign stable crystal indices that remain consistent across simulation runs so your analysis scripts and ROOT or Python plots stay valid when you rerun or modify the geometry.
Checking crystal geometry with visualization
Before running long simulations, it is important to verify that your crystal geometry is correct. After you have created the crystal volumes and arranged them inside the modules and ring, use GATE visualization to check:
- Crystals are visible and placed at the expected radius.
- The crystal arrays align correctly inside each module without large gaps or overlaps.
- Neighboring modules connect smoothly around the ring, without missing modules or misaligned crystal rows.
- Crystal dimensions correspond to your intended physical sizes.
To inspect the geometry, enable volume drawing for the crystal level only, and hide larger structures when needed. This makes it easier to see individual crystals. You can then rotate and zoom the view to verify both the transaxial ring and the axial stacking.
If you see obvious overlaps or gaps, adjust crystal pitch, module dimensions, or the number of crystals, and re-run the visualization until the geometry looks correct. Fixing these issues at this stage avoids later problems with tracking errors, warning messages about overlapping volumes, or inconsistent detector mappings.
Once crystal creation and placement are validated visually, the PET scanner geometry is ready for recording hits in the crystals and for building the detector response through the digitizer chain in the subsequent chapters.
Views: 11
KAHIBARO