KAHIBARO
Discord Login Register

28.1 Why Validate a Simulation?

Physical correctness

Validation for physical correctness answers a simple question: does the simulation describe the real world for the problem you care about, within an acceptable accuracy?

In Geant4 this means you do not simply trust the default physics lists or your own geometry. Every choice you make in the simulation, from materials and dimensions to physics processes and cuts, must be checked against independent knowledge. This independent knowledge can be analytical formulas, experimental data, or other validated simulations or databases.

For physical correctness you first check that the underlying physics model is appropriate. For example, a physics list tuned for very high energy collider experiments is usually not suitable for low energy medical applications without careful study. The relevant energy range, the particle types, and the materials must all be within the domain where the chosen physics models are known to work.

Geometry and materials must reflect the real system as closely as needed. It is rarely enough to represent a detector as a single box if the real detector has layers, dead materials, and supports that significantly affect particle interactions. Likewise, you must verify that material compositions and densities in your code match specifications, databases, or measurements.

Physical observables from your simulation, such as energy spectra, dose distributions, attenuation coefficients, angular distributions, or track ranges, should be compared with trusted references. These can be textbook formulas, evaluated nuclear data libraries, or published experimental measurements. Discrepancies point either to mistakes in the setup or to limitations in the underlying physics models. Understanding which one applies is part of validation.

A Geant4 simulation is not validated just because it runs without errors. Physical correctness requires explicit comparison of simulated observables with independent references, within well defined accuracy goals.

For most applications you must define in advance how accurate the physics needs to be. For example, in a teaching demo a 20 percent agreement in a dose profile might be acceptable, while in radiotherapy planning a few percent deviation can already be too large. Validation is always tied to the intended use of the simulation.

Finally, physical correctness is specific to a domain and configuration. A physics list or geometry model that has been validated for one energy range or detector setup is not automatically validated for a different one. Any significant change in geometry, materials, particle types, energies, or required observables should trigger a new validation step focused on the changed aspects.

Numerical correctness

Numerical correctness concerns how accurately and reliably the computer implementation represents the intended physics model. Even a perfect physical model can give misleading results if numerical aspects are handled poorly.

Geant4 uses floating point arithmetic, random numbers, and stepwise particle transport. Each of these introduces numerical effects. Validation for numerical correctness checks that these effects do not distort the results beyond acceptable limits.

A first aspect is numerical stability. You need to ensure that results do not change significantly when you vary technical parameters that should not affect physics. Examples include step size limits, production cuts within a reasonable range for the application, and geometry tolerances. If a small change in such parameters leads to large changes in results, your setup is numerically unstable and needs investigation.

Another key point is statistical uncertainty. Monte Carlo results always include fluctuations. For many observables the uncertainty scales approximately as $1/\sqrt{N}$, where $N$ is the number of independent events. You must run enough events so that the statistical error on your main observables is smaller than the accuracy you require. Without this, you may misinterpret random noise as a physical effect.

Never trust a single Monte Carlo run without quantifying its statistical uncertainty. Numerical correctness requires:

  1. Sufficient statistics for key observables.
  2. Checks that results are stable against reasonable changes of technical parameters.

You should also consider random number handling. Using the same seed unintentionally can make two runs artificially correlated, while changing seeds appropriately allows you to estimate uncertainties from independent simulations. For debugging and validation it is useful to be able to reproduce specific events by saving and restoring random states.

Precision issues can also arise in extreme situations, for example very large or very small coordinates, very thin layers, or very low energies close to cut thresholds. In such cases you may see artifacts like particles stopping too early or missing interactions. Numerical validation includes testing these edge cases and adjusting geometry definitions, cuts, or step limitations so that results remain stable and physically reasonable.

Finally, numerical correctness implies that the code you write around Geant4, such as analysis and unit conversions, does not introduce errors. Accidental unit mismatches, incorrect binning, or loss of precision in derived quantities can all spoil otherwise correct simulations. Verifying that summations, averages, and derived observables behave as expected when you change the number of events or the binning is part of checking numerical correctness.

In practice, full validation combines physical and numerical checks. You ensure that the physics model and configuration are appropriate, and you verify that the numerical implementation and statistics do not distort those physics beyond your chosen tolerances. Only when both aspects are under control can you rely on the results for scientific or practical decisions.

Views: 9

Comments

Please login to add a comment.

Don't have an account? Register now!