Warning, /geant4/examples/extended/electromagnetic/TestEm7/README.md is written in an unsupported language. File is not indexed.
0001 \page ExampleTestEm7 Example TestEm7
0002
0003 - How to produce a Bragg curve in a water phantom.
0004 - How to compute the dose in 'test volumes' called tallies.
0005 - How to define a maximum step size.
0006
0007 ## GEOMETRY DEFINITION
0008
0009 The geometry consists of a single block of a homogenous material,
0010 placed in a world.
0011
0012 Three parameters define the geometry :
0013 - the material of the box,
0014 - the thickness of the box (sizeX),
0015 - the transverse dimension of the box (sizeYZ).
0016
0017 The default is 20 cm of water.
0018
0019 In addition a transverse uniform magnetic field can be applied.
0020
0021 The default geometry is constructed in DetectorConstruction class,
0022 but all of the above parameters can be changed interactively via
0023 the commands defined in the DetectorMessenger class.
0024
0025 The size, matter, positions of several test-volumes (tallies) can be
0026 defined via UI commands : /testem/det/tally...
0027
0028 ## PHYSICS LIST
0029
0030 Physics lists can be local (eg. in this example) or from G4 kernel
0031 physics_lists subdirectory.
0032
0033 Local physics lists:
0034 - "local" standard EM physics with current 'best' options setting.
0035 these options are explicited in PhysListEmStandard
0036 - "standardSS" standard EM physics with single Coulomb scattering
0037 instead of multiple scattering;
0038 - "standardNR" standard EM physics with single Coulomb scattering
0039 process G4ScreenedNuclearRecoil instead of the
0040 multiple scattering for ions with energy less than
0041 100 MeV/nucleon; the new process was developed
0042 by M.H. Mendenhall and R.A. Weller from Vanderbuilt
0043 University and published in NIM B 277 (2005) 420.
0044 In later Geant4 releases the process will be a part
0045 of Geant4 source, currently it is released together
0046 with its mathematical tool c2_functions in current
0047
0048 From geant4/source/physics_lists/builders:
0049 - "emstandard_opt0" recommended standard EM physics for LHC
0050 - "emstandard_opt1" best CPU performance standard physics for LHC
0051 - "emstandard_opt2" similar fast simulation
0052 - "emstandard_opt3" best standard EM options - analog to "local" above
0053 - "emstandard_opt4" best current advanced EM options standard + lowenergy
0054 - "emstandardWVI" standard EM physics and WentzelVI multiple scattering
0055 - "emstandardSS" standard EM physics and single scattering model
0056 - "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
0057 - "emlivermore" low-energy EM physics using Livermore data
0058 - "empenelope" low-energy EM physics implementing Penelope models
0059 - "emlowenergy" low-energy EM physics implementing experimental
0060 low-energy models
0061
0062 Decay and StepMax processes are added to each list.
0063
0064 Optional components can be added:
0065 - "elastic" elastic scattering of hadrons
0066 - "HElastic"
0067 - "QElastic"
0068 - "binary" QBBC configuration of hadron inelastic models
0069 - "binary_ion" Binary ion inelastic models
0070 - "ionIoni" Ion gas models
0071
0072 Physics lists and options can be (re)set with UI commands
0073
0074 Please, notice that options set through G4EmProcessOptions are global, eg
0075 for all particle types. In G4 builders, it is shown how to set options per
0076 particle type.
0077
0078 ## AN EVENT : THE PRIMARY GENERATOR
0079
0080 The primary kinematic consists of a single particle which hits the
0081 block perpendicular to the input face. The type of the particle
0082 and its energy are set in the PrimaryGeneratorAction class, and can
0083 changed via the G4 build-in commands of G4ParticleGun class (see
0084 the macros provided with this example).
0085 The default is a 160 MeV proton.
0086
0087 In addition one can define randomly the impact point of the incident
0088 particle. The corresponding interactive command is built in
0089 PrimaryGeneratorMessenger class.
0090
0091 A RUN is a set of events.
0092
0093
0094 ## DOSE IN 'TEST-VOLUMES'
0095
0096 The energy deposited in the test-volumes (tallies) defined in
0097 DetectorConstruction are printed at RunAction::EndOfRunAction(), both in MeV and gray.
0098
0099 ## VISUALIZATION
0100
0101 The Visualization Manager is set in the main().
0102 The initialisation of the drawing is done via the command
0103 ```
0104 > /control/execute vis.mac
0105 ```
0106
0107 The detector has a default view which is a longitudinal view of the box.
0108
0109 The tracks are drawn at the end of event, and erased at the end of run.
0110 Optionally one can choose to draw all particles, only the charged one,
0111 or none. This command is defined in EventActionMessenger class.
0112
0113
0114 ## HOW TO START ?
0115
0116 - Execute Test in 'batch' mode from macro files
0117 ```
0118 % ./TestEm7 proton.mac
0119 ```
0120
0121 - Execute Test in 'interactive mode' with visualization
0122 ```
0123 % ./TestEm7
0124 ....
0125 Idle> type your commands
0126 ....
0127 Idle> exit
0128 ```
0129
0130
0131 ## HISTOGRAM OF THE BRAGG PEAK
0132
0133 Testem7 computes the total energy deposited along the trajectory of
0134 the incident particle : the so-called Bragg peak.
0135
0136 In order to control the accuracy of the deposition, the user can limit
0137 the maximum allowed for the step size of charged particles.
0138 (command `/testem/stepMax` )
0139
0140 The result is a 1D histogram, which is the total energy deposited
0141 along the trajectory of the incident particle.
0142
0143 The bin size is equal to stepMax. The number of bins is determined by
0144 the thickness of the absorber (with a minimum of 100 bins).
0145 The total energy deposited is plotted in MeV/mm per incident particle.
0146
0147 The next histogram allows to have a zoom around the Bragg peak. Its binning
0148 should be defined via UI command:
0149 ```
0150 /analysis/h1/set 2 nbins xmin xmax unit
0151 ```
0152
0153 The last histogram shows the projectile range. Its bining should be defined
0154 similary by the UI command:
0155 ```
0156 /analysis/h1/set 3 nbins xmin xmax unit
0157 ```
0158
0159 One can control the name of the histograms file with the command:
0160 ```
0161 /analysis/setFileName name (default testem7)
0162 ```
0163
0164 It is possible to choose the format of the histogram file : root (default),
0165 xml, csv, by changing the default file type in HistoManager.cc
0166
0167 It is also possible to print selected histograms on an ascii file:
0168 ```
0169 /analysis/h1/setAscii id
0170 ```
0171 All selected histos will be written on a file name.ascii (default testem7)
0172