Warning, /geant4/examples/extended/biasing/ReverseMC01/README is written in an unsupported language. File is not indexed.
0001 Example1 for Reverse Monte Carlo
0002 --------------------------------
0003
0004
0005 Author
0006 ------
0007 This example code and the adjoint classes in the G4 toolkit have been developed by L.Desorgher (SpaceIT GmbH)
0008 under the ESA contract 21435/08/NL/AT. For any (reasonable) question you may contact the author
0009 at the following email address : desorgher@spaceit.ch
0010
0011
0012 Abstract
0013 --------
0014 This is the README file for the first G4 example illustrating the use of the Reverse Monte Carlo (RMC) mode in a Geant4
0015 application. The Reverse Monte Carlo method is also known as the Adjoint Monte Carlo (AMC) method and
0016 in this document we will alternate both Reverse and Adjoint terms.
0017
0018 Other documentation
0019 -------------------
0020 See also the section 3.7.3 Adjoint/Reverse Monte carlo in the
0021 Geant4 User guide for application developers.
0022
0023
0024 Table of Contents:
0025 -----------------
0026
0027 1.Definition of Reverse/Adjoint Monte Carlo
0028
0029 2.The Reverse Monte Carlo mode in Geant4 (since G4.9.3 release)
0030 2.1. Reverse tracking phase
0031 2.2. Forward tracking phase
0032 2.3. Reverse processes
0033 2.4. Remark on Nb of adjoint particle types and G4 events considered in an adjoint simulation
0034 2.5. Modifications to bring in a existing G4 application to use the Reverse MC method
0035
0036 3.exampleRMC01
0037 3.1. Geometry
0038 3.2. Physics
0039 3.3. Analysis and output of the code
0040 3.4. Run macrofiles
0041 3.5. Comparison of adjoint and forward simulation results. Normalization!
0042
0043 4.Control of the adjoint simulation and the RMC01 code by G4 macro UI commands
0044 4.1. G4UI commands in the directory /adjoint
0045 4.2. G4UI commands in the directory /adjoint_physics
0046 4.3. G4UI commands in the directory /RMC01
0047
0048 5. Known issues
0049 5.1. Rare too high weight in the adjoint simulation
0050 5.2. Limitation of the reverse bremsstrahlung
0051 5.3.Limitation of the reverse multiple scattering
0052
0053
0054
0055 1. Definition of Reverse/Adjoint Monte Carlo
0056 -----------------------------------------
0057 -----------------------------------------
0058 When the sensitive part of a detector is small compared to its entire size and to the size of the
0059 external extended primary particle source, a lot of computing time is spent during a normal Monte Carlo run
0060 in the simulation of particle showers that are not contributing to the detector signal.
0061 In such particular case the Reverse Monte Carlo (RMC) method, also known as the
0062 Adjoint Monte Carlo method, can be used.
0063 In this method particles are generated in or on the external surface of the sensitive volume
0064 of the instrument and then are tracked backward in the geometry till they reach the source surface,
0065 or exceed an energy threshold. During the reverse tracking reverse reactions are applied to the particles.
0066
0067
0068
0069 2. The Reverse Monte Carlo mode in Geant4 (since G4.9.3 release)
0070 ----------------------------------------------------------------
0071 ----------------------------------------------------------------
0072 (See also the section 3.7.3 Adjoint/Reverse Monte carlo in the
0073 Geant4 User guide for application developers.)
0074
0075 Different G4Adjoint classes have been implemented into the Geant4
0076 toolkit to run an adjoint/reverse simulation in a Geant4 application.
0077 In this implementation an adjoint run is divided in a succession
0078 of alternative adjoint and forward tracking of adjoint and normal particles.
0079 One Geant4 event treats the reverse tracking of an adjoint primary particle
0080 and its secondaries, and the forward tracking of a primary particle euqivalent
0081 to the adjoint primary as well as its secondaries.
0082
0083
0084 2.1. Reverse tracking phase:
0085 -------------------------
0086
0087 Adjoint particles (adjoint_e-, adjoint_gamma,...) are generated one by one on the so called
0088 adjoint source with random position, energy (1/E distribution) and direction. The adjoint
0089 source is the external surface of a user defined volume or of a user defined sphere. The
0090 adjoint source should contain one or several sensitive volumes and should be small
0091 compared to the entire geometry. The user can set the minimum and maximum energy of the
0092 adjoint source. After its generation the adjoint primary particle is tracked backward in
0093 the geometry till a user defined external surface (spherical or boundary of a volume)
0094 or is killed before if it reaches a user defined upper energy limit that represents the
0095 maximum energy of the external source. During the reverse tracking, reverse processes take
0096 place where the adjoint particle being tracked can be either scattered or transformed in
0097 another type of adjoint particle. During the reverse tracking the
0098 G4AdjointSimulationManager replaces the user defined primary, run, stepping, ... actions,
0099 by its own actions.
0100
0101 2.2. Forward tracking phase:
0102 --------------------------
0103
0104 When an adjoint particle reaches the external surface its weight, type, position,
0105 and direction are registered and a normal primary particle with a type equivalent
0106 to the last generated adjoint primary is generated with the same energy,
0107 position but opposite direction and is tracked in the forward direction
0108 in the sensitive region as in a forward MC simulation.
0109 During this forward tracking phase the event, stacking, stepping, tracking actions defined
0110 by the user for its general forward application are used.
0111 By this clear separation between adjoint and forward tracking phases, the code of the
0112 user developed for a forward simulation should be only slightly
0113 modified to adapt it for an adjoint simulation. Indeed the computation of the signal
0114 is done by the same user actions or analysis classes that the one used in the forward
0115 simulation mode. Before the G4.10.0 release the reverse and forward tracking mode
0116 took place in separated events. Since the G4.10.0 release,
0117 in order to prepare to the migration of the
0118 ReverseMC to the G4 Multiple Threading mode, the reverse and forward tracking
0119 phase of corresponding adjoint and forward primaries have been merged in the same
0120 event.
0121
0122
0123 2.3. Reverse Processes:
0124 ---------------------
0125
0126 During the reverse tracking phase reverse processes act on the adjoint particles.
0127 The Reverse processes that are available at the moment in Geant4 are the:
0128 - Reverse discrete Ionization for e-, proton and ions
0129 - Continuous gain of energy by ionization and bremsstrahlung for e- and by ionization for protons and ions
0130 - Reverse discrete e- bremsstrahlung
0131 - Reverse photoelectric effect
0132 - Reverse Compton scattering
0133 - Approximated multiple scattering (MS) (see section 5.3)
0134
0135 For the gamma reverse physics an adjoint gamma reverse forced interaction process has been implemented
0136 since GEANT4.10.3. THis process splits a new created gamma in two tracks.
0137 The first tracks is used to force a free flight of the adjoint gamma through the geometry.
0138 The second track is used to force a reverse bremsstrahlung or a reverse compton at some random
0139 position along the free flight track.
0140
0141 It is important to note that the electromagnetic reverse processes are cut dependent
0142 as their equivalent forward processes. The implementation of the reverse processes is
0143 based on the forward processes
0144 implemented in the G4 standard electromagnetic package.
0145
0146
0147 2.4. Remark on Nb of adjoint particle types and Nb of G4 events considered in an adjoint simulation:
0148 ---------------------------------------------------------------------------------
0149
0150 The list of type of adjoint and forward particles that are generated on the adjoint source
0151 and considered in the simulation is a function of the adjoint processes declared in the
0152 physics list. For example if only the e- and gamma electromagnetic processes are considered
0153 , only adjoint e- and adjoint gamma will be considered as primaries. In this case an
0154 adjoint event will be divided in two G4 events. The first event will consist
0155 into the coupled reverse and forward tracking of an adjoint e- and its equivalent
0156 forward e-, while the second events will process the reverse and forward trackings
0157 of corresponsing adjoint and forward primary gammas. In this case a
0158 run of 100 adjoint events will consist into 200 Geant4 events. If the proton ionization is
0159 also considered adjoint and forward protons are also generated as primaries
0160 and 300 Geant4 events are processed for 100 adjoint events.
0161
0162 2.5. Modifications to bring in a existing G4 application to use the Reverse MC method
0163 --------------------------------------------------------------------------------
0164 (for more details see also the section 3.7.3 Adjoint/Reverse Monte carlo in the
0165 Geant4 User guide for application developers.)
0166
0167 Due the clear separation between the reverse and forward tracking phase only few modifications are needed
0168 to an existing Geant4 application in order to adapt it for the use of the reverse simulation mode.
0169 Except in the physics list where all the reverse processes and their forward equivalent
0170 have to be declared, the principal code modifications are needed only in the analysis phase at the end
0171 of the forward tracking where computed signals have to be multiplied by the weight
0172 of the reverse tracks that have reached the external surface of the simulatrion
0173 and then normalized to different user defined spectra and angular distribution representing
0174 the external source.
0175 The weight of the adjoint tracks is computed by the G4Adjoint classes and the user needs
0176 only to multiply them to the primary differential, directional spectrum of its choice.
0177 The adjoint weight a the end of tracks can be also registered if needed in answer matrices.
0178
0179 More precisely, in order to be able to use the Reverse MC method in his simulation, the user should modify
0180 its code as such:
0181
0182 - Adapt its physics list to use Reverse Processes for adjoint particles. An example of such physics list is provided in an extended
0183 example.
0184 - Create an instance of G4AdjointSimManager somewhere in the main code.
0185
0186 - Modify the analysis part of the code to normalize the signal computed during the forward phase to the weight
0187 of adjoint particle that reached the external surface during the last tracking phase.
0188 This is done by using the following method of G4AdjointSimManager.
0189 size_t GetNbOfAdointTracksReachingTheExternalSurface()
0190 G4int GetIDOfLastAdjParticleReachingExtSource(size_t i)
0191 G4ThreeVector GetPositionAtEndOfLastAdjointTrack(size_t i)
0192 G4ThreeVector GetDirectionAtEndOfLastAdjointTrack(size_t i)
0193 G4double GetEkinAtEndOfLastAdjointTrack(size_t i)
0194 G4double GetEkinNucAtEndOfLastAdjointTrack(size_t i)
0195 G4double GetWeightAtEndOfLastAdjointTrack(size_t i)
0196 G4double GetCosthAtEndOfLastAdjointTrack(size_t i)
0197 G4String GetFwdParticleNameAtEndOfLastAdjointTrack(size_t i)
0198 G4int GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack(size_t i)
0199 G4int GetFwdParticleIndexAtEndOfLastAdjointTrack(size_t i).
0200 Since the version Geant4.10.3 several adjoint tracks can arrive on the external surface during the same events.
0201 It is therefore important to loop over alll these tracks when normalizing the weights at the end of the event.
0202 The method GetNbOfAdointTracksReachingTheExternalSurface() returns the number of adjoint tracks that reached the
0203 external surface. Ine the other methods the input parameter i allows to get the information of the ith track.
0204
0205 In order to have a code working for both forward and adjoint simulation mode, the extra code needed in user actions for the adjoint
0206 simulation mode can be separated to the code needed only for the normal forward simulation by using the following method
0207
0208 G4bool GetAdjointSimMode() that return true if an adjoint simulation is running and false if not!
0209
0210
0211
0212 3. exampleRMC01
0213 ---------------
0214 ---------------
0215 The example RMC01 illustrates how to modify a G4 application in order to use
0216 both forward and reverse MC modes in the same code.
0217
0218
0219 3.1. Geometry:
0220 --------------
0221
0222 The following simple geometry is considered:
0223 - sensitive Silicon cylinder at the center of an Aluminum spherical shielding with 10 cm Radius.
0224 - two 0.5mm thick Tantalum plates set horizontally above and below the Sensitive Cylinder
0225
0226 The free parameters of the geometry that can bes set by the user are:
0227 - the thickness of the Aluminum shielding
0228 - the height of the sensitive Si cylinder
0229 - the radius of the sensitive Si cylinder
0230
0231
0232
0233 3.2. Physics:
0234 -------------
0235
0236 The physical processes considered are:
0237 - Reverse and forward discrete Ionization for e- and proton
0238 - Continuous gain and loss of energy by ionization and bremsstrahlung for e- and by ionization for protons
0239 - Reverse and forward discrete e- bremsstrahlung
0240 - Reverse and forward photoelectric effect
0241 - Reverse and forward Compton scattering
0242 - Reverse and forward Multiple scattering
0243
0244 These processes are implemented in the class G4AdjointPhysicsList distributed with the example. The G4AdjointPhysicsMessenger allows the user
0245 to switch on/off some processes for testing purpose. By default all processes cited above are considered except the proton ionization that
0246 has to be specifically switch on in the macro file by the user.
0247
0248
0249
0250 3.3. Analysis and output of the code:
0251 ----------------------------------
0252
0253 The example computes the energy deposited in the sensitive Si cylinder and the current of e-, protons, and gamma
0254 entering this cylinder.
0255 The Hits are registered in the sensitive detector class RMC01SD that is a typical G4 sensitive detector class
0256 used in a forward simulation and is not modified at all
0257 for the adjoint simulation mode.
0258 The analysis of the registered hits during forward events is done by the RMCO1AnalysisManager.
0259 That is the class that illustrates how to adapt an analysis code of a fwd simulation in order to use it also for
0260 an adjoint simulation.
0261 In this class during a forward simulation the method EndOfEventForForwardSimulation is used at the end of an event
0262 while during an adjoint simulation at the end of fwd tracking event the method EndOfEventForAdjointSimulation is called.
0263 By looking at the source of RMCO1AnalysisManager and more particularly to its method EndOfEventForAdjointSimulation the user will
0264 learn how to adapt its G4 analysis code for an adjoint simulation.
0265
0266 The outputs of an adjoint simulation are:
0267
0268 -The total energy deposited and particle current entering the sensitive cylinder normalized
0269 automatically to a user defined primary spectrum(exponential or power law) .
0270 These results are stored in the files:
0271 -Adj_Edep_vs_EkinPrim.txt
0272 -Adj_ElectronCurrent.txt
0273 -Adj_GammaCurrent.txt
0274 -Adj_ProtonCurrent.txt
0275 -ConvergenceOfAdjointSimulationResults.txt:
0276 The total normalized edep and its relative error registered every 5000 adjoint events
0277
0278
0279 -The answer matrix of the energy deposited and particles current on the sensitive cylinder in function of primary energy of e-, gamma and
0280 protons. These results are stored in the files Adj********_Answer.txt
0281
0282
0283
0284 The outputs of a forward simulation are:
0285 -The mean energy deposited and particle current entering the sensitive cylinder per event.
0286 These results are stored in the files:
0287 -Fwd_Edep_vs_EkinPrim.txt
0288 -Fwd_ElectronCurrent.txt
0289 -Fwd_GammaCurrent.txt
0290 -Fwd_ProtonCurrent.txt
0291 -ConvergenceOfAdjointSimulationResults.txt: The total normalized edep and its relative error registered every 5000 adjoint events
0292
0293
0294
0295 3.4. Run macrofiles:
0296 ------------------
0297 The following example run macro files are distributed with the code:
0298
0299 -run_adjoint_simulation_electron.mac and run_adjoint_simulation_proton.mac for adjoint simulations
0300
0301 -run_forward_simulation_electron.mac and run_forward_simulation_proton.mac for forward simulations
0302
0303
0304 3.5. Comparison of adjoint and forward simulation results:
0305 ----------------------------------------------------------
0306 It is the responsibility of the user to select in the macro file the same external spectrum
0307 for both the forward and adjoint simulations and to normalize the per event results of the forward simulation
0308 to the fluence considered in the adjoint simulation.
0309
0310 For the macro files that are provided with the examples it consists into multiplying the forward results by pi*100.
0311 This normalization factor is explained by the following:
0312
0313 -For the forward simulation the results are given per number of events. It corresponds
0314 to a normalization to a fluence of 1 particle emanating from the external source.
0315
0316 -In run_fwd_simulation.mac the source is set on a sphere of 10 cm radius (see /gps commands in
0317 macrofile).Therefore the omnidirectional fluence for the fwd simulation is 1./(pi*R^2) with R=10cm.
0318
0319 -The adjoint results are normalized to a fluence of 1/cm2.
0320 (See command /RMC01/analysis/SetExponentialSpectrumForAdjointSim in macrofile)
0321
0322 -In conclusion to compare the adjoint and forward results, the forward results should
0323 be multiplied by pi*R^2/cm2= pi*100.
0324
0325
0326
0327 4. Control of the adjoint simulation and the RMC01 code by G4 macro UI commands:
0328 -------------------------------------------------------------------------
0329 Different G4 macro UI commands are provided to control the RMC01 example and the adjoint simulation.
0330 Some macro commands are provided within the geant4 toolkit and appears in a G4 application when the singleton
0331 class G4AdjointSimManager is called somewhere in the code, the other macro commands are
0332 declared in the code distributed within the example.
0333
0334
0335 4.1. G4UI commands in the directory /adjoint
0336 -----------------------------------------------
0337 The macro commands in the directory /adjoint appears in a user application when the singleton
0338 class G4AdjointSimManager is called somewhere in the code.
0339 It allows to control the adjoint source, the external source and start an adjoint simulation.
0340
0341 The command to start an adjoint run is:
0342
0343 -/adjoint/start_run nb
0344 Start an adjoint simulation with a number of events given by nb. It is important to note that the total number of events in the sense of G4
0345 will be nb*2*nb_primary_considered (see 3.4.)
0346
0347
0348 The commands to control the adjoint source are:
0349
0350 -/adjoint/DefineSphericalAdjSource R X Y Z unit_length
0351 The adjoint source is set on a sphere with radius R and centered on position (X,Y,Z)
0352
0353 -/adjoint/DefineSphericalAdjSourceCenteredOnAVolume phys_vol_name R unit_length
0354 The external source is set on a sphere with radius R and with its center position located at the center of the
0355 the physical volume specified by the name phys_vol_name.
0356 -/adjoint/DefineAdjSourceOnExtSurfaceOfAVolume phys_vol_name
0357 The external surface is set as the external boundary of a the physical volume with name phys_vol_name
0358
0359 -/adjoint/SetAdjSourceEmin Emin energy_unit
0360 Set the minimum energy of the external source
0361
0362 -/adjoint/SetAdjSourceEmax Emax energy_unit
0363 Set the maximum energy of the external source
0364
0365 -/adjoint/ConsiderAsPrimary particle_name
0366 The type of particle specified by "particle_name" will be added in the list of primary adjoint particles.
0367 The list of candidates depends on the reverse physics processes considered in the simulation. At the most the
0368 potential candidates are (e-, gamma, proton , ion). For this example only e-, gamma, proton
0369 can be chosen. As the proton ionization is not considered by default, the default list of particles is
0370 [e-,gamma]. To have also the proton as candidate the proton ionization should
0371 be switch on (/adjoint_physics/UseProtonIonisation true).
0372
0373 -/adjoint/NeglectAsPrimary particle_name
0374 The type of particle specified by "particle_name" will be removed from the list of primary adjoint particles.
0375 The list of candidates depends on the reverse physics processes considered in the simulation. At the most the
0376 potential candidates are (e-, gamma, proton , ion). For this example only e-, gamma, proton
0377 can be chosen. As the proton ionization is not considered by default, the default list of particles is
0378 [e-,gamma].To have also the proton as candidate the proton ionization should
0379 be switch on (/adjoint_physics/UseProtonIonisation true).
0380
0381
0382 The commands to control the external source are:
0383
0384 -/adjoint/DefineSphericalExtSource R X Y Z unit_length:
0385 The external source is set on a sphere with radius R and centered on position (X,Y,Z)
0386
0387 -/adjoint/DefineSphericalExtSourceCenteredOnAVolume phys_vol_name R unit_length
0388 The external source is set on a sphere with radius R and with its center position located at the center of the
0389 the physical volume specified by the name phys_vol_name.
0390
0391 -/adjoint/DefineExtSourceOnExtSurfaceOfAVolume phys_vol_name
0392 The external surface is set as the external boundary of a the physical volume with name phys_vol_name
0393
0394 -/adjoint/SetExtSourceEmax Emax energy_unit
0395 Set the maximum energy of the external source. An adjoint track will be stop when a an adjoint particle get an energy higher than this maximum energy.
0396
0397
0398
0399 4.2. G4UI commands in the directory /adjoint_physics
0400 ------------------------------------------------------
0401 These commands allow to control the electromagnetic processes that will be considered in the simulation.
0402
0403 The processes that can be used are:
0404 -Reverse and forward e- continuous and discrete Ionization. Always switch on
0405 -Reverse and forward e- Bremsstrahlung. Switch on by default
0406 -Reverse and forward Compton scattering. Switch on by default
0407 -Reverse and forward photo electric effect. Switch on by default
0408 -Reverse and forward photo electric effect. Switch on by default
0409 -Reverse and forward multiple scattering. Switch on by default
0410 -Reverse and forward proton continuous and discrete Ionization. Switch off by default
0411 -Forward e-e+ pair production. Switch off by default.
0412 If switch all the e+ electromagnetic physics is considered.
0413
0414
0415 The commands that can be used to switch on of these processes are:
0416
0417 /adjoint_physics/UseProtonIonisation true/false
0418 -Switch on/off the reverse and forward proton ionization. Off by default.
0419
0420 /adjoint_physics/UseBremsstrahlung true/false
0421 -Switch on/off the reverse and forward e- bremsstrahlung. On by default.
0422
0423 /adjoint_physics/UseCompton true/false
0424 -Switch on/off the Compton scattering. On by default.
0425
0426
0427 /adjoint_physics/UseMS true/false
0428 -Switch on/off the multiple scattering. On by default.
0429
0430
0431 /adjoint_physics/UseEgainElossFluctuation true/false
0432 -Switch on/off the fluctuation in the continuous energy loss/gain. On by default. Only for test purpose.
0433
0434 /adjoint_physics/UsePEEffect true/false
0435 -Switch on/off the photo electric effect. On by default.
0436
0437
0438 /adjoint_physics/UseGammaConversion true/false
0439 -Switch on/off the forward e-e+ pair production from gamma. Off by default. When On all the e+
0440 electromagnetic physics is considered.
0441
0442
0443 The user can also fix the maximum energy Emax and minimum energy Emin of the adjoint physical processes used
0444 in the simulation. The adjoint process will be applied to particles within the energy range [Emin, Emax]
0445 and will produce adjoint secondary only in this energy range. It is recommended to fix Emin to the minimum
0446 energy of the adjoint source and fix Emax to the maximum energy of the external source.
0447 The commands controlling Emin and Emax are:
0448
0449 /adjoint_physics/SetEminForAdjointModels Emin Energy_unit
0450 -Set the minimum energy of the adjoint processes/models.
0451
0452 /adjoint_physics/SetEmaxForAdjointModels Emin Energy_unit
0453 -Set the maximum energy of the adjoint processes/models.
0454
0455
0456 4.3. G4UI commands in the directory /RMC01
0457 ----------------------------------------------
0458
0459 Commands/RMC01/geometry/ to control the geometry:
0460
0461 /RMC01/geometry/SetSensitiveVolumeHeight H length_unit
0462 Set the height H of the Si sensitive cylinder.
0463
0464
0465 /RMC01/geometry/SetSensitiveVolumeRadius R length_unit
0466 Set the radius R of the Si sensitive cylinder.
0467
0468 /RMC01/geometry/SetShieldingThickness D length_unit
0469 Set the thickness D of the aluminum shielding.
0470
0471 Commands /RMC01/analysis/ to control the primary spectrum used for the normalization of the
0472 adjoint simulation results and fix the expected precision of the computed Edep:
0473
0474 /RMC01/analysis/SetPowerLawPrimSpectrumForAdjointSim particle_name F F_unit alpha Emin Emax E_unit
0475 Set the primary spectrum to which the adjoint simulation results will be normalised to a power law
0476 spectrum E^(-alpha) of particle defined by particle_name, with an omnidirectional fluence F, and
0477 energy range [Emin,Emax]. The fluence unit candidates for F_unit are [1/cm2, 1/m2, cm-2, m-2].
0478
0479
0480 /RMC01/analysis/SetExponentialSpectrumForAdjointSim particle_name F F_unit E0 Emin Emax E_unit
0481 Set the primary spectrum to which the adjoint simulation results will be normalised to an exponential
0482 spectrum exp(-E/E0) of particle defined by particle_name, with an omnidirectional fluence F, and
0483 energy range [Emin,Emax]. The fluence unit candidates for F_unit are [1/cm2, 1/m2, cm-2, m-2].
0484
0485
0486
0487 /RMC01/analysis/SetExpectedPrecisionOfResults precision
0488 Set the expected precision in % for the computed energy deposited in the sensitive volume
0489 for both the forward and adjoint simulation case. When the relative statistical error
0490 of the computed energy deposited reach this precision the run is aborted and the results are registered.
0491 Otherwise the run continue till the nb of events specified by the user are processed. By default the precision is set
0492 to 0. meaning that the run will not be aborted in this case.
0493
0494
0495
0496
0497
0498
0499 5. Known issues
0500 --------------------------------
0501 --------------------------------
0502
0503 5.1 Rare too high weight in the adjoint simulation
0504 ---------------------------------------------------
0505
0506 In rare cases an adjoint track may get a much too high weight when reaching the external source.
0507 While this happen not often it may corrupt the simulation results significantly. The reason of this high weight is
0508 the joint use at low e- and gamma energy of both the photoelectric and bremsstrahlung processes.
0509 Unfortunately we still need some investigations to remove this problem at the level of physical processes.
0510 However this problem can be solved at the level of event action in the user code by adding a test on the adjoint
0511 weight. Such test has been implemented in the example RMC01.
0512 In this implementation an event is rejected when the relative error of the computed normalised edep
0513 increase during one event by more than 50% when the precision is already below 10%.
0514
0515
0516 5.2 Limitation of the reverse bremsstrahlung
0517 -------------------------------------------
0518 The difference between the differential cross sections used in the adjoint and forward bremsstrahlung
0519 models is the source of a higher flux of >100 keV gamma in the reverse simulation compared to the forward simulation.
0520 The adjoint processes/models should make use of the direct differential cross section to sample
0521 the adjoint secondaries and compute the adjoint cross section.
0522 The differential cross section used in G4AdjointeBremstrahlungModel is obtained by the numerical derivation
0523 over the cut energy of the direct cross section provided by G4eBremsstrahlungModel.
0524 This would be a correct procedure if the distribution of secondary in G4eBremsstrahlungModel
0525 would match this differential cross section. Unfortunately it is not the case as independent parameterization are used
0526 in G4eBremsstrahlungModel for both the cross sections and the sample of secondary. (It means that in the forward case
0527 if one would integrate the effective differential cross section considered in the simulation we would not find back
0528 the used cross section).
0529 In the future we plan to correct this problem by using an extra weight correction factor after the occurrence of a reverse
0530 bremsstrahlung. This weight factor should be the ratio between the differential CS used in the adjoint simulation and the
0531 one effectively used in the forward processes. As it is impossible to have access to the forward differential CS
0532 in G4eBremsstrahlungModel we are investigating the feasibility to use the differential CS considered in
0533 G4Penelope models.
0534
0535
0536 5.3 Limitation of the reverse multiple scattering
0537 -------------------------------------------------
0538 For the reverse multiple scattering we are using the same models than for the forward case.
0539 This approximation makes that the discrepancy between the adjoint and forward
0540 simulation cases can get to a level of ~ 10-15% relative differences in the test cases that we have considered.
0541 In the future we plan to improve the adjoint multiple scattering models by forcing the computation of
0542 multiple scattering effect at the end of an adjoint step.