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.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 ]
1 -------------------------------------------------------------------
2
3 =========================================================
4 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
5 =========================================================
6
7 TestEm7
8 -------
9
10 How to produce a Bragg curve in a water phantom.
11 How to compute the dose in 'test volumes' called tallies.
12 How to define a maximum step size.
13
14 1- GEOMETRY DEFINITION
15
16 The geometry consists of a single block of a homogenous material,
17 placed in a world.
18
19 Three parameters define the geometry :
20 - the material of the box,
21 - the thickness of the box (sizeX),
22 - the transverse dimension of the box (sizeYZ).
23
24 The default is 20 cm of water.
25
26 In addition a transverse uniform magnetic field can be applied.
27
28 The default geometry is constructed in DetectorConstruction class,
29 but all of the above parameters can be changed interactively via
30 the commands defined in the DetectorMessenger class.
31
32 The size, matter, positions of several test-volumes (tallies) can be
33 defined via UI commands : /testem/det/tally...
34
35 2- PHYSICS LIST
36
37 Physics lists can be local (eg. in this example) or from G4 kernel
38 physics_lists subdirectory.
39
40 Local physics lists:
41 - "local" standard EM physics with current 'best' options setting.
42 these options are explicited in PhysListEmStandard
43 - "standardSS" standard EM physics with single Coulomb scattering
44 instead of multiple scattering;
45 - "standardNR" standard EM physics with single Coulomb scattering
46 process G4ScreenedNuclearRecoil instead of the
47 multiple scattering for ions with energy less than
48 100 MeV/nucleon; the new process was developed
49 by M.H. Mendenhall and R.A. Weller from Vanderbuilt
50 University and published in NIM B 277 (2005) 420.
51 The process is released in this example with its
52 mathematical tool c2_functions
53
54 From geant4/source/physics_lists/builders:
55 - "emstandard_opt0" recommended standard EM physics for LHC
56 - "emstandard_opt1" best CPU performance standard physics for LHC
57 - "emstandard_opt2" similar fast simulation
58 - "emstandard_opt3" best standard EM options - analog to "local" above
59 - "emstandard_opt4" best current advanced EM options standard + lowenergy
60 - "emstandardWVI" standard EM physics and WentzelVI multiple scattering
61 - "emstandardSS" standard EM physics and single scattering model
62 - "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
63 - "emlivermore" low-energy EM physics using Livermore data
64 - "empenelope" low-energy EM physics implementing Penelope models
65 - "emlowenergy" low-energy EM physics implementing experimental
66 low-energy models
67
68 Decay and StepMax processes are added to each list.
69
70 Optional components can be added:
71 - "elastic" elastic scattering of hadrons
72 - "HElastic"
73 - "QElastic"
74 - "binary" QBBC configuration of hadron inelastic models
75 - "binary_ion" Binary ion inelastic models
76 - "ionIoni" Ion gas models
77
78 Physics lists and options can be (re)set with UI commands
79
80 3- AN EVENT : THE PRIMARY GENERATOR
81
82 The primary kinematic consists of a single particle which hits the
83 block perpendicular to the input face. The type of the particle
84 and its energy are set in the PrimaryGeneratorAction class, and can
85 changed via the G4 build-in commands of G4ParticleGun class (see
86 the macros provided with this example).
87 The default is a 160 MeV proton.
88
89 In addition one can define randomly the impact point of the incident
90 particle. The corresponding interactive command is built in
91 PrimaryGeneratorMessenger class.
92
93 A RUN is a set of events.
94
95 4- DOSE IN 'TEST-VOLUMES'
96
97 The energy deposited in the test-volumes (tallies) defined in
98 DetectorConstruction are printed at EndOfRun, both in MeV and gray.
99
100 5- VISUALIZATION
101
102 The Visualization Manager is set in the main().
103 The initialisation of the drawing is done via the command
104 > /control/execute vis.mac
105
106 The detector has a default view which is a longitudinal view of the box.
107
108 The tracks are drawn at the end of event, and erased at the end of run.
109 Optionally one can choose to draw all particles, only the charged one,
110 or none. This command is defined in EventActionMessenger class.
111
112 6- HOW TO START ?
113
114 - execute Test in 'batch' mode from macro files
115 % TestEm7 proton.mac
116
117 - execute Test in 'interactive mode' with visualization
118 % TestEm7
119 ....
120 Idle> type your commands
121 ....
122 Idle> exit
123
124 7- HISTOGRAM OF THE BRAGG PEAK
125
126 Testem7 computes the total energy deposited along the trajectory of
127 the incident particle : the so-called Bragg peak.
128
129 In order to control the accuracy of the deposition, the user can limit
130 the maximum allowed for the step size of charged particles.
131 (command /testem/stepMax )
132
133 The result is a 1D histogram, which is the total energy deposited
134 along the trajectory of the incident particle.
135
136 The bin size is equal to stepMax. The number of bins is determined by
137 the thickness of the absorber (with a minimum of 100 bins).
138 The total energy deposited is plotted in MeV/mm per incident particle.
139
140 The next histogram allows to have a zoom around the Bragg peak. Its binning
141 should be defined via UI command:
142 /analysis/h1/set 2 nbins xmin xmax unit
143
144 The last histogram shows the projectile range. Its bining should be defined
145 similary by the UI command:
146 /analysis/h1/set 3 nbins xmin xmax unit
147
148 One can control the name of the histograms file with the command:
149 /analysis/setFileName name (default testem7)
150
151 It is possible to choose the format of the histogram file : root (default),
152 xml, csv, by using namespace in HistoManager.hh
153
154 It is also possible to print selected histograms on an ascii file:
155 /analysis/h1/setAscii id
156 All selected histos will be written on a file name.ascii (default testem7)