Adjoint Monte-Carlo¶
A powerful biasing technique available in Geant4 is the Reverse Monte Carlo (RMC) method, also known as the Adjoint Monte Carlo method. In this method particles are generated on the external boundary of the sensitive part of the geometry and then are tracked backward in the geometry till they reach the external source surface, or exceed an energy threshold. By this way the computing time is focused only on particle tracks that are contributing to the tallies. The RMC method is much rapid than the Forward MC method when the sensitive part of the geometry is small compared to the rest of the geometry and to the external source, that has to be extensive and not beam like. At the moment the RMC method is implemented in Geant4 only for some electromagnetic processes.
Adjoint Monte Carlo in Geant4¶
Different G4Adjoint classes have been implemented into the Geant4 toolkit in order to run an adjoint/reverse simulation in a Geant4 application. This implementation is illustrated in Figure 3.3. An adjoint run is divided in a serie of alternative adjoint and forward tracking of adjoint and normal particles. One Geant4 event treats one of this tracking phase.

Adjoint tracking phase¶
A group of adjoint particles of different types are generated (adjoint_e-, adjoint_gamma,…) at the same event on the so called adjoint source with random position, energy (1/E distribution) and direction. The adjoint source is the external surface of a user defined volume or of a user defined sphere. The adjoint source should contain one or several sensitive volumes and should be small compared to the entire geometry. The user can set the minimum and maximum energy of the adjoint source. After their generation the adjoint primary particles are tracked backward in the geometry till a user defined external surface (spherical or boundary of a volume) or are killed before they reached a user defined upper energy limit that represents the maximum energy of the external source. During the reverse tracking, reverse processes take place where the adjoint particles being tracked can be either scattered or transformed in other types of adjoint particles. During the reverse tracking the G4AdjointSimulationManager replaces the user defined primary, run, stepping, … actions, by its own actions. A reverse tracking phase corresponds to one Geant4 event.
Forward tracking phase¶
When some adjoint particles previously tracked reach the external surface their final, as well as corresponding primary, weights, types, positions, and directions are registered. After that a group of primary particles with types eqivalent to the primary adjoint particles of the reverse track that have reached the external surface, are generated with the same energies, positions but opposite direction. These particles are tracked in the forward direction in the sensitive region as in a forward MC simulation. During this forward tracking phase the event, stacking, stepping, tracking actions defined by the user for his forward simulation are used. By this clear separation between adjoint and forward tracking phases, the code of the user developed for a forward simulation should be only slightly modified to adapt it for an adjoint simulation. Indeed the computation of the signals is done by the same actions or classes that the one used in the forward simulation mode. A forward tracking phase of a group of primary forward particles correspond to one G4 event.
Reverse processes¶
During the reverse tracking, reverse processes act on the adjoint particles. The reverse processes that are at the moment available in Geant4 are the:
Reverse discrete ionization for e-, proton and ions
Continuous gain of energy by ionization and bremsstrahlung for e- and by ionization for protons and ions
Reverse discrete e- bremsstrahlung
Reverse photo-electric effect
Reverse Compton scattering
Approximated reverse multiple scattering
Forced interaction of adjoint gamma¶
It is also possible to bias further the physics of adjoint gamma by forcing their interaction with materials. This makes sense because the reverse MC is mainly used in the space domain where the primary radiations of interest are most of the time charged particles. In this case we want to avoid the tracking of a reverse gamma trough the geometry without any further interaction, as such reverse track would correspond to a forward track of a primary gamma. The forcing of adjoint gamma reverse interaction is available in GEANT4 since the version 10.3. In this implementation at any time that a gamma is produced it is splitted into two identical gammas. The first gamma, that is called the free gamma, goes through the whole geometry without any interaction, while the second gamma, called the forced gamma, is forced to interact with the geometry at some random position along the track of the free gamma. The sampling of the position of the interaction of the forced gamma is computed by taking into account the integration of the cross section along the path of the free gamma. For both the free and the forced gammas a weight correction is applied that is correctly computed into GEANT4.
Adjoint Monte Carlo in GRAS¶
GRAS has been modified in order to use the adjoint Monte Carlo method implemented in Geant4. It has been implemented such that the definition of the analysis modules is the same for the forward and reverse Monte Carlo simulation.
Definition of the adjoint physics processes in GRAS¶
A dedicated electromagnetic physics lists has been developed in order to define the adjoint physics processes in Geant4. This physics list can be selected in GRAS by using the command:
/gras/physics/addPhysics rmc_em_standard
In this physics lists the following physics is considered by default:
Continuous gain of energy by ionization and bremsstrahlung for e- and by ionization for protons and ions
Reverse discrete e- bremsstrahlung
Reverse compton scaterring
Reverse photo electric effect
Continuous weight correction for transport of particles where all forward processes are taken into account
Splitting with factor 10 of primary gamma on the adjoint source in the forward tracking phase
Forced interaction of reverse gamma
The following macro commands illustrate how to select the different reverse physics models in GRAS with their default implementation
/adjoint_physics/UseBremsstrahlung true #default
/adjoint_physics/UseCompton true #default
/adjoint_physics/UseAdjointCompton true #default
/adjoint_physics/UseMS true #default
/adjoint_physics/UsePEEffect true #default
/adjoint_physics/UseAdjointPEEffect true #default
/adjoint_physics/SetSplittingFactorForPrimFwdGamma 10 #default
/adjoint/SetNbOfPrimaryAdjGammasPerEvent 1 #default
/adjoint_physics/UseGammaForcedInteraction true #default
It is also important to set the limit of energy of the adjoint models by using the following command
/adjoint_physics/SetEminForAdjointModels 1.0000e-03 MeV
/adjoint_physics/SetEmaxForAdjointModels 1.0000e+03 MeV
It is recommanded to set the minimum and maximum energy as the minimum and maximum energy of the adjoint source. See next section.
For an electron simulation it is not needed to track the reverse protons and therefore the physics of reverse proton ionisation can be switched off with the following command
/adjoint_physics/UseProtonIonisation false
Definition of the adjoint source¶
The adjoint source is the source where adjoint primaries are generated before being back tracked in the geometry. This source should be set by the user as the limit of the sensitive region where tallies will be regsitered in the forward tracking phase of an adjoint event. The following options are offered to the user to select the adjoint source:
On the external surface of a sensitive volume with the command
/adjoint/DefineAdjSourceOnExtSurfaceOfAVolume phys_vol_name
On a spherical surface centered at a given position with the command
/adjoint/DefineSphericalAdjSource R X Y Z unit_length
On a spherical surface centered on a given sensitive volume
/adjoint/DefineSphericalAdjSourceCenteredOnAVolume phys_vol_name R unit_length
The minimum and maximum energy of the adjoint source can be set by the following commands
/adjoint/SetAdjSourceEmin Emin energy_unit
/adjoint/SetAdjSourceEmax Emax energy_unit
It is recommended to set the minimum energy low enough (typically 1 keV) and the maximum energy as the maximum energy of the external spectrum.
Definition of the external source¶
By default the external source surface defining the surface limit till where adjoint particles area tracked is set to the world limit. If needed the user may choose to set this limit on a specific surface by using one of the following commands
/adjoint/DefineSphericalExtSource R X Y Z unit_length
/adjoint/DefineSphericalExtSourceCenteredOnAVolume phys_vol_name R unit_length
/adjoint/DefineExtSourceOnExtSurfaceOfAVolume phys_vol_name
Adjoint particles ae killed during their reverse tracking when they reach an upper limit of energy equivalent to the maximum energy of the external source. This maximum energy can be set by the user with the following command
/adjoint/SetExtSourceEmax Emax energy_unit
Normalisation of simulation results to external primary spectrum¶
During a reverse Monte Carlo simulation response matrices of the tallies are computed. These response matrices are then convoluted with user defined primary spectra at the end of the reverse simulation. The user can define the external primary spectrum as:
An exponential spectrum with the command
/gras/analysis/adjoint/addExponentialPrimSpectrum particle_name integral_fluence fluence_unit E0 Emin Emax energy unit
A power law spectrum with the command
/gras/analysis/adjoint/addPowerLawPrimSpectrum particle_name integral_fluence fluence_unit alpha Emin Emax energy unit
A user selected spectrum (differential in energy) with for example the commands below (Jupiter example). Please note that the shape of the spectrum is determined by the
/gps/hist/point
UI commands, but the absolute normalisation of the results is set only in the last UI command/gras/analysis/adjoint/addUserDefinedPrimSpectrum
, where the user has to input the total fluence energy-integrated from the lowest to the highest energy point (1 MeV to 1000 MeV in the example below):
/gps/ene/type Arb
/gps/hist/type arb
/gps/ene/min 1.000E+00 MeV
/gps/ene/max 1.000E+03 MeV
/gps/hist/point 1.00 1.21E+07
/gps/hist/point 2.00 2.17E+06
/gps/hist/point 3.00 7.24E+05
/gps/hist/point 5.00 1.53E+05
/gps/hist/point 10.00 1.87E+04
/gps/hist/point 20.00 1.90E+03
/gps/hist/point 30.00 3.69E+02
/gps/hist/point 50.00 4.69E+01
/gps/hist/point 70.00 1.21E+01
/gps/hist/point 100.00 2.87E+00
/gps/hist/point 200.00 1.77E-01
/gps/hist/point 300.00 3.46E-02
/gps/hist/point 500.00 4.45E-03
/gps/hist/point 700.00 1.15E-03
/gps/hist/point 1000.00 2.76E-04
/gras/analysis/adjoint/addUserDefinedPrimSpectrum e- 1.97E+14 1/cm2 Arb
The point detector adjoint simulation mode¶
In GRAS the adjoint point detector mode has been implemented. In this mode the user defines a position where the fluence of secondaries particles and the local dose in Silicon will be computed by an adjoint/reverse simulations. The adjoint source is set on the external surface of a tiny sphere of 10 um radius, centered on the user specified position. The response matrices of the fluence of electron, gamma, and protons on the adjoint source, as well as the dose in Silicon are computed during the adjoint tracking phase. No forward tracking phase is performed during this type of simulation. These response matrices are convoluted with user defined primary spectra at the end of the reverse simulation as usual. The dose deposited in Silicon is computed by registering for each adjoint track arriving on the external surface, the stopping power of the adjoint primary electrons and protons, and the equivalent stopping power of the adjoint primary gamma on the adjoint source. The equivalent stopping power of a gamma particle at a given energy is obtained by multiplying the NIST tabulated mass energy absorption coefficient with the energy. The stopping power and the gamma equivalent stopping power are given in MeV/g/cm2. After convolution of the response matrices of the dose with the primary fluence a signal in term of energy per mass is then obtained (cm2*MeV/g/cm2 ). The final total dose results are registered in rad unit in GRAS csv files. The way the dose is computed in the point detector mode is equivalent to the convolution of the secondary particle fluence on the tally position with the stopping power of the particles. The point detector adjoint simulation mode is selected by the user with the following command
/gras/setAdjointPointDetectorMode True
The position where the fluence and the dose will be computed can be selected by the user either by specifying the cartesian coordinate of this position or by setting it a the center of a given volume. These two options are selected by the following commands
/gras/setAdjointPointDetectorPosition x y z unit_length
/gras/setAdjointPointDetectorAtTheCenterOfAVolume volume_name
Examples¶
Two examples illustrating how to use the reverse MC are distributed in GRAS
Simple geo example¶
This example illustrates how to use the reverse MC in GRAS with a simple geometry and an exponential primary spectrum with 10 MeV energy limit. The example can be found on gras/examples/reverse_mc/simple_geo
Juice example¶
This example illustrates how to use the reverse MC in GRAS with a more complex geometry made of two PCBs placed in an aluminum box with 10 mm thickness and a electron primary spectrum typical of the Juice Jupiter mission. It computes the dose in components placed on the different PCBS. The size of the components are large enough in order to limit the time needed for the forward simulation to reach precise results.
The example can be found on gras/examples/reverse_mc/juice_example
GRAS/trunk/r2242