1 | $Id: README,v 1.23 2010/09/17 18:45:43 maire Exp $ |
---|
2 | ------------------------------------------------------------------- |
---|
3 | |
---|
4 | ========================================================= |
---|
5 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP |
---|
6 | ========================================================= |
---|
7 | |
---|
8 | TestEm7 |
---|
9 | ------- |
---|
10 | |
---|
11 | How to produce a Bragg curve in a water phantom. |
---|
12 | How to compute the dose in small 'test volumes' called tallies. |
---|
13 | How to define a maximum step size. |
---|
14 | |
---|
15 | 1- GEOMETRY DEFINITION |
---|
16 | |
---|
17 | The geometry consists of a single block of a homogenous material, |
---|
18 | placed in a world. |
---|
19 | |
---|
20 | Three parameters define the geometry : |
---|
21 | - the material of the box, |
---|
22 | - the thickness of the box (sizeX), |
---|
23 | - the tranverse dimension of the box (sizeYZ). |
---|
24 | |
---|
25 | The default is 20 cm of water. |
---|
26 | |
---|
27 | In addition a transverse uniform magnetic field can be applied. |
---|
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 | The size, matter, positions of several test-volumes (tallies) can be |
---|
34 | defined via UI commands : /testem/det/tally... |
---|
35 | |
---|
36 | 2- PHYSICS LIST |
---|
37 | |
---|
38 | Physics lists can be local (eg. in this example) or from G4 kernel |
---|
39 | physics_lists subdirectory. |
---|
40 | |
---|
41 | Local physics lists: |
---|
42 | - "local" standard EM physics with current 'best' options setting. |
---|
43 | these options are explicited in PhysListEmStandard |
---|
44 | - "standardSS" standard EM physics with single Coulomb scattering |
---|
45 | instead of multiple scattering; |
---|
46 | - "standardNR" standard EM physics with single Coulomb scattering |
---|
47 | process G4ScreenedNuclearRecoil instead of the |
---|
48 | multiple scattering for ions with energy less than |
---|
49 | 100 MeV/nucleon; the new process was developed |
---|
50 | by M.H. Mendenhall and R.A. Weller from Vanderbuilt |
---|
51 | University and published in NIM B 277 (2005) 420. |
---|
52 | In later Geant4 releases the process will be a part |
---|
53 | of Geant4 source, currently it is released together |
---|
54 | with its mathematical tool c2_functions in current |
---|
55 | |
---|
56 | |
---|
57 | From geant4/source/physics_lists/builders: |
---|
58 | - "emstandard_opt0" recommended standard EM physics for LHC |
---|
59 | - "emstandard_opt1" best CPU performance standard physics for LHC |
---|
60 | - "emstandard_opt2" |
---|
61 | - "emstandard_opt3" best current advanced EM options. |
---|
62 | analog to "local" above |
---|
63 | - "emlivermore" low-energy EM physics using Livermore data |
---|
64 | - "empenelope" low-energy EM physics implementing Penelope models |
---|
65 | |
---|
66 | Optional components can be added: |
---|
67 | - "elastic" elastic scattering of hadrons |
---|
68 | - "HElastic" |
---|
69 | - "QElastic" |
---|
70 | - "binary" QBBC configuration of hadron inelastic models |
---|
71 | - "binary_ion" Binary ion inelastic models |
---|
72 | |
---|
73 | Physics lists and options can be (re)set with UI commands |
---|
74 | |
---|
75 | Please, notice that options set through G4EmProcessOPtions are global, eg |
---|
76 | for all particle types. In G4 builders, it is shown how to set options per |
---|
77 | particle type. |
---|
78 | |
---|
79 | 3- AN EVENT : THE PRIMARY GENERATOR |
---|
80 | |
---|
81 | The primary kinematic consists of a single particle which hits the |
---|
82 | block perpendicular to the input face. The type of the particle |
---|
83 | and its energy are set in the PrimaryGeneratorAction class, and can |
---|
84 | changed via the G4 build-in commands of ParticleGun class (see |
---|
85 | the macros provided with this example). |
---|
86 | The default is proton 160 MeV |
---|
87 | |
---|
88 | In addition one can define 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 | |
---|
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 | Optionaly one can choose to draw all particles, only the charged one, |
---|
110 | or none. This command is defined in EventActionMessenger class. |
---|
111 | |
---|
112 | |
---|
113 | 6- HOW TO START ? |
---|
114 | |
---|
115 | - compile and link to generate an executable |
---|
116 | % cd geant4/examples/extended/electromagnetic/TestEm7 |
---|
117 | % gmake |
---|
118 | |
---|
119 | - execute Test in 'batch' mode from macro files |
---|
120 | % TestEm7 proton.mac |
---|
121 | |
---|
122 | - execute Test in 'interactive mode' with visualization |
---|
123 | % TestEm7 |
---|
124 | .... |
---|
125 | Idle> type your commands |
---|
126 | .... |
---|
127 | Idle> exit |
---|
128 | |
---|
129 | |
---|
130 | 7- HISTOGRAM OF THE BRAGG PEAK |
---|
131 | |
---|
132 | Testem7 computes the total energy deposited along the trajectory of |
---|
133 | the incident particle : the so-called Bragg peak. |
---|
134 | |
---|
135 | In order to control the accuracy of the deposition, the user can limit |
---|
136 | the maximum allowed for the step size of charged particles. |
---|
137 | (command /testem/stepMax ) |
---|
138 | |
---|
139 | The result is a 1D histogram, which is the total energy deposited |
---|
140 | along the trajectory of the incident particle. |
---|
141 | |
---|
142 | The bin size is egal to stepMax. The number of bins is determined by |
---|
143 | the thickness of the absorber (with a minimum of 100 bins). |
---|
144 | The total energy deposited is plotted in MeV/mm per incident particle. |
---|
145 | |
---|
146 | The next histogram allows to have a zoom around the Bragg peak. Its bining |
---|
147 | should be defined via UI command: |
---|
148 | /testem/histo/setHisto 2 nbins xmin xmax unit |
---|
149 | |
---|
150 | The last histogram shows the projectile range. Its bining should be defined |
---|
151 | similary by the UI command: |
---|
152 | /testem/histo/setHisto 3 nbins xmin xmax unit |
---|
153 | |
---|
154 | 8- USING HISTOGRAMS |
---|
155 | |
---|
156 | By default the histograms are not activated. To activate histograms |
---|
157 | the environment variable G4ANALYSIS_USE should be defined. For instance |
---|
158 | uncomment the flag G4ANALYSIS_USE in GNUmakefile. |
---|
159 | |
---|
160 | To use histograms, at least one of the AIDA implementations should be |
---|
161 | available. See InstallAida.txt |
---|
162 | |
---|
163 | Before compilation of the example it is optimal to clean up old files: |
---|
164 | gmake histclean |
---|
165 | gmake |
---|
166 | |
---|
167 | One can choose the format of the histogram file (hbook, root, XML): |
---|
168 | /testem/histo/setFileType root |
---|
169 | |
---|
170 | The default name "testem7" can be changed: |
---|
171 | /testem/histo/setFileName myname |
---|