1 | $Id: README,v 1.5 2008/09/26 20:05:13 maire Exp $ |
---|
2 | ------------------------------------------------------------------- |
---|
3 | |
---|
4 | ========================================================= |
---|
5 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP |
---|
6 | ========================================================= |
---|
7 | |
---|
8 | TestEm16 |
---|
9 | -------- |
---|
10 | Simulate synchrotron radiation |
---|
11 | |
---|
12 | 1- GEOMETRY DEFINITION |
---|
13 | |
---|
14 | The geometry consists of a single block of a homogenous material. |
---|
15 | |
---|
16 | Two parameters define the geometry : |
---|
17 | - the material of the box, |
---|
18 | - the (full) size of the box. |
---|
19 | The default is 500 m of vacuum. |
---|
20 | |
---|
21 | A transverse uniform magnetic field can be applied. |
---|
22 | |
---|
23 | The default geometry is constructed in DetectorConstruction class, |
---|
24 | but all of the above parameters can be changed interactively via |
---|
25 | the commands defined in the DetectorMessenger class. |
---|
26 | |
---|
27 | 2- PHYSICS LIST |
---|
28 | |
---|
29 | The particle list is the one of novice/exampleN03 and TestEm6 |
---|
30 | with in addition synchrotron radiation. |
---|
31 | To make the synchrotron radiation easily visible, a very low |
---|
32 | pressure "vaccuum" and a magnetic field of by default 1 Tesla |
---|
33 | in z-direction is used. |
---|
34 | |
---|
35 | 3- AN EVENT : THE PRIMARY GENERATOR |
---|
36 | |
---|
37 | The primary kinematic consists of a single particle which hits the |
---|
38 | block perpendicular to the input face. The type of the particle |
---|
39 | and its energy are set in the PrimaryGeneratorAction class, and can |
---|
40 | changed via the G4 build-in commands of ParticleGun class (see |
---|
41 | the macros provided with this example). |
---|
42 | The default is an positron of 10 GeV. |
---|
43 | |
---|
44 | In addition one can choose randomly the impact point of the incident |
---|
45 | particle. The corresponding interactive command is built in |
---|
46 | PrimaryGeneratorMessenger class. |
---|
47 | |
---|
48 | A RUN is a set of events. |
---|
49 | |
---|
50 | |
---|
51 | 4- VISUALIZATION |
---|
52 | |
---|
53 | The Visualization Manager is set in the main(). |
---|
54 | The initialisation of the drawing is done via the command |
---|
55 | > /control/execute vis.mac |
---|
56 | > /run/beamOn 1 |
---|
57 | |
---|
58 | The detector has a default view which is a longitudinal view of the box. |
---|
59 | |
---|
60 | The tracks are drawn at the end of event, and erased at the end of run. |
---|
61 | Optionaly one can choose to draw all particles, only the charged one, |
---|
62 | or none. This command is defined in EventActionMessenger class. |
---|
63 | |
---|
64 | 5- PHYSICS DEMO |
---|
65 | |
---|
66 | The particle's type and the physic processes which will be available |
---|
67 | in this example are set in PhysicsList class. |
---|
68 | |
---|
69 | In addition a build-in interactive command (/process/inactivate proname) |
---|
70 | allows to activate/inactivate the processes one by one. |
---|
71 | |
---|
72 | The threshold for producing secondaries can be changed. |
---|
73 | eg: /run/particle/setCut 100 micrometer |
---|
74 | /run/initialize |
---|
75 | |
---|
76 | To visualize the Synchrotron radiation : |
---|
77 | /control/execute vis.mac |
---|
78 | |
---|
79 | 6- HOW TO START ? |
---|
80 | |
---|
81 | - compile and link to generate an executable |
---|
82 | % cd geant4/examples/extended/electromagnetic/TestEm16 |
---|
83 | % make |
---|
84 | |
---|
85 | - execute Test in 'batch' mode from macro files |
---|
86 | % TestEm16 run01.mac |
---|
87 | |
---|
88 | - execute Test in 'interactive mode' with visualization |
---|
89 | % TestEm16 |
---|
90 | .... |
---|
91 | Idle> type your commands |
---|
92 | .... |
---|
93 | Idle> exit |
---|
94 | |
---|
95 | 7 - TRACKING : stepMax and setMaxStepLength |
---|
96 | |
---|
97 | In order to control the accuracy of the deposition, the user can limit |
---|
98 | 'by hand' the maximum step size stepMax of charged particles. |
---|
99 | |
---|
100 | The maximum tracking step length for computing of magnetic field lines |
---|
101 | is by default set to 1 km. |
---|
102 | Synchrotron radiation in very weak magnetic fields of the order of 1 Gauss |
---|
103 | may require longer pathlength. |
---|
104 | This can be achieved with using setMaxStepLength like |
---|
105 | /testem/tracking/setMaxStepLength 100 km |
---|
106 | |
---|
107 | 8- HISTOGRAMS |
---|
108 | |
---|
109 | TestEm16 produces 3 histograms which illustrate synchrotron radiation. |
---|
110 | The photon energy spectrum (photons / energy bin) and the power spectrum |
---|
111 | (photon spectrum weighted with the photon energy) and a histogram |
---|
112 | of the path length between photon radiation is produced. |
---|
113 | |
---|
114 | By default the histograms are not activated. To activate histograms |
---|
115 | the environment variable G4ANALYSIS_USE should be defined. For instance |
---|
116 | uncomment the flag G4ANALYSIS_USE in GNUmakefile. |
---|
117 | |
---|
118 | Before compilation of the example it is optimal to clean up old files: |
---|
119 | make histclean |
---|
120 | make |
---|
121 | |
---|
122 | By default the histograms are saved as testem16.root |
---|
123 | It is possible to choose the format of the histogram file (hbook, root, XML) |
---|
124 | and the binning using /testem/histo/ command, see run01.mac |
---|
125 | |
---|
126 | To use histograms, at least one of the AIDA implementations should be |
---|
127 | available. See InstallAida.txt |
---|