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.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]
1 -------------------------------------------------------------------
2
3 =========================================================
4 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
5 =========================================================
6
7 xray_fluorescence
8 -----------------
9 XrayFluo is an advanced Geant4 example reproducing various setups for PIXE or XRF experiments.
10
11 A sample macro (livermore.mac) is provided.
12
13 The detector is a monolitic Si(Li) or HPGe detector, with real response functions, stored in response.dat and SILIresponse.dat.
14
15 The sample, a simple box whose material can be selected, can be irradiated with different particles, with different spectra for the incident energy and with different shapes of the primary generator.
16
17 Two diaphragms reproducing those used to collimate the incident beam on sample and detector during the test beam are simulated as well
18
19 The aim of this advanced example is to illustrate Deexcitation products generation and analysis schemes available in Geant4.
20
21 Generation of particles is done via the G4ParticleGun: the example shows how to use it in order to obtain a beam of circular section or a particle source isotropic in space
22
23 The example includes the possibility to shoot particles according to a given energy spectrum: the files B_flare.dat, C_Flare.dat and M_flare.dat store the spectra of photons during solar flares, the files mercury2_flx_solmax.dat and mercury_flx_solmin.dat contain the spectra of protons respectively during solar maximum and solar minimum conditions, and merc2_flx_alp_max.dat merc_flx_alp_min.dat contain the spectra of alpha particles again respectively during solar maximum and solar minimum conditions. These features are available by changing hard-doced values in XrayFluoRunAction.cc
24
25 Histogramming facilities are provided using the built-it g4analysis tools of Geant4.
26
27 In order to be able to use any of these packages, prior installation is necessary to configure you environment to get visulaization, as described in geant4 manual.
28
29 #path to the lowEnergy data base
30
31 setenv G4LEDATA /your/path/to/geant4/data/G4EMLOWXX.XX
32
33 #path to Xray_Fluorescence data files, if not set, PWD is assumed:
34
35 setenv XRAYDATA /path/to/detector/and/input/spctra/files
36
37 1. Run
38 After the compilation of the program, to execute a sample simulation type (for example):
39
40 $G4WORKDIR/bin/Linux-g++/XrayFluo
41
42 The program gives, at tis point,the user 4 options:
43
44 Please Select Simulation Geometrical Set-Up:
45 1 - Test Beam
46 2 - Infinite Plane
47 3 - Planet and Sun
48 4 - Phase-Space Production
49
50 The first three choices are to choose different experimental set-ups (a test beam one, an infite plane and a planetary geometry), while the fourth is a simplified version of the first, without a detector, only to generate a tuple with particles genereted or exiting the sample.
51
52 In order to run a macro, type the following command:
53
54 idle> execute command "/control/execute xxxxx.mac"
55
56 If the analysis options are set, histograms will automatically stored in the corresponding files (root, by default)
57
58 In order to launch the application in batch mode, it is necessary to specify, after the executable file name, the name of the macro file and the number of the choice:
59
60 $G4WORKDIR/bin/Linux-g++/XrayFluo xxxxx.mac 1
61
62 2. Detector description
63 The telescope and detector geometry is defined in XrayFluoDetectorConstruction.cc and similar
64
65 3. Detector peculiar properties are described in XrayFluoSiLiDetectorType and XrayFluoHPGeDetectorType, both derived from XrayFluoVDetectorType. Other detector types can be added, creating other implementations of XrayFluoVDetectorType objects. Detector type selection is made in XrayFluoDetectorConstruction, and can be modified trough /apparate/detector command of the UI.
66 Other commands (apparate/sample /apparate/sampleGranularity /apparate/GrainDiameter) are present to simulate sample granulosity: grains are spheres, disposed in a compact cubic structure, i.e superipmposition of planes of maximum density with ABC ABC path. The fundamental cell is of type cubic with centered-faces.
67
68 4. Physics processes
69
70 Tha user can select the preferred physics list form the pre-built ones producin atomic deexcitation products: livermore, standard (opt 0, 1, 2, 3) and penelope.
71
72 5. Event generation
73
74 This is done using the G4ParticleGun with some modifications. See XrayFluoParticleGeneratorAction.cc
75
76 Event generation is controlled by commands in the /gun/category (see help for further details). In this readme only two commands are undrlined:
77
78 - /gun/loadGunData <filename>: to be used with the setup #1, loads the ntuple created in the setup #4. The loaded particles will be generated and will be directed ALL OF THEM to the detector. This can be useful to perform detector studies with encreased efficiency.
79
80 - /gun/loadRayleighFlag <true/false> This is used to let the user decide if backscattered primary particles should be loaded and directed toward the detector. This command, in order to be useful, must be used BEFORE the previous one.
81
82
83