12.07.2015 Views

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Toolkit FundamentalsWeight roulette uses a relative minimal weight limit and a relative survival weight. When a particle falls belowthe weight limit Russian roulette is applied. If the particle survives, tracking will be continued and the particleweight will be set to the survival weight.The weight roulette uses the following parameters with their default values:• wsurvival: 0.5• wlimit: 0.25• isource: 1The following algorithm is applied:If a particle weight "w" is lower than R*wlimit:• the weight of the particle will be changed to "ws = wsurvival*R"• the probability <strong>for</strong> the particle to survive is "p = w/ws"3.7.2. Physics Based Biasing<strong>Geant4</strong> supports physics based biasing through a number of general use, built in biasing techniques. A utility class,G4WrapperProcess, is also available to support user defined biasing.3.7.2.1. Built in Biasing Options3.7.2.1.1. Primary Particle BiasingPrimary particle biasing can be used to increase the number of primary particles generated in a particular phasespace region of interest. The weight of the primary particle is modified as appropriate. A general implementationis provided through the G4GeneralParticleSource class. It is possible to bias position, angular and energy distributions.G4GeneralParticleSource is a concrete implementation of G4VPrimaryGenerator. To use, instantiateG4GeneralParticleSource in the G4VUserPrimaryGeneratorAction class, as demonstrated below.MyPrimaryGeneratorAction::MyPrimaryGeneratorAction() {generator = new G4GeneralParticleSource;}voidMyPrimaryGeneratorAction::GeneratePrimaries(G4Event*anEvent){generator->GeneratePrimaryVertex(anEvent);}The biasing can be configured through interactive commands. Extensive documentation can be found in Primaryparticle biasing. Examples are also distributed with the <strong>Geant4</strong> distribution in examples/extended/eventgenerator/exgps.3.7.2.1.2. Radioactive Decay BiasingThe G4RadioactiveDecay class simulates the decay of radioactive nuclei and implements the following biasingoptions:• Increase the sampling rate of radionuclides within observation times through a user defined probability distributionfunction• Nuclear splitting, where the parent nuclide is split into a user defined number of nuclides• Branching ratio biasing where branching ratios are sampled with equal probabilityG4RadioactiveDecay is a process which must be registered with a process manager, as demonstrated below.void MyPhysicsList::ConstructProcess(){58

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!