Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/medical/dna/scavenger/README.md is written in an unsupported language. File is not indexed.

0001 \page Examplescavenger Example scavenger
0002 
0003 \author F. Chappuis (a), L. Desorgher (b), H. Tran (c)      \n
0004 (a) flore.chappuis@chuv.ch                                  \n
0005 (b) laurent.desorgher@chuv.ch                               \n
0006 (c) tran@cenbg.in2p3.fr                                     \n
0007 
0008 (a,b) Institute of Radiation Physics (IRA), Lausanne University Hospital        \n
0009       and University of Lausanne, CH-1007 Lausanne, Switzerland                 \n
0010 (c) CNRS, CENBG, UMR 5797, Université de Bordeaux, F-33170 Gradignan, France    \n
0011 
0012 Funding: FNS Synergia grant MAGIC-FNS CRSII5_186369.
0013 
0014 This example is provided by the Geant4-DNA collaboration.
0015 (http://geant4-dna.org)
0016 
0017 Any report or published results obtained using the Geant4-DNA software shall 
0018 cite the following Geant4-DNA collaboration publications: \n
0019 Med. Phys. 45 (2018) e722-e739  \n
0020 Phys. Med. 31 (2015) 861-874    \n
0021 Med. Phys. 37 (2010) 4692-4708  \n
0022 Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178 \n
0023 
0024 
0025 ## INTRODUCTION
0026 
0027 This example shows how to activate the scavenging process in chemistry
0028 using the deterministic treatment of the IRT model (see chem6 example).
0029 It allows to define chemical reactions and the concentration of
0030 scavengers by means of a user text file (see section 10). The
0031 concentration of scavengers is assumed to be constant over time.
0032 
0033 To run the example:
0034 
0035     mkdir scavenger-build
0036     cd scavenger-build
0037     cmake ../pathToExamples/scavenger
0038     make
0039 
0040 In interactive mode, run:
0041 
0042     ./scavenger
0043 
0044 (Note: the interactive mode only allows the visualisation of the
0045 physical stage and does not work for the chemical stage)
0046 
0047 In batch mode, the macro beam.in can be used as follows:
0048 
0049     ./scavenger beam.in
0050 
0051 or
0052 
0053     ./scavenger beam.in 123
0054         123 is the user's seed number
0055 
0056 ## GEOMETRY DEFINITION
0057 
0058 The world volume is a simple water box which represents a 'pseudo infinite'
0059 homogeneous medium.
0060 
0061 Two parameters define the geometry :
0062 - the material of the box for the physical stage is water.
0063 - for the chemistry stage, the concentration of scavengers in [mole/l]
0064   is added. This concentration is supposed to have no effect on the 
0065   physical stage.
0066 
0067 The default geometry is constructed in DetectorConstruction class.
0068 
0069 ## PHYSICS LIST
0070 
0071 Physics list is Geant4 modular physics list using G4EmDNAPhysics_option2
0072 and EmDNAChemistry constructors (the chemistry constructor uses the
0073 independent reaction time method).
0074 
0075 ## ACTION INITIALIZATION
0076 
0077 The class ActionInitialization instantiates and registers
0078 to Geant4 kernel all user action classes.
0079 
0080 While in sequential mode the action classes are instantiated just once,
0081 via invoking the method
0082 ActionInitialization::Build()
0083 in multi-threading mode the same method is invoked for each thread worker
0084 and so all user action classes are defined thread-local.
0085 
0086 A run action class is instantiated both thread-local
0087 and global that's why its instance is created also in the method
0088 ActionInitialization::BuildForMaster()
0089 which is invoked only in multi-threading mode.
0090   
0091 To not register a molecule, add this command:
0092 G4MoleculeCounter::Instance()->DontRegister(G4O2::Definition());
0093 
0094 ## AN EVENT: PRIMARY GENERATOR
0095     
0096 The primary kinematic consists of a single particle starting at the
0097 center of the box. The type of the particle and its energy are set
0098 in the PrimaryGeneratorAction class, and can be changed via the G4 
0099 build-in commands of G4GeneralParticleSource class.
0100 The chemistry module is triggered in the StackingAction class when
0101 all physical tracks have been processed.
0102 
0103 ## DETECTOR RESPONSE : Scorers
0104 
0105 ### Species scorer
0106 
0107 Scorers are defined in DetectorConstruction::ConstructSDandField().
0108 There is one G4MultiFunctionalDetector object which computes the 
0109 energy deposition and the number of species along time in order to
0110 extract the radiochemical yields:
0111 ```
0112 (Number of species X) / (100 eV of deposited energy).
0113 ```
0114 
0115 Run::RecordEvent(), called at end of event, collects information
0116 event per event from the hits collections, and accumulates statistic
0117 for RunAction::EndOfRunAction().
0118 
0119 In multi-threading mode the accumulated statistics per workers is
0120 merged to the master in Run::Merge().
0121     
0122 These two macro commands can be used to control the scoring time:
0123 
0124 ```
0125 /scorer/species/addTimeToRecord 1 ps
0126 # user can select time bin to score G values.
0127 
0128 /scorer/species/nOfTimeBins
0129 # or user can automatically select time bin logarithmically.
0130 ```
0131     
0132 The information about all the molecular species is scored in a ROOT
0133 ntuple file, the name of which can be given by the user through the
0134 macro command: /scoreSpecies/setRootFileName scorer.root.
0135 The ROOT program plotG.C can be used to plot the G values vs time
0136 for each species.
0137   
0138 ### Primary Killer
0139 
0140 The G values are computed for a range of deposited energy. We are
0141 in an infinite volume. Therefore the energy lost by the primary
0142 equals the deposited energy since all secondary particles will
0143 finally slow down to the thermal energy. 
0144 The primary is killed once it has deposited more energy than a 
0145 minimum threshold. 
0146     
0147 IMPORTANT: However, when the primary particle loses more energy 
0148 in few interaction steps than the maximum allowed threshold, the
0149 event is disregarded (= aborted).
0150 
0151 These two macro commands can be used to control the energy loss by 
0152 the primary:
0153 
0154 ```
0155 /primaryKiller/eLossMin 10 keV
0156 # after 10 keV of energy loss by the primary particle, the primary is killed
0157       
0158 /primaryKiller/eLossMax 10.1 keV
0159 # if the primary particle loses more than 10.1 keV, the event is aborted
0160 ```
0161 
0162 The G values are then computed for a deposited energy in the range
0163 [10 keV; 10.1 keV].
0164  
0165 Note that if the upper boundary of the energy lost by the primary
0166 is not set, the chemistry may take a lot of time to compute. 
0167 This set of macros is embedded in the PrimaryKiller class.
0168 The species scorer must check whether the event was aborted before
0169 taking it or not into account for the computation of the results.
0170 
0171 The size of detector can be controlled by this class using user
0172 macro command:
0173 
0174 ```
0175 /primaryKiller/setSize 5 5 5 um
0176 # kill the particles (primary and secondary) outside of the virtual volume
0177 ```
0178 
0179 ## STACKING ACTION
0180 
0181 scavenger::StackingAction::NewStage() is called when a stack of tracks has been
0182 processed (for more details, look at the Geant4 documentation).
0183 A verification on whether physical tracks remain to be processed
0184 is done. If no tracks remain to be processed, the chemical module
0185 is then triggered.
0186 
0187 ## VISUALIZATION
0188 
0189 The visualization manager is set via the G4VisExecutive class in the
0190 main() function in scavenger.cc.
0191 The initialization of the drawing is done via a set of /vis/ commands
0192 in the macro vis.mac. To activate the visualization mode, run:
0193 
0194 ```
0195 ./scavenger
0196 ```
0197 
0198 ## OUTPUT
0199 
0200 Physics initialization and the defined reaction table are printed.
0201 G4Scheduler processes the chemical stage after the physical stage has been completed.
0202    
0203 ## RELEVANT MACRO COMMANDS AND MACRO FILE
0204 
0205 ```
0206 /primaryKiller/eLossMin 10 keV 
0207 # after 10 keV of energy loss by the primary particle, the primary is killed
0208     
0209 /primaryKiller/eLossMax 10.1 keV 
0210 # if the primary particle loses more than 10.1 keV, the event is aborted
0211     
0212 /scheduler/verbose 1 
0213 # set the verbose level of the G4Scheduler class (time steps, reactions ...)
0214 
0215 /scheduler/endTime 1 microsecond 
0216 # set the time at which the simulation stops
0217     
0218 /scheduler/whyDoYouStop 
0219 # for advanced users: print information at the end of the chemical stage to know why the simulation has stopped
0220 ```
0221 
0222 The user macro file is beam.in (electron simulations with primary killer method).
0223 
0224 ## REACTION PARSER FILE
0225 
0226 This file is used to define chemical reactions and the concentration
0227 of scavengers for the EmDNAChemistry constructor.
0228     
0229 Definition of scavengers:
0230 ```
0231 scavenger: NAME  CONCENTRATION
0232 # concentration in [mole/l]
0233 ```
0234       
0235 Definition of chemical reactions:
0236 ```
0237 REACTANTS -> PRODUCTS , RATE   TYPE
0238 # reaction rate in [1/s/(mole/l)], for first order reaction in [1/s]
0239 # reaction type based on Frongillo et al., Rad. Phys. Chem., 1998
0240 ```
0241       
0242 In any reaction, the molecules surrounded by square brackets [] are
0243 scavengers. In the products of a reaction, the user can also use [] 
0244 to prevent a molecule from being produced.
0245 
0246 In this example, we provide 2 reaction tables for 2 different scavengers:
0247 one with O2 and another with NO2-/NO3-. We encourage the user to add 
0248 chemical reactions and/or scavengers. However, the parser does not allow
0249 the addition of molecules not defined in the model. This aspect will be
0250 improved in future releases. In the meantime, please refer to the NO2- 
0251 or NO3- ions defined in EmDNAChemistry::ConstructMolecule() to add new
0252 molecules.
0253 
0254 ## PLOT
0255 
0256 The information about all the molecular species is scored in a ROOT
0257 (https://root.cern) ntuple file scorer.root. The ROOT program plotG
0258 can be used to plot the G values vs time for each species.
0259 
0260 Execute plotG as:
0261 ```
0262 root plotG.C
0263 ```
0264 
0265 or print G values to scorer.txt
0266 ```
0267 root plotG.C > scorer.txt
0268 ```
0269 
0270 The results show the molecular species (G values) as a function of
0271 time (ns). Please ignore the O_2^0 molecule.
0272 The function (plotG()) should have the same name as the
0273 file without file extension (plotG).
0274   
0275 ## OTHER
0276 
0277 In physics: How can I display the tracking information?
0278 ```
0279 /tracking/verbose 1
0280 ```
0281 
0282 In chemistry: How can I display the reaction information?
0283 ```
0284 /scheduler/verbose 1
0285 ```
0286 
0287 How can I display the step by step information?
0288 ```
0289 /scheduler/verbose 3
0290 ```