1 | $Id: README,v 1.28 2010/02/22 15:41:29 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 | Physics lists can be local (eg. in this example) or from G4 kernel |
---|
40 | physics_lists subdirectory. |
---|
41 | |
---|
42 | Local physics lists: |
---|
43 | - "local" standard EM physics with current 'best' options setting. |
---|
44 | these options are explicited in PhysListEmStandard |
---|
45 | |
---|
46 | From geant4/source/physics_lists/builders: |
---|
47 | - "emstandard_opt0" recommended standard EM physics for LHC |
---|
48 | - "emstandard_opt1" best CPU performance standard physics for LHC |
---|
49 | - "emstandard_opt2" |
---|
50 | - "emstandard_opt3" best current advanced EM options. |
---|
51 | analog to "local" above |
---|
52 | |
---|
53 | Physics lists and options can be (re)set with UI commands |
---|
54 | |
---|
55 | Please, notice that options set through G4EmProcessOPtions are global, eg |
---|
56 | for all particle types. In G4 builders, it is shown how to set options per |
---|
57 | particle type. |
---|
58 | |
---|
59 | 3- AN EVENT : THE PRIMARY GENERATOR |
---|
60 | |
---|
61 | The primary kinematic consists of a single particle which hits the |
---|
62 | cylinder perpendicular to the input face. The type of the particle |
---|
63 | and its energy are set in the PrimaryGeneratorAction class, and can |
---|
64 | changed via the G4 build-in commands of ParticleGun class (see |
---|
65 | the macros provided with this example). |
---|
66 | |
---|
67 | A RUN is a set of events. |
---|
68 | |
---|
69 | 4- VISUALIZATION |
---|
70 | |
---|
71 | The Visualization Manager is set in the main(). |
---|
72 | The initialisation of the drawing is done via the commands |
---|
73 | /vis/.. in the macro vis.mac. In interactive session: |
---|
74 | PreInit or Idle > /control/execute vis.mac |
---|
75 | |
---|
76 | The detector has a default view which is a longitudinal view of the |
---|
77 | cylinder. |
---|
78 | |
---|
79 | The tracks are drawn at the end of event, and erased at the end of run. |
---|
80 | Optionaly one can choose to draw all particles, only the charged one, |
---|
81 | or none. This command is defined in EventActionMessenger class. |
---|
82 | |
---|
83 | 5- PHYSICS DEMO |
---|
84 | |
---|
85 | The particle's type and the physic processes which will be available |
---|
86 | in this example are set in PhysicsList class. |
---|
87 | |
---|
88 | In addition a build-in interactive command (/process/inactivate proname) |
---|
89 | allows to activate/inactivate the processes one by one. |
---|
90 | |
---|
91 | The threshold for producing secondaries can be changed. |
---|
92 | eg: /testem/phys/setCuts 100 microm |
---|
93 | /run/initialize |
---|
94 | |
---|
95 | The shower profiles are histogramed, if histograming is activated. |
---|
96 | They can be also printed with the command /testem/run/verbose 1 |
---|
97 | |
---|
98 | 6- HOW TO START ? |
---|
99 | |
---|
100 | - compile and link to generate an executable |
---|
101 | % cd TestEm2 |
---|
102 | % gmake |
---|
103 | |
---|
104 | - execute TestEm2 in 'batch' mode from macro files |
---|
105 | % TestEm2 run01.mac |
---|
106 | |
---|
107 | - execute TestEm2 in 'interactive mode' with visualization |
---|
108 | % TestEm2 |
---|
109 | .... |
---|
110 | Idle> type your commands |
---|
111 | .... |
---|
112 | Idle> exit |
---|
113 | |
---|
114 | 7- HISTOGRAMS |
---|
115 | |
---|
116 | TestEm2 produces several histograms: |
---|
117 | |
---|
118 | Content of these histo: |
---|
119 | |
---|
120 | 1 : energy deposit per event |
---|
121 | 2 : charged track length per event |
---|
122 | 3 : neutral track length per event |
---|
123 | |
---|
124 | 4 : longitudinal energy profile |
---|
125 | 5 : rms of longitudinal energy profile |
---|
126 | 6 : cumulated longitudinal energy profile |
---|
127 | 7 : rms of cumulated longitudinal energy profile |
---|
128 | |
---|
129 | 8 : radial energy profile |
---|
130 | 9 : rms of radial energy profile |
---|
131 | 10 : cumulated radial energy profile |
---|
132 | 11 : rms of cumulated radial energy profile |
---|
133 | |
---|
134 | Note that, by default, histograms are disabled. To activate them, uncomment |
---|
135 | the flag G4ANALYSIS_USE in GNUmakefile. To define the output file name with |
---|
136 | histograms and the type of these file the following UI commands can be used: |
---|
137 | |
---|
138 | "/testem/histo/setFileName name" |
---|
139 | "/testem/histo/setFileType type" |
---|
140 | |
---|
141 | The following types are available: "hbook", "root", "XML" |
---|
142 | By default the name is "testem2" and the type "root". |
---|
143 | |
---|
144 | Before compilation of the example it is optimal to clean up old files: |
---|
145 | gmake histclean |
---|
146 | gmake |
---|
147 | |
---|
148 | 8- USING HISTOGRAMS |
---|
149 | |
---|
150 | To use histograms, at least one of the AIDA implementations should be |
---|
151 | available. See InstallAida.txt |
---|
152 | |
---|