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10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.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 ]

Diff markup

Differences between /examples/advanced/xray_fluorescence/README (Version 11.3.0) and /examples/advanced/xray_fluorescence/README (Version 9.3)


                                                   >>   1 $Id: README,v 1.14 2005/12/09 22:15:52 mantero Exp $
  1 ----------------------------------------------      2 -------------------------------------------------------------------
  2                                                     3 
  3      =========================================      4      =========================================================
  4      Geant4 - an Object-Oriented Toolkit for S      5      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
  5      =========================================      6      =========================================================
  6                                                     7 
  7                             xray_fluorescence       8                             xray_fluorescence
  8                             -----------------       9                             -----------------
  9 XrayFluo is an advanced Geant4 example reprodu <<  10 XrayFluo is an advanced Geant4 example based on a realistic simulation of 
 10                                                <<  11 a test beam. 
 11 A sample macro (livermore.mac) is provided.    <<  12 The aim of the test beam was to characterize the response function of various
 12                                                <<  13 X-Rays detectors used to measure fluorescence emissions from samples composed
 13 The detector is a monolitic Si(Li) or HPGe det <<  14 of different materials irradiated with a monochromatic beam of photons.
 14                                                <<  15 In this example the geometry of the detector is simplified:
 15 The sample, a simple box whose material can be <<  16 one single pixel is used, since the test beams has used monolithic detectors.
 16                                                <<  17 The response function is tabulated for different values of incident 
 17 Two diaphragms reproducing those used to colli <<  18 energy and stored in the file response.dat and SILIresponse.dat.
 18                                                <<  19 At the moment, two kinds of detectors are available: HPGe and Si(Li).
 19 The aim of this advanced example is to illustr <<  20 The sample, a simple box whose material can be selected, can be irradiated
 20                                                <<  21 with different particles, with different spectra for the incident energy and
 21 Generation of particles is done via the G4Part <<  22 with different shapes of the primary generator. 
 22                                                <<  23 Apart from the sample and the detector there are two diaphragm reproducing 
 23 The example includes the possibility to shoot  <<  24 those used to collimate the incident beam during the test beam.
 24                                                <<  25 
 25 Histogramming facilities are provided using th <<  26 The aim of this advanced example is to illustrate the use of particle 
 26                                                <<  27 generation and analysis schemes available in Geant4:
 27 In order to be able to use any of these packag <<  28 
                                                   >>  29 - the generation of particles is done via the G4ParticleGun: the example
                                                   >>  30   shows how to use it in order to obtain a beam of circular section or
                                                   >>  31   a particle source isotropic in space
                                                   >>  32 
                                                   >>  33 - the example includes the possibility to shoot particles according to a 
                                                   >>  34   given energy spectrum: the files B_flare.dat, C_Flare.dat and M_flare.dat
                                                   >>  35   store the spectra of photons during solar flares, the files 
                                                   >>  36   mercury2_flx_solmax.dat and mercury_flx_solmin.dat contain the spectra of
                                                   >>  37   protons respectively during solar maximum and solar minimum conditions, and 
                                                   >>  38   merc2_flx_alp_max.dat merc_flx_alp_min.dat contain  the spectra of alpha
                                                   >>  39   particles again respectively during solar maximum and solar minimum
                                                   >>  40   conditions.
                                                   >>  41 
                                                   >>  42 - histograming facilities are presently provided for the Linux environment 
                                                   >>  43   by using the AIDA3 interfaces.
                                                   >>  44   The AIDA compliant version has not been tested by the developers and is
                                                   >>  45   here as a example of "forward compatibility" on how to use analysis.
                                                   >>  46 
                                                   >>  47 In order to be able to use any of these packages, prior installation is 
                                                   >>  48 necessary to configure you environment to get visulaization, as described in geant4 manual.
                                                   >>  49 If we want to use analisys, we provide an example for the use of PI:
                                                   >>  50 
                                                   >>  51 # flag that we want to use analysis:
                                                   >>  52 setenv G4ANALYSIS_USE               1
                                                   >>  53 
                                                   >>  54 #select AIDA implementation: PI 1.3.3
                                                   >>  55 
                                                   >>  56 setenv G4ANALYSIS_BUILD  1
                                                   >>  57 
                                                   >>  58 setenv PI_VERSION 1_3_3
                                                   >>  59 setenv PATH /your/path/to/PI/app/releases/PI/PI_1_3_0/slc3_ia32_gcc323/bin/:${PATH}
                                                   >>  60 eval `aida-config -r csh`
 28                                                    61 
 29 #path to the lowEnergy data base                   62 #path to the lowEnergy data base
 30                                                    63 
 31 setenv G4LEDATA /your/path/to/geant4/data/G4EM <<  64 setenv G4LEDATA /your/path/to/geant4/data/G4EMLOW3.0
 32                                                    65 
 33 #path to Xray_Fluorescence data files, if not      66 #path to Xray_Fluorescence data files, if not set, PWD is assumed:
 34                                                    67 
 35 setenv XRAYDATA /path/to/detector/and/input/sp     68 setenv XRAYDATA /path/to/detector/and/input/spctra/files
 36                                                    69 
 37 1. Run                                             70 1. Run
 38 After the compilation of the program, to execu     71 After the compilation of the program, to execute a sample simulation type (for example):
 39                                                    72 
 40 $G4WORKDIR/bin/Linux-g++/XrayFluo                  73 $G4WORKDIR/bin/Linux-g++/XrayFluo 
 41                                                    74 
 42 The program gives, at tis point,the user 4 opt     75 The program gives, at tis point,the user 4 options:
 43                                                    76 
 44 Please Select Simulation Geometrical Set-Up:       77 Please Select Simulation Geometrical Set-Up:
 45 1 - Test Beam                                      78 1 - Test Beam
 46 2 - Infinite Plane                                 79 2 - Infinite Plane
 47 3 - Planet and Sun                                 80 3 - Planet and Sun
 48 4 - Phase-Space Production                         81 4 - Phase-Space Production
 49                                                    82 
 50 The first three choices are to choose differen <<  83 The first three choices are to choose different experimental set-ups 
                                                   >>  84 (a test beam one, an infite plane and a planetary geometry), while 
                                                   >>  85 the fourth is a simplified version of the first, without a detector, 
                                                   >>  86 only to generate a tuple with particles genereted or exiting the sample.
 51                                                    87 
 52 In order to run a macro, type the following co     88 In order to run a macro, type the following command:
 53                                                    89 
 54 idle> execute command "/control/execute xxxxx.     90 idle> execute command "/control/execute xxxxx.mac"
 55                                                    91 
 56 If the analysis options are set, histograms wi <<  92 If the analysis options are set, histograms will
                                                   >>  93 automatically stored in the corresponding files (hbook or XML)
 57                                                    94 
 58 In order to launch the application in batch mo <<  95 In order to launch the application in batch mode, it is necessary to specify, 
                                                   >>  96 after the executable file name, the name of the macro file and the number of the choice:
 59                                                    97 
 60 $G4WORKDIR/bin/Linux-g++/XrayFluo xxxxx.mac 1      98 $G4WORKDIR/bin/Linux-g++/XrayFluo xxxxx.mac 1
 61                                                    99 
 62 2. Detector description                        << 100 2. Detector description
 63 The telescope and detector geometry is defined << 101 The telescope and detector geometry is defined in 
 64                                                << 102 XrayFluoDetectorConstruction.cc
 65 3. Detector peculiar properties are described  << 103 
 66 Other commands (apparate/sample /apparate/samp << 104 3. Detector peculiar properties are described in XrayFluoSiLiDetectorType and
                                                   >> 105 XrayFluoHPGeDetectorType, both derived from XrayFluoVDetectorType. Other 
                                                   >> 106 detector types can be added, creating other implementations of 
                                                   >> 107 XrayFluoVDetectorType objects. 
                                                   >> 108 Detector type selection is made in  XrayFluoDetectorConstruction, and can be 
                                                   >> 109 modified trough /apparate/detector command of the UI.  
                                                   >> 110 Other commands (apparate/sample /apparate/sampleGranularity 
                                                   >> 111 /apparate/GrainDiameter) are present to simulate sample granulosity:
                                                   >> 112  grains are spheres, disposed in a compact cubic structure, i.e superipmposition 
                                                   >> 113 of planes of maximum density with ABC ABC path. The fundamental cell is of type 
                                                   >> 114 cubic with centered-faces.
 67                                                   115 
 68 4. Physics processes                              116 4. Physics processes
 69                                                   117 
 70 Tha user can select the preferred physics list << 118 The physics processes are in XrayFluoPhysicsList.cc
                                                   >> 119 The main process in this example is fluorescence emission from the sample.
 71                                                   120 
 72 5. Event generation                               121 5. Event generation
 73                                                   122 
 74 This is done using the G4ParticleGun with some << 123 This is done using the G4ParticleGun with some modifications. See 
 75                                                << 124 XrayFluoParticleGeneratorAction.cc
 76 Event generation is controlled by commands in  << 
 77                                                << 
 78 - /gun/loadGunData <filename>: to be used with << 
 79                                                << 
 80 - /gun/loadRayleighFlag <true/false> This is u << 
 81                                                << 
 82                                                   125 
                                                   >> 126 Event generation is controlled by commands in the /gun/category (see help for further details).
                                                   >> 127 In this readme only two commands are undrlined: 
 83                                                   128 
                                                   >> 129 - /gun/loadGunData <filename>: to be used with the setup #1, loads the ntuple created 
                                                   >> 130   in the setup #4. The loaded particles will be generated and will be directed 
                                                   >> 131   ALL OF THEM to the detector. This can be useful to perform detector studies 
                                                   >> 132   with encreased efiiciency.
                                                   >> 133 
                                                   >> 134 - /gun/loadRayleighFlag <true/false> This is used to let the user decide if backscattered 
                                                   >> 135   primary particles should be loaded and directed toward the detector. This command, 
                                                   >> 136   in order to be useful, must be used BEFORE the previous one.
                                                   >> 137 
                                                   >> 138 6. Analysis
                                                   >> 139 
                                                   >> 140 At present the analisys is provided by any AIDA-3.2.1 compliant analysis system. 
                                                   >> 141 In the example the Anaphe toolkit is used.
                                                   >> 142 
                                                   >> 143 AIDA implementation configuration for compilation and link are in GNUmakefile, once 
                                                   >> 144 is set the environmente as above:
                                                   >> 145 
                                                   >> 146 ifdef G4ANALYSIS_USE
                                                   >> 147  CPPFLAGS += `aida-config --include`
                                                   >> 148  LDFLAGS  += `aida-config --lib`
                                                   >> 149  LOADLIBS += `aida-config --lib`
                                                   >> 150 endif
                                                   >> 151 
                                                   >> 152 To build and execute the example on platforms where there is no
                                                   >> 153 implementation of the analysis system, the environment variable
                                                   >> 154 G4ANALYSIS_USE must not be set.
                                                   >> 155 
                                                   >> 156 By setting visPlotter variable in XrayFluoAnalysisManager to true, 
                                                   >> 157 it is possible to display the simulated output of the detector while 
                                                   >> 158 simulation is in progress. Graph window is updated every 1000 events. 
                                                   >> 159 
                                                   >> 160 The example provides also a simple Python file (readPY) used to display
                                                   >> 161 histograms with the python interface of PI. This must be run after the 
                                                   >> 162 configuration script config.csh and the python interpreter.
                                                   >> 163 
                                                   >> 164 Various commads, with help,  are available for Geant4 UI. 
                                                   >> 165 /analysis/outputFile and /analysis/fileType respectively for 
                                                   >> 166 changing the name and the type (xml or Hbook) of the file in wich results 
                                                   >> 167 are saved. 
                                                   >> 168 If these commends are used, to make the changes effective, another
                                                   >> 169 command, /anaysis/update, must be executed.
                                                   >> 170 
                                                   >> 171 NOTE: if a file named xrayfluo.hbk (default name) is present, it 
                                                   >> 172 will be deleted, even if /analysis/outputFile command is issued 
                                                   >> 173 before any run.