KAHIBARO
Discord Login Register

27.6. Comparing Ideal and Smeared Results

Visualizing Ideal and Smeared Detector Response

When you add detector resolution to a simulation, you should not just apply smearing and move on. You should always compare the ideal response from Geant4 with the smeared response that approximates a real detector. This comparison tells you how much information you lose and whether your chosen resolution model is realistic.

In practice, this comparison is usually made with histograms of key observables such as deposited energy, position, and time. The ideal distributions come directly from Geant4 scoring, for example energy deposition per event in a sensitive detector, and the smeared distributions are obtained by applying your resolution model to those ideal values and filling separate histograms.

It is usually best to keep ideal and smeared quantities side by side in your analysis. For example, in an ntuple you might have columns like E_ideal and E_smeared, or x_true and x_meas. That way you can always revisit and adjust your resolution model later without rerunning the full Geant4 simulation.

Always store or keep access to the ideal quantities from Geant4 in addition to the smeared ones. Do not overwrite the ideal values. You may need them later to change the resolution model, to perform efficiency studies, or to compare with future detector designs.

Energy Spectra: Line Broadening and Peak Shapes

The most common place to compare ideal and smeared results is in an energy spectrum. In a typical gamma detector example, the ideal spectrum contains narrow peaks at precise energies with minimal intrinsic spread, while the smeared spectrum shows broadened peaks that resemble real experimental data.

In Geant4 you might record the total deposited energy per event in a scintillator crystal into a histogram hE_ideal. After applying Gaussian smearing to each event energy, you fill another histogram hE_smeared. Plotting the two together immediately shows the impact of resolution.

For a monoenergetic gamma, the ideal peak is limited mainly by physical effects such as partial energy deposition and escape of secondary particles. When you add detector resolution, that same peak becomes Gaussian-like, with a full width at half maximum (FWHM) related to your smearing parameter. The broader this peak, the harder it becomes to resolve nearby lines.

You can characterize both ideal and smeared peaks by fitting them with a Gaussian function:
$$
f(E) = A \exp\!\left(-\frac{(E - \mu)^2}{2\sigma^2}\right),
$$
where $\mu$ is the peak position, $\sigma$ is the standard deviation and $A$ is the amplitude.

The FWHM for a Gaussian is
$$
\text{FWHM} = 2\sqrt{2\ln 2}\,\sigma \approx 2.355\,\sigma.
$$

Key relation for Gaussian peaks:
$$
\text{FWHM} \approx 2.355\,\sigma.
$$
Use this to convert between your smearing parameter $\sigma$ and the more commonly quoted energy resolution FWHM.

A useful comparison strategy is to fit the ideal peak and the smeared peak separately and extract:
β€’ The mean energies $\mu_{\text{ideal}}$ and $\mu_{\text{smeared}}$
β€’ The widths $\sigma_{\text{ideal}}$ and $\sigma_{\text{smeared}}$

You expect the width of the smeared peak to be larger. If the smearing is purely Gaussian and statistically independent of the intrinsic spread, the variances should add approximately in quadrature:
$$
\sigma_{\text{smeared}}^2 \approx \sigma_{\text{ideal}}^2 + \sigma_{\text{resolution}}^2.
$$

If your smearing model is Gaussian and independent, then
$$
\sigma_{\text{smeared}}^2 \approx \sigma_{\text{ideal}}^2 + \sigma_{\text{resolution}}^2.
$$
This is a useful consistency check between your ideal simulation and the smeared result.

If you add two close energy lines in the simulation, you can test the resolving power of your detector model. In the ideal spectrum the lines may appear completely separated. In the smeared spectrum they may merge into a single broad peak. This illustrates directly how detector resolution limits the physics you can extract from real data.

Position and Timing: From True Values to Measured Distributions

Energy is not the only quantity affected by detector resolution. Position and time measurements are also smeared in real detectors, and you should compare ideal and smeared distributions for these as well.

In a tracking detector example, you might record the ideal hit position of a particle in a plane, say $(x_{\text{true}}, y_{\text{true}})$, and then apply a position resolution to obtain $(x_{\text{meas}}, y_{\text{meas}})$. The ideal distribution might show a narrow beam spot or a sharp geometric edge. After smearing, the edge becomes blurred and the beam spot spreads out, which is what you expect in a real measurement.

Similarly, in timing detectors the ideal time of arrival $t_{\text{true}}$ is defined precisely by Geant4 kinematics and processes. When you add time resolution, the measured time $t_{\text{meas}}$ is scattered around the ideal time with some spread. For coincidence measurements, such as two detectors registering annihilation photons, the ideal time difference distribution may be extremely narrow, while the smeared distribution shows a wider peak. This peak width is directly related to your coincidence timing resolution.

To compare ideal and smeared position and time results, you can:

Use one-dimensional histograms of each coordinate
Compare distributions of derived quantities, such as radial position $r = \sqrt{x^2 + y^2}$ or time differences $\Delta t$

It is often helpful to look at residuals, for example the difference between measured and true positions:
$$
\Delta x = x_{\text{meas}} - x_{\text{true}}.
$$
If your smearing model is Gaussian with standard deviation $\sigma_x$, then the distribution of $\Delta x$ should look like a Gaussian centered at zero with width close to $\sigma_x$. The same idea applies to timing, where you look at $t_{\text{meas}} - t_{\text{true}}$.

When validating resolution models, check residuals such as
$$
\Delta x = x_{\text{meas}} - x_{\text{true}}, \quad \Delta t = t_{\text{meas}} - t_{\text{true}}.
$$
Their distributions should match the resolution parameters you implemented.

By comparing residual distributions from your smeared simulation to the resolution values you used, you confirm that your smearing code behaves as expected.

Impact on Physics Results and Detector Performance

Detector resolution does not just change the shape of individual histograms. It also affects higher level physics quantities such as detection efficiency, energy thresholds, peak-to-total ratios and the accuracy of reconstructed parameters.

For example, suppose you study detector efficiency by counting events above an energy threshold. In the ideal spectrum, a monoenergetic gamma line well above threshold might be fully counted, giving an efficiency near 100% for that line. After smearing, some events are scattered below threshold by the energy resolution, so the counted fraction decreases. In contrast, if the line is just below threshold in the ideal case, smearing may push some events above threshold, which increases the counted fraction.

To compare ideal and smeared efficiencies, you can compute for each case:
$$
\epsilon = \frac{N_{\text{selected}}}{N_{\text{incident}}},
$$
where $N_{\text{selected}}$ is the number of events passing your selection (for example, energy within a window) and $N_{\text{incident}}$ is the number of incident primary particles.

In a simple case of a photopeak selection, you might define an energy window around the nominal line, for example
$$
E_0 - \Delta E < E < E_0 + \Delta E.
$$
Counting events in that window in both the ideal and smeared spectra shows how much the resolution smearing reduces the peak fraction and changes the background contribution under the peak.

A small summary comparison might look like this:

QuantityIdeal simulationSmeared simulation
Peak positionClose to $E_0$Nearly unchanged if smearing is unbiased
Peak width (FWHM)Intrinsic onlyLarger due to detector resolution
Peak area in fixed windowHigherLower, more events in tails
Counts above thresholdDetermined by physics onlyChanges due to resolution leakage
Spatial or timing sharpnessGeometrically limitedBlurred by resolution

You can also examine how smearing affects reconstructed physics quantities such as scattering angles, particle ranges or reconstructed decay vertices. An ideal reconstruction uses exact positions and energies from Geant4, while a realistic reconstruction uses smeared measurements. Comparing the distributions of these reconstructed quantities with and without smearing tells you how much performance you lose due to finite detector resolution.

In detector design studies, this comparison is essential. You might simulate several assumed resolutions, then for each one compare ideal and smeared physics results. If a particular resolution is so poor that important features disappear or key parameters become biased, you know that such a detector design will not meet your physics goals.

Comparing to Experimental Data

Ultimately, the reason to introduce smearing is to bring your simulation closer to real experimental data. A typical workflow is:

  1. Generate an ideal Geant4 spectrum or distribution.
  2. Apply your detector resolution model to obtain a smeared simulation result.
  3. Compare the smeared result to measured data.

The ideal result is mainly a theoretical reference, while the smeared result should match the experiment. You can, for example, fit both data and smeared simulation spectra with the same model and compare parameters such as peak positions, widths and relative intensities.

If the smeared simulation still has narrower peaks than the experiment, your assumed resolution is too optimistic. If the smeared peaks are much broader than in data, your resolution is too pessimistic. By iteratively adjusting the smearing model and comparing to data, you can tune the detector response in your simulation.

In this process, always keep the ideal distribution. It helps you understand which effects are due to fundamental physics and which are due to the detector. For example, if a low energy tail is present in the ideal spectrum, it is caused by incomplete energy deposition or escaping particles, not by resolution. If a tail appears only after smearing, it is likely a property of your response model, for example non Gaussian resolution.

Use the ideal simulation to understand the underlying physics and the smeared simulation to compare with experimental data. Differences between ideal and smeared results indicate detector effects, while differences between smeared simulation and data indicate missing or mis-modeled physics or detector response.

By systematically comparing ideal and smeared results, and then smeared results to real measurements, you build confidence that your Geant4 simulation is both physically sound and experimentally realistic.

Views: 8

Comments

Please login to add a comment.

Don't have an account? Register now!