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 Fundamentalsvolume or of a user defined sphere. The adjoint source should contain one or several sensitive volumes and shouldbe small compared to the entire geometry. The user can set the minimum and maximum energy of the adjointsource. After its generation the adjoint primary particle is tracked backward in the geometry till a user definedexternal surface (spherical or boundary of a volume) or is killed be<strong>for</strong>e if it reaches a user defined upper energylimit that represents the maximum energy of the external source. During the reverse tracking, reverse processestake place where the adjoint particle being tracked can be either scattered or trans<strong>for</strong>med in another type of adjointparticle. During the reverse tracking the G4AdjointSimulationManager replaces the user defined primary, run,stepping, ... actions, by its own actions. A reverse tracking phase corresponds to one <strong>Geant4</strong> event.3.7.3.1.2. Forward tracking phaseWhen an adjoint particle reaches the external surface its weight, type, position, and direction are registered and anormal primary particle, with a type equivalent to the last generated primary adjoint, is generated with the sameenergy, position but opposite direction and is tracked in the <strong>for</strong>ward direction in the sensitive region as in a <strong>for</strong>wardMC simulation. During this <strong>for</strong>ward tracking phase the event, stacking, stepping, tracking actions defined by theuser <strong>for</strong> his <strong>for</strong>ward simulation are used. By this clear separation between adjoint and <strong>for</strong>ward tracking phases,the code of the user developed <strong>for</strong> a <strong>for</strong>ward simulation should be only slightly modified to adapt it <strong>for</strong> an adjointsimulation (see Section 3.7.3.2). Indeed the computation of the signals is done by the same actions or classes thatthe one used in the <strong>for</strong>ward simulation mode. A <strong>for</strong>ward tracking phase corresponds to one G4 event.3.7.3.1.3. Reverse processesDuring the reverse tracking, reverse processes act on the adjoint particles. The reverse processes that are at themoment available in <strong>Geant4</strong> are the:• Reverse discrete ionization <strong>for</strong> e-, proton and ions• Continuous gain of energy by ionization and bremsstrahlung <strong>for</strong> e- and by ionization <strong>for</strong> protons and ions• Reverse discrete e- bremsstrahlung• Reverse photo-electric effect• Reverse Compton scattering• Approximated multiple scattering (see comment in Section 3.7.3.4.3)It is important to note that the electromagnetic reverse processes are cut dependent as their equivalent <strong>for</strong>wardprocesses. The implementation of the reverse processes is based on the <strong>for</strong>ward processes implemented in the G4standard electromagnetic package.3.7.3.1.4. Nb of adjoint particle types and nb of G4 events of an adjoint simulationThe list of type of adjoint and <strong>for</strong>ward particles that are generated on the adjoint source and considered in thesimulation is a function of the adjoint processes declared in the physics list. For example if only the e- and gammaelectromagnetic processes are considered, only adjoint e- and adjoint gamma will be considered as primaries. Inthis case an adjoint event will be divided in four G4 event consisting in the reverse tracking of an adjoint e-, the<strong>for</strong>ward tracking of its equivalent <strong>for</strong>ward e-, the reverse tracking of an adjoint gamma, and the <strong>for</strong>ward trackingof its equivalent <strong>for</strong>ward gamma. In this case a run of 100 adjoint events will consist into 400 <strong>Geant4</strong> events. If theproton ionization is also considered adjoint and <strong>for</strong>ward protons are also generated as primaries and 600 <strong>Geant4</strong>events are processed <strong>for</strong> 100 adjoint events.3.7.3.2. How to update a G4 application to use the reverse MonteCarlo modeSome modifications are needed to an existing <strong>Geant4</strong> application in order to adapt it <strong>for</strong> the use of the reversesimulation mode (see also the G4 example examples/extended/biasing/ReverseMC01). It consists into the:• Creation of the adjoint simulation manager in the main code• Optional declaration of user actions that will be used during the adjoint tracking phase• Use of a special physics lists that combine the adjoint and <strong>for</strong>ward processes• Modification of the user analysis part of the code61

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

Saved successfully!

Ooh no, something went wrong!