1 | $Id: README,v 1.6 2005/11/27 13:13:59 mpiergen Exp $ |
---|
2 | ------------------------------------------------------------------- |
---|
3 | |
---|
4 | |
---|
5 | ========================================================= |
---|
6 | Geant4 - Medical Linac example |
---|
7 | ========================================================= |
---|
8 | |
---|
9 | README |
---|
10 | --------------------- |
---|
11 | |
---|
12 | |
---|
13 | ------------------------------------------------------------------------ |
---|
14 | ----> Introduction. |
---|
15 | |
---|
16 | Medical_Linac is an example of application of Geant4 in a medical physics |
---|
17 | envinronment. It simulates energy deposit in a Phantom filled with water |
---|
18 | for a typical linac used for intensity modulated radiation therapy. |
---|
19 | The experimental set-up is very similar to one used in clinical practice. |
---|
20 | |
---|
21 | ------------------------------------------------------------------------ |
---|
22 | ----> 1.Experimental set-up. |
---|
23 | |
---|
24 | The elements simulated are: |
---|
25 | |
---|
26 | 1-The point source of electrons (the distribution of the electron energy |
---|
27 | and the electron radial intensity was assumed Gaussian in shape) |
---|
28 | (the beam is along the z axis) |
---|
29 | 2-The primary collimator |
---|
30 | 3-The target |
---|
31 | 4-The vacuum window |
---|
32 | 5-The flattening filter |
---|
33 | 6-The ion chamber |
---|
34 | 7-The mirror |
---|
35 | 8-The light field reticle |
---|
36 | 9-The secondary movable collimators (jaws) |
---|
37 | 10-The Multi Leaf Collimator |
---|
38 | 11-The phantom (filled with water) |
---|
39 | |
---|
40 | The objects (2) and (3) are in a box filled with vacuum. |
---|
41 | The world volume is filled with air. |
---|
42 | The distance between the upper surface of the target and the upper surface |
---|
43 | of the phantom (SSD) is 100 cm. |
---|
44 | The particles exiting from the target with an angle>25deg are killed. |
---|
45 | |
---|
46 | ------------------------------------------------------------------------ |
---|
47 | ----> 2.Setting up the environment variables |
---|
48 | |
---|
49 | compiler = gcc-3.2.3 |
---|
50 | |
---|
51 | setenv G4SYSTEM Linux-g++ |
---|
52 | |
---|
53 | setenv G4INSTALL points to the installation directory of GEANT4; |
---|
54 | |
---|
55 | setenv G4LIB point to the compiled libraries of GEANT4; |
---|
56 | |
---|
57 | setenv G4WORKDIR points to the work directory; |
---|
58 | |
---|
59 | setenv CLHEP_BASE_DIR points to the installation directory of CHLEP; |
---|
60 | |
---|
61 | setenv G4LEDATA points to the low energy electromagnetic libraries - G4EMLOW2.3 |
---|
62 | |
---|
63 | setup for analysis: AIDA 3.2.1, PI 1.3.3 |
---|
64 | |
---|
65 | Users can download the analysis tools from: |
---|
66 | |
---|
67 | http://aida.freehep.org/ |
---|
68 | http://www.cern.ch/PI |
---|
69 | |
---|
70 | #------------------------------------------ |
---|
71 | |
---|
72 | - Setup for Visualization |
---|
73 | |
---|
74 | IMPORTANT: be sure that your Geant4 installation has been done |
---|
75 | with the proper visualization drivers; for details please see the |
---|
76 | file geant4/source/visualization/README. |
---|
77 | |
---|
78 | To use the visualization drivers set the following variables in |
---|
79 | your local environment: |
---|
80 | |
---|
81 | setenv G4VIS_USE_OPENGLX 1 # OpenGL visualization |
---|
82 | setenv G4VIS_USE_DAWNFILE 1 # DAWN file |
---|
83 | setenv G4VIS_USE_VRMLFILE 1 # VRML file |
---|
84 | setenv G4VRMLFILE_VIEWER vrmlview # If installed |
---|
85 | |
---|
86 | ------------------------------------------------------------------------ |
---|
87 | ----> 3.How to run the example. |
---|
88 | |
---|
89 | - batch mode: |
---|
90 | |
---|
91 | OpenGL visualization: |
---|
92 | $G4WORDIR/bin/Linux-g++/MedLinac vis.mac |
---|
93 | |
---|
94 | or DAWN file: |
---|
95 | $G4WORDIR/bin/Linux-g++/MedLinac dawnvis.mac |
---|
96 | |
---|
97 | or VRML file: |
---|
98 | $G4WORDIR/bin/Linux-g++/MedLinac vrmlvis.mac |
---|
99 | |
---|
100 | or without visualization: |
---|
101 | $G4WORDIR/bin/Linux-g++/MedLinac macro.mac |
---|
102 | |
---|
103 | - Interative mode: |
---|
104 | 3) $G4WORDIR/bin/Linux-g++/MedLinac |
---|
105 | |
---|
106 | -->possible different configurations for interactive mode: |
---|
107 | |
---|
108 | The user can select the cut of the physics processes: |
---|
109 | /PhysicsList/cut 0.2 mm |
---|
110 | |
---|
111 | The user can select the dimension of the water phantom and the dimension of the phantom's voxels in the detector |
---|
112 | construction: |
---|
113 | /Phantom/dimension 15. cm |
---|
114 | /Phantom/Nvoxels 150/Phantom/maxStep 0.2 mm |
---|
115 | |
---|
116 | and in the definition of the sensitive detector: |
---|
117 | /PhantomSD/dimension 15. cm |
---|
118 | /PhantomSD/Nvoxels 150 |
---|
119 | |
---|
120 | The user can select the max step defined in the detector construction: |
---|
121 | /Phantom/maxStep 0.2 mm |
---|
122 | |
---|
123 | |
---|
124 | The user can select the position of the secondary collimators (the jaws) |
---|
125 | to obtain the desired field at isocenter: |
---|
126 | idle>/Jaws/X1/DistanceFromAxis -20. cm |
---|
127 | idle>/Jaws/X2/DistanceFromAxis 20. cm |
---|
128 | idle>/Jaws/Y1/DistanceFromAxis -20. cm |
---|
129 | idle>/Jaws/Y2/DistanceFromAxis 20. cm |
---|
130 | idle>/Jaws/update |
---|
131 | |
---|
132 | The user can select the position of every single leaf of the Multi-Leaf Collimator, for example: |
---|
133 | Idle> /MLC/leaf_selection a1 |
---|
134 | Idle> /MLC/position 0. cm |
---|
135 | Idle> /MLC/leaf_selection a2 |
---|
136 | Idle> /MLC/position 0. cm |
---|
137 | .. |
---|
138 | .. |
---|
139 | .. |
---|
140 | Idle> /MLC/leaf_selection b39 |
---|
141 | Idle> /MLC/position 0. cm |
---|
142 | Idle> /MLC/leaf_selection b40 |
---|
143 | Idle> /MLC/position 0. cm |
---|
144 | |
---|
145 | The distance selected represent the distance between the leaf tip and the beam axis projected at isocenter. |
---|
146 | |
---|
147 | |
---|
148 | |
---|
149 | The user can select the mean energy ad the standard deviation of the electrons: |
---|
150 | idle>/energy 6.0 MeV |
---|
151 | idle>/sourceType 0.127 MeV |
---|
152 | |
---|
153 | idle>/run/beamOn [NumberOfEvents] ...and then |
---|
154 | idle>exit |
---|
155 | |
---|
156 | ----------------------------------------------------------------------- |
---|
157 | ----> 4. The physics |
---|
158 | |
---|
159 | The electromagnetic physic uses the LowEnergy library, |
---|
160 | specifically provided from GEANT4 to treat low energy processes. |
---|
161 | The default cut in range value is 0.1 mm, a bigger cut is associated to the first collimator. |
---|
162 | |
---|
163 | ------------------------------------------------------------------------ |
---|
164 | ----> 5. Simulation output |
---|
165 | |
---|
166 | The analysis part of Medical_Linac is based on the AIDA interfaces and their |
---|
167 | implementation in Anaphe |
---|
168 | The actual analysis produces some histograms; the histograms are saved at |
---|
169 | the end of the run in the file "medlinac.hbk". |
---|
170 | |
---|
171 | It contains: |
---|
172 | 1) 2Dhistogram with the distribution of energy in the phantom (plane xz) |
---|
173 | 2) 1Dhistogram with the primary particle energy |
---|
174 | |
---|
175 | 3) 2Dhistogram with the distribution of energy )at a depth in the phantom |
---|
176 | of 15 mm (ZThickness = 1. cm ) |
---|
177 | |
---|
178 | 4) 1Dhistogram with the distribution of energy along the z axis |
---|
179 | (Y and X Thickness = 5. mm), from which the user can calculate the PDD |
---|
180 | |
---|
181 | 5) 1Dhistogram with the distribution of energy along the x axis |
---|
182 | (Y and Z Thickness = 5. mm) at a depth in the phantom of 15 mm, |
---|
183 | from which the user can calculate the flatness |
---|
184 | |
---|
185 | 6) 1Dhistogram with the distribution of energy along the x axis |
---|
186 | (Y and Z Thickness = 5. mm) at a depth in the phantom of 50 mm, |
---|
187 | from which the user can calculate the flatness |
---|
188 | |
---|
189 | 7) 1Dhistogram with the distribution of energy along the x axis |
---|
190 | (Y and Z Thickness = 5. mm) at a depth in the phantom of 100 mm, |
---|
191 | from which the user can calculate the flatness |
---|
192 | |
---|
193 | 8) 1Dhistogram with the distribution of energy along the x axis |
---|
194 | (Y and Z Thickness = 5. mm) at a depth in the phantom of 200 mm, |
---|
195 | from which the user can calculate the flatness |
---|
196 | |
---|
197 | Units: the energy deposit is in MeV; |
---|
198 | x, y, z in mm for histograms |
---|
199 | |
---|
200 | To fill histograms from (4) to (8) I suggest you to select NumberOfEvents>500000 |
---|
201 | |
---|
202 | Please note that in a multiple run session, the last run always override the |
---|
203 | hbook file. |
---|
204 | |
---|
205 | To use analisys remember to set G4ANALYSIS_USE. |
---|
206 | |
---|
207 | -------------------------------------------------------------------------- |
---|
208 | |
---|
209 | for comments, advices, doubts and questions: Michela.Piergentili@ge.infn.it |
---|
210 | |
---|
211 | last modified: Michela Piergentili 24/11/2005 |
---|
212 | |
---|
213 | |
---|