source: trunk/examples/extended/electromagnetic/TestEm14/README@ 1337

Last change on this file since 1337 was 1337, checked in by garnier, 15 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 4.6 KB
Line 
1$Id: README,v 1.9 2010/04/02 13:22:02 maire Exp $
2-------------------------------------------------------------------
3
4 =========================================================
5 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
6 =========================================================
7
8 TestEm14
9 --------
10
11 How to compute cross sections from the direct evaluation of the mean
12 free path ( see below, item Physics).
13 How to plot final state of a process.
14
15 1- GEOMETRY DEFINITION
16
17 It is a single box representing a 'semi infinite' homogeneous medium.
18 Two parameters define the geometry :
19 - the material of the box,
20 - the (full) size of the box.
21
22 The default geometry (100 m of water) is constructed in
23 DetectorConstruction, but the above parameters can be changed
24 interactively via the commands defined in DetectorMessenger.
25
26 2- PHYSICS LIST
27
28 The physics list contains the standard electromagnetic processes.
29 In order not to introduce 'artificial' constraints on the step size, the
30 multiple scattering is not instanciated, and all processes are
31 registered as discrete : there is no continuous energy loss.
32
33 3- AN EVENT : THE PRIMARY GENERATOR
34
35 The primary kinematic consists of a single particle starting at the edge
36 of the box. The type of the particle and its energy are set in
37 PrimaryGeneratorAction (1 MeV gamma), and can be changed via the G4
38 build-in commands of ParticleGun class (see the macros provided with
39 this example).
40
41 4- PHYSICS
42
43 An event is killed at the first interaction of the incident paticle.
44 The absorption length, also called mean free path, is computed as
45 the mean value of the track length of the incident particle.
46 This is why the medium must be 'infinite' : to be sure that interaction
47 occurs at any events.
48
49 The result is compared with the 'input' data, i.e. with the cross
50 sections stored in the PhysicsTables and used by Geant4.
51
52 The energy spectrum and the angular distribution of the scattered
53 particle (if any) and of the created secondaries are plotted (see
54 SteppingAction).
55
56 A set of macros defining various run conditions are provided.
57 The processes are actived/inactived in order to survey the processes
58 individually.
59
60 5- HISTOGRAMS
61
62 The test contains 6 built-in 1D histograms, which are managed by the
63 HistoManager class and its Messenger. The histos can be individually
64 activated with the command :
65 /testem/histo/setHisto id nbBins valMin valMax unit
66 where unit is the desired unit for the histo (MeV or keV, etc..)
67 (see the macros xxxx.mac).
68
69 1 "scattered primary particle: energy spectrum"
70 2 "scattered primary particle: costheta distribution"
71 3 "charged secondaries: energy spectrum"
72 4 "charged secondaries: costheta distribution"
73 5 "neutral secondaries: energy spectrum"
74 6 "neutral secondaries: costheta distribution"
75
76 See below the note on histogram tools.
77
78 One can control the name and the type of the histograms file with
79 the commands:
80 /testem/histo/setFileName name (default testem14)
81 /testem/histo/setFileType name (default root)
82
83 It is also possible to print selected histograms on an ascii file:
84 /testem/histo/printHisto id
85 All selected histos will be written on a file name.ascii
86 (default testem14)
87
88 Note that, by default, histograms are disabled. To activate them,
89 uncomment the flag G4ANALYSIS_USE in GNUmakefile.
90
91 6- VISUALIZATION
92
93 The Visualization Manager is set in the main().
94 The initialisation of the drawing is done via the commands
95 /vis/... in the macro vis.mac. To get visualisation:
96 > /control/execute vis.mac
97
98 The detector has a default view which is a longitudinal view of the
99 box.
100
101 The tracks are drawn at the end of event, and erased at the end of run.
102
103 7- HOW TO START ?
104
105 compile and link to generate an executable
106 % cd geant4/examples/extended/electromagnetic/TestEm14
107 % gmake
108
109 execute TestEm14 in 'batch' mode from macro files :
110 % TestEm14 compt.mac
111
112 execute TestEm14 in 'interactive mode' with visualization :
113 % TestEm14
114 Idle> control/execute vis.mac
115 ....
116 Idle> type your commands
117 ....
118 Idle> exit
119
120
121 8- USING HISTOGRAMS
122
123 By default the histograms are not activated. To activate histograms
124 the environment variable G4ANALYSIS_USE should be defined. For instance
125 uncomment the flag G4ANALYSIS_USE in GNUmakefile.
126
127 Before compilation of the example it is optimal to clean up old files:
128 gmake histclean
129 gmake
130
131 To use histograms, at least one of the AIDA implementations should be
132 available. See InstallAida.txt
133
Note: See TracBrowser for help on using the repository browser.