Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/biasing/GB02/README.md is written in an unsupported language. File is not indexed.

0001 \page ExampleGB02 Example GB02
0002 
0003 ## Force collision biasing
0004 
0005 This example illustrates how to make a force collision biasing in a way
0006 that is essentially the same than the MCNP one.
0007 
0008 Generally speaking, the scheme consists of a G4VBiasingOperator that takes
0009 decisions on what sort of biasing is to be applied. The operator makes these
0010 decision on requests of the G4BiasingProcessInterface process. This process
0011 wraps an actual physics process and asks to the operator about what sort of
0012 biasing it should apply. This operator selects G4VBiasingOperation objects that
0013 implement the actual biasing content.
0014 
0015 In the present case, we make use of the biasing operator
0016 - G4BOptrForceCollision
0017 that implements an "a la MCNP" force collision scheme for one particle type.
0018 This operator is defined in processes/biasing/generic. It is a non-trivial
0019 operator.
0020 It starts by "splitting" the track at the volume entrance. Then this
0021 track is forced to fly through the volume with no interaction. The
0022 G4OptnForceFreeFlight biasing operation is used for that.
0023 The second copy is then forced to interact within the volume, which is
0024 handled by the G4BOptnForceCommonTruncatedExp operation : it is common as it
0025 takes care of several processes by itself, and it applies a truncated
0026 exponential law : ie and exponential law limited to the [0,L] range, L being
0027 the volume width along the track flight.
0028 
0029 To allow several particle types to undergo this force interaction scheme,
0030 an other operator is defined
0031 - GB02BOptrMultiParticleForceCollision
0032 which holds one G4BOptrForceCollision per particle type, and which
0033 delegates then everything to it.
0034 
0035 The geometry is simple : a single volume to which an instance of
0036 GB02BOptrMultiParticleForceCollision is attached to.
0037 
0038 The wrapping of physics processes by G4BiasingProcessInterface processes
0039 is simply handled by the G4GenericBiasingPhysics physics constructor, as shown
0040 in the main program.
0041 
0042 Then, at whatever level (stepping action, or sensitive detector) the
0043 statistical weight of the track can be obtained as:
0044 ```cpp
0045 w = track->GetWeight() ;
0046 ```