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.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]
1 Example GB01 : cross-section biasing
2 ------------------------------------
3
4 This example illustrates how to bias process cross-sections.
5
6 Generally speaking, the scheme consists of a G4VBiasingOperator that takes
7 decisions on what sort of biasing is to be applied. The operator makes these
8 decision on requests of the G4BiasingProcessInterface process. This process
9 wraps an actual physics process and asks to the operator about what sort of
10 biasing it should apply. This operator selects G4VBiasingOperation objects that
11 implement the actual biasing content.
12
13 In the present case, the G4VBiasingOperation objects are
14
15 G4BOptnChangeCrossSection
16
17 instances. This class is defined in processes/biasing/generic.
18
19 A first operator is defined to handle the case of one particle:
20
21 GB01BOptrChangeCrossSection .
22
23 The change of cross-section is generally speaking a change of process occurence.
24 G4BOptnChangeCrossSection objets are then selected in the method:
25
26 G4VBiasingOperation* ProposeOccurenceBiasingOperation(...)
27
28 of the GB01BOptrChangeCrossSection operator.
29
30
31 To allow this same cross-section change to be applied to several particle
32 types, an other operator is defined
33
34 GB01BOptrMultiParticleChangeCrossSection
35
36 which holds one GB01BOptrChangeCrossSection per particle type, and which
37 delegates then everything to it.
38
39 The geometry is simple : a single volume to which an instance of
40 GB01BOptrMultiParticleChangeCrossSection is attached to.
41
42 The wrapping of physics processes by G4BiasingProcessInterface processes
43 is simply handled by the G4GenericBiasingPhysics physics constructor, as shown
44 in the main program.
45
46
47 Then, at whatever level (stepping action, or sensitive detector) the
48 statistical weight of the track can be obtained as:
49
50 w = track->GetWeight() ;