1.2. How Geant4 Works
Table of Contents
Particle transport
In Geant4, particle transport means following particles as they move through a defined geometry under the influence of physical processes. The code does not solve continuous differential equations analytically. Instead, it advances each particle in a series of small, discrete steps through volumes, and at each step it checks what happens due to the geometry and the physics.
A transported particle always has a well defined type, position, direction, kinetic energy, time and current volume. Geant4 continuously asks: how far can I move this particle before something important happens? Important events include the particle leaving its current volume, interacting with matter, reaching a user defined boundary condition, or losing all its kinetic energy. The result is a detailed history of how each particle moves and interacts inside your simulated setup.
Transport is handled in three spatial dimensions and uses your defined materials and magnetic or electric fields. If you define a magnetic field, Geant4 bends charged particle trajectories according to the Lorentz force and still follows them step by step. If no field is present, motion is along straight lines between interactions or boundaries. The transport engine is always the same, what changes is which processes are active for each particle and how those processes modify the motion.
Interactions with matter
As particles travel through materials they can lose energy, change direction, create secondary particles, or be absorbed. These are called interactions with matter. In Geant4, they are described by physical processes such as ionization, bremsstrahlung, multiple scattering, nuclear reactions and many others, depending on the particle type and energy.
Each process has associated cross sections and models that describe how likely it is to occur and what final state it produces. Geant4 uses these probabilities to decide which process, if any, will occur next along a particle track. When a process occurs, Geant4 changes the particle state accordingly. For example, an ionization interaction may reduce the kinetic energy of an electron and create a low energy secondary electron. A nuclear interaction may create several new secondary particles that are then transported in the same way as the original one.
Different physics lists in Geant4 select and configure sets of processes and models that are appropriate for different applications. Once you choose a physics list, the transport system automatically applies the corresponding interactions to every relevant particle as it moves through the geometry. You do not manually trigger interactions, you only define which physics is available and Geant4 handles the stochastic choice.
Monte Carlo simulation
Geant4 is a Monte Carlo simulation toolkit. Monte Carlo means that it uses random numbers to sample from probability distributions that describe particle interactions, paths and outcomes. Instead of computing a single deterministic result, Geant4 simulates many random realizations of what could happen, called events, and you then analyze the statistical distribution of results.
At each point where physics or geometry introduces uncertainty, Geant4 draws random numbers. It samples the distance to the next interaction, the type of interaction, the scattering angle, the energy of secondary particles and many other quantities from their respective distributions. Over many simulated events, the ensemble of outcomes reproduces the underlying physics distributions.
Because the simulation is statistical, results always have uncertainties that decrease as you simulate more events. The random choices are controlled by random number engines and seeds. If you set the same seed, you can reproduce exactly the same sequence of random numbers and therefore repeat the same simulated history. If you change the seed, you obtain a different but statistically equivalent realization of the same physical setup.
Monte Carlo simulations use random sampling of physical probability distributions. The accuracy of averages improves with the number of events, while each individual event is only one possible outcome, not a deterministic prediction.
Events
An event in Geant4 represents one full, independent history of primary particles and all the secondary particles they generate. You can think of a single event as one trigger of your detector, or one radiation history, depending on the application. When you run a simulation you usually simulate many events one after another.
At the beginning of an event, your primary particle generator creates one or more primary particles. Geant4 then transports these primaries and any secondaries they create until all tracks are finished. The event ends when no more particles are left to transport. During this time, all interactions, energy depositions and hits inside sensitive detectors belonging to this event are recorded and can be analyzed.
Events are independent of one another in the physics sense. The result of one event does not influence the physics processes in the next event. This independence is very important for parallelization and for statistical analysis. You can sum or average quantities over events, such as total energy deposited in a given detector per event, and then calculate mean values and uncertainties.
Tracks
A track describes the continuous life history of a single particle from its creation to its end. Each primary or secondary particle has exactly one track. The track stores the particle type, unique track ID, the ID of its parent track, and its evolving state such as position, momentum, energy and time.
Tracks are not continuous curves in the implementation. Instead, Geant4 represents each track as a chain of steps. However, conceptually the track provides the complete story of that particle inside the event. A track begins when the particle is created, for example by the primary generator or by a physical interaction, and ends when the particle leaves the world, is absorbed, stops without further possible interactions, or is killed by the user or the physics.
By examining tracks and their relationships, you can distinguish primaries from secondaries using parent IDs, follow decay chains, or study how different particles contributed to signals in your detectors. Even though most user analyses focus on energy deposited in detectors, understanding tracks is essential to interpret how those deposits arise from underlying particle histories.
Steps
A step is the smallest unit of particle movement and interaction that Geant4 handles. Each track is composed of many steps. During each step, the particle moves from a pre step point to a post step point, and along this segment various physics processes can act.
The length of a step is not fixed. Geant4 chooses it dynamically according to several conditions. The step ends when the particle reaches a geometry boundary, when a physics interaction is scheduled to occur, when a user defined maximum step length is reached, or when the track is otherwise forced to stop. In this way, steps automatically become shorter where the geometry is complex or interactions are frequent, and longer in regions where little happens.
Each step carries detailed information about what happened along that segment. This includes the energy lost by the particle, energy deposited in materials, the volume where the step took place, and the global time at the start and end of the step. Sensitive detectors often use the information in steps to create hits, for example by recording the position and amount of energy deposited when a step occurs inside a detector volume.
Every particle track is divided into multiple steps, and all energy deposition and interaction details are recorded step by step. Steps are the fundamental units that connect physics, geometry and detector response in Geant4.
Views: 11
KAHIBARO