Warning, /geant4/examples/extended/biasing/GB01/README is written in an unsupported language. File is not indexed.
0001 Example GB01 : cross-section biasing
0002 ------------------------------------
0003
0004 This example illustrates how to bias process cross-sections.
0005
0006 Generally speaking, the scheme consists of a G4VBiasingOperator that takes
0007 decisions on what sort of biasing is to be applied. The operator makes these
0008 decision on requests of the G4BiasingProcessInterface process. This process
0009 wraps an actual physics process and asks to the operator about what sort of
0010 biasing it should apply. This operator selects G4VBiasingOperation objects that
0011 implement the actual biasing content.
0012
0013 In the present case, the G4VBiasingOperation objects are
0014
0015 G4BOptnChangeCrossSection
0016
0017 instances. This class is defined in processes/biasing/generic.
0018
0019 A first operator is defined to handle the case of one particle:
0020
0021 GB01BOptrChangeCrossSection .
0022
0023 The change of cross-section is generally speaking a change of process occurence.
0024 G4BOptnChangeCrossSection objets are then selected in the method:
0025
0026 G4VBiasingOperation* ProposeOccurenceBiasingOperation(...)
0027
0028 of the GB01BOptrChangeCrossSection operator.
0029
0030
0031 To allow this same cross-section change to be applied to several particle
0032 types, an other operator is defined
0033
0034 GB01BOptrMultiParticleChangeCrossSection
0035
0036 which holds one GB01BOptrChangeCrossSection per particle type, and which
0037 delegates then everything to it.
0038
0039 The geometry is simple : a single volume to which an instance of
0040 GB01BOptrMultiParticleChangeCrossSection is attached to.
0041
0042 The wrapping of physics processes by G4BiasingProcessInterface processes
0043 is simply handled by the G4GenericBiasingPhysics physics constructor, as shown
0044 in the main program.
0045
0046
0047 Then, at whatever level (stepping action, or sensitive detector) the
0048 statistical weight of the track can be obtained as:
0049
0050 w = track->GetWeight() ;