Warning, /geant4/examples/extended/biasing/GB06/README is written in an unsupported language. File is not indexed.
0001 Example GB06: parallel geometries with generic biasing
0002 ------------------------------------------------------
0003
0004
0005 This example demonstrates the use of parallel geometries in generic biasing,
0006 on a classical shield problem, using geometry-based importance biasing.
0007
0008 1) Geometry and activation of navigation in parallel world:
0009 --------------------------------------------------------
0010
0011 The geometry is made of two parts:
0012 - the mass (standard) geometry, which is made of a single block of
0013 concrete ; this is implemented in GB06DetectorConstuction ;
0014 - a parallel geometry, in which a series of slices is defined, these
0015 slices being created using a replica volume ; this is implemeted in
0016 GB06ParallelGeometryForSlices, which derives from the base class
0017 G4VUserParallelWorld .
0018
0019 The navigation in the parallel geometry is activated for neutrons. This is
0020 done in the main program exampleGB06.cc. The activation is made using the
0021 facilities of the G4GenericBiasingPhysics class, as:
0022
0023 biasingPhysics->AddParallelGeometry("neutron",
0024 "parallelWorldForSlices");
0025
0026 where the first name is for the particle type to be aware of the parallel word,
0027 the second argument is the name of the parallel world.
0028
0029 When checking the process list of neutrons (/particle/select neutron and
0030 then /particle/process dump ) a new process, `biasingLimiter', is visible. This
0031 process handles the step limitation in the parallel geometry. This process can
0032 handle several parallel geometries, these being passed to the process as
0033 biasingPhysics->AddParallelGeometry("neutron", "parallelWorld1") ,
0034 biasingPhysics->AddParallelGeometry("neutron", "parallelWorld2") , etc.
0035
0036 The geometry-based importance technique utilizes only splitting and killing,
0037 hence techniques which are "non-physics biasing" techniques, in the sense they
0038 don't modify the behavior of physics processes. For this reason, only a process
0039 making the interface between the tracking and the biaising is inserted in the
0040 physics list, the physics processes themselves being untouched, this is made as:
0041
0042 biasingPhysics->NonPhysicsBias("neutron");
0043
0044 Finally, the volume (ie the slice) importances are defined in a simple
0045 "importance map" that is created in the GB06ParallelGeometryForSlices class, this
0046 map associating a replica number to a volume importance. The map is hold by the
0047 biasing operator.
0048
0049
0050 2) Biasing classes:
0051 ----------------
0052
0053 As usual, with the generic biasing scheme, a biasing operator and a biasing
0054 operation are defined, these are, respectively the
0055
0056 GB06BOptrSplitAndKillByImportance and
0057 GB06BOptnSplitAndKillByImportance
0058
0059 classes. The operator here only handles one particle type. In the StartRun()
0060 method, it configures the biasing operation GB06BOptnSplitAndKillByImportance
0061 passing it the information related to the parallel geometry, and passing it the
0062 importance map.
0063
0064 The biasing operation GB06BOptnSplitAndKillByImportance applies a classical
0065 importance-based geometry technique, with spliting / killing at the slice
0066 bondaries. Splitting is made if the track goes from a smaller importance to a
0067 volume of larger importance, and killing (Russian roulette) is applied in the
0068 other case.
0069 The particularity of this biasing operation is its handling of the parallel
0070 geometry information. It has to get by itself geometry information that, in the
0071 case of information of the mass geometry, are provided in the G4StepPoint objects
0072 (pre step point, post step point) of the G4Step. Here, in the
0073 DistanceToApplyOperation(...), which is called at the beginning of the step, it
0074 gets a "snapshot" of the geometry state keeping a G4TouchableHandle. Then
0075 in the GenerateBiasingFinalState, which is called at the end of the step, it gets
0076 the new geometry state, with an other G4TouchableHandle. For a step that
0077 ends on the boundary, this last touchable history will logically point to the
0078 next volume. In this case, the biasing is applied, and the importances are
0079 obtained from the replica numbers taken from the two touchable histories, and
0080 then from the importance map.
0081
0082 3) Output:
0083 -------
0084
0085 A simple sensitive detector is defined (GB06SD) and is attached to a thin
0086 volume ("meas.logical") placed after the concrete shield. This sensitive
0087 detector simply prints the information (particle type, kinetic energy, etc,
0088 and weight) leaving the shield.
0089
0090
0091 4) Known problems:
0092 ---------------
0093
0094 In exampleGB06.in the neutron killer process, nKiller, is de-activated
0095 (process that kills neutrons after some time), for two reasons. First, killing
0096 neutrons in a shield problem is not desirable because neutrons may fly for some
0097 time before leaving the shield, and hence must be accounted for. Second, if
0098 nKiller is left active, an exception message about a spurious displacement by
0099 1e-7mm will appear sometimes : this happens when a neutron is killed on a volume
0100 boundary, and the navigation "sees" a (tiny) displacement, that should not exist.