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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 TestEm11
8 --------
9
10 How to plot a depth dose profile in a rectangular box.
11
12
13 1- GEOMETRY DEFINITION
14
15 The geometry consists of a stack of one or several blocks of homogenous
16 material, called absorbers.
17 Optionally, each absorber can be divided in thinner layers (replica)
18
19 A minimum of 5 parameters define the geometry :
20 - the number of absorbers (NbOfAbsor)
21 - the material of each absorber,
22 - the thickness of each absorber,
23 - the tranverse dimension of the stack (sizeYZ),
24 - the number of divisions of each absorber (NbOfDivisions)
25
26 In addition a transverse uniform magnetic field can be applied.
27 eg: /globalField/setValue 0 0 5 tesla
28
29 The default geometry is constructed in DetectorConstruction class,
30 but all of the above parameters can be changed interactively via
31 the commands defined in the DetectorMessenger class.
32
33 2- PHYSICS LIST
34
35 Physics Lists are based on modular design. Several modules are instantiated:
36 1. Transportation
37 2. EM physics
38 3. Decays
39 4. StepMax - for step limitation
40
41 The following options for EM physics using builders from physics_lists
42 sub-package are available:
43 - "emstandard_opt0" recommended standard EM physics for LHC
44 - "emstandard_opt1" best CPU performance standard physics for LHC
45 - "emstandard_opt2" similar fast simulation
46 - "emstandard_opt3" best standard EM options - analog to "local" above
47 - "emstandard_opt4" best current advanced EM options standard + lowenergy
48 - "emstandardWVI" standard EM physics and WentzelVI multiple scattering
49 - "emstandardSS" standard EM physics and single scattering model
50 - "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
51 - "emlivermore" low-energy EM physics using Livermore data
52 - "empenelope" low-energy EM physics implementing Penelope models
53 - "emlowenergy" low-energy EM physics implementing experimental
54 low-energy models
55 - "emstandardMP" standard EM physics where for e- a new model
56 G4DiscreteScatteringModel is applied; for this model
57 a data set G4GBFPDATA should be requested from EM group
58
59 A local builder, PhysListEmStandard "local" (similar to opt3) is also
60 available.
61
62 Physics lists and options can be (re)set with UI commands
63
64 3- ACTION INITIALIZATION
65
66 A newly introduced class, ActionInitialization, instantiates and registers
67 to Geant4 kernel all user action classes.
68
69 While in sequential mode the action classes are instantiated just once,
70 via invoking the method:
71 ActionInitialization::Build()
72 in multi-threading mode the same method is invoked for each thread worker
73 and so all user action classes are defined thread-local.
74
75 A run action class (if present) has to be instantiated both thread-local
76 and global, which is why its instance has to be created also in the method
77 ActionInitialization::BuildForMaster()
78 which is invoked only in multi-threading mode.
79
80 4- AN EVENT : THE PRIMARY GENERATOR
81
82 The primary kinematic consists of a single particle starting at the
83 left face of the box. The type of the particle and its energy are set
84 in the PrimaryGeneratorAction class, and can be changed via the G4
85 build-in commands of G4ParticleGun class (see the macros provided with
86 this example).
87
88 In addition one can choose randomly the impact point of the incident
89 particle. The corresponding interactive command is built in
90 PrimaryGeneratorMessenger class.
91
92 A RUN is a set of events.
93
94 5- VISUALIZATION
95
96 The Visualization Manager is set in the main().
97 The initialisation of the drawing is done via the commands
98 /vis/... in the macro vis.mac. To get visualisation:
99 > /control/execute vis.mac
100
101 The detector has a default view which is a longitudinal view of the box.
102
103 The tracks are drawn at the end of event, and erased at the end of run.
104 Optionally one can choose to draw all particles, only the charged one,
105 or none. This command is defined in EventActionMessenger class.
106
107 6- HOW TO START ?
108
109 - Execute TestEm11 in 'batch' mode from macro files
110 % TestEm11 run01.mac
111
112 - Execute TestEm11 in 'interactive mode' with visualization
113 % TestEm11
114 ....
115 Idle> type your commands
116 ....
117 Idle> exit
118
119 Macros provided in this example:
120 - alpha.mac: alpha (400 MeV) on water
121 - ionC12.mac: ion C12 (2.4 GeV) on water
122 - multiLayers.mac: gamma (6 MeV) on multi layers
123 - radioactive.mac: radioactive ion on multi layers
124 - range.mac: compute csda range of primary particle
125 - run01.mac: e- (500 keV) on silicon. Step max from histo 1
126 - run02.mac: e- (500 keV) on silicon. Step max from geometry
127 - sandia.mac: to compare with Sandia data
128 - water.mac: e- (4 MeV) on water. No constraint on tracking step
129
130 Macros to be run interactively:
131 - vis.mac: To activate visualization
132
133 7- TRACKING and STEP MAX
134
135 TestEm11 computes the distribution of energy deposited along the trajectory of
136 the incident particle : the so-called longitudinal energy profile,
137 or depth dose distribution.
138 The energy deposited (edep) is randomly distribued along the step (see
139 SteppingAction).
140
141 In order to control the accuracy of the deposition, the maximum step size
142 of charged particles is computed automatically from the binning of
143 histograms 1 and 8 (see RunAction).
144
145 As an example, this limitation is implemented as a 'full' process :
146 see StepMax class and its Messenger. The 'StepMax process' is registered
147 in the Physics List.
148
149 StepMax is evaluated at RunAction::BeginOfRun(),
150 and passed to the StepMax process.
151 A boolean UI command allows to deactivate this mechanism.
152 Another UI command allows to define directly a stepMax value.
153
154 8- HISTOGRAMS
155
156 TestEm11 has several predefined 1D histograms :
157
158 1 : longitudinal energy profile (in MeV/mm and per event)
159 2 : total energy deposited in all absorbers
160 3 : total track length of the primary track
161 4 : step size of the primary track
162 5 : projected range of the primary track
163 6 : total track length of charged secondary tracks
164 7 : step size of charged secondary tracks
165 8 : longitudinal energy profile (in MeV.cm2/g), as a function of x/r0
166 where r0 is the range of the primary particle
167 9 : total energy leakage
168 10 : total energy : Edep + Eleak
169 11 : energy deposited in absorber 1
170 12 : energy deposited in absorber 2
171 ...etc........
172
173 The histograms are managed by G4Analysis classes.
174 The histos can be individually activated with the command :
175 /analysis/h1/set id nbBins valMin valMax unit
176 where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
177
178 One can control the name of the histograms file with the command:
179 /analysis/setFileName name (default testem11)
180
181 It is possible to choose the format of the histogram file : root (default),
182 hdf5, xml, csv, by changing the default file type in HistoManager.cc
183
184 It is also possible to print selected histograms on an ascii file:
185 /analysis/h1/setAscii id
186 All selected histos will be written on a file name.ascii (default testem11)