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

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

update

File size: 6.0 KB
Line 
1$Id: README,v 1.6 2007/11/13 12:13:32 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 there is no limitation from
31        the maximum energy lost per step. 
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 hbook)
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 http://aida.freehep.org).
133 
134 8a - PI
135
136  A package including AIDA and extended interfaces also using Python is PI,
137  available from: http://cern.ch/pi
138
139  Once installed PI or PI-Lite in a specified local area $MYPY, it is required
140  to add the installation path to $PATH, i.e. for example, for release 1.2.1 of
141  PI:
142  setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin
143
144  CERN users can use the PATH to the LCG area on AFS.
145  Before running the example the command should be issued:
146  eval `aida-config --runtime csh`
147
148 8b -  OpenScientist
149
150  OpenScientist is available at http://OpenScientist.lal.in2p3.fr.
151
152  You have to "setup" the OpenScientist AIDA implementation before compiling
153  (then with G4ANALYSIS_USE set) and running your Geant4 application.
154
155 On UNIX you setup, with a csh flavoured shell :
156        csh> source <<OpenScientist install path>/aida-setup.csh
157        or with a sh flavoured shell :
158        sh> . <<OpenScientist install path>/aida-setup.sh
159 On Windows :
160        DOS> call <<OpenScientist install path>/aida-setup.bat
161
162  You can use various file formats for writing (AIDA-XML, hbook, root).
163  These formats are readable by the Lab onx interactive program
164  or the OpenPAW application. See the web pages.
165
166
167  With OpenPAW, on a run.hbook file, one can view the histograms
168  with something like :
169        OS> opaw
170        opaw> h/file 1 run.hbook  ( or opaw> h/file 1 run.aida or run.root) 
171        opaw> zone 2 2
172        opaw> h/plot 1
173        opaw> h/plot 2
Note: See TracBrowser for help on using the repository browser.