source: trunk/examples/advanced/xray_telescope/README @ 1166

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

update

File size: 4.8 KB
Line 
1$Id: README,v 1.13 2005/11/30 19:58:30 santin Exp $
2-------------------------------------------------------------------
3
4     =========================================================
5               Geant4 - X-Ray Telescope Example
6     =========================================================
7
8
9NEW: May 2004: Migration to AIDA 3.2.1 - see below
10
11
12Introduction
13------------
14XrayTel is an advanced Geant4 example based on a realistic simulation of
15an X-ray Telescope.  It is based on work carried out by a team of Geant4
16experts to simulate the interaction between X-ray Telescopes XMM-Newton
17and Chandra with low energy protons present in the orbital radiation
18background.  The X-ray mirrors are designed to collect x-ray photons at
19grazing-incidence angles and focus them onto detectors at the focal plane.
20However, this mechanism also seems to work for low energy protons which,
21if they reach the detectors in sufficient numbers, can cause damage.
22In this example, the geometry has been simplified by using a single mirror
23shell and no baffles, but all the dimensions and materials are realistic.
24
25The aim of this advanced example is to illustrate the use advanced
26GUI, visualisation, particle generation and analysis schemes available
27in Geant4:
28
29 - the simulation can be run from GAG or the command prompt
30
31 - macros are provided to display the geometry and particle tracks with
32   OpenGL, DAWN Postscript or VRML visualisation
33
34 - the generation of particles is done via the new General Particle Source
35
36 - histograming facilities are available through the AIDA 3.0 interfaces.
37
38 - on-line visualisation of histograms is provided through the AIDA 3.0 interface.
39
40In order to be able to use any of these packages, prior installation is
41necessary and a number of environment variables will have to be set.
42
43
441. Setting up the environment variables for GAG, Visualisation and
45   Analysis options (example based on Linux at CERN)
46
47#set up GAG
48setenv G4UI_BUILD_GAG_SESSION       1
49setenv G4UI_USE_GAG                 1
50
51#set up VRMLview
52setenv G4VIS_USE_VRML               1
53setenv G4VRMLFILE_MAX_FILE_NUM     100
54setenv G4VRMLFILE_VIEWER        vrmlview    #if installed
55setenv G4VIS_USE_VRML               1
56setenv PATH ${PATH}:"/afs/cern.ch/sw/contrib/VRML/bin/Linux"  # example at CERN
57
58#set up OpenGL
59setenv G4VIS_BUILD_OPENGLX_DRIVER   1
60setenv G4VIS_USE_OPENGLX            1
61
62#set up DAWN
63setenv G4VIS_BUILD_DAWN_DRIVER      1
64setenv G4VIS_USE_DAWN               1
65
66NOTE: The geometry is refreshed on the viewer at the beginning of each run,
67      but the tracks are plotted only in case an interesting event occurs.
68      This is the case only for about 1 every 10**4 events.
69
70
71
72Sources
73-------
74
75GAG can be found in:
76
77geant4/environments/MOMO
78
79DAWN can be obtained from:
80
81http://geant4.kek.jp/~tanaka/
82
83VRMLview for Linux can be obtained from:
84
85http://www.sim.no
86
87
882. Run
89
90To execute a sample simulation with visualisation of proton tracks
91reaching the detector run:
92
93XrayTel
94
95execute command "/control/execute xxxxx.mac"
96
97visualisation macros provided are
98  - opengl.mac  for OpenGL display
99  - vrml.mac    for VRML display and output file
100  - dawn.mac    for dawn display and PS output file
101
102To execute a run without visualisation use
103  - test.mac
104
105
106If the analysis options are set, histograming windows will
107automatically open and the corresponding files will be created.
108A 1D histogram will display the energy distribution of the protons
109that reach the detector at the end of the run.
110
111
1123. Detector description
113
114The telescope and detector geometry is defined in
115XrayTelDetectorConstruction.cc
116
117
1184. Physics processes
119
120The physics processes are in XrayTelPhysicsList.cc
121The main process in this example is MultipleScattering of the protons
122on the mirror surfaces.
123
124
1255. Event generation
126
127This is done using the new General Particle Source. Documentation for
128this can be found in:
129
130http://reat.space.qinetiq.com/gps/
131
132
1336. Analysis
134
135In case the variable G4ANALYSIS_USE is set:
136setenv G4ANALYSIS_USE               1
137relevant information from the simulation is processed in the XrayTelAnalysis
138class and saved, through the AIDA interface, to Histograms and Tuples.
139
140Compilation and link flags to hook any AIDA compliant system are passed
141to the Geant4 GNUmakefile system by using the "aida-config" tool
142that should come with any AIDA compliant system.
143Specifically in the GNUmakefile you find the 2 lines:
144  CPPFLAGS += `aida-config --include`
145  LDFLAGS += `aida-config --lib`
146
147For more information about AIDA and PI please look at:
148http://aida.freehep.org/
149http://www.cern.ch/PI
150
151Presently, the tools
152- PI (http://cern.ch/pi)
153- OpenScientist (http://openscientist.lal.in2p3.fr/)
154- JAS (http://jas.freehep.org/jas3/)
155provide an implementation of AIDA 3.2.1
156
157To build and execute the example on platforms where there is no
158implementation of the analysis system, the environment variables
159must not be set.
160
Note: See TracBrowser for help on using the repository browser.