source: trunk/examples/extended/biasing/README @ 1337

Last change on this file since 1337 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 4.6 KB
Line 
1
2                    Examples for event biasing: B01 and B02
3                    ---------------------------------------
4
5B01 and B02 applications demonstrate the usage of different variance
6reduction techniques supported in Geant4, or possible from the user
7applications.
8
9General remark to variance reduction
10------------------------------------
11The tools provided for importance sampling (or geometrical splitting and
12Russian roulette) and for the weight window technique require the user to
13have a good understanding of the physics in the problem. This is because
14the user has to decide which particle types have to be biased, define the
15cells (physical volumes, replicas) and assign importances or weight
16windows to that cells. If this is not done properly it can not be
17expected that the results describe a real experiment. The examples given
18here only demonstrate how to use the tools technically. They don't intend
19to produce physical correct results.
20
21General remark to scoring
22-------------------------
23A interface G4VScorer is provided for the user. The user may create his
24own class to perform the desired scoring. The user defined class
25therefore should inherit from the interface G4VScorer.
26An example of an implementation of a scorer is G4Scorer
27which may be found in source/event.
28The scoring in these examples is done with a G4Scorer.
29The variance reduction techniques and scoring do not support all options
30of the Geant4 geometry. It only supports physical volumes and simple
31replicas.
32To identify a physical volume (or replica) objects of the class
33G4GeometryCell are used. Scoring is done according to these
34cells and importance values or the weight windows  may be assigned to
35them.
36When scoring is done in a parallel geometry special action has to be taken
37to prevent counting of "collisions" with boundaries of the mass geometry
38as interactions. This is differently handled when scoring is done in the
39mass geometry.
40
41--> G4GeometryCell of the parallel geometry must not share boundaries with
42the world volume! <--
43
44Known problems
45--------------
46In the following scenario it can happen that a particle is not
47biased and it's weight is therefore not changed even if it crosses
48a boundary where biasing should happen.
49Importance and weight window sampling create particles on boundaries
50between volumes. If the GPIL method of a physical process returns
510 as step length for a particle on a boundary and if the PostStepDoIt of
52that process changes the direction of the particle to go back in the
53former volume the biasing won't be invoked.
54This will produce particles with weights that do not correspondent to the
55importance of the current volumes.
56
57Further information:
58--------------------
59Short description of importance sampling and scoring:
60http://cern.ch/geant4/working_groups/geometry/biasing/Sampling.html
61
62Example B01
63===========
64
65The example uses importance sampling or the weight window technique
66according to an input parameter. It uses scoring in both cases.
67Importance values or weight windows are defined according to the mass
68geometry. In this example the weight window technique is configured such
69that it behaves equivalent to importance sampling: The window is actually
70not a window but simply the inverse of the importance value and only
71one energy region is used that covers all energies in the problem.
72The user may change the weight window configuration by changing the
73initialization of the weight window algorithm in example,cc.
74Different energy bounds for the weight window technique may be specified
75in B01DetectorConstruction.
76
77The executable takes one optional argument: 0 or 1. Without argument or
78with argument: 0, the importance sampling is applied with argument: 1,
79the weight window technique is applied.
80
81
82Example B02
83===========
84
85This example uses a parallel geometry to define G4GeometryCell objects
86for scoring and importance sampling. In addition it customizes
87the scoring. In this example one scorer creates a histogram.
88
89Compiling and running
90---------------------
91To compile this example you need AIDA installed. To link
92and run it you need a AIDA compliant analysis package.
93Histograms are saved in HBOOK format.
94You need to set the following variable in your environment:
95   "G4ANALYSIS_USE"
96The example stores the plot in the file b02.hbook.
97
98 ___________________________________________________________________________
99
100
101             Reverse MonteCarlo Technique example: ReverseMC01
102             -------------------------------------------------
103
104Example ReverseMC01
105===================
106
107Example illustrating the use of the Reverse Monte Carlo (RMC) mode in a Geant4
108application. See details in ReverseMC01/README.
109
Note: See TracBrowser for help on using the repository browser.