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