Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/advanced/xray_fluorescence/README is written in an unsupported language. File is not indexed.

0001 -------------------------------------------------------------------
0002 
0003      =========================================================
0004      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0005      =========================================================
0006 
0007                             xray_fluorescence
0008                             -----------------
0009 XrayFluo is an advanced Geant4 example reproducing various setups for PIXE or XRF experiments.
0010 
0011 A sample macro (livermore.mac) is provided.
0012 
0013 The detector is a monolitic Si(Li) or HPGe detector, with real response functions, stored in response.dat and SILIresponse.dat.
0014 
0015 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. 
0016 
0017 Two diaphragms reproducing those used to collimate the incident beam on sample and detector during the test beam are simulated as well
0018 
0019 The aim of this advanced example is to illustrate Deexcitation products generation and analysis schemes available in Geant4.
0020 
0021 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
0022 
0023 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
0024 
0025 Histogramming facilities are provided using the built-it g4analysis tools of Geant4.
0026 
0027 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.
0028 
0029 #path to the lowEnergy data base
0030 
0031 setenv G4LEDATA /your/path/to/geant4/data/G4EMLOWXX.XX
0032 
0033 #path to Xray_Fluorescence data files, if not set, PWD is assumed:
0034 
0035 setenv XRAYDATA /path/to/detector/and/input/spctra/files
0036 
0037 1. Run
0038 After the compilation of the program, to execute a sample simulation type (for example):
0039 
0040 $G4WORKDIR/bin/Linux-g++/XrayFluo 
0041 
0042 The program gives, at tis point,the user 4 options:
0043 
0044 Please Select Simulation Geometrical Set-Up:
0045 1 - Test Beam
0046 2 - Infinite Plane
0047 3 - Planet and Sun
0048 4 - Phase-Space Production
0049 
0050 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.
0051 
0052 In order to run a macro, type the following command:
0053 
0054 idle> execute command "/control/execute xxxxx.mac"
0055 
0056 If the analysis options are set, histograms will automatically stored in the corresponding files (root, by default)
0057 
0058 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:
0059 
0060 $G4WORKDIR/bin/Linux-g++/XrayFluo xxxxx.mac 1
0061 
0062 2. Detector description 
0063 The telescope and detector geometry is defined in XrayFluoDetectorConstruction.cc and similar
0064 
0065 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.  
0066 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.
0067 
0068 4. Physics processes
0069 
0070 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.
0071 
0072 5. Event generation
0073 
0074 This is done using the G4ParticleGun with some modifications. See XrayFluoParticleGeneratorAction.cc
0075 
0076 Event generation is controlled by commands in the /gun/category (see help for further details). In this readme only two commands are undrlined: 
0077 
0078 - /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.
0079 
0080 - /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.
0081 
0082 
0083