B01, B02 and B03 applications demonstrate the usage of different variance reduction techniques supported in Geant4, or possible from the user applications.
The tools provided for importance sampling (or geometrical splitting and Russian roulette) and for the weight window technique require the user to have a good understanding of the physics in the problem. This is because the user has to decide which particle types have to be biased, define the cells (physical volumes, replicas) and assign importances or weight windows to that cells. If this is not done properly it can not be expected that the results describe a real experiment. The examples given here only demonstrate how to use the tools technically. They don't intend to produce physical correct results.
Scoring is carried out using the built-in Multifunctional detectors. For parallel geometries this requires a special scoring physics process. See examples/extended/runAndEvent (especailly RE05) for clarification.
In the following scenario it can happen that a particle is not biased and it's weight is therefore not changed even if it crosses a boundary where biasing should happen. Importance and weight window sampling create particles on boundaries between volumes. If the GPIL method of a physical process returns 0 as step length for a particle on a boundary and if the PostStepDoIt of that process changes the direction of the particle to go back in the former volume the biasing won't be invoked. This will produce particles with weights that do not correspondent to the importance of the current volumes.
Short description of importance sampling and scoring: http://cern.ch/geant4/working_groups/geometry/biasing/Sampling.html
The example uses importance sampling or the weight window technique according to an input parameter. It uses scoring in both cases. Importance values or weight windows are defined according to the mass geometry. In this example the weight window technique is configured such that it behaves equivalent to importance sampling: The window is actually not a window but simply the inverse of the importance value and only one energy region is used that covers all energies in the problem. The user may change the weight window configuration by changing the initialization of the weight window algorithm in example,cc. Different energy bounds for the weight window technique may be specified in B01DetectorConstruction.
The executable takes one optional argument: 0 or 1. Without argument or with argument: 0, the importance sampling is applied with argument: 1, the weight window technique is applied.
This example uses a parallel geometry to define G4GeometryCell objects for scoring and importance sampling. The output should be equivalent to B01.
A modular approach is applied to the physicslist and the extension for biasing. The parallel geometry is included in this extension.
This example uses a parallel geometry to define G4GeometryCell objects for scoring and importance sampling. The output should be statistically equivalent to B02 (and B01).
This demonstrates a customised "flat" physics implementation with the addition of biasing. Complementary approach to the modular physics lists of B01 and B02
These examples illustrate the usage of a biasing scheme implemented since version Geant4 10.0. The scheme is meant to be extensible, not limited to these six examples.
This example illustrates how to bias process cross-sections in this scheme.
Illustrates a force collision scheme similar to the MCNP one.
Illustrates geometry based biasing.
Illustrates a bremsstrahlung splitting.
Illustrates a "splitting by cross-section" technique: a splitting-based technique using absorption cross-section to control the neutron population.
Illustrates the usage of parallel geometries with generic biasing.
Illustrates the usage of leading particle biasing with generic biasing.
Example illustrating the use of the Reverse Monte Carlo (RMC) mode in a Geant4 application. See details in Example README page .