Geant4 Cross Reference |
1 ---------------------------------------------- 1 ------------------------------------------------------------------- 2 2 3 ========================================= 3 ========================================================= 4 Geant4 - X-Ray Telescope Exampl 4 Geant4 - X-Ray Telescope Example 5 ========================================= 5 ========================================================= 6 6 7 7 8 Introduction 8 Introduction 9 ------------ 9 ------------ 10 XrayTel is an advanced Geant4 example based on 10 XrayTel is an advanced Geant4 example based on a realistic simulation of 11 an X-ray Telescope. It is based on work carri 11 an X-ray Telescope. It is based on work carried out by a team of Geant4 12 experts to simulate the interaction between X- 12 experts to simulate the interaction between X-ray Telescopes XMM-Newton 13 and Chandra with low energy protons present in 13 and Chandra with low energy protons present in the orbital radiation 14 background. The X-ray mirrors are designed to 14 background. The X-ray mirrors are designed to collect x-ray photons at 15 grazing-incidence angles and focus them onto d 15 grazing-incidence angles and focus them onto detectors at the focal plane. 16 However, this mechanism also seems to work for 16 However, this mechanism also seems to work for low energy protons which, 17 if they reach the detectors in sufficient numb 17 if they reach the detectors in sufficient numbers, can cause damage. 18 In this example, the geometry has been simplif 18 In this example, the geometry has been simplified by using a single mirror 19 shell and no baffles, but all the dimensions a 19 shell and no baffles, but all the dimensions and materials are realistic. 20 20 21 The aim of this advanced example is to illustr 21 The aim of this advanced example is to illustrate the use advanced 22 GUI, visualisation, particle generation and an 22 GUI, visualisation, particle generation and analysis schemes available 23 in Geant4: 23 in Geant4: 24 24 25 - macros are provided to display the geometry 25 - macros are provided to display the geometry and particle tracks with 26 OpenGL, DAWN Postscript or VRML visualisati 26 OpenGL, DAWN Postscript or VRML visualisation 27 27 28 - the generation of particles is done via the 28 - the generation of particles is done via the new General Particle Source 29 29 30 - histograming facilities are available throu 30 - histograming facilities are available through the G4AnalysisManager tools 31 31 32 In order to be able to use any of these packag 32 In order to be able to use any of these packages, prior installation is 33 necessary and a number of environment variable 33 necessary and a number of environment variables will have to be set. 34 34 35 35 36 NOTE: The geometry is refreshed on the viewer 36 NOTE: The geometry is refreshed on the viewer at the beginning of each run, 37 but the tracks are plotted only in case 37 but the tracks are plotted only in case an interesting event occurs. 38 This is the case only for about 1 every 38 This is the case only for about 1 every 10**4 events. 39 39 40 40 41 41 42 2. Run 42 2. Run 43 43 44 To execute a sample simulation with visualisat 44 To execute a sample simulation with visualisation of proton tracks 45 reaching the detector run: 45 reaching the detector run: 46 46 47 XrayTel 47 XrayTel 48 48 49 execute command "/control/execute test.mac" 49 execute command "/control/execute test.mac" 50 50 51 To enable visualisation, uncomment one line fr 51 To enable visualisation, uncomment one line from test.mac: 52 /control/execute vis.mac 52 /control/execute vis.mac 53 53 54 If the analysis options are set, histograms wi 54 If the analysis options are set, histograms will 55 automatically created and the corresponding fi 55 automatically created and the corresponding files will be created. 56 A 1D histogram will display the energy distrib 56 A 1D histogram will display the energy distribution of the protons 57 that reach the detector at the end of the run. 57 that reach the detector at the end of the run. 58 58 59 59 60 3. Detector description 60 3. Detector description 61 61 62 The telescope and detector geometry is defined 62 The telescope and detector geometry is defined in 63 XrayTelDetectorConstruction.cc 63 XrayTelDetectorConstruction.cc 64 64 65 65 66 4. Physics processes 66 4. Physics processes 67 67 68 The physics processes are in XrayTelPhysicsLis 68 The physics processes are in XrayTelPhysicsList.cc 69 The main process in this example is G4hMultipl 69 The main process in this example is G4hMultipleScattering for scattering of the protons 70 off the mirror surfaces. 70 off the mirror surfaces. 71 71 72 72 73 5. Event generation 73 5. Event generation 74 74 75 This is done using the new General Particle So 75 This is done using the new General Particle Source. Documentation for 76 this can be found in: 76 this can be found in: 77 77 78 http://reat.space.qinetiq.com/gps/ 78 http://reat.space.qinetiq.com/gps/ 79 79 80 80 81 6. Analysis 81 6. Analysis 82 82 83 Relevant information from the simulation is pr 83 Relevant information from the simulation is processed in the XrayTelAnalysis 84 class and saved, through the G4AnalysisManager 84 class and saved, through the G4AnalysisManager interface, to Histograms and 85 Tuples. The output file is written in Root for 85 Tuples. The output file is written in Root format, but one can easily switch to Xml (or Csv, Hdf5) by changing the G4AnalysisManager default file type in XrayTelAnalysis::book(). 86 No external software is required (apart from t 86 No external software is required (apart from the Hdf5 case). 87 87