source: trunk/examples/extended/electromagnetic/TestEm7/README@ 807

Last change on this file since 807 was 807, checked in by garnier, 17 years ago

update

File size: 7.3 KB
Line 
1$Id: README,v 1.17 2007/12/04 12:06:28 vnivanch 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 The following EM physics lists are available in this example:
39 - "standard" standard EM physics (default)
40 - "livermore" low-energy EM physics using Livermore data
41 - "penelope" low-energy EM physics implementing Penelope models
42 - "standardSS" standard EM physics with single Coulomb scattering
43 instead of multiple scattering; G4ionIonisation is
44 substituted by G4ionGasIonisation for GenericIons
45 - "standardNR" standard EM physics with single Coulomb scattering
46 process G4ScreenedNuclearRecoil instead of the
47 multiple scattering; the new process was developed
48 by M.H. Mendenhall and R.A. Weller from Vanderbuilt
49 University and published in NIM B 277 (2005) 420.
50 In later Geant4 releases the process will be a part
51 of Geant4 source, currently it is released together
52 with its mathematical tool c2_functions in current
53 example
54
55 Alternatively, the user may use predefined Geant4 builders:
56 - "emstandard" G4EmStandardPhysics builder
57 - "emstandard_opt1" G4EmStandardPhysics_option1 builder
58 - "emstandard_opt2" G4EmStandardPhysics_option2 builder
59 See geant4/source/physics_lists/History for details
60
61 Optional components can be added:
62 - "elastic" elastic scattering of hadrons
63 - "HElastic"
64 - "QElastic"
65 - "binary" QBBC configuration of hadron inelastic models
66 - "binary_ion" Binary ion inelastic models
67
68 3- AN EVENT : THE PRIMARY GENERATOR
69
70 The primary kinematic consists of a single particle which hits the
71 block perpendicular to the input face. The type of the particle
72 and its energy are set in the PrimaryGeneratorAction class, and can
73 changed via the G4 build-in commands of ParticleGun class (see
74 the macros provided with this example).
75 The default is proton 160 MeV
76
77 In addition one can define randomly the impact point of the incident
78 particle. The corresponding interactive command is built in
79 PrimaryGeneratorMessenger class.
80
81 A RUN is a set of events.
82
83
84 4- VISUALIZATION
85
86 The Visualization Manager is set in the main().
87 The initialisation of the drawing is done via the command
88 > /control/execute vis.mac
89
90 The detector has a default view which is a longitudinal view of the box.
91
92 The tracks are drawn at the end of event, and erased at the end of run.
93 Optionaly one can choose to draw all particles, only the charged one,
94 or none. This command is defined in EventActionMessenger class.
95
96
97 5- HOW TO START ?
98
99 - compile and link to generate an executable
100 % cd geant4/examples/extended/electromagnetic/TestEm7
101 % gmake
102
103 - execute Test in 'batch' mode from macro files
104 % TestEm7 proton.mac
105
106 - execute Test in 'interactive mode' with visualization
107 % TestEm7
108 ....
109 Idle> type your commands
110 ....
111 Idle> exit
112
113
114 6- HISTOGRAM OF THE BRAGG PEAK
115
116 Testem7 computes the total energy deposited along the trajectory of
117 the incident particle : the so-called Bragg peak.
118
119 In order to control the accuracy of the deposition, the user can limit
120 the maximum allowed for the step size of charged particles.
121 (command /testem/stepMax )
122
123 The result is a 1D histogram which is the total energy deposited along
124 the trajectory of the incident particle.
125
126 The histogram is saved in hbook format (testem7.hbook)
127
128 The bin size is egal to stepMax. The number of bins is determined by
129 the thickness of the absorber (with a minimum of 100 bins).
130 The total energy deposited is plotted in MeV/mm per incident particle.
131
132 Note that, by default, histograms are disabled. To activate them, uncomment
133 G4ANALYSIS_USE in GNUmakefile.
134
135 7- DOSE IN 'TEST-VOLUMES'
136
137 The energy deposited in the test-volumes (tallies) defined in
138 DetectorConstruction are printed at EndOfRun, both in MeV and gray.
139
140
141 8- USING HISTOGRAMS
142
143 By default the histograms are not activated. To activate histograms
144 the environment variable G4ANALYSIS_USE should be defined. For instance
145 uncomment the flag G4ANALYSIS_USE in GNUmakefile.
146
147 It is possible to choose the format of the histogram file (hbook, root, XML):
148 comment/uncomment 1 line in RunAction::bookHisto().
149
150 Before compilation of the example it is optimal to clean up old files:
151 gmake histclean
152 gmake
153
154 To use histograms, at least one of the AIDA implementations should be
155 available (see http://aida.freehep.org).
156
157 8a - PI
158
159 A package including AIDA and extended interfaces also using Python is PI,
160 available from: http://cern.ch/pi
161
162 Once installed PI or PI-Lite in a specified local area $MYPY, it is required
163 to add the installation path to $PATH, i.e. for example, for release 1.2.1 of
164 PI:
165 setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin
166
167 CERN users can use the PATH to the LCG area on AFS.
168 Before running the example the command should be issued:
169 eval `aida-config --runtime csh`
170
171 8b - OpenScientist
172
173 OpenScientist is available at http://OpenScientist.lal.in2p3.fr.
174
175 You have to "setup" the OpenScientist AIDA implementation before compiling
176 (then with G4ANALYSIS_USE set) and running your Geant4 application.
177
178 On UNIX you setup, with a csh flavoured shell :
179 csh> source <<OpenScientist install path>/aida-setup.csh
180 or with a sh flavoured shell :
181 sh> . <<OpenScientist install path>/aida-setup.sh
182 On Windows :
183 DOS> call <<OpenScientist install path>/aida-setup.bat
184
185 You can use various file formats for writing (AIDA-XML, hbook, root).
186 These formats are readable by the Lab onx interactive program
187 or the OpenPAW application. See the web pages.
188
189
190 With OpenPAW, on a run.hbook file, one can view the histograms
191 with something like :
192 OS> opaw
193 opaw> h/file 1 run.hbook ( or opaw> h/file 1 run.aida or run.root)
194 opaw> zone 2 2
195 opaw> h/plot 1
196 opaw> h/plot 2
Note: See TracBrowser for help on using the repository browser.