43.7. Digitizer Problems
Table of Contents
Missing singles
Digitizer problems usually appear only after the rest of the simulation works, so you often already see hits or dose but no detector output. When singles are missing or far fewer than expected, you should think in terms of a chain: particles, interactions, hits, digitizer steps, singles output. Any break in that chain can remove all singles.
The first check is to verify that hits are produced at all. Use a hits actor attached to the detector volume and confirm that particles interact and deposit energy. If the hits table is empty, the problem is not the digitizer. You must then look at geometry, source, or physics, which are covered in other chapters. Only once hits exist does it make sense to debug the digitizer.
In GATE the digitizer is a sequence of steps that operate on hit collections and gradually transform them into detector signals. The most common reason for missing singles is that the digitizer is not connected to the correct hit collection or detector volume. Ensure that the digitizer input matches the name of the hits you are recording, and that the volumes used in the hit actor and in digitizer configuration correspond to the same physical crystals or detector blocks. A mismatch in volume names or collection names silently produces empty singles.
Energy thresholds are another frequent cause of invisible singles. If you set a lower energy threshold that is higher than the majority of deposited energies, all events will be discarded. For example, if most interactions deposit around 80 keV but your lower threshold is 400 keV, you will see no singles at all. Similarly, a very narrow energy window or an upper energy threshold set too low can eliminate events that would otherwise be valid. When starting, use a generous energy window and relaxed thresholds, then tighten them later.
In GATE digitizers, any threshold or filter that removes events does not usually give an explicit error. If singles are missing, always suspect:
- Incorrect hit collection or volume name.
- Lower energy threshold set too high.
- Upper energy threshold set too low.
- Time window or other filters that eliminate all events.
Timing filters can also suppress singles. If your digitizer includes time-based selection, such as requiring hits within a small time window, but your physics and detector response produce broader timing distributions, you may filter out nearly everything. Start by disabling timing cuts and time blurring, verify that singles appear, then reintroduce timing constraints.
Another subtle source of problems is energy or time blurring implemented before thresholds. If you apply strong Gaussian energy blurring so that true 511 keV events spread down to low energies, and then apply a narrow photopeak window, virtually all events can fall outside the window. The same can happen with time blurring and coincidence-related selections. It is often helpful to record intermediate quantities, such as pre-blur and post-blur energy, or to temporarily output a debug ROOT tree that contains each digitizer step, to see where events vanish.
Ensure that the digitizer chain is actually attached to your simulation. Creating a digitizer object without registering it with the simulation engine does nothing. In practice, that means you should verify in your Python script that you both configure the digitizer and add it to the main simulation object. Also confirm that you run enough events; with very small numbers of primaries, it is possible to see zero singles simply because interactions are rare.
Finally, check the output. Singles may be written to a particular file or branch. If you are opening the wrong ROOT file, or inspecting the wrong tree or branch, it can look like singles are missing when they are just written under a different name. Use the data output and ROOT chapters to confirm filenames, directory structure, and branch naming.
Missing coincidences
If singles exist but coincidences are missing or much fewer than expected, the interruption is later in the digitizer chain. Coincidences are formed by pairing singles in time and usually require energy and detector geometry conditions to be satisfied. Missing coincidences usually indicate that singles are not reaching the coincidence sorter, or that the coincidence criteria are too strict.
First ensure that the coincidence module reads from the correct singles collection. In many configurations you explicitly specify which singles data the coincidence sorter should use. If the name does not match, the sorter will process an empty set and produce no coincidences. Check this before adjusting physics or timing, because a naming mismatch is easy to overlook and produces no visible error.
Coincidence timing is the next critical element. The coincidence window defines how close in time two singles must be to be considered a coincidence. If this window is too small compared to the detector timing resolution or the physics time spread, almost no pairs will satisfy it. For instance, if your time resolution is around a few hundred picoseconds but you select a coincidence window of a few picoseconds, you will effectively eliminate nearly all events. At the beginning it is safer to use a wide window, such as several nanoseconds, verify that coincidences appear, and then reduce it to realistic values.
For coincidence sorting, three conditions dominate whether coincidences appear:
- Singles must be correctly passed to the coincidence sorter.
- The coincidence time window must be wide enough for your timing resolution and physics.
- Energy and detector selection windows must not reject all valid pairs.
If any one of these is too restrictive, you may see zero coincidences even with many singles.
Energy windows applied at the coincidence stage can also suppress coincidences. Some configurations require each of the two singles to lie inside a certain energy window, often around 511 keV for PET. If your singles are heavily blurred in energy or your initial photopeak window at the singles stage is already narrow, an additional strict energy condition at the coincidence level can drop almost all pairs. To debug, record an energy spectrum of singles and check how many fall into your chosen window.
The geometry of detector pairing is another common source of missing coincidences. Coincidence selection can be configured to accept only specific detector pairs, for example opposite crystals or particular modules in a ring. If these selections do not match the actual geometry or ID scheme of your detectors, no pair will qualify. Check that crystal IDs, module IDs, and ring IDs used in the coincidence configuration agree with the mapping you assigned when building the PET scanner or gamma camera. A mismatch in ID numbering or ordering can silently prevent any valid pair from being formed.
Time blurring has similar effects at the coincidence level as energy blurring. If you model realistic timing resolution by adding Gaussian time smearing and then keep a narrow coincidence window, the smeared detection times can fall outside the window. Temporarily disabling time blurring or enlarging the time window allows you to determine whether timing resolution is the cause.
You should also confirm that the simulation runs long enough to accumulate coincidences. In PET, coincidences occur when both annihilation photons from a positron event are detected. With very low activity or a small number of primary events, you might simply not produce enough annihilation events to see coincidences. Run with more events or higher activity to distinguish between a configuration problem and simple statistical scarcity.
Once you suspect that coincidences are being generated but are not visible, inspect the output structure. Coincidences may be written to a separate ROOT tree or branch, distinct from singles. Verify that you are opening the correct file, reading the correct tree, and interpreting the columns correctly. When in doubt, print the number of entries in the coincidence tree using ROOT or uproot to check whether it is truly empty.
Altogether, debugging missing coincidences is a matter of walking through the chain: verify singles exist and have reasonable energy and time distributions, check that the coincidence sorter reads the correct singles, use an initially wide time window and broad energy conditions, and only then move on to refine geometry-based pairing and realistic resolution.
Views: 12
KAHIBARO