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.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Name Size       Last modified (GMT) Description
Back Parent directory       2024-12-05 15:16:16
Folder include/       2024-12-05 15:16:16
Folder src/       2024-12-05 15:16:16
File CMakeLists.txt 2489 bytes       2024-12-05 15:16:16
File GNUmakefile 471 bytes       2024-12-05 15:16:16
File History 2089 bytes       2024-12-05 15:16:16
File README 9000 bytes       2024-12-05 15:16:16
File beam.in 3702 bytes       2024-12-05 15:16:16
File beam_HCP.in 1857 bytes       2024-12-05 15:16:16
C++ file chem6.cc 4342 bytes       2024-12-05 15:16:16
File chem6.out 36168 bytes       2024-12-05 15:16:16
File plotG_LET.C 4951 bytes       2024-12-05 15:16:16
File plotG_time.C 6691 bytes       2024-12-05 15:16:16

  1 $Id: $
  2 -------------------------------------------------------------------
  3 
  4      =========================================================
  5      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
  6      =========================================================
  7 
  8                             Chem6
  9                             -------
 10 
 11 CORRESPONDING AUTHORS
 12 W. G. Shin (a), S. Incerti (b)
 13 (a) ukguen _ gmail _ com
 14 (b) incerti _ cenbg _ in2p3 _ fr
 15 
 16 This example is provided by the Geant4-DNA collaboration.
 17 (http://geant4-dna.org)
 18 
 19 Any report or published results obtained using the Geant4-DNA software shall 
 20 cite the following Geant4-DNA collaboration publications:
 21 
 22 
 23 J. Appl. Phys. 125 (2019) 104301
 24 Med. Phys. 45 (2018) e722-e739
 25 Phys. Med. 31 (2015) 861-874
 26 Med. Phys. 37 (2010) 4692-4708
 27 Int. J. Model. Simul. Sci . Comput. 1 (2010) 157-178
 28 
 29  0 - INTRODUCTION
 30     Based on chem4 and chem5 examples, this example provides scoring of the 
 31     radiochemical yield G defined as
 32         (Number of species X) / (100 eV of deposited energy).
 33     as a function of time and LET.
 34     The example uses the IRT approach by default.
 35 
 36     The details are described in the following paper:
 37     J. Appl. Phys. 125 (2019) 104301
 38 
 39  1 - GEOMETRY DEFINITION
 40 
 41     The world volume is a simple water box which represents a 'pseudo infinite'
 42     homogeneous medium.
 43 
 44     The default geometry is constructed in DetectorConstruction class.
 45 
 46     The size of detector can be controlled by PrimaryKiller class (see section 5.2).
 47 
 48  2 - PHYSICS LIST
 49 
 50     PhysicsList is Geant4 modular physics list using:
 51 
 52     G4EmDNAPhysics_option2 constructor
 53     - the accelerated physics constructor based on G4EmDNAPhysics constructor.
 54 
 55     G4EmDNAChemistry_option3 constructor.
 56     - the chemistry constructor is based on the pre-chemical stage of PARTRAC
 57     and chemical parameters of RITRACKS.
 58     - this chemistry constructor uses independent reaction time method as a
 59     default.
 60 
 61  3 - CHEMISTRY MODEL AND CHEMICAL REACTION LIST
 62 
 63     ## UI species are defined by format :
 64     username [ molecule | charge | D(m2/s) | Radius(nm) ]
 65     where : *username* is decided by users, *molecule* is used by Geant4,
 66     *D* is diffusion constant, *Radius* is reaction radius.
 67     Spaces between characters are needed.
 68 
 69     ## UI reactions are defined by format :
 70     /chem/reaction/add H + H -> H2  | Fix |  1.2e10 | 0
 71     where : *H* is username, *1.2e10* is reaction rate, *0* is reaction type.
 72     Spaces between characters are needed.
 73 
 74     ## UI time step model is defined only for: Step-by-Step (SBS),
 75     independent reaction time (IRT) or synchronized IRT (IRT_syn).
 76     *Note* : SBS is supposed for totally diffusion-controlled (TDC) reaction
 77     only then please set reaction type 0 if use this model.
 78     Only G4EmDNAChemistry_option3 can change time step model
 79 
 80     (parameters can be found in Med. Phys. 48 (2021) 890-901
 81     and Med. Phys. 47 (2020) 5919-5930)
 82 
 83  4 - ACTION INITALIZATION
 84 
 85     The class ActionInitialization instantiates and registers
 86     to Geant4 kernel all user action classes.
 87 
 88     While in sequential mode the action classes are instantiated just once,
 89     via invoking the method:
 90     ActionInitialization::Build()
 91     In multi-threading mode the same method is invoked for each thread worker
 92     and so all user action classes are defined thread-local.
 93 
 94     A run action class is instantiated both thread-local
 95     and global that's why its instance is created also in the method:
 96     ActionInitialization::BuildForMaster()
 97     which is invoked only in multi-threading mode.
 98 
 99  5 - AN EVENT: THE PRIMARY GENERATOR
100 
101     The primary kinematic consists of a single particle starting at the center
102     of the box. The type of the particle and its energy are set in the
103     PrimaryGeneratorAction class, and can be changed via the G4 build-in
104     commands of G4ParticleGun class.
105     The chemistry module is triggered in the StackingAction class when all
106     physical tracks have been processed.
107 
108  6 - DETECTOR RESPONSE: Scorers
109 
110         6.1 - Species scorer
111 
112     This scorer computes the energy deposition and the number of species along
113     time in order to extract the radiochemical yields as in chem4 example.
114 
115     Run::RecordEvent(), called at end of event, collects informations
116     event per event from the hits collections, and accumulates statistics for
117     RunAction::EndOfRunAction().
118 
119     In multi-threading mode the statistics accumulated per worker is merged
120     to the master in Run::Merge().
121 
122     These two macro commands can be used to control the scoring time:
123     
124     /scorer/species/addTimeToRecord 1 ps
125     # user can select time bin to score G values.
126     
127     /scorer/species/nOfTimeBins
128     # or user can automatically select time bin logarithmically.
129 
130     The information about all the molecular species is scored in a ROOT
131     ntuple file Species(runID).root.
132     e.g.) Species0.root Species1.root ...
133 
134     G values at the last time bin are scored in a text file Species.txt in order to
135     obtain G versus LET results.
136     The G versus LET results are accumulated all along, thus, user should remove Species.txt
137     file directly in order to initialize the results.
138 
139         6.2 - Primary killer
140 
141     The G-values are computed for a range of deposited energy.
142     We are in an infinite volume. Therefore the energy lost by the 
143     primary equals the deposited energy since all secondary particles 
144     will finally slow down to the thermal energy. 
145     The primary is killed once it has deposited more energy than a 
146     minimum threshold.
147     
148     **IMPORTANT**: However, when the primary particle loses more energy 
149     in few interaction steps than the maximum allowed threshold, 
150     the event is disregarded (=aborted). 
151     
152     These two macro commands can be used to control the energy loss by 
153     the primary:
154     
155     /primaryKiller/eLossMin 1 keV 
156     # after 1 keV of energy loss by the primary particle, the primary is killed
157     
158     /primaryKiller/eLossMax 2 keV 
159     # if the primary particle losses more than 2 keV, the event is aborted
160     
161     The G-values are then computed for a deposited energy in the range [1 keV;2 keV].
162  
163     Note that if the upper boundary of the energy lost by the primary is 
164     not set, the chemistry may take a lot of time to compute. 
165     This set of commands is embedded in the PrimaryKiller class.
166     The species scorer must check whether the event was aborted before taking
167     it or not into account for the computation of the results. 
168 
169     The size of detector can be controlled by this class using user macro command:
170 
171     /primaryKiller/setSize 5 5 5 um
172     # kills the particles (primary and secondary) outside of the virtual volume
173 
174         6.3. - LET scorer
175 
176     In order to obtain G versus LET results, LET values are simultaneously calculated 
177     during the simulation in ScorerLET class.
178 
179     A macro command can be used to control the LET scorer:
180 
181     /scorer/LET/cutoff
182     # selects cut-off energy for restricted LET.
183 
184  7 - TIMESTEP ACTION
185 
186     The user defined time steps can be given by G4UserTimeStepAction::AddTimeStep() method.
187     This method is not recommended for IRT method.
188 
189     These two method are called before and after every time steps:
190 
191     TimeStepAction::UserPreTimeStepAction()
192     TimeStepAction::UserPostTimeStepAction()
193 
194     This method is called when a chemical reaction is occurred:
195 
196     TimeStepAction::UserReactionAction(const G4Track&, const G4Track&, const std::vector<G4Track*>*)
197      In order to access to molecular information,
198      #include "G4Molecule.hh"
199      G4Molecule* thisIsMyMolecule = GetMolecule(thisIsMyTrack);
200      const G4String& moleculeName = thisIsMyMolecule->GetName();
201 
202  8 - STACKING ACTION
203 
204     StackingAction::NewStage is called when a stack of tracks has been processed
205     (for more details, look at the Geant4 documentation).
206     A verification on whether physical tracks remain to be processed is done.
207     If no tracks remain to be processed, the chemical module is then triggered.
208 
209  9 - OUTPUT
210 
211     Physics initialization and the defined reaction table are printed.
212     G4Scheduler processes the chemical stage time step after time step.
213     Chemical reactions are printed.
214     The molecular reaction as a function of the elapsed time can be displayed
215     setting the macro command /scheduler/verbose 1
216 
217  10 - RELEVANT MACRO FILES
218 
219     Two user macro files can be used:
220 
221     ./chem6 beam.in
222     # electron simulations w primary killer method.
223 
224     ./chem6 beam_HCP.in
225     # protons and alphas are generated at the edge of a 5x5x5 um3 water phantom.
226 
227 11 - PLOT
228 
229     Two root macros can be used:
230 
231     root plotG_time.C
232     # plot G values as a function of time according to the molecular species by importing Species0.root.
233     # The function (plotG_time()) should have the same name as the file without file extension (plotG_time).
234 
235     root plotG_LET.C
236     # plot G values as a function of LET according to the molecular species by importing Species.txt.