-------------------------------------------------------------------------------- G4LECS 1.07 Installation and Use R. M. Kippen LANL Jun-2006 -------------------------------------------------------------------------------- N.B. Version 1.07 works with GEANT4.8.1, but not with previous versions of GEANT4. INTRODUCTION: ============= This document describes the installation and use of the GEANT4 Low-Energy Compton Scattering (G4LECS) package, which provides more detailed physical models of the coherent (Rayleigh) and incoherent (Compton) photon scattering processes than those included in the standard (or LowEnergy) GEANT4 distribution. G4LECS can be used with practically any simulation program based on the GEANT4 system. PHYSICS OVERVIEW: ================= In the standard GEANT4, Compton scattering is modeled using the approximation of a photon scattering with an electron at rest. In reality, the electron is not at rest, but rather bound in an atomic system with some corresponding orbital momentum. The GEANT4 LowEnergyCompton package (included in the GEANT4 distribution) improves the standard treatment by incorporating the correct total cross sections and scattering form factors, but does NOT include the effects of bound momentum on the scattered particle energy distribution. These effects become significant (> few percent) at energies below a few hundred keV, particularly at large angles, and in high-Z materials. The G4LECS treatment of Compton scattering accounts for bound electron momentum on a shell-by-shell basis using evaluated data read from tables. The treatment is derived from [1], and users should consult this reference for a full description. Briefly, the G4LECS treatment differs from standard (and LowEnergy) GEANT4 in the following ways: A) The probability of a Compton scatter is evaluated using the total Compton cross section. In G4LECS, the total cross sections for an element are interpolated from the Evaluated Photon Data Library (EPDL97 [2]) tables in exactly the same manner as in the class G4LowEnergyCompton. These data include electron binding effects and are valid from 250 eV to 100 GeV. For compound materials, the cross sections of individual constituent elements are randomly sampled based on the relative number of electrons in each element. B) The scattered photon angle is sampled from the differential Compton cross-section. In G4LECS, this is the free-electron Klein-Nishina formula multiplied by the incoherent scattering form factor interpolated from EPDL97 data in the same manner as in G4LowEnergyCompton. The EPDL97 form factor represents the combination of all electron shells from a particular element. For compound materials, a weighted average of the individual element form factors is used, based on the relative number of electrons for each element in the material. C) The "Doppler broadened" scattered photon energy is sampled based on the distribution of bound electron momentum. These distributions (called "Compton profiles") for each atomic electron sub-shell are taken from Atomic Data tables (see [1,3]) included in the G4LECS distribution. The appropriate sub-shell is randomly sampled based on the electron occupancy per shell. The bound electron momentum is then sampled from the Compton profile distribution. This allows the energies of the scattered photon and (by conservation of energy) scattered electron to be computed. The technique used for simulating Rayleigh (or coherent) scattering in GEANT4 LowEnergyRayleigh suffers from two significant problems. First, the tabulated scattering form factor is sampled incorrectly, resulting in incorrect scatter angles and energies. Second, the way the form factor is sampled becomes very inefficient at high energies. In G4LECS these problems are fixed. As in G4LowEnergyRayleigh, EPDL97 data are used for the total cross section and scattering function, but the sampling technique is changed based on the algorithm in [4]. For compound materials, a weighted average of the individual element cross-sections is used, based on the relative number of electrons for each element in the material. The scattered photon angle is sampled using the Thomson cross section multiplied by the incoherent scattering form factor interpolated from EPDL data. The EPDL Rayleigh form factor represents the combination of all electron shells from a particular element. For compound materials, a particular element is chosen at random based on the relative number of electrons for each element in the material. The problems in G4LowEnergyRayleigh were reported to the GEANT4 collaboration, and corrections were applied to the GEANT4.4.1 release. However, the technique used in G4LECS is more efficient than the corrections applied to G4LowEnergyRayleigh4.4.1. It is thus suggested to use G4LECS rather than G4LowEnergyRayleigh. [1] Namito, Y., Ban, S., & Hirayama, H., "Implementation of the Doppler Broadening of a Compton-Scattered Photon Into the EGS4 Code," Nucl. Inst. Meth. in Phys. Res. A 349, 489-494 (1994). [2] D.E. Cullen, et al., "EPDL97: the Evaluated Photon Data Library, 97 version," UCRL-ID-50400, Vol. 6, Rev. 5, Lawrence Livermore National Laboratory (1997). [3] Biggs, F., Mendelsohn, L. B., & Mann, J. B., "Hartree-Fock Compton Profiles for the Elements," At. Data Nucl. Data Tables 16, 201-309 (1975). [4] W.R. Nelson et al., "The EGS4 Code System," SLAC-Report-265, December (1985). REQUIREMENTS: ============= In principle, G4LECS can be used with any existing GEANT4 simulation program. However, the GEANT4 developers have chosen to make incremental releases that are usually not backward compatible with earlier releases. Users must therefore ensure that the version of G4LECS is compatible with their GEANT4 installation. A compatibility matrix is available at: http://home.lanl.gov/mkippen/actsim/g4lecs/versions.html This release (v1.05) was tested with GEANT4.7.0 (22-Dec-2004) on Linux and Darwin platforms with gcc version 3.2.3 and 3.3, respectively. In addition to GEANT4, G4LECS requires the data files for low-energy electromagnetic processes, G4EMLOW, available from the GEANT4 distribution site. G4LECSv1.05 was tested with G4EMLOW version 2.3. Note that G4LECS is NOT compatible with GEANT3. A separate LECS package (with similar capabilities) for GEANT3 is available (see GLECS). INSTALLATION: ============= Introduction: ------------- The G4LECS package consists of the classes that define two new GEANT4 physics processes: G4LECSCompton and G4LECSRayleigh. These are distributed in the context of an example application called "Compt" that illustrates how they are used. Unpacking: ---------- The G4LECS package is distributed via a unix archive "tar" file that has been compressed with the gzip utility. Unpacking the file will result in the creation of a directory structure below the current directory. The command to unpack the distribution file is "tar -xzvf g4lecs.tgz", where is the version number of the G4LECS distribution file. Files & Directories: -------------------- Successful unpacking of the G4LECS distribution file will result in the following files and directory structure beneath the current directory. g4lecs/== main G4LECS package directory GNUmakefile --GNU makefile to compile the g4lecs example application README --This file Compt.cc --Example application main program using G4LECS def.mac --Default macro file for example application include/ == Include files used by G4LECS data/ == Data tables accessed at run-time by all G4LECS programs include/ == Include files for G4LECS and example application src/ == Source code for G4LECS and example application Compilation: ------------- The GNUmakefile works with the standard GEANT4 make architecture to build the example application program Compt. Before building Compt, GEANT4 (and CLHEP) must be properly installed, and the environment variable G4INSTALL properly set to point at the GEANT4 distribution directory. To build Compt, type "make" from the g4lecs directory. This compiles the code and links it to the various G4 libraries resulting in an executable program called "Compt". The executable will be located in the directory pointed to by the G4 environment variables $G4BIN/$G4SYSTEM. Data Files: ----------- Before running the example program Compt, the G4LEDATA environment variable must be set to point at the top-level directory that contains the G4EMLOW data files. *** In addition, all files in the g4lecs/data/comp directory must be moved to the $G4LEDATA/comp directory. USING G4LECS: ============= G4LECS operates by completely replacing the standard or LowEnergy GEANT4 Compton and Rayleigh processes. An example of its use is given in the "Compt" program, especially in the PhysicsList class. The comments in this code illustrate how to select and de-select the G4LECS physics processes. In this application, changing the physics processes to/from the standard/G4LECS classes requires re-compiling the program. For other user applications, the source code for the G4LECS physics processes can be located with a particular application (as in the example Compt), or the files could be made generally available by copying them to the GEANT4 installation source directory, and re-building GEANT4, thus becomming part of the local GEANT4 libraries. EXAMPLE PROGRAM: ================ The Compt program provides a simple demonstration of G4LECS. The G4LECSCompton and G4LECSRayleigh processes are specified in the PhysicsList object. The G4LowEnergy package is used for the remaining physical processes (e.g., photoelectric, ionization, etc.). The geometrical setup is meant to crudely simulate the experimental setup of Namito et al. [1]. Photons (default energy 40 keV) are normally incident on a carbon target consisting of a clyindrical shell (0.589 mm thick, 1 cm radius, 1 cm high, with 45 deg tilt). A ring of germanium 1 cm thick x 2 cm high surrounds the target at a distance of 43.4 cm from the target surface, just behind a 0.5-cm slit lead collimator. Photons must therefore scatter at an angle near 90 deg to be detected in the germanium. Cumulative energy deposits in the carbon (E1) and germanium (E2) are recorded (and printed to the user terminal) for 10 events, where an event is any photon that deposits energy in the germanium (E2 > 0). A sample portion of the output is given below. ### Run 0 start. Event# E1(keV) E2(keV) Etot(keV) ------ ------- ------- --------- 0 3.7268 36.2732 40.0000 1 2.8193 37.1807 40.0000 2 2.7069 37.2931 40.0000 3 3.1739 36.8261 40.0000 4 2.8901 37.1099 40.0000 5 9.5927 30.4073 40.0000 6 2.8904 37.1096 40.0000 7 2.5615 37.4385 40.0000 8 2.2270 37.7730 40.0000 9 2.8161 37.1839 40.0000 ### Run 0 end. ### Statistics: User=7.0600s Real=7.0600s Sys=0.0000s 134864 incident photons In this example, the effects of Doppler broadening are evident in the non-negligible distribution of E2 energies around the Compton edge near 37 keV. Rayleigh-scattered photons are those with no change in energy after scattering (E1 = 0). Run parameters such as the beam energy, number of events, visualization, etc. may be controlled via the GEANT4 command line interface, or through the use of macro files. The default macro file for Compt is called "def.mac". To override the default, specify the name of the macro file as a command line argument, e.g., "Compt ". DOCUMENT HISTORY: ================= 1.07/JUN-2006....Change required to make compatible with GEANT4.8.1: * New interface to G4CompositeEMDataSet 1.06/DEC-2005....Changes required to make compatible with GEANT4.8.0: * Migrate outdated to * Migrate to use of G4VisExecutive 1.05/DEC-2004....Changes required to make compatible with GEANT4.7.0: * New interface names for ParticleChange methods * Upgraded to new GeneralParticleSource commands 1.04/DEC-2003....Bug fixes to make compatible with GEANT4.6.0: * Changed g4std headers to standard gcc headers for G4.6.0 * Modified RunManager in example code according to new handling of state manager starting in G4.6.0 * PhysicsList in example now properly uses standard physics classes for positrons (LowEnergy classes don't work for e+). 1.03/MAY-2003....Fixed incompatibility with GEANT4.5.1. 1.02/FEB-2003....Fixed incompatibility with GEANT4.5.0. 1.01/JUL-2002....Corrected bug in v1.00 that prevented Doppler broadening at large energies and large scatter angles. Also, ionization energy is now deposited locally rather than carried with the Compton scattered electron. 1.00/JUL-2002....First version. PROBLEMS/QUESTIONS: =================== e-mail: mkippen@lanl.gov phone: 505-667-3125 FAX: 505-667-4414 www: http://home.lanl.gov/mkippen/ mail: Dr. R. Marc Kippen Space Science & Applications Group (ISR-1) Mail Stop B244 Los Alamos National Laboratory Los Alamos, NM 87545 Users are encouraged to acknowledge the author in any publications or presentations that include results using G4LECS. LICENSE DISCLAIMER: =================== This program was prepared by the Regents of the University of California at Los Alamos National Laboratory (the University) under contract No. W-7405-ENG-36 with the U.S. Department of Energy (DOE). All rights in the program are reserved by the DOE and the University. Permission is granted to the public to copy and use this software without charge, provided that this Notice and any statement of authorship are reproduced on all copies. Neither the U.S. Government nor the University makes any warranty, express or implied, or assumes any liability or responsibility for the use of this software. This software has been reviewed and assigned the identifying number LA-CC-02-47 by Los Alamos National Laboratory. -------------------------------------------------------------------------------- -eof-