Warning, /geant4/examples/extended/medical/dna/chem6/README.md is written in an unsupported language. File is not indexed.
0001 \page ExampleChem6 Example chem6
0002
0003 \author W. G. Shin (a), A. Paillet (b), S. Incerti (b) \n
0004 (a) ukguen _ gmail _ com \n
0005 (b) incerti _ lp2ib _ in2p3 _ fr \n
0006
0007 This example is provided by the Geant4-DNA collaboration.
0008 (http://geant4-dna.org)
0009
0010 Any report or published results obtained using the Geant4-DNA software shall
0011 cite the following Geant4-DNA collaboration publications: \n
0012 Med. Phys. 45 (2018) e722-e739 \n
0013 Phys. Med. 31 (2015) 861-874 \n
0014 Med. Phys. 37 (2010) 4692-4708 \n
0015 Int. J. Model. Simul. Sci . Comput. 1 (2010) 157-178 \n
0016
0017 ## INTRODUCTION
0018 Based on chem4 example, this example provides to score the radiochemical yield G
0019 defined as \n
0020 ```
0021 (Number of species X) / (100 eV of deposited energy).
0022 ```
0023 as a function of time and LET.
0024
0025 The details are described in the following paper:
0026 J. Appl. Phys. 125 (2019) 104301
0027
0028 ## GEOMETRY DEFINITION
0029 The world volume is a simple water box which represents a 'pseudo infinite'
0030 homogeneous medium.
0031
0032 The default geometry is constructed in DetectorConstruction class.
0033
0034 The size of the detector can be controlled by PrimaryKiller class.
0035
0036 ## PHYSICS LIST
0037
0038 PhysicsList is Geant4 modular physics list using:
0039
0040 G4EmDNAPhysics_option2 constructor by default:
0041 - the accelerated physics constructor based on G4EmDNAPhysics constructor.
0042
0043 A UI command is available to change the Physics constructor, e.g.:
0044
0045 /chem/phys/registerPhysics G4EmDNAPhysics_option4
0046
0047 G4EmDNAChemistry_option3 constructor by default:
0048 - the chemistry constructor is based on the pre-chemical stage of PARTRAC
0049 and chemical parameters of RITRACKS.
0050 - this chemistry constructor uses independent reaction time method as a
0051 default.
0052
0053
0054 ## CHEMISTRY MODEL AND CHEMICAL REACTION LIST
0055
0056 - UI species are defined by format :
0057 ```
0058 username [ molecule | charge | D(m2/s) | Radius(nm) ]
0059 where : *username* is decided by users, *molecule* is used by Geant4,
0060 *D* is diffusion constant, *Radius* is reaction radius.
0061 ```
0062 Spaces between characters are needed.
0063
0064 - UI reactions are defined by format :
0065 ```
0066 /chem/reaction/add H + H -> H2 | Fix | 1.2e10 | 0
0067 where : *H* is username, *1.2e10* is reaction rate, *0* is reaction type.
0068 ```
0069 Spaces between characters are needed.
0070
0071 - UI time step model is defined only for: Step-by-Step (SBS),
0072 independent reaction time (IRT) or synchronized IRT (IRT_syn).
0073 *Note* : SBS is supposed for totally diffusion-controlled (TDC) reaction only, then please set reaction type 0 if use of this model. Only G4EmDNAChemistry_option3 can change the time step model
0074
0075 (parameters can be found in Med. Phys. 48 (2021) 890-901
0076 and Med. Phys. 47 (2020) 5919-5930)
0077
0078 ## ACTION INITALIZATION
0079
0080 The class ActionInitialization instantiates and registers
0081 to Geant4 kernel all user action classes.
0082
0083 While in sequential mode, the action classes are instantiated just once,
0084 via invoking the method:
0085 ActionInitialization::Build()
0086 In multi-threading mode, the same method is invoked for each thread worker
0087 and so all user action classes are defined thread-local.
0088
0089 A run action class is instantiated both thread-local
0090 and global, that's why its instance is created also in the method:
0091 ActionInitialization::BuildForMaster()
0092 which is invoked only in multi-threading mode.
0093
0094 ## AN EVENT: PRIMARY GENERATOR
0095
0096 The primary kinematic consists of a single particle starting at the center
0097 of the box. The type of the particle and its energy are set in the
0098 PrimaryGeneratorAction class, and can be changed via the G4 build-in
0099 commands of G4ParticleGun class.
0100
0101 The chemistry module is triggered in the StackingAction class when all
0102 physical tracks have been processed.
0103
0104 ## DETECTOR RESPONSE : Scorers
0105
0106 ### Species scorer
0107
0108 This scorer computes the energy deposition and the number of species along
0109 time in order to extract the radiochemical yields as chem4 example.
0110
0111 Run::RecordEvent(), called at end of event, collects informations
0112 event per event from the hits collections, and accumulates statistic for
0113 RunAction::EndOfRunAction().
0114
0115 In multi-threading mode, the statistics accumulated per worker is merged
0116 to the master in Run::Merge().
0117
0118 These two macro commands can be used to control the scoring time:
0119
0120 ```
0121 /scorer/species/addTimeToRecord 1 ps
0122 # user can select time bin to score G values.
0123
0124 /scorer/species/nOfTimeBins
0125 # or user can automatically select time bin logarithmically.
0126 ```
0127
0128 The information about all the molecular species is scored in a ROOT
0129 ntuple file Species(runID).root.
0130 e.g.) Species0.root Species1.root ...
0131
0132 A UI command is available to change this file name, e.g. for newName:
0133
0134 /chem/output/fileName newName
0135
0136 G values at the last time bin are scored in a text file Species.txt in order to
0137 obtain G versus LET results.
0138 The G versus LET results are accumulated all along, thus, user should remove Species.txt
0139 file directly in order to initialize the results.
0140
0141 ### Primary Killer
0142 The G-values are computing for a range of deposited energy.
0143 We are in an infinite volume. Therefore the energy lost by the
0144 primary equals the deposited energy since all secondary particles
0145 will finally slow down to the thermal energy.
0146 The primary is killed once it has deposited more energy than a
0147 minimum threshold.
0148 IMPORTANT: However, when the primary particle looses more energy in
0149 few interaction steps than the maximum allowed thresold, the event is
0150 disregarded (=aborted). \n
0151
0152 These two macro commands can be used to control the energy loss by the primary:
0153
0154 ```
0155 /primaryKiller/eLossMin 1 keV
0156 # after 1 keV of energy loss by the primary particle, the primary is killed
0157
0158 /primaryKiller/eLossMax 2 keV
0159 # if the primary particle losses more than 2 keV, the event is aborted
0160 ```
0161
0162 The G-values are then computed for a deposited energy in the range [1 keV;2 keV].
0163
0164 Note that if the upper boundary of the energy lost by the primary is not set, the chemistry may
0165 take a lot of time to compute as the number of secondaries may be huge.
0166 This set of macros is embedded in the PrimaryKiller class.
0167 The species scorer must check whether the event was aborted before taking it or not into
0168 account for the computation of the results.
0169
0170 The size of detector can be controlled by this class using user macro command:
0171
0172 ```
0173 /primaryKiller/setSize 5 5 5 um
0174 # kill the particles (primary and secondary) outside of the virtual volume
0175 ```
0176
0177 ### LET scorer
0178 In order to obtain G versus LET results, LET values are simultaneously calculated
0179 during the simulation in ScorerLET class.
0180
0181 A macro command can be used to control the LET scorer:
0182
0183 ```
0184 /scorer/LET/cutoff
0185 # select cut-off energy for restricted LET.
0186 ```
0187
0188 ## TIMESTEP ACTION
0189 The user defined time steps can be given by G4UserTimeStepAction::AddTimeStep() method.
0190 This method is not recommended for IRT method.
0191
0192 These two method are called before and after every time steps:
0193 - TimeStepAction::UserPreTimeStepAction()
0194 - TimeStepAction::UserPostTimeStepAction()
0195
0196 This method is called when a chemical reaction has occurred:
0197 - TimeStepAction::UserReactionAction(const G4Track&, const G4Track&, const std::vector<G4Track*>*)
0198
0199 In order to access to molecular information:
0200 ```cpp
0201 #include "G4Molecule.hh"
0202 G4Molecule* thisIsMyMolecule = GetMolecule(thisIsMyTrack);
0203 const G4String& moleculeName = thisIsMyMolecule->GetName();
0204 ```
0205
0206 ## STACKING ACTION
0207
0208 StackingAction::NewStage is called when a stack of tracks has been processed
0209 (for more details, look at the Geant4 documentation).
0210 A verification on whether physical tracks remain to be processed is done.
0211 If no tracks remain to be processed, the chemical module is then triggered.
0212
0213 ## OUTPUT
0214
0215 Physics initialization and the defined reaction table are printed.
0216 G4Scheduler processes the chemical stage time step after time step.
0217 Chemical reactions are printed.
0218
0219 The molecular reaction as a function of the elapsed time can be displayed
0220 setting the macro command /scheduler/verbose 1
0221
0222 ## RELEVANT MACRO FILES
0223
0224 Two user macro files, beam.in and beam_HCP.in, can be used:
0225
0226 ```
0227 ./chem6 beam.in
0228 # electron simulations w primary killer method.
0229
0230 ./chem6 beam_HCP.in
0231 # protons and alphas are generated at the edge of a 5x5x5 um3 water phantom.
0232 ```
0233
0234
0235 ## PLOT
0236
0237 Two root macros, plotG_time.C and root plotG_LET.C, can be used:
0238
0239 ```
0240 root plotG_time.C
0241 # plot G values as a function of time according to the molecular species by importing Species0.root.
0242 # The function (plotG_time()) should have the same name as the file without file extension (plotG_time).
0243
0244 root plotG_LET.C
0245 # plot G values as a function of LET according to the molecular species by importing Species.txt.
0246 ```