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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 7.1.p1)


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