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