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

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

update

File size: 6.1 KB
Line 
1$Id: README,v 1.23 2006/05/15 14:38:40 maire Exp $
2-------------------------------------------------------------------
3
4 =========================================================
5 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
6 =========================================================
7
8 TestEm2
9 -------
10
11 How to do shower profiles in an homogenous medium, with virtual
12 voxelisation.
13
14 1- GEOMETRY DEFINITION
15
16 The geometry consists of a cylinder of homegenous material.
17
18 The default geometry is constructed in DetectorConstruction class,
19 but all of the above parameters can be modified interactively via
20 the commands defined in the DetectorMessenger class.
21
22 Material can be choosen: Air Water lAr Al Fe BGO PbWO4 Pb.
23 eg: /testem/det/setMat PbWO4
24
25 The cylinder is virtually sliced longitudinaly (slice) and radialy (ring).
26 The size of the slices and rings are expressed in radiation length units
27 and can be changed.
28 eg: /testem/det/setLbin 20 1. ---> 20 slices of 1. radl
29 /testem/det/setRbin 5 0.25 ---> 5 rings of 0.25 radl
30 /testem/det/update ---> rebuild the geometry
31
32 (MaxBin = 500 in both directions)
33
34 An uniform magnetic field along the cylinder axis can be set.
35 eg: /testem/det/setField 5 tesla
36
37 2- PHYSICS LISTS
38
39 Modular PhysicsList are used. The following modules can be activated:
40 1. "standard" - (alternative) standard EM physics
41 2. "g4v52" - (alternative) standard EM physics version G4 5.2
42 3. "high_energy" - add high energy processes
43
44 To activate a specific module the UI command can be used:
45 "/testem/phys/addPhysics title"
46 By default "standard" module is loaded.
47
48 3- AN EVENT : THE PRIMARY GENERATOR
49
50 The primary kinematic consists of a single particle which hits the
51 cylinder perpendicular to the input face. The type of the particle
52 and its energy are set in the PrimaryGeneratorAction class, and can
53 changed via the G4 build-in commands of ParticleGun class (see
54 the macros provided with this example).
55
56 A RUN is a set of events.
57
58 4- VISUALIZATION
59
60 The Visualization Manager is set in the main().
61 The initialisation of the drawing is done via the commands
62 /vis/.. in the macro vis.mac. In interactive session:
63 PreInit or Idle > /control/execute vis.mac
64
65 The detector has a default view which is a longitudinal view of the
66 cylinder.
67
68 The tracks are drawn at the end of event, and erased at the end of run.
69 Optionaly one can choose to draw all particles, only the charged one,
70 or none. This command is defined in EventActionMessenger class.
71
72 5- PHYSICS DEMO
73
74 The particle's type and the physic processes which will be available
75 in this example are set in PhysicsList class.
76
77 In addition a build-in interactive command (/process/inactivate proname)
78 allows to activate/inactivate the processes one by one.
79
80 The threshold for producing secondaries can be changed.
81 eg: /testem/phys/setCuts 100 microm
82 /run/initialize
83
84 The shower profiles are histogramed, if histograming is activated.
85 They can be also printed with the command /testem/run/verbose 1
86
87 6- HOW TO START ?
88
89 - compile and link to generate an executable
90 % cd TestEm2
91 % gmake
92
93 - execute TestEm2 in 'batch' mode from macro files
94 % TestEm2 run01.mac
95
96 - execute TestEm2 in 'interactive mode' with visualization
97 % TestEm2
98 ....
99 Idle> type your commands
100 ....
101 Idle> exit
102
103 7- HISTOGRAMS
104
105 TestEm2 produces several histograms:
106
107 Content of these histo:
108
109 1 : energy deposit per event
110 2 : charged track length per event
111 3 : neutral track length per event
112
113 4 : longitudinal energy profile
114 5 : cumulated longitudinal energy profile
115 6 : rms of cumulated longitudinal energy profile
116
117 7 : radial energy profile
118 8 : cumulated radial energy profile
119 9 : rms of cumulated radial energy profile
120
121 Note that, by default, histograms are disabled. To activate them, uncomment
122 the flag G4ANALYSIS_USE in GNUmakefile. To define the output file name with
123 histograms and the type of these file the following UI commands can be used:
124
125 "/testem/histo/setFileName name"
126 "/testem/histo/setFileType type"
127
128 The following types are available: "hbook", "root", "XML"
129 By default the name is "testem2" and the type "hbook".
130
131 Before compilation of the example it is optimal to clean up old files:
132 gmake histclean
133 gmake
134
135 8- USING HISTOGRAMS
136
137 To use histograms, at least one of the AIDA implementations should be
138 available (see http://aida.freehep.org).
139
140 8a - PI
141
142 A package including AIDA and extended interfaces also using Python is PI,
143 available from: http://cern.ch/pi
144
145 Once installed PI or PI-Lite in a specified local area $MYPY, it is required
146 to add the installation path to $PATH, i.e. for example, for release 1.2.1 of
147 PI:
148 setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin
149
150 CERN users can use the PATH to the LCG area on AFS.
151 Before running the example the command should be issued:
152 eval `aida-config --runtime csh`
153
154 8b - OpenScientist
155
156 OpenScientist is available at http://OpenScientist.lal.in2p3.fr.
157
158 You have to "setup" the OpenScientist AIDA implementation before compiling
159 (then with G4ANALYSIS_USE set) and running your Geant4 application.
160
161 On UNIX you setup, with a csh flavoured shell :
162 csh> source <<OpenScientist install path>/aida-setup.csh
163 or with a sh flavoured shell :
164 sh> . <<OpenScientist install path>/aida-setup.sh
165 On Windows :
166 DOS> call <<OpenScientist install path>/aida-setup.bat
167
168 You can use various file formats for writing (AIDA-XML, hbook, root).
169 These formats are readable by the Lab onx interactive program
170 or the OpenPAW application. See the web pages.
171
172
173 With OpenPAW, on a run.hbook file, one can view the histograms
174 with something like :
175 OS> opaw
176 opaw> h/file 1 run.hbook ( or opaw> h/file 1 run.aida or run.root)
177 opaw> zone 2 2
178 opaw> h/plot 1
179 opaw> h/plot 2
Note: See TracBrowser for help on using the repository browser.