source: trunk/examples/extended/electromagnetic/TestEm11/README

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

tag geant4.9.4 beta 1 + modifs locales

File size: 5.8 KB
Line 
1$Id: README,v 1.11 2009/09/22 14:20:31 maire Exp $
2-------------------------------------------------------------------
3
4     =========================================================
5     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
6     =========================================================
7
8                            TestEm11
9                            -------
10
11     How to plot a depth dose profile in a rectangular box.   
12
13       
14 1- GEOMETRY DEFINITION
15 
16        The geometry consists of a single block of an homogenous material.
17        Optionally, the block can be divided in thinner layers (replica)
18       
19        4 parameters define the geometry :
20        - the material of the box,
21        - the thickness of the box (sizeX),
22        - the tranverse dimension of the box (sizeYZ).
23        - the number of layers (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 Physics lists can be local (eg. in this example) or from G4 kernel
34 physics_lists subdirectory.
35     
36 Local physics lists:   
37 - "local"      standard EM physics with current 'best' options setting.
38                these options are explicited in PhysListEmStandard
39                       
40 From geant4/source/physics_lists/builders:     
41  - "emstandard_opt0" recommended standard EM physics for LHC
42  - "emstandard_opt1" best CPU performance standard physics for LHC
43  - "emstandard_opt2"     
44  - "emstandard_opt3" best current advanced EM options.
45                      analog to "local" above 
46  - "emlivermore"  low-energy EM physics using Livermore data
47  - "empenelope"   low-energy EM physics implementing Penelope models
48     
49 Physics lists and options can be (re)set with UI commands
50   
51 Please, notice that options set through G4EmProcessOPtions are global, eg
52 for all particle types. In G4 builders, it is shown how to set options per
53 particle type.
54
55         
56 3- AN EVENT : THE PRIMARY GENERATOR
57 
58        The primary kinematic consists of a single particle starting at the
59        left face of the box. The type of the particle and its energy are set
60        in the PrimaryGeneratorAction class, and can be changed via the G4
61        build-in commands of ParticleGun class (see the macros provided with
62        this example).
63       
64        In addition one can choose randomly the impact point of the incident
65        particle. The corresponding interactive command is built in
66        PrimaryGeneratorMessenger class.
67               
68        A RUN is a set of events.
69       
70                               
71 4- VISUALIZATION
72 
73        The Visualization Manager is set in the main().
74        The initialisation of the drawing is done via the commands
75        /vis/... in the macro vis.mac. To get visualisation:
76        > /control/execute vis.mac
77       
78        The detector has a default view which is a longitudinal view of the
79        box.
80       
81        The tracks are drawn at the end of event, and erased at the end of run.
82        Optionaly one can choose to draw all particles, only the charged one,
83        or none. This command is defined in EventActionMessenger class.
84       
85       
86 5- HOW TO START ?
87 
88        - compile and link to generate an executable
89                % cd geant4/examples/extended/electromagnetic/TestEm1
90                % gmake
91               
92        - execute TestEm11 in 'batch' mode from macro files
93                % TestEm11   run01.mac
94               
95        - execute TestEm11 in 'interactive mode' with visualization
96                % TestEm11
97                ....
98                Idle> type your commands
99                ....
100                Idle> exit
101               
102
103 6- TRACKING  and STEP MAX
104 
105     Testem11 computes the total energy deposited along the trajectory of
106     the incident particle : the so-called longitudinal energy profile,
107     or depth dose distribution.
108     The energy deposited (edep) is randomly distribued along the step (see
109     SteppingAction).
110     
111     In order to control the accuracy of the deposition, the maximum  step size
112     of charged particles is computed automatically from the binning of
113     histogram 1 and 8 (see HistoManager).
114     
115     As an example, this limitation is implemented as a 'full' process :
116     see StepMax class and its Messenger. The 'StepMax process' is registered
117     in the Physics List.
118     
119     In RunAction::BeginOfRun() the stepMax value is passed from the
120     HistoManager to the StepMax process.
121     A boolean UI command allows to desactivate this mechanism.
122       
123 7- HISTOGRAMS
124 
125   Testem11 has several predefined 1D histograms :
126 
127      1 : longitudinal energy profile (in MeV/mm and per event)
128      2 : total energy deposited in the absorber
129      3 : total track length of the primary track
130      4 : step size of the primary track     
131      5 : projected range of the primary track
132      6 : total track length of charged secondary tracks
133      7 : step size of charged secondary tracks     
134      8 : longitudinal energy profile (in MeV.cm2/g), as a function of x/r0
135          where r0 is the range of the primary particle
136               
137   The histograms are managed by the HistoManager class and its Messenger.
138   The histos can be individually activated with the command :
139   /testem/histo/setHisto id nbBins  valMin valMax unit
140   where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
141   
142   One can control the name of the histograms file with the command:
143   /testem/histo/setFileName  name  (default testem11)
144   
145   It is possible to choose the format of the histogram file (hbook, root, XML)
146   with the command /testem/histo/setFileType (root by default)
147   
148   It is also possible to print selected histograms on an ascii file:
149   /testem/histo/printHisto id
150   All selected histos will be written on a file name.ascii  (default testem11)
151       
152   Note that, by default, histograms are disabled. To activate them, uncomment
153   the flag G4ANALYSIS_USE in GNUmakefile.
154   
155 
156 8- USING HISTOGRAMS
157
158  To use histograms, at least one of the AIDA implementations should be
159  available. See InstallAida.txt
Note: See TracBrowser for help on using the repository browser.