Geant4 Cross Reference |
>> 1 $Id: README,v 1.14 2009/11/20 18:08:53 santin Exp $ 1 ---------------------------------------------- 2 ------------------------------------------------------------------- 2 3 3 ========================================= 4 ========================================================= 4 Geant4 - X-Ray Telescope Exampl 5 Geant4 - X-Ray Telescope Example 5 ========================================= 6 ========================================================= 6 7 7 8 8 Introduction 9 Introduction 9 ------------ 10 ------------ 10 XrayTel is an advanced Geant4 example based on 11 XrayTel is an advanced Geant4 example based on a realistic simulation of 11 an X-ray Telescope. It is based on work carri 12 an X-ray Telescope. It is based on work carried out by a team of Geant4 12 experts to simulate the interaction between X- 13 experts to simulate the interaction between X-ray Telescopes XMM-Newton 13 and Chandra with low energy protons present in 14 and Chandra with low energy protons present in the orbital radiation 14 background. The X-ray mirrors are designed to 15 background. The X-ray mirrors are designed to collect x-ray photons at 15 grazing-incidence angles and focus them onto d 16 grazing-incidence angles and focus them onto detectors at the focal plane. 16 However, this mechanism also seems to work for 17 However, this mechanism also seems to work for low energy protons which, 17 if they reach the detectors in sufficient numb 18 if they reach the detectors in sufficient numbers, can cause damage. 18 In this example, the geometry has been simplif 19 In this example, the geometry has been simplified by using a single mirror 19 shell and no baffles, but all the dimensions a 20 shell and no baffles, but all the dimensions and materials are realistic. 20 21 21 The aim of this advanced example is to illustr 22 The aim of this advanced example is to illustrate the use advanced 22 GUI, visualisation, particle generation and an 23 GUI, visualisation, particle generation and analysis schemes available 23 in Geant4: 24 in Geant4: 24 25 25 - macros are provided to display the geometry 26 - macros are provided to display the geometry and particle tracks with 26 OpenGL, DAWN Postscript or VRML visualisati 27 OpenGL, DAWN Postscript or VRML visualisation 27 28 28 - the generation of particles is done via the 29 - the generation of particles is done via the new General Particle Source 29 30 30 - histograming facilities are available throu << 31 - histograming facilities are available through the AIDA 3.0 interfaces. >> 32 >> 33 - on-line visualisation of histograms is provided through the AIDA 3.0 interface. 31 34 32 In order to be able to use any of these packag 35 In order to be able to use any of these packages, prior installation is 33 necessary and a number of environment variable 36 necessary and a number of environment variables will have to be set. 34 37 35 38 36 NOTE: The geometry is refreshed on the viewer 39 NOTE: The geometry is refreshed on the viewer at the beginning of each run, 37 but the tracks are plotted only in case 40 but the tracks are plotted only in case an interesting event occurs. 38 This is the case only for about 1 every 41 This is the case only for about 1 every 10**4 events. 39 42 40 43 41 44 42 2. Run 45 2. Run 43 46 44 To execute a sample simulation with visualisat 47 To execute a sample simulation with visualisation of proton tracks 45 reaching the detector run: 48 reaching the detector run: 46 49 47 XrayTel 50 XrayTel 48 51 49 execute command "/control/execute test.mac" << 52 execute command "/control/execute xxxxx.mac" >> 53 >> 54 visualisation macros provided are >> 55 - opengl.mac for OpenGL display >> 56 - vrml.mac for VRML display and output file >> 57 - dawn.mac for dawn display and PS output file >> 58 >> 59 To execute a run without visualisation use >> 60 - test.mac 50 61 51 To enable visualisation, uncomment one line fr << 52 /control/execute vis.mac << 53 62 54 If the analysis options are set, histograms wi << 63 If the analysis options are set, histograming windows will 55 automatically created and the corresponding fi << 64 automatically open and the corresponding files will be created. 56 A 1D histogram will display the energy distrib 65 A 1D histogram will display the energy distribution of the protons 57 that reach the detector at the end of the run. 66 that reach the detector at the end of the run. 58 67 59 68 60 3. Detector description 69 3. Detector description 61 70 62 The telescope and detector geometry is defined 71 The telescope and detector geometry is defined in 63 XrayTelDetectorConstruction.cc 72 XrayTelDetectorConstruction.cc 64 73 65 74 66 4. Physics processes 75 4. Physics processes 67 76 68 The physics processes are in XrayTelPhysicsLis 77 The physics processes are in XrayTelPhysicsList.cc 69 The main process in this example is G4hMultipl 78 The main process in this example is G4hMultipleScattering for scattering of the protons 70 off the mirror surfaces. 79 off the mirror surfaces. 71 80 72 81 73 5. Event generation 82 5. Event generation 74 83 75 This is done using the new General Particle So 84 This is done using the new General Particle Source. Documentation for 76 this can be found in: 85 this can be found in: 77 86 78 http://reat.space.qinetiq.com/gps/ 87 http://reat.space.qinetiq.com/gps/ 79 88 80 89 81 6. Analysis 90 6. Analysis 82 91 83 Relevant information from the simulation is pr << 92 In case the variable G4ANALYSIS_USE is set: 84 class and saved, through the G4AnalysisManager << 93 setenv G4ANALYSIS_USE 1 85 Tuples. The output file is written in Root for << 94 relevant information from the simulation is processed in the XrayTelAnalysis 86 No external software is required (apart from t << 95 class and saved, through the AIDA interface, to Histograms and Tuples. >> 96 >> 97 Compilation and link flags to hook any AIDA compliant system are passed >> 98 to the Geant4 GNUmakefile system by using the "aida-config" tool >> 99 that should come with any AIDA compliant system. >> 100 Specifically in the GNUmakefile you find the 2 lines: >> 101 CPPFLAGS += `aida-config --include` >> 102 LDFLAGS += `aida-config --lib` >> 103 >> 104 For more information about AIDA please look at: >> 105 http://aida.freehep.org/ >> 106 >> 107 Presently, tools >> 108 - OpenScientist (http://openscientist.lal.in2p3.fr/) >> 109 - JAS (http://jas.freehep.org/jas3/) >> 110 - iAIDA (http://iaida.dynalias.net/Intro.html) >> 111 provide an implementation of AIDA 3.2.1 >> 112 >> 113 To build and execute the example on platforms where there is no >> 114 implementation of the analysis system, the environment variables >> 115 must not be set. 87 116