21.4 Time Histograms
Table of Contents
Coincidence timing
In GATE, time information for each detected event is stored in ROOT trees as numerical variables, usually in units of nanoseconds. For coincidence data, a typical tree contains one entry per coincidence pair, including the detection times in the two detector elements. Common branch names are similar to time1 and time2 for the two singles that form a coincidence, or a single time if each row already refers to one hit or one single.
To build a coincidence timing histogram, you first compute the time difference $\Delta t$ between the two detectors that registered the coincidence. The usual convention is
$$
\Delta t = t_2 - t_1,
$$
where $t_1$ and $t_2$ are the timestamps of the two singles forming the coincidence. You can calculate $\Delta t$ directly in ROOT using a draw expression such as time2 - time1 or by defining a new branch or friend tree that stores $\Delta t$ for later use.
Once you have $\Delta t$, you create a one dimensional histogram that covers an appropriate time range. The binning should be fine enough to resolve the detector timing resolution but wide enough to have sufficient counts per bin. For example, if your timing resolution is about 500 ps and the coincidence window is $\pm 5$ ns, you might choose a histogram from $-5$ ns to $+5$ ns with bin widths of 20 to 50 ps. In ROOT, you can create such a histogram and fill it directly from the tree. The resulting coincidence timing spectrum typically shows a central peak around $\Delta t = 0$ for true coincidences, with a width that reflects the combined timing resolution of the detectors and the electronics. If you include random coincidences, you may see a relatively flat background under and around the peak.
To study the effect of the coincidence time window that you use in the digitizer, you can either filter events at analysis time or produce multiple simulations with different configured windows. At analysis time, you can apply a selection such as abs(time2 - time1) < t_window when drawing or projecting your histogram. Narrowing this analysis window will reduce random coincidences at the cost of losing some true events in the tails of the peak. By comparing count rates and peak shapes for different analysis windows, you gain intuition about the trade off between sensitivity and noise.
The coincidence timing histogram allows you to estimate important performance metrics. The full width at half maximum of the central peak approximates the coincidence timing resolution. If you know the intrinsic single detector timing resolution, you can compare it with the coincidence resolution and verify that your simulation behaves as expected. Deviations from the expected Gaussian peak shape, such as long tails or asymmetry, can indicate problems in your digitizer configuration, physics models, or event selection. Repeating the same timing analysis in different detector regions, or for different energy windows, is also possible by applying additional selection cuts on energy and detector identifiers within the draw expression or with ROOT’s event filters.
Because time in GATE is always in physical units, it is important to confirm the units stored in the ROOT branches and to keep them consistent during analysis. If your histogram axis is labeled in nanoseconds but your data are in picoseconds, the inferred timing resolution will be incorrect. Often, you can rescale time values directly in the draw expression, for example by using (time2 - time1)*1e-3 to convert from picoseconds to nanoseconds. Whenever you compare simulation results to experimental timing spectra, apply the same binning, units, and selection criteria in both cases to allow a meaningful validation of your timing model.
The coincidence time difference is defined as $\Delta t = t_2 - t_1$. The width of the central peak in the $\Delta t$ histogram, typically quantified by the full width at half maximum, is a key measure of the coincidence timing resolution.
Time-of-flight distributions
Time of flight PET uses the difference in detection times between the two photons to estimate where along the line of response the annihilation occurred. In a GATE ROOT file, once you have the coincidence timing information for each event, you can transform the time difference $\Delta t$ into a position coordinate along the line joining the two detectors. Assuming photons travel at the speed of light $c$ and that the detectors are synchronized, the estimated position offset $x_{\text{TOF}}$ from the midpoint of the detectors along the line of response is
$$
x_{\text{TOF}} = \frac{c\,\Delta t}{2},
$$
where $\Delta t$ is in seconds and $c \approx 3.0 \times 10^{8}\,\text{m/s}$. In practice, for $\Delta t$ in picoseconds and $x_{\text{TOF}}$ in millimeters, you can use a numerical factor so that
$$
x_{\text{TOF}} \, [\text{mm}] \approx 0.15 \, \Delta t \, [\text{ps}].
$$
To build time of flight distributions in ROOT, you proceed in two steps. First, create a timing histogram as described before to verify the timing resolution. Second, compute $x_{\text{TOF}}$ for each coincidence and fill a separate histogram of this position estimate. The $x_{\text{TOF}}$ distribution for a point source located at the center of the field of view should be centered at zero and have a width directly related to the timing resolution. For extended sources, or for phantoms, the distribution may broaden and become structured, since different annihilation positions map to different $x_{\text{TOF}}$ values along each line of response.
By combining the time difference with detector geometry stored in the ROOT tree, for example the positions of the two detector elements that registered the coincidence, you can project the TOF position back into three dimensional space. For each coincidence, you know the two detector positions that define the line of response and the scalar offset $x_{\text{TOF}}$ along that line. You can then compute a three dimensional TOF position, which provides a probabilistic localization of the annihilation point. In analysis, this is often used for visualization or for approximate reconstructions that highlight how TOF information sharpens image contrast.
Time of flight distributions are useful to validate the TOF configuration in your simulation. If you simulate an ideal detector with very good timing resolution, the $x_{\text{TOF}}$ distribution for a point source should be very narrow. When you add realistic timing blurring in the digitizer, the distribution will broaden. By adjusting the timing resolution parameter in the digitizer and comparing the resulting distribution to a target experimental value, you can calibrate your simulation. You can also study how timing performance changes with detector position, energy window, or photon interaction depth by applying corresponding selection cuts on detector ID, energy, or other branches when filling TOF histograms.
Another important aspect is the relationship between the TOF distribution and random or scattered coincidences. True coincidences from a localized source produce a sharp peak in the $\Delta t$ distribution and a localized $x_{\text{TOF}}$ distribution. Random coincidences tend to fill the timing window more uniformly, and therefore give a broad or nearly flat contribution in $\Delta t$ and $x_{\text{TOF}}$. Scattered coincidences usually have intermediate behavior, often with shifted or broadened distributions. By analyzing TOF distributions separately for true, scattered, and random events, which GATE can label in dedicated branches, you can quantify how TOF information helps discriminate against unwanted event types.
When plotting TOF histograms from ROOT, always check the normalization and units. A narrow timing peak in picoseconds can correspond to several millimeters of spatial uncertainty, and different bin sizes in time or position can change the apparent width. If you aim to compare to analytical models or reconstruction algorithms, export the TOF histograms from ROOT into a format that preserves bin edges and counts, such as ROOT files or text tables. You can then use this information as input for separate image reconstruction software or as reference for algorithm development.
The TOF position estimate along the line of response is given by
$$
x_{\text{TOF}} = \frac{c\,\Delta t}{2}.
$$
Accurate TOF analysis requires consistent time units and correct conversion between time difference and spatial offset.
Views: 15
KAHIBARO