source: trunk/examples/extended/electromagnetic/TestEm12/README@ 1230

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

update

File size: 6.5 KB
Line 
1$Id: README,v 1.7 2007/11/09 17:35:06 maire Exp $
2-------------------------------------------------------------------
3
4 =========================================================
5 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
6 =========================================================
7
8 TestEm12
9 --------
10
11
12 How to plot a depth dose profile in spherical geometry.
13
14
15 1- GEOMETRY DEFINITION
16
17 The geometry consists of a single sphere of an homogenous material.
18 Optionally, the sphere can be divided in thin shells.
19
20 3 parameters define the geometry :
21 - the material of the sphere,
22 - the radius of the sphere (absorRadius),
23 - the number of shells (nbOfLayers)
24
25 In addition a transverse uniform magnetic field can be applied.
26
27 The default geometry is constructed in DetectorConstruction class,
28 but all of the above parameters can be changed interactively via
29 the commands defined in the DetectorMessenger class.
30
31 2- PHYSICS LIST
32
33 The particle list is the one of novice/exampleN02.
34 The physics list contains the 'standard' electromagnetic processes,
35 and decay.
36
37 Few commands have been added to PhysicsList, in order to set the
38 production threshold for secondaries either in range for gamma, e-/e+.
39
40 3- AN EVENT : THE PRIMARY GENERATOR
41
42 The primary kinematic consists of a single particle randomly shooted at
43 the centre of the sphere. The type of the particle and its energy are set
44 in the PrimaryGeneratorAction class, and can be changed via the G4
45 build-in commands of ParticleGun class (see the macros provided with
46 this example).
47
48 In addition one can desactivate the randomness of the direction of the
49 incident particle. The corresponding interactive command is built in
50 PrimaryGeneratorMessenger class.
51
52 A RUN is a set of events.
53
54
55 4- VISUALIZATION
56
57 The Visualization Manager is set in the main().
58 The initialisation of the drawing is done via the commands
59 /vis/... in the macro vis.mac. To get visualisation:
60 > /control/execute vis.mac
61
62 The detector has a default view which is a longitudinal view of the
63 box.
64
65 The tracks are drawn at the end of event, and erased at the end of run.
66 Optionaly one can choose to draw all particles, only the charged one,
67 or none. This command is defined in EventActionMessenger class.
68
69
70 5- HOW TO START ?
71
72 - compile and link to generate an executable
73 % cd geant4/examples/extended/electromagnetic/TestEm1
74 % gmake
75
76 - execute TestEm12 in 'batch' mode from macro files
77 % TestEm12 run01.mac
78
79 - execute TestEm12 in 'interactive mode' with visualization
80 % TestEm12
81 ....
82 Idle> type your commands
83 ....
84 Idle> exit
85
86 6- TRACKING and STEP MAX
87
88 Testem12 computes the total energy deposited along the trajectory of
89 the incident particle : the so-called longitudinal energy profile,
90 or depth dose distribution.
91 The energy deposited (edep) is randomly distribued along the step (see
92 SteppingAction).
93
94 In order to control the accuracy of the deposition, the maximum step size
95 of charged particles is computed automatically from the binning of
96 histograms 1 and 8 (see HistoManager).
97
98 As an example, this limitation is implemented as a 'full' process :
99 see StepMax class and its Messenger. The 'StepMax process' is registered
100 in the Physics List.
101
102 In RunAction::BeginOfRun() the stepMax value is passed from the
103 HistoManager to the StepMax process.
104 A boolean UI command allows to desactivate this mechanism.
105
106 7- HISTOGRAMS
107
108 Testem12 has several predefined 1D histograms :
109
110 1 : energy profile dE/dr (in MeV/mm per event)
111 2 : total energy deposited in the absorber
112 3 : total track length of the primary track
113 4 : step size of the primary track
114 5 : projected range of the primary track
115 6 : total track length of charged secondary tracks
116 7 : step size of charged secondary tracks
117 8 : normalized energy profile d(E/E0)/d(r/r0), where r0 is the range of
118 the primary particle of energy E0
119
120 The histograms are managed by the HistoManager class and its Messenger.
121 The histos can be individually activated with the command :
122 /testem/histo/setHisto id nbBins valMin valMax unit
123 where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
124
125 One can control the name of the histograms file with the command:
126 /testem/histo/setFileName name (default testem12)
127
128 It is possible to choose the format of the histogram file (hbook, root, XML)
129 with the command /testem/histo/setFileType (hbook by default)
130
131 It is also possible to print selected histograms on an ascii file:
132 /testem/histo/printHisto id
133 All selected histos will be written on a file name.ascii (default testem12)
134
135 Note that, by default, histograms are disabled. To activate them, uncomment
136 the flag G4ANALYSIS_USE in GNUmakefile.
137
138
139 8- USING HISTOGRAMS
140
141 To use histograms, at least one of the AIDA implementations should be
142 available (see http://aida.freehep.org).
143
144 8a - PI
145
146 A package including AIDA and extended interfaces also using Python is PI,
147 available from: http://cern.ch/pi
148
149 Once installed PI or PI-Lite in a specified local area $MYPY, it is required
150 to add the installation path to $PATH, i.e. for example, for release 1.2.1 of
151 PI:
152 setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin
153
154 CERN users can use the PATH to the LCG area on AFS.
155 Before running the example the command should be issued:
156 eval `aida-config --runtime csh`
157
158 8b - OpenScientist
159
160 OpenScientist is available at http://OpenScientist.lal.in2p3.fr.
161
162 You have to "setup" the OpenScientist AIDA implementation before compiling
163 (then with G4ANALYSIS_USE set) and running your Geant4 application.
164
165 On UNIX you setup, with a csh flavoured shell :
166 csh> source <<OpenScientist install path>/aida-setup.csh
167 or with a sh flavoured shell :
168 sh> . <<OpenScientist install path>/aida-setup.sh
169 On Windows :
170 DOS> call <<OpenScientist install path>/aida-setup.bat
171
172 You can use various file formats for writing (AIDA-XML, hbook, root).
173 These formats are readable by the Lab onx interactive program
174 or the OpenPAW application. See the web pages.
175
176
177 With OpenPAW, on a run.hbook file, one can view the histograms
178 with something like :
179 OS> opaw
180 opaw> h/file 1 run.hbook ( or opaw> h/file 1 run.aida or run.root)
181 opaw> zone 2 2
182 opaw> h/plot 1
183 opaw> h/plot 2
Note: See TracBrowser for help on using the repository browser.