1 | $Id: README,v 1.2 2001/11/28 09:39:39 elena Exp $ |
---|
2 | ------------------------------------------------------------------- |
---|
3 | |
---|
4 | ========================================================= |
---|
5 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP |
---|
6 | ========================================================= |
---|
7 | |
---|
8 | xray_fluorescence |
---|
9 | -------------- |
---|
10 | XrayFluo is an advanced Geant4 example based on a realistic simulation of |
---|
11 | a test beam. |
---|
12 | The aim of the test beam was to characterize the response function of an |
---|
13 | HPGe detector used to measure fluorescence emissions from samples composed |
---|
14 | of different materials irradiated with a monochromatic beam of photons. |
---|
15 | In this example the geometry of the detector is simplified: |
---|
16 | one single pixel is used instead of an array of pixels. |
---|
17 | The response function is tabulated for ten different values of incident |
---|
18 | energy and stored in the file response.dat. |
---|
19 | The sample, a simple box whose material can be selected, can be irradiated |
---|
20 | with different particles, with different spectra for the incident energy and |
---|
21 | with different shapes of the primary generator. |
---|
22 | A part from the sample and the detector there are two diaphragm reproducing |
---|
23 | those used to collimate the incident beam during the test beam. |
---|
24 | |
---|
25 | The aim of this advanced example is to illustrate the use of particle |
---|
26 | generation and analysis schemes available in Geant4: |
---|
27 | |
---|
28 | - the generation of particles is done via the G4ParticleGun: the example |
---|
29 | shows how to use it in order to obtain a beam of circular section or |
---|
30 | a particle source isotropic in space |
---|
31 | |
---|
32 | _ the example includes the possibility to shoot particles according to a |
---|
33 | given energy spectrum: the files B_flare.dat, C_Flare.dat and M_flare.dat |
---|
34 | store the spectra of photons during solar flares, the files |
---|
35 | mercury2_flx_solmax.dat and mercury_flx_solmin.dat contain the spectra of |
---|
36 | protons respectively during solar maximum and solar minimumconditions, and |
---|
37 | merc2_flx_alp_max.dat merc_flx_alp_min.dat contain the spectra of alpha |
---|
38 | particles again respectively during solar maximum and solar minimum |
---|
39 | conditions. |
---|
40 | |
---|
41 | - histograming facilities are provided for the Linux environment only |
---|
42 | with the Lizard system. |
---|
43 | |
---|
44 | |
---|
45 | In order to be able to use any of these packages, prior installation is |
---|
46 | necessary and a number of environment variables will have to be set. |
---|
47 | |
---|
48 | |
---|
49 | #set up VRMLview |
---|
50 | setenv G4VIS_BUILD_VRMLFILE_DRIVER 1 |
---|
51 | setenv G4VIS_USE_VRML 1 |
---|
52 | setenv G4VIS_USE_VRMLFILE 1 |
---|
53 | setenv G4VRMLFILE_MAX_FILE_NUM 100 |
---|
54 | setenv G4VRMLFILE_VIEWER vrmlview #if installed |
---|
55 | setenv G4VIS_USE_VRML 1 |
---|
56 | setenv G4VIS_USE_VRMLFILE 1 |
---|
57 | setenv PATH ${PATH}:"/afs/cern.ch/sw/contrib/VRML/bin/Linux" |
---|
58 | |
---|
59 | #set up OpenGL or Mesa |
---|
60 | setenv G4VIS_BUILD_OPENGLX_DRIVER 1 |
---|
61 | setenv G4VIS_USE_OPENGLX 1 |
---|
62 | setenv OGLHOME /afs/cern.ch/sw/geant4/dev/Mesa/Linux-g++ |
---|
63 | |
---|
64 | #set up DAWN |
---|
65 | setenv G4VIS_BUILD_DAWN_DRIVER 1 |
---|
66 | setenv G4VIS_BUILD_DAWNFILE_DRIVER 1 |
---|
67 | setenv G4VIS_USE_DAWN 1 |
---|
68 | setenv G4VIS_USE_DAWNFILE 1 |
---|
69 | setenv PATH ${PATH}:"/afs/cern.ch/sw/geant4/dev/DAWN/Linux-g++" |
---|
70 | |
---|
71 | #set up Lizard and Anaphe |
---|
72 | |
---|
73 | setenv LHCXX_REL_DIR /afs/cern.ch/sw/lhcxx/specific/redhat61/egcs_1.1.2/3.6.4-sec |
---|
74 | setenv PATH ${PATH}:${LHCXX_REL_DIR}/bin |
---|
75 | source /afs/cern.ch/sw/lhcxx/share/LHCXX/3.6.4-sec/install/sharedstart.csh |
---|
76 | |
---|
77 | setenv G4ANALYSIS_USE 1 |
---|
78 | (this flag is required if you want to compile and run the example with the |
---|
79 | analysis facilities) |
---|
80 | |
---|
81 | #path to the lowEnergy data base |
---|
82 | |
---|
83 | setenv G4LEDATA /afs/cern.ch/sw/geant4/stt/dev1/src/G4EMLOW0.4 |
---|
84 | |
---|
85 | 1. Run |
---|
86 | To execute a sample simulation with visualisation of tracks |
---|
87 | reaching the detector run: |
---|
88 | |
---|
89 | XrayFluo |
---|
90 | |
---|
91 | execute command "/control/execute xxxxx.mac" |
---|
92 | |
---|
93 | |
---|
94 | If the Lizard analysis options are set, histograming windows will |
---|
95 | automatically stored in the corresponding files |
---|
96 | |
---|
97 | 2. Detector description |
---|
98 | |
---|
99 | The telescope and detector geometry is defined in |
---|
100 | XrayFluoDetectorConstruction.cc |
---|
101 | |
---|
102 | 3. Physics processes |
---|
103 | |
---|
104 | The physics processes are in XrayFluoPhysicsList.cc |
---|
105 | The main process in this example is fluorescence emission from the sample. |
---|
106 | |
---|
107 | 4. Event generation |
---|
108 | |
---|
109 | This is done using the G4ParticleGun with some modifications. See |
---|
110 | XrayFluoParticleGeneratorAction.cc |
---|
111 | |
---|
112 | 5. Analysis |
---|
113 | |
---|
114 | At present the analysis package implemented is Lizard. As this is still |
---|
115 | under development only simple histograming and a dummy ntuple are used. |
---|
116 | |
---|
117 | Lizard is not currently implemented on platforms other than Linux. |
---|
118 | To build and execute the example on other platforms the analysis |
---|
119 | environment variables must not be set. |
---|
120 | |
---|
121 | The example provides also two Phyton files used to display and fit the |
---|
122 | histograms. |
---|
123 | |
---|
124 | |
---|
125 | |
---|
126 | |
---|
127 | |
---|