Penelope 2014 Nea
Penelope 2014 Nea
Penelope 2014 Nea
NEA/NSC/DOC(2015)3
www.oecd-nea.org
PENELOPE-2014: A Code
System for Monte Carlo
Simulation of Electron
and Photon Transport
Workshop
Barcelona, Spain
29 June-3 July 2015
NEA/NSC/DOC(2015)3
Data Bank
PENELOPE-2014
A Code System for Monte Carlo Simulation of Electron and Photon Transport
Workshop
Barcelona, Spain
29 June-3 July 2015
Francesc Salvat
Facultat de Física (ECM)
Universitat de Barcelona
Spain
OECD 2015
2
NEA/NSC/DOC(2015)3
The OECD is a unique forum where the governments of 34 democracies work together to address the economic,
social and environmental challenges of globalisation. The OECD is also at the forefront of efforts to understand and to
help governments respond to new developments and concerns, such as corporate governance, the information
economy and the challenges of an ageing population. The Organisation provides a setting where governments can
compare policy experiences, seek answers to common problems, identify good practice and work to co-ordinate
domestic and international policies.
The OECD member countries are: Australia, Austria, Belgium, Canada, Chile, the Czech Republic, Denmark,
Estonia, Finland, France, Germany, Greece, Hungary, Iceland, Ireland, Israel, Italy, Japan, Luxembourg, Mexico, the
Netherlands, New Zealand, Norway, Poland, Portugal, the Republic of Korea, the Slovak Republic, Slovenia, Spain,
Sweden, Switzerland, Turkey, the United Kingdom and the United States. The European Commission takes part in the
work of the OECD.
OECD Publishing disseminates widely the results of the Organisation’s statistics gathering and research on
economic, social and environmental issues, as well as the conventions, guidelines and standards agreed by its
members.
The OECD Nuclear Energy Agency (NEA) was established on 1 February 1958. Current NEA membership
consists of 31 countries: Australia, Austria, Belgium, Canada, the Czech Republic, Denmark, Finland, France, Germany,
Greece, Hungary, Iceland, Ireland, Italy, Japan, Luxembourg, Mexico, the Netherlands, Norway, Poland, Portugal, the
Republic of Korea, the Russian Federation, the Slovak Republic, Slovenia, Spain, Sweden, Switzerland, Turkey, the
United Kingdom and the United States. The European Commission also takes part in the work of the Agency.
The mission of the NEA is:
– to assist its member countries in maintaining and further developing, through international co-operation, the
scientific, technological and legal bases required for a safe, environmentally friendly and economical use of
nuclear energy for peaceful purposes;
– to provide authoritative assessments and to forge common understandings on key issues, as input to
government decisions on nuclear energy policy and to broader OECD policy analyses in areas such as energy
and sustainable development.
Specific areas of competence of the NEA include the safety and regulation of nuclear activities, radioactive waste
management, radiological protection, nuclear science, economic and technical analyses of the nuclear fuel cycle,
nuclear law and liability, and public information.
The NEA Data Bank provides nuclear data and computer program services for participating countries. In these
and related tasks, the NEA works in close collaboration with the International Atomic Energy Agency in Vienna, with
which it has a Co-operation Agreement, as well as with other international organisations in the nuclear field.
This document and any map included herein are without prejudice to the status of or sovereignty over any territory, to
the delimitation of international frontiers and boundaries and to the name of any territory, city or area.
Corrigenda to OECD publications may be found online at: www.oecd.org/publishing/corrigenda.
© OECD 2015
You can copy, download or print OECD content for your own use, and you can include excerpts from OECD publications, databases and
multimedia products in your own documents, presentations, blogs, websites and teaching materials, provided that suitable acknowledgment
of the OECD as source and copyright owner is given. All requests for public or commercial use and translation rights should be submitted to
rights@oecd.org. Requests for permission to photocopy portions of this material for public or commercial use shall be addressed directly to
the Copyright Clearance Center (CCC) at info@copyright.com or the Centre français d'exploitation du droit de copie (CFC)
contact@cfcopies.com.
NEA/NSC/DOC(2015)3
Foreword
The NEA Data Bank was established to promote effective sharing of data and software developed
in member countries in the field of nuclear technology and radiation physics applications. It
operates a Computer Program Service (CPS) related to nuclear energy applications. The software
library collects, compiles and verifies programs in an appropriate computer environment, ensuring
that the computer program package is complete and adequately documented. Internationally
agreed quality-assurance methods are used in the verification process.
In order to obtain good results in modelling the behaviour of technological systems, two conditions
must be fulfilled:
1. Good quality and validated computer codes and associated basic data libraries should be
used.
2. Modelling should be performed by a qualified user of such codes.
One subject to which special effort has been devoted in recent years is radiation transport.
Workshops and training courses including the use of computer codes have been organised in the
field of neutral particle transport for codes using both deterministic and stochastic methods. The
area of charged particle transport, and in particular electron-photon transport, has received
increased attention for a number of technological and medical applications.
A new computer code was released to the NEA Data Bank for general distribution
in 2001:“PENELOPE, A Code System for Monte Carlo Simulation of Electron and Photon Transport”
developed by Francesc Salvat, José M. Fernández-Varea, Eduardo Acosta and Josep Sempau. A
first workshop/tutorial was held at the NEA Data Bank in November 2001. This code began to be
used very widely by radiation physicists, and users requested that a second PENELOPE workshop
with hands-on training be organised. The NEA Nuclear Science Committee endorsed this request
while the authors agreed to teach a course covering the physics behind the code and to
demonstrate, with corresponding exercises, how it can be used for practical applications. Courses
have been organised on a regular basis. New versions of the code have also been presented
containing improved physics models and algorithms.
This document contains the corresponding manual and teaching notes of the PENELOPE-2014
training course of 29 June-3 July 2015 in Barcelona, Spain.
NEA/NSC/DOC(2015)3
Francesc Salvat
Abstract
The computer code system penelope (version 2014) performs Monte Carlo simulation
of coupled electron-photon transport in arbitrary materials for a wide energy range,
from a few hundred eV to about 1 GeV. Photon transport is simulated by means of
the standard, detailed simulation scheme. Electron and positron histories are generated
on the basis of a mixed procedure, which combines detailed simulation of hard events
with condensed simulation of soft interactions. A geometry package called pengeom
permits the generation of random electron-photon showers in material systems consisting
of homogeneous bodies limited by quadric surfaces, i.e., planes, spheres, cylinders, etc.
This report is intended not only to serve as a manual of the penelope code system,
but also to provide the user with the necessary information to understand the details of
the Monte Carlo algorithm.
5
NEA/NSC/DOC(2015)3
6
NEA/NSC/DOC(2015)3
Contents
Preface vii
7
NEA/NSC/DOC(2015)3
ii Contents
2 Photon interactions 49
2.1 Photoelectric effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.1.1 Simulation of photoelectron emission . . . . . . . . . . . . . . . . 54
2.1.1.1 Initial direction of photoelectrons . . . . . . . . . . . . 54
2.2 Coherent (Rayleigh) scattering . . . . . . . . . . . . . . . . . . . . . . . 56
2.2.1 Simulation of coherent scattering events . . . . . . . . . . . . . . 58
2.3 Incoherent (Compton) scattering . . . . . . . . . . . . . . . . . . . . . . 59
2.3.1 Analytical Compton profiles . . . . . . . . . . . . . . . . . . . . . 68
2.3.2 Simulation of incoherent scattering events . . . . . . . . . . . . . 69
2.4 Electron-positron pair production . . . . . . . . . . . . . . . . . . . . . . 72
2.4.1 Simulation of pair-production events . . . . . . . . . . . . . . . . 77
2.4.1.1 Angular distribution of the produced particles . . . . . 79
2.4.1.2 Compound materials . . . . . . . . . . . . . . . . . . . 80
2.5 Attenuation coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
2.6 Atomic relaxation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
2.6.1 Photon propagation time. Atomic lifetimes . . . . . . . . . . . . 87
2.7 Scattering of polarised photons . . . . . . . . . . . . . . . . . . . . . . . 89
2.7.1 Rayleigh scattering . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.7.2 Compton scattering . . . . . . . . . . . . . . . . . . . . . . . . . 95
2.7.3 Simulation of interactions of polarised photons . . . . . . . . . . 97
8
NEA/NSC/DOC(2015)3
Contents iii
9
NEA/NSC/DOC(2015)3
iv Contents
10
NEA/NSC/DOC(2015)3
Contents v
11
NEA/NSC/DOC(2015)3
vi CONTENTS
Bibliography 373
12
NEA/NSC/DOC(2015)3
Preface
Radiation transport in matter has been a subject of intense interest since the beginning
of the 20th century. High-energy photons, electrons and positrons penetrating matter
suffer multiple interactions by which energy is transferred to the atoms and molecules
of the material and secondary particles are produced1 . By repeated interaction with the
medium, a high-energy particle originates a cascade of particles which is usually referred
to as a shower. In each interaction, the energy of the particle is reduced and further
particles may be generated so that the evolution of the shower represents an effective
degradation in energy. As time goes on, the initial energy is progressively deposited
into the medium, while that remaining is shared by an increasingly larger number of
particles.
A reliable description of shower evolution is required in a number of fields. Thus,
knowledge of radiation transport properties is needed for quantitative analysis in surface
electron spectroscopies (Jablonski, 1987; Tofterup, 1986), positron surface spectroscopy
(Schultz and Lynn, 1988), electron microscopy (Reimer, 1985), electron energy loss
spectroscopy (Reimer et al., 1992), electron probe microanalysis (Heinrich and Newbury,
1991), etc. Detailed information on shower evolution is also required for the design and
quantitative use of radiation detectors (Titus, 1970; Berger and Seltzer, 1972). A field
where radiation transport studies play an important sociological role is that of radiation
dosimetry and radiotherapy (Andreo, 1991; Chetty et al., 2007).
The study of radiation transport problems was initially attempted on the basis of the
linear Boltzmann transport equation. However, this procedure comes up against con-
siderable difficulties when applied to limited geometries, with the result that numerical
methods based on the transport equation have only had certain success in simple geome-
tries, mainly for unlimited and semi-infinite media (see, e.g., Zheng-Ming and Brahme,
1993). At the end of the 1950s, with the availability of computers, Monte Carlo simula-
tion methods were developed as a powerful alternative to deal with transport problems.
The evolution of an electron-photon shower is of a random nature and so it is a process
that is particularly amenable to Monte Carlo simulation. Detailed simulation, where
all the interactions experienced by a particle are simulated in chronological succession,
is exact, i.e., it yields the same results as the rigorous solution of the linear transport
equation (apart from the inherent statistical uncertainties).
1
In this report, the term particle will be used to designate either photons, electrons or positrons.
13
NEA/NSC/DOC(2015)3
viii Preface
To our knowledge, the first numerical Monte Carlo simulation of photon transport
is that of Hayward and Hubbell (1954) who generated 67 photon histories using a desk
calculator. The simulation of photon transport is straightforward since the mean number
of events in each history is fairly small. Indeed, a photon history terminates after a single
photoelectric or pair-production interaction or after a few Compton interactions (say,
of the order of 10). With present-day computational facilities, detailed simulation of
photon transport is a simple routine task.
The simulation of electron and positron transport is much more difficult than that
of photons. The main reason is that the average energy loss of an electron in a single
interaction is very small (of the order of a few tens of eV). As a consequence, high-
energy electrons suffer a large number of interactions before being effectively absorbed
in the medium. In practice, detailed simulation (interaction by interaction) is feasible
only when the average number of collisions per track is not too large (say, up to a
few hundred). Experimental situations which are amenable to detailed simulation are
those involving either electron sources with low initial kinetic energies (up to about 100
keV) or special geometries such as electron beams impinging on thin foils. For larger
initial energies, and thick geometries, the average number of collisions experienced by
an electron until it is effectively stopped becomes very large, and detailed simulation is
very inefficient.
For high-energy electrons and positrons, most of the Monte Carlo codes currently
available [e.g., etran (Berger and Seltzer, 1988a,b,c), its3 (Halbleib et al., 1992),
egs4 (Nelson et al., 1985), geant3 (Brun et al., 1989), egsnrc (Kawrakow and Rogers,
2001), mcnp (X-5 Monte Carlo Team, 2003), geant4 (Agostinelli et al., 2003; Allison
et al., 2006), fluka (Ferrari et al., 2005), egs5 (Hirayama et al., 2006), . . . ] have
recourse to multiple-scattering theories, which allow the simulation of the global effect
of a large number of events in a track segment of a given length (step). Following
Berger (1963), these simulation procedures will be referred to as “condensed” Monte
Carlo methods. The multiple-scattering theories implemented in condensed simulation
algorithms are only approximate and may lead to systematic errors, which can be made
evident by the dependence of the simulation results on the adopted step length (Bielajew
and Rogers, 1987). To analyse their magnitude, one can perform simulations of the
same arrangement with different step lengths. The results are usually found to stabilise
when the step length is reduced, while computation time increases rapidly, roughly in
proportion to the inverse of the step length. Thus, for each particular problem, one must
reach a certain compromise between available computer time and attainable accuracy.
It is also worth noting that, owing to the nature of certain multiple-scattering theories
and/or to the particular way they are implemented in the simulation code, the use of very
short step lengths may introduce spurious effects in the simulation results. For instance,
the multiple-elastic-scattering theory of Molière (1948), which is the model used in egs4-
based codes, is not applicable to step lengths shorter than a few times the mean free
path for elastic collisions (see, e.g., Fernández-Varea et al., 1993a) and multiple elastic
scattering has to be switched off when the step length becomes smaller than this value.
As a consequence, stabilisation for short step lengths does not necessarily imply that
14
NEA/NSC/DOC(2015)3
Preface ix
simulation results are correct. Condensed schemes also have difficulties in generating
particle tracks in the vicinity of an interface, i.e., a surface separating two media of
different compositions. When the particle moves near an interface, the step length must
be kept smaller than the minimum distance to the interface so as to make sure that the
step is completely contained in the initial medium (Bielajew and Rogers, 1987). This
may complicate the code considerably, even for relatively simple geometries.
The present report describes the 2014 version of penelope, a Monte Carlo algorithm
and computer code for the simulation of coupled electron-photon transport. The name
is an acronym that stands for PENetration and Energy LOss of Positrons and Electrons
(photon simulation was introduced later). The simulation algorithm is based on a scat-
tering model that combines numerical databases with analytical cross section models for
the different interaction mechanisms and is applicable to energies (kinetic energies in the
case of electrons and positrons) from a few hundred eV to ∼1 GeV. Photon transport is
simulated by means of the conventional detailed method. The simulation of electron and
positron transport is performed by means of a mixed procedure. Hard interactions, with
scattering angle θ or energy loss W greater than pre-selected cutoff values θc and Wc ,
are simulated in detail. Soft interactions, with scattering angle or energy loss less than
the corresponding cutoffs, are described by means of multiple-scattering approaches.
This simulation scheme handles lateral displacements and interface crossing appropri-
ately and provides a consistent description of energy straggling. The simulation is fairly
stable under variations of the cutoffs θc , Wc and these can be made quite large, thus
speeding up the calculation considerably, without altering the results. A characteristic
feature of penelope is that the most delicate parts of the simulation are handled inter-
nally; electrons, positrons and photons are simulated by calling the same subroutines.
Thus, from the users’ point of view, penelope makes the practical simulation of elec-
trons and positrons as simple as that of photons (although simulating charged particles
may take longer times).
penelope in its current form is the result of continued evolution from the first
version, which was released in 1996. The present version incorporates various changes
and additions, which aim to improve both reliability and flexibility of the code system.
Inner-shell ionisation by electron and positron impact has been extended to N shells, and
ionizing events are now described as proper inelastic collisions. This ensures that the net
deposited energy in each interaction event is positive. The variance-reduction routines
have been reformulated, and now include the techniques of bremsstrahlung splitting,
and Woodcock delta scattering of photons. Optionally, the program can keep track of
the age of particles, measured from the start of the primary particle that initiates each
shower. The programming style has been slightly improved by replacing some common
blocks by modules (i.e., we use Fortran 90). The example main program penmain.f
contains various new options, and an auxiliary program is provided for combining results
from multiple independent runs of the same problem. Minor bugs and inconsistencies
in the code system have also been corrected.
The present document is intended not only to serve as a manual of the simulation
package, but also to provide the user with the necessary information to understand the
15
NEA/NSC/DOC(2015)3
x Preface
details of the Monte Carlo algorithm. The first chapters of the report deal with the
fundamentals of Monte Carlo simulation and physical interaction models. In Chapter 1
we give a brief survey of random sampling methods and an elementary introduction to
Monte Carlo simulation of radiation transport. The cross sections adopted in penelope
to describe particle interactions, and associated sampling techniques, are presented in
Chapters 2 and 32 . Chapter 4 is devoted to mixed simulation methods for electron and
positron transport. Additional information on physical interaction models for electron
and photon transport used in penelope and other Monte Carlo codes, with references
to relevant publications and data resources, can be found in Salvat and Fernández-
Varea (2009). In Chapter 5 we introduce concepts and quantities of common use in
radiation dosimetry, and we describe the Monte Carlo calculation of intermediate dosi-
metric quantities (linear energy absorption for electrons, photons and positrons). The
latter are useful, e.g., to implement track length estimators for the absorbed dose. A
relatively simple, but very effective, method to handle simulation in quadric geometries
is presented in Chapter 6. The Fortran simulation package penelope, two example
main programs, and other complementary tools are described in Chapter 7, which also
provides instructions for their operation. Information on relativistic kinematics and nu-
merical methods is given in Appendices A and B, respectively. Appendix C contains a
detailed study of photon polarisation, described in terms of the density matrix and the
Stokes parameters. Finally, Appendix D is devoted to simulation of electron/positron
transport under external, static electric and magnetic fields.
The penelope package includes the Fortran source files, the database, various com-
plementary tools, and code documentation. It is distributed by the NEA Data Bank3
and the RSICC4 . The code is also available from the author, but I would appreciate it
if users did try to get the code from these institutions.
Acknowledgements
A great deal of the physics of penelope, the program structure, and various parts
of the present manual were developed over decades of close and friendly collaboration
with José M. Fernández-Varea and Josep Sempau. Without their contributions and
inspiration, penelope would be a far less reliable and complete tool. With the maturity
of the code, collaboration has become less intense, but they keep providing useful ideas
and advice on code development, as well as correcting my errors.
In the course of the Monte Carlo research, I have had the good fortune of obtaining
much help from numerous colleagues and friends. Collaboration with David Liljequist
gave shape to our first algorithm for simulation of electrons and positrons. Stimulating
collaboration with Alex F. Bielajew led to substantial improvements in electron trans-
2
In these Chapters, and in other parts of the text, the CGS Gaussian system of units is adopted.
3
OECD Nuclear Energy Agency Data Bank. Le Seine Saint-Germain, 12 Boulevard des Iles. 92130
Issy-les-Moulineaux, France. e-mail: nea@nea.fr; http://www.nea.fr
4
Radiation Safety Information Computational Center. PO Box 2008, Oak Ridge, TN 37831-6362,
USA. e-mail: pdc@ornl.gov; http://www-rsicc.ornl.gov
16
NEA/NSC/DOC(2015)3
Preface xi
17
NEA/NSC/DOC(2015)3
xii Preface
18
NEA/NSC/DOC(2015)3
Chapter 1
The name “Monte Carlo” was coined in the 1940s by scientists working on the nuclear-
weapon project in Los Alamos to designate a class of numerical methods based on the
use of random numbers. Nowadays, Monte Carlo methods are widely used to solve
complex physical and mathematical problems (James, 1980; Rubinstein, 1981; Kalos
and Whitlock, 2008), particularly those involving multiple independent variables where
more conventional numerical methods would demand formidable amounts of memory
and computer time. The book by Kalos and Whitlock (2008) gives a readable survey of
Monte Carlo techniques, including simple applications in radiation transport, statistical
physics and many-body quantum theory.
In Monte Carlo simulation of radiation transport, the history (track) of a particle is
viewed as a random sequence of free flights that end with an interaction event where
the particle changes its direction of movement, loses energy and, occasionally, produces
secondary particles. The Monte Carlo simulation of a given experimental arrangement
(e.g., an electron beam, coming from an accelerator and impinging on a water phantom)
consists of the numerical generation of random histories. To simulate these histories we
need an “interaction model”, i.e., a set of differential cross sections (DCS) for the rele-
vant interaction mechanisms. The DCSs determine the probability distribution functions
(PDF) of the random variables that characterise a track; 1) free path between successive
interaction events, 2) type of interaction taking place and 3) energy loss and angular
deflection in a particular event (and initial state of emitted secondary particles, if any).
Once these PDFs are known, random histories can be generated by using appropriate
sampling methods. If the number of generated histories is large enough, quantitative
information on the transport process may be obtained by simply averaging over the
simulated histories.
The Monte Carlo method yields the same information as the solution of the Boltz-
mann transport equation, with the same interaction model, but is easier to implement
(Berger, 1963). In particular, the simulation of radiation transport in complex geome-
19
NEA/NSC/DOC(2015)3
tries is straightforward, while even the simplest finite geometries (e.g., thin foils) are
very difficult to be dealt with by the transport equation. The main drawback of the
Monte Carlo method lies in its random nature: all the results are affected by statistical
uncertainties, which can be reduced at the expense of increasing the sampled popu-
lation and, hence, the computation time. Under special circumstances, the statistical
uncertainties may be lowered by using variance-reduction techniques (Rubinstein, 1981;
Bielajew and Rogers, 1988).
This Chapter contains a general introduction to Monte Carlo methods and their
application to radiation transport. We start with a brief review of basic concepts in
probability theory, which is followed by a description of generic random sampling meth-
ods and algorithms. In Section 1.3 we consider the calculation of multidimensional
integrals by Monte Carlo methods and we derive general formulas for the evaluation
of statistical uncertainties. In Section 1.4 we present the essentials of detailed Monte
Carlo algorithms for the simulation of radiation transport in matter. Sections 1.5 and
1.6 are devoted, respectively, to the evaluation of statistical uncertainties and to the use
of variance-reduction techniques in radiation transport studies.
where p(x) is the PDF of x. Since 1) negative probabilities have no meaning and 2) the
obtained value of x must be somewhere in the interval (xmin ,xmax ), the PDF must be
20
NEA/NSC/DOC(2015)3
Any “function” that satisfies these two conditions can be interpreted as a PDF. In Monte
Carlo simulation we shall frequently use the uniform distribution,
(
1/(xmax − xmin ) if xmin ≤ x ≤ xmax ,
Uxmin ,xmax (x) ≡ (1.3)
0 otherwise,
which is discontinuous. The definition (1.2) also includes singular distributions such as
the Dirac delta, δ(x − x0 ), which is defined by the property
(
Z b f (x0 ) if a < x0 < b,
f (x)δ(x − x0 ) dx = (1.4)
a 0 if x0 < a or x0 > b
for any function f (x) that is continuous at x0 . An equivalent, more intuitive definition
is the following,
δ(x − x0 ) ≡ lim Ux0 −∆,x0 +∆ (x), (1.40 )
∆→0
which represents the delta distribution as the zero-width limit of a sequence of uniform
distributions centred at the point x0 . Hence, the Dirac distribution describes a single-
valued discrete random variable (i.e., a constant). The PDF of a random variable x
that takes the discrete values x = x1 , x2 , . . . with point probabilities p1 , p2 , . . . can be
expressed as a mixture of delta distributions,
X
p(x) = pi δ(x − xi ). (1.5)
i
21
NEA/NSC/DOC(2015)3
The moment hx0 i is simply the integral of p(x), which is equal to unity, by definition.
However, higher-order moments may or may not exist. An example of a PDF that has
no even-order moments is the Lorentz or Cauchy distribution,
1 γ
pL (x) ≡ , −∞ < x < ∞. (1.9)
π γ 2 + x2
Its first moment, and other odd-order moments, can be assigned a finite value if they
are defined as the “principal value” of the integrals, e.g.,
Z +a
1 γ
hxiL = lim x dx = 0. (1.10)
a→∞ −a π γ + x2
2
However, the second and higher even-order moments are infinite, irrespective of the way
they are defined.
The first moment, when it exists, is called the mean or expected value of the random
variable x, Z
hxi = x p(x) dx. (1.11)
Since f (x) is a random variable, it has its own PDF, π(f ), which is such that the
probability of having f in a certain interval of length df is equal to the probability of
having x in the corresponding interval or intervals1 . Thus, if f (x) is a monotonically
increasing function of x (so that there is a one-to-one correspondence between the values
of x and f ), p(x) dx = π(f ) df and
It can be shown that the definitions (1.11) and (1.12) are equivalent. If f (x) increases
monotonically with x, the proof is trivial: we can start from the definition (1.11) and
write Z Z
hf i = f π(f ) df = f (x) p(x) dx,
which agrees with (1.12). Notice that the expectation value is linear, i.e.,
22
NEA/NSC/DOC(2015)3
The square root of the variance, σ ≡ [var(x)]1/2 , is called the standard deviation (and
sometimes the standard uncertainty); it gives a measure of the dispersion of the random
variable (i.e., of the width of the PDF). The Dirac delta is the only PDF that has zero
variance. Similarly, the variance of a function f (x) is defined as
i.e., q(x) is the probability of obtaining the value x and any value of y. The joint PDF
can be expressed as
p(x, y) = q(x) p(y|x) = q(y) p(x|y), (1.19)
where
p(x, y) p(x, y)
p(x|y) = and p(y|x) = (1.20)
q(y) q(x)
are the conditional PDFs of x and y, respectively. Notice that p(x|y) is the normalised
PDF of x for a fixed value of y.
The expectation value of a function f (x, y) is
Z Z
hf (x, y)i = dx dy f (x, y) p(x, y). (1.21)
23
NEA/NSC/DOC(2015)3
In particular, Z Z Z
n n
hx i = dx dy x p(x, y) = xn q(x) dx. (1.23)
Again, the only moment that is necessarily defined is hx0 y 0 i = 1. When the correspond-
ing moments exist, the variances of x and y are given by
The variance of x + y is
where
cov(x, y) = hxyi − hxi hyi (1.26)
is the covariance of x and y, which can be positive or negative. A related quantity is
the correlation coefficient,
cov(x, y)
ρ(x, y) = p , (1.27)
var(x) var(y)
which takes values from −1 to 1. Notice that cov(x, x) = var(x). When the variables x
and y are independent, i.e., when p(x, y) = px (x) py (y), we have
24
NEA/NSC/DOC(2015)3
C *********************************************************************
C FUNCTION RAND
C *********************************************************************
FUNCTION RAND(DUMMY)
C
C This is an adapted version of subroutine RANECU written by F. James
C (Comput. Phys. Commun. 60 (1990) 329-344), which has been modified to
C give a single random number at each call.
C
C The ’seeds’ ISEED1 and ISEED2 must be initialised in the main program
C and transferred through the named common block /RSEED/.
C
IMPLICIT DOUBLE PRECISION (A-H,O-Z), INTEGER*4 (I-N)
PARAMETER (USCALE=1.0D0/2.147483563D9)
COMMON/RSEED/ISEED1,ISEED2
C
I1=ISEED1/53668
ISEED1=40014*(ISEED1-I1*53668)-I1*12211
IF(ISEED1.LT.0) ISEED1=ISEED1+2147483563
C
I2=ISEED2/52774
ISEED2=40692*(ISEED2-I2*52774)-I2*3791
IF(ISEED2.LT.0) ISEED2=ISEED2+2147483399
C
IZ=ISEED1-ISEED2
IF(IZ.LT.1) IZ=IZ+2147483562
RAND=IZ*USCALE
C
RETURN
END
on the computer (see, e.g., Kalos and Whitlock, 2008; James, 1990; Hellekalek, 1998).
Among the “good” random-number generators currently available, the simplest ones
are the so-called multiplicative congruential generators (Press and Teukolski, 1992). A
popular example of this kind of generator is the following,
25
NEA/NSC/DOC(2015)3
In our simulations we use the generator ranecu (L’Ecuyer, 1988), which was coded
in Fortran by James (1990). In our programs we use the function RAND (Table 1.1), which
differs from the one given by James in that it generates and delivers a single random
number at each call. RAND produces 32-bit floating-point numbers uniformly distributed
in the open interval between zero and one. Its period is of the order of 1018 , which
is virtually inexhaustible in practical simulations. The internal state of the generator
is completely characterised by the two integers ISEED1 and ISEED2, the seeds, whose
initial values determine the sequence of random numbers utilised during a simulation.
Our reasons for adopting the RAND generator, aside from its good random properties,
are the smallness of the state definition, just two integers, and the repeatability of the
sequence of generated random numbers.
In a typical simulation, RAND is initialised with seed values entered by the user. It
is convenient to structure the simulation program in such a way that 1) each history
(usually, a sequence of multiple random events) is completely determined by the values
of the seeds at the beginning of the history, and 2) at the end of a simulation run, the
program writes the current values of the seeds (i.e., the ones that would start a new
history) in an output file. This simple strategy allows a simulation that ended with
insufficient statistics to be resumed. It is also useful for identifying program errors that
may occur after large simulation times, a situation where interactive debugging tools are
of little help. A practical solution consists of modifying the source code to write the RAND
seeds at regular intervals, and running the program again until the error occurs. The
last pair of seeds in the output list can then be entered to start the program close to the
first occurrence of the error, which may then be investigated using available debugging
tools.
In parallel calculations we have to make sure that different processors produce truly
independent (i.e., uncorrelated) sequences of random numbers. This can be accom-
plished by feeding each processor with initial seeds that belong to a single long sequence
generated by RAND, but are far enough from each other to avoid overlap of the sub-
sequences generated by the different processors. A convenient property of the RAND
generator is that the values of the seeds after a number N of calls can be obtained
directly from the initial seeds, without calculating the intermediate stages (L’Ecuyer,
1988). Badal and Sempau (2006) have written a Fortran program that, starting from
initial seeds specified by the user, calculates the seed values after an arbitrary number
of calls. Our random sampling routines include a pre-computed list of seed pairs that
belong to a long sequence (initiated with the pair 1,1) and whose relative separation is
1014 calls. That is, if we start with the n-th seed pair, after 1014 calls to RAND we obtain
the (n + 1)-th pair. The n-th pair of seeds is loaded by calling subroutine RAND0 with
its argument equal to n.
26
NEA/NSC/DOC(2015)3
a new random variable that takes values in the interval (0,1), see Fig. 1.1. Owing to the
correspondence between x and ξ values, the PDF of ξ, pξ (ξ), and that of x, p(x), are
related by pξ (ξ) dξ = p(x) dx. Hence,
−1 −1
dξ dP(x)
pξ (ξ) = p(x) = p(x) = 1, (1.31)
dx dx
that is, ξ is distributed uniformly in the interval (0,1).
1.0
P(x)
0.8
ξ
0.6
p(x)
0.4
0.2
0.0
x
Figure 1.1: Random sampling from a distribution p(x) using the inverse-transform method.
27
NEA/NSC/DOC(2015)3
1.2.2.1 Examples
1
p(x) = Ua,b (x) = .
b−a
The sampling equation (1.32) for this PDF reads
x−a
ξ= , (1.33)
b−a
which leads to the well-known sampling formula
s = −λ ln(1 − ξ) =
˘ − λ ln ξ. (1.36)
The last equality (=)˘ indicates that the two sampling formulas are equivalent, in the
sense that they generate random values from the exponential distribution. Their equiv-
alence follows from the fact that 1 − ξ is, like ξ, a random number uniformly distributed
in (0,1). The last formula avoids one subtraction and is, therefore, somewhat faster.
• Wentzel distribution. The Wentzel distribution is defined by
A(A + 1)
p(x) = , 0 ≤ x ≤ 1, A > 0. (1.37)
(A + x)2
Aξ
x= . (1.39)
A+1−ξ
28
NEA/NSC/DOC(2015)3
where δ(x) is the Dirac distribution. Here p(x) is assumed to be defined for x in an
interval (xmin , xmax ) with xmin < 1 and xmax > N . The corresponding cumulative
distribution function is
0 if x < 1,
P
[x]
P(x) = i=1 pi if 1 ≤ x ≤ N , (1.41)
1 if x > N ,
where [x] stands for the integer part of x. Then, Eq. (1.32) leads to the sampling formula
x =1 if ξ ≤ p1
=2 if p1 < ξ ≤ p1 + p2
..
. (1.42)
Pj−1 Pj
=j if i=1 pi < ξ ≤ i=1 pi
..
.
We can define the quantities
N
X
P1 = 0, P2 = p1 , P3 = p 1 + p 2 , ..., PN +1 = pi = 1. (1.43)
i=1
To sample x we generate a random number ξ and set x equal to the index i such that
The method is illustrated in Fig. 1.2 for a discrete distribution with N = 4 values.
Notice the similarity with Fig. 1.1.
If the number N of x-values is large and the index i is searched sequentially, the
sampling algorithm given by Eq. (1.44) may be quite slow because of the large number
of comparisons needed to determine the sampled value. The easiest method to reduce
the number of comparisons is to use binary search instead of sequential search. The
algorithm for binary search, for a given value of ξ, proceeds as follows:
29
NEA/NSC/DOC(2015)3
0.4
p (x) p (3) = 5/16
0.3
0.2 p (2) = 2/16
0.1 p (1) = 1/16
0
0 1 2 3 4 5
x
0.8
P (x)
0.6
0.4
ξ
0.2
0
0 1 2 3 4 5
x
Figure 1.2: Random sampling from a discrete PDF using the inverse-transform method. The
random variable can take the values i = 1, 2, 3 and 4 with relative probabilities 1, 2, 5 and 8,
respectively.
(v) Deliver i.
When 2n < N ≤ 2n+1 , i is obtained after n+1 comparisons. This number of comparisons
is evidently much less than the number required when using purely sequential search.
Although the algorithm uses multiple divisions of integer numbers by 2, this operation
is relatively fast (much faster than the division of real numbers).
Walker (1977) described an optimal sampling method for discrete distributions, which
yields the sampled value with only one comparison. The idea underlying Walker’s
method can be easily understood by resorting to graphical arguments (Salvat, 1987).
30
NEA/NSC/DOC(2015)3
To this end, let us represent the PDF (1.40) as a histogram constructed with N bars of
width 1/N and heights N pi (see Fig. 1.3). Now, the histogram bars can be cut off at
convenient heights and the resulting pieces can be arranged to fill up the square of unit
side in such a way that each vertical line crosses, at most, two different pieces. This
arrangement can be performed systematically by selecting the lowest and the highest
bars in the histogram, say the `-th and the j-th, respectively, and by cutting the highest
bar off to complete the lowest one, which is subsequently kept unaltered. In order to
keep track of the performed transformation, we label the moved piece with the “alias”
value K` = j, giving its original position in the histogram, and we introduce the “cutoff”
value F` defined as the height of the lower piece in the `-th bar of the resulting square.
This lower piece keeps the label `. Evidently, iteration of this process eventually leads
to the complete square (after, at most, N − 1 steps). Notice that the point probabilities
pi can be reconstructed from the alias and cutoff values. We have
X
N pi = Fi + (1 − Fj )δ(i, Kj ), (1.45)
j6=i
(iv) Deliver x = i.
We see that the sampling of x involves only the generation of a random number and
one comparison (irrespective of the number N of possible outcomes). The price we
pay for this simplification reduces to doubling the number of memory locations that
are needed: the two arrays Ki and Fi are used instead of the single array pi (or Pi ).
31
NEA/NSC/DOC(2015)3
0 1
1 2 3 4
4
3
4 4
3 4 3 4 4 3 4
3
4 4
2 2 2 2
1 1 1 1
1 4 2 4 3 4 3
0 1 N 2 3 4
Figure 1.3: Graphical representation of the inverse-transform method (top) and Walker’s
aliasing method (bottom) for random sampling from the discrete distribution shown in Fig.
1.2.
Unfortunately, the calculation of alias and cutoff values is fairly involved and this limits
the applicability of Walker’s algorithm to distributions that remain constant during the
course of the simulation.
32
NEA/NSC/DOC(2015)3
Notice that this function is very steep in regions where the PDF is small. Linear interpo-
lation of P −1 (ξ) is, in general, too crude because it is equivalent to approximating p(x)
by a stepwise distribution. It is more expedient to use a rational interpolation scheme
of the type2
This implies
ξi+1 − ξi 1 1 − bi ξi+1 − ξi 1
1 + ai + bi = and = ,
xi+1 − xi p(xi ) 1 + ai + bi xi+1 − xi p(xi+1 )
33
NEA/NSC/DOC(2015)3
Thus, ai and bi are determined by the values of the PDF p(x) at the grid points xi .
Once these parameters have been calculated, the sampling formula
(1 + ai + bi )η
x = xi + (xi+1 − xi ) if ξi ≤ ξ < ξi+1 (1.54)
1 + ai η + bi η 2
gives random values of x that are exactly distributed according to the PDF
!−1
e−1 (ξ)
dP (1 + ai η + bi η 2 )2 ξi+1 − ξi
pe(x) = = 2
if xi ≤ x < xi+1 . (1.55)
dξ (1 + ai + bi )(1 − bi η ) xi+1 − xi
From Eq. (1.53a) we see that bi is always less than unity and, therefore, the denominator
in expression (1.55) is positive, i.e., pe(x) is positive, as required for a proper PDF. To
calculate pe(x) for a given x, we have to determine the value of η by solving Eq. (1.54).
The root that satisfies the conditions η = 0 for x = xi and η = 1 for x = xi+1 is
" s #
1 + ai + bi − ai τ 4bi τ 2 x − xi
η= 1− 1− , τ ≡ . (1.56)
2bi τ (1 + ai + bi − ai τ )2 xi+1 − xi
It is worth noting that the distributions p(x) and pe(x) not only coincide at the
grid points xi , but also their integrals over the interval (xi , xi+1 ) are equal, i.e., pe(x)
gives the correct probability of finding x in each interval. The PDF (1.55) turns out
to be fairly flexible and can approximate smooth PDFs over relatively wide intervals
to good accuracy. Furthermore, because formula (1.54) involves only a few arithmetic
operations, random sampling will be faster than with alternative interpolation schemes
that lead to sampling formulas involving transcendental functions.
The key to ensure accuracy of the sampling is to set a suitable grid of x-values, xi
(i = 1, . . . , N ), such that errors introduced by the rational interpolation (1.55) are
negligible (say, of the order of 0.01% or less). A simple, and effective strategy for
defining the x-grid is the following. We start with a uniform grid of ∼ 10 equally
spaced x-values. The cumulative distribution function at these grid points, P(xi ) = ξi ,
is evaluated numerically (see below). After calculating the parameters ai and bi of the
interpolating PDF, Eq. (1.55), the interpolation “error” in the i-th interval (xi , xi+1 ) is
defined as Z xi+1
i = |p(x) − pe(x)| dx, (1.57)
xi
where the integral is evaluated numerically using the trapezoidal rule. To reduce the
interpolation error efficiently, new points xi are added where the error is larger. The
position of each new point is selected at the midpoint of the interval j with the largest
value. After inserting each new point, the interpolation parameters ai and bi , for the
two new intervals (the two halves of the initial j-th interval) are evaluated, as well as
34
NEA/NSC/DOC(2015)3
the corresponding interpolation errors i , Eq. (1.57). The process is iterated until the
last, N -th, grid point has been set. Obviously, to reduce the interpolation error we only
need to increase the number N of grid points.
Using this strategy to set new grid points, the algorithm is self-adaptive: grid points
automatically accumulate in intervals where the PDF and its approximation (1.55) differ
most. If the number N of grid points is large enough, the functions p(x) and pe(x) vary
smoothly within each grid interval (xi , xi+1 ). Integrals of those functions over grid
intervals can then be calculated accurately by using simple quadrature formulas. In our
implementation of the algorithm, we use the extended Simpson rule with 51 equally-
spaced points,
Z xi+1
hh i
f (x) dx = f0 + 4 f1 + f3 + · · · f49 + 2 f2 + f4 + · · · + f48 + f50
xi 3
25 5 (iv) ∗
− h f (x ), (1.58)
90
where h = (xi+1 − xi )/50, fk = f (xi + kh), and f (iv) (x∗ ) is the fourth derivative of the
function f (x) at an unknown point x∗ in the interval (xi , xi+1 ).
Figure 1.4 displays the rational interpolation, Eq. (1.55), of the analytical PDF
defined in the inset and limited to the interval (0,5). The crosses indicate the points
of the grid for N = 32. Agreement between the interpolating PDF (dashed curve, not
visible) and the original distribution is striking. The rational interpolation is seen to
very closely reproduce the curvature of the original distribution, even when the grid
points are quite spaced. The lower plot in Fig. 1.4 represents the local interpolation
error i in each interval of the grid (as a stepwise function for visual aid); the maximum
error in this case is 3.2 × 10−4 . For a denser grid with N = 128 values, the maximum
error decreases to 8.3 × 10−7 .
After determining the interpolation grid and the parameters of the rational interpolation,
xi , ξi = P(xi ), ai , bi (i = 1, . . . , N ), (1.59)
the sampling from the distribution (1.55) can be performed exactly by using the following
algorithm:
35
NEA/NSC/DOC(2015)3
0.4
0.2
0
3
ǫi × 104
2
1
0
0 1 2 3 4 5
x
Figure 1.4: Rational interpolation of the continuous PDF defined by the analytical expres-
sion indicated in the inset and restricted to the interval (0,5). The crosses are grid points
determined as described in the text with N = 32. The rational interpolating function given
by Eq. (1.55) is represented by a dashed curve, which is not visible on this scale. The lower
plot displays the interpolation error i .
The sampling speed decreases (slowly) when the number N of grid points increases,
due to the increasing number of comparisons needed in step (ii). This loss of speed
can be readily avoided by using Walker’s aliasing (Section 1.2.3.1) to sample the grid
interval. Walker’s method requires only a single comparison and, hence, the algorithm
becomes optimal, at the expense of some additional memory storage. A drawback of
Walker’s method is that the sampled value x is not a continuous function of the random
number ξ. This feature impedes the use of the method for sampling the variable in a
restricted domain, as needed, e.g., in mixed simulations of electron transport. A less
sophisticated procedure to reduce the number of comparisons, which is free from this
drawback (the generated x values increase monotonically with ξ), consists of providing
pre-calculated limits (e.g., tabulated as functions of the integer variable k = [ξN ]) for
the range of interval indices i that needs to be explored. In practical calculations, this
procedure is only slightly slower than Walker’s aliasing. The present sampling algorithm,
36
NEA/NSC/DOC(2015)3
either with Walker’s aliasing or with pre-calculated index intervals, will be referred to as
the RITA (Rational Inverse Transform with Aliasing) algorithm. In penelope, RITA is
used to simulate elastic collisions of electrons and positrons (Section 3.1), and coherent
(Rayleigh) scattering of photons (Section 2.2).
Cπ(x)
1 r(x)
A
p(x)
0
x
Figure 1.5: Random sampling from a distribution p(x) using a rejection method.
37
NEA/NSC/DOC(2015)3
between the x-axis and the curve y = p(x) and hence, their x-coordinate is distributed
according to p(x).
A rejection method is thus completely specified by representing the PDF p(x) as
where π(x) is a PDF that can be easily sampled, e.g., by the inverse-transform method,
C is a positive constant and the function r(x) satisfies the conditions 0 ≤ r(x) ≤ 1. The
rejection algorithm for sampling from p(x) proceeds as follows:
(iv) Deliver x.
From the geometrical arguments given above, it is clear that the algorithm does
yield x values distributed according to p(x). The following is a more formal proof:
Step (i) produces x-values in the interval (x, x + dx) with probability π(x) dx, these
values are accepted with probability r(x) = p(x)/[Cπ(x)] and, therefore, (apart from
a normalisation constant) the probability of delivering a value in (x, x + dx) is equal
to p(x) dx as required. It is important to realise that, as regards Monte Carlo, the
normalisation of the simulated PDF is guaranteed by the mere fact that the algorithm
delivers some value of x.
The efficiency of the algorithm, i.e., the probability of accepting a generated x-value,
is Z b
1
= r(x)π(x) dx = . (1.63)
a C
Graphically, the efficiency equals the ratio of the areas under the curves y = p(x) and
y = Cπ(x), which are 1 and C, respectively. For a given π(x), since r(x) ≤ 1, the
constant C must satisfy the condition Cπ(x) ≥ p(x) for all x. The minimum value of
C, with the requirement that Cπ(x) = p(x) for some x, gives the optimum efficiency.
The PDF π(x) in Eq. (1.62) should be selected in such a way that the resulting
sampling algorithm is as fast as possible. In particular, random sampling from π(x)
must be performed rapidly, by the inverse-transform method or by the composition
method (see below). High efficiency is also desirable, but not decisive. One hundred
percent efficiency is obtained only with π(x) = p(x) (however, random sampling from
this PDF is just the problem we want to solve); any other PDF gives a lower efficiency.
The usefulness of the rejection method lies in the fact that a certain loss of efficiency
can be largely compensated with the ease of sampling x from π(x) instead of p(x). A
disadvantage of this method is that it requires the generation of several random numbers
ξ to sample each x-value.
38
NEA/NSC/DOC(2015)3
It is now evident that to generate random points (x, y) from p(x, y) we can first sample
y from q(y) and then x from p(x|y). Hence, two-dimensional random variables can be
generated by using single-variable sampling methods. This is also true for multivariate
distributions because an n-dimensional PDF can always be expressed as the product of
a single-variable marginal distribution and an (n − 1)-dimensional conditional PDF.
From the definition of the marginal PDF of x,
Z Z
q(x) ≡ p(x, y) dy = q(y) p(x|y) dy, (1.65)
it is clear that if we sample y from q(y) and, then, x from p(x|y), the generated values of
x are distributed according to q(x). This idea is the basis of composition methods, which
are applicable when p(x), the distribution to be simulated, is a probability mixture of
several PDFs. More specifically, we consider that p(x) can be expressed as
Z
p(x) = w(y) py (x) dy, (1.66)
The composition method for random sampling from the PDF p(x) is as follows. First,
a value of y (or i) is drawn from the PDF w(y) and then x is sampled from the PDF
py (x) for that chosen y.
This technique may be applied to generate random values from complex distributions
obtained by combining simpler distributions that are themselves easily generated, e.g.,
by the inverse-transform method or by rejection methods.
Devising fast, exact methods for random sampling from a given PDF is an interesting
technical challenge. The ultimate criterion for the quality of a sampling algorithm is its
39
NEA/NSC/DOC(2015)3
speed in actual simulations: the best algorithm is the fastest. However, programming
simplicity and elegance may justify the use of slower algorithms. For simple analyti-
cal distributions that have an analytical inverse cumulative distribution function, the
inverse-transform method is usually satisfactory. This is the case for a few elementary
distributions (e.g., the uniform and exponential distributions considered above). The
inverse-transform method is also adequate for discrete distributions, particularly when
combined with Walker’s aliasing. The adaptive sampling algorithm RITA, described in
Section 1.2.4, provides a practical method for sampling from continuous single-variate
PDFs, defined either analytically or in numerical form; this algorithm is fast and quite
accurate, but it is not exact. By combining the inverse-transform, rejection and com-
position methods we can devise exact sampling algorithms for virtually any (single- or
multivariate) PDF.
1.2.6.1 Examples
1
pG (x) = √ exp(−x2 /2). (1.68)
2π
Since the cumulative distribution function cannot be inverted analytically, the inverse-
transform method is not appropriate. The easiest (but not the fastest) method to sample
from the normal distribution consists of generating two independent random variables at
a time, as follows. Let x1 and x2 be two independent normal variables. They determine
a random point in the plane with PDF
1
p2G (x1 , x2 ) = pG (x1 ) pG (x2 ) = exp[−(x21 + x22 )/2].
2π
Introducing the polar coordinates r and φ,
x1 = r cos φ, x2 = r sin φ,
We see that r and φ are independent random variables. The angle φ is distributed
uniformly on (0,2π) and can be sampled as φ = 2πξ. The PDF of r is exp(−r2 /2) r and
the corresponding cumulative distribution function is P(r) = 1−exp(−r2 /2). Therefore,
r can be generated by the inverse-transform method as
p p
r = −2 ln(1 − ξ) = ˘ −2 ln ξ.
40
NEA/NSC/DOC(2015)3
where ξ1 and ξ2 are two independent random numbers. This procedure is known as the
Box-Müller method. It has the advantages of being exact and easy to program (it can
be coded as a single Fortran statement).
The mean and variance of the normal variable are hxi = 0 and var(x) = 1. The
linear transformation
X = m + σx (σ > 0) (1.70)
defines a new random variable. From the properties (1.14) and (1.29), we have
The PDF of X is
(X − m)2
dx 1
p(X) = pG (x) = √ exp − , (1.72)
dX σ 2π 2σ 2
41
NEA/NSC/DOC(2015)3
θ ˆd
y
φ
x
by introducing an arbitrary PDF p(x) and setting f (x) = F (x)/p(x) [it is assumed that
p(x) > 0 in (a, b) and p(x) = 0 outside this interval]. The Monte Carlo evaluation of the
42
NEA/NSC/DOC(2015)3
integral I is very simple: generate a large number N of random points xi from the PDF
p(x) and accumulate the sum of values f (xi ) in a counter. At the end of the calculation
the expected value of f is estimated as
N
1 X
f≡ f (xi ). (1.80)
N i=1
In statistical terminology, this means that f , the Monte Carlo result, is a consistent
estimator of the integral (1.78). This is valid for any function f (x) that is finite and
piecewise continuous, i.e., with a finite number of discontinuities.
The law of large numbers (1.81) can be restated as
N
1 X
hf i = lim f (xi ). (1.82)
N →∞ N
i=1
By applying this law to the integral that defines the variance of f (x) [cf. Eq. (1.16)]
Z
var{f (x)} = f 2 (x) p(x) dx − hf i2 , (1.83)
we obtain " #2
N
1 X N
2 1 X
var{f (x)} = lim [f (xi )] − f (xi ) . (1.84)
N →∞ N N i=1
i=1
43
NEA/NSC/DOC(2015)3
where use has been made of properties of the expectation and variance operators. The
standard deviation (or standard error) of f ,
r
var{f (x)}
q
σf ≡ var(f ) = , (1.87)
N
gives a measure of the statistical uncertainty of the Monte Carlo estimate f . The
result (1.87) has an important practical implication: in order to reduce the statistical
uncertainty by a factor of 10, we have to increase the sample size N by a factor of
100. Evidently, this sets a limit to the accuracy that can be attained with the available
computer power.
We can now invoke the central-limit theorem (see, e.g., James, 1980), which estab-
lishes that, in the limit N → ∞, the PDF of f is a normal (Gaussian) distribution with
mean hf i and standard deviation σf ,
!
1 (f − hf i)2
p(f ) = √ exp − . (1.88)
σf 2π 2σf2
It follows that, for sufficiently large values of N , for which the theorem is applicable,
the interval f ± nσf contains the exact value hf i with a probability of 68.3% if n = 1,
95.4% if n = 2 and 99.7% if n = 3 (3σ rule).
The central-limit theorem is a very powerful tool because it predicts that the gen-
erated values of f follow a specific distribution, but it applies only asymptotically. The
minimum number N of sampled values needed to apply the theorem with confidence
depends on the problem under consideration. If, in the case of our problem, the third
central moment of f , Z
µ3 ≡ [f (x) − hf i]3 p(x) dx, (1.89)
44
NEA/NSC/DOC(2015)3
45
NEA/NSC/DOC(2015)3
xi = (i − 1/2)h. This sets a partition of the unit cube into N = nD cubic cells of volume
hD centred at the positions (xi1 , xi2 , . . . , xiD ). The integral (1.93) can then be expressed
as the sum of contributions from each cell,
n Z
X xi1 +h/2 n Z
X xiD +h/2
I = du1 . . . duD F (u1 , . . . , uD ). (1.94)
i1 =1 xi1 −h/2 iD =1 xiD −h/2
Within each cell, we can approximate the integrand by its Taylor expansion about the
centre of the cell,
D
X ∂F (u1 , . . . , uD )
F (u1 , . . . , uD ) = F (xi1 , . . . , xiD ) + (uj − xij )
j=1
∂uj {u` =xi` }
D 2
1 X ∂ F (u1 , . . . , uD )
+ (uj − xij )(uk − xik ) + . . . , (1.95)
2 j,k=1 ∂uj ∂uk {u` =xi } `
where {u` = xi` } denotes the set of coordinates of the centre of the cell. If we retain
only the constant zero-order terms in this expansion, we obtain the following first-order
estimate of the integral:
n
X n
X
D
Inum = h ... F (xi1 , . . . , xiD ). (1.96)
i1 =1 iD =1
This formula involves only the N values of the function F (u1 , . . . , uD ) at the centres of
the N cells; it is essentially equivalent to the trapezoidal rule (see, e.g., Abramowitz and
Stegun, 1972). The error, (∆I)num = I − Inum , can be estimated from the higher-order
terms in the Taylor expansion (1.95). All the linear terms with (uj − xij ), and all the
quadratic terms with (uj −xij )(uk −xik ) and j 6= k give vanishing contributions [because
the factors (uj − xij ) are antisymmetric with respect to the centre of the cell], and we
have
n Z xi +h/2 n Z xi +h/2 D
X 1 X D 1X
(uj − xij )2 ∂ 2 F/∂u2j {u =x }
(∆I)num = du1 . . . duD
i =1 xi1 −h/2 i =1 xiD −h/2
2 j=1 ` i`
1 D
n n XD
1 X X
= hD+2
2
∂ F/∂u2j {u =x } .
... (1.97)
24 i =1 i =1 j=1 ` i`
1 D
Recalling that h = 1/n = N −1/D , the relative error of the numerical integral can be
expressed as
(∆I)num /Inum = N −2/D enum , (1.98)
with Pn Pn PD 2
2
i1 =1 . . . iD =1 j=1 ∂ F/∂u j {u` =xi` }
enum = Pn Pn . (1.99)
24 i1 =1 . . . iD =1 F (xi1 , . . . , xiD )
46
NEA/NSC/DOC(2015)3
Let us now consider the crude Monte Carlo calculation of the integral (1.93) with
random points sampled uniformly in the unit cube, i.e., with p(u1 , . . . , uD ) = 1. The
relative (1σ) uncertainty of a Monte Carlo estimate, with the same number N of samples
as cells in the numerical calculation, is [see Eq. (1.87)]
p
−1/2 var{F (u1 , . . . , uD )}
(∆I)MC /IMC = N eMC , with eMC = . (1.100)
IMC
The important fact here is that the error of numerical quadrature is proportional to
N −2/D while the statistical uncertainty of the Monte Carlo estimate is proportional to
N −1/2 . Evidently, the calculation of the N values of the integrand takes the same time
for both Monte Carlo and numerical quadrature. Furthermore, the amount of numerical
work needed for performing the rest of the calculation (sums and averages) is similar
for both techniques. Therefore, assuming that the proportionality factors enum and eMC
in Eqs. (1.99) and (1.100) are both finite, and that the number N of cells and samples
is sufficiently large, we conclude that the Monte Carlo method will yield more accurate
results than first-order numerical quadrature for dimensions D > 4.
It can be argued that with a more elaborate algorithm, numerical quadrature could
beat Monte Carlo for dimensions higher than 4, and this may well be the case for specific
problems with smooth functions. For instance, if we adopt the Simpson rule (see, e.g.,
Abramowitz and Stegun, 1972), which is analogous to retaining terms up to second order
in the expansion (1.95), the relative error of the numerical result would be proportional
to N −4/D ,
(∆I)num /Inum = N −4/D e0num , (1.101)
with e0num given by an expression similar to (1.99), but with fourth-order derivatives
(cubic terms in (1.95) yield vanishing contributions, by symmetry). In this case, Monte
Carlo is only expected to be more efficient than numerical quadrature for dimensions
D > 8.
In turn, it may be claimed that with the aid of suitable variance-reduction techniques,
the efficiency of Monte Carlo methods can be increased and make Monte Carlo more
advantageous than numerical quadrature. In addition, the foregoing analysis is based
on the assumption that the integrand in Eq. (1.93) can be evaluated exactly. In high-
dimensionality problems, straight calculation of the function F (u1 , . . . , uD ) may be very
difficult and we may need to have recourse to interpolations or approximations. If
the calculation of the integrand introduces errors with strong short-range correlations,
the accuracy of numerical quadrature may be seriously impaired. The sensitivity of
numerical quadrature to local errors of the integrand is determined by the order of
the derivatives in the error factor enum ; higher-order formulas are more sensitive to
local errors. In this respect, low-order quadrature formulas (such as the trapezoidal
rule studied above) are favoured, and this gives a distinct advantage to Monte Carlo
methods.
In practice, the efficiencies of Monte Carlo integration and numerical quadrature
depend to a great extent on the details of a given problem. The utility of Monte Carlo
47
NEA/NSC/DOC(2015)3
methods stems not only from the convenient properties of statistical uncertainties for
high-dimensionality problems, but also from the ease with which simulation methods
can handle complicated geometries.
48
NEA/NSC/DOC(2015)3
d2 σ Ṅcount
≡ . (1.103)
dΩ dW |Jinc | dΩ dW
The DCS has the dimensions of area/(solid angle × energy); the product [d2 σ/(dΩ dW )]
×dΩ dW represents the area of a plane surface that, placed perpendicularly to the
incident beam, is hit by as many projectiles as are scattered into directions d̂0 within
dΩ with energy loss between W and W + dW .
x
dΩ, dW
φ ˆd′, E-W
d̂, E θ
Jinc
z
T
y
Figure 1.7: Schematic diagram of an experiment to measure the DCS. Incident particles
move in the direction of the z axis; θ and φ are the polar and azimuthal scattering angles,
respectively (cf. Fig. 1.6).
The energy-loss DCS, differential in only the energy loss, is obtained by integrating
the double-differential DCS over directions,
d2 σ
Z
dσ
≡ dΩ. (1.104)
dW dΩ dW
3
The current density vector Jinc is parallel to the direction of incidence d̂ and its magnitude is equal
to the number of incident particles that cross a small probe surface, perpendicular to the beam and at
rest with respect to the target, per unit time and unit probe surface.
49
NEA/NSC/DOC(2015)3
The total cross section σ is defined as the integral of the energy-loss DCS over the energy
loss,
Z E Z E Z
d2 σ
dσ
σ≡ dW = dΩ dW. (1.105)
0 dW 0 dΩ dW
Geometrically, the total cross section gives the area of a plane surface that, when placed
perpendicularly to the incident beam, is crossed by the same number of projectiles that
undergo interactions with any angular deflection and energy loss.
Let us consider that our particles move within a random-scattering medium with N
molecules per unit volume. We wish to determine the PDF p(s) of the path length s
of a particle from its current position to the site of the next interaction. To get a more
visual picture of the interaction process, we can replace each molecule by a sphere of
radius rs such that the cross-sectional area πrs2 equals the total cross section σT . An
interaction takes place when the particle strikes one of these spheres.
We can start by studying a simpler situation, in which a homogeneous beam of
particles impinges normally on a very thin material foil of thickness ds (see Fig. 1.8).
What the incident particles see directly ahead of their path is a uniform distribution of
N ds spheres per unit surface. Let J be the current density of the incident beam. The
current density of particles transmitted through the foil without interacting is J − dJ,
where dJ = J N σ ds is the number of particles that undergo interactions per unit
time and unit surface of the foil (note that N σ ds is the fractional area covered by the
spheres). Therefore, the interaction probability per unit path length is
dJ 1
= N σ. (1.106)
J ds
J N J — dJ
dJ = J Nσ ds
ds
50
NEA/NSC/DOC(2015)3
Let us now return to our original problem, where particles move within an unbounded
medium. The probability that a particle travels a path length s without interacting is
Z ∞
F(s) = p(s0 ) ds0 . (1.107)
s
The probability p(s) ds of having the next interaction when the travelled length is in the
interval (s, s + ds) equals the product of F(s) (the probability of arrival at s without
interacting) and N σ ds (the probability of interacting within ds). It then follows that
Z ∞
p(s) = N σ p(s0 ) ds0 . (1.108)
s
The solution of this integral equation, with the boundary condition p(∞) = 0, is the
familiar exponential distribution
The mean free path λ is defined as the average path length between collisions:
Z ∞
1
λ ≡ hsi = s p(s) ds = . (1.110)
0 Nσ
Its inverse,
λ−1 = N σ, (1.111)
is the interaction probability per unit path length.
51
NEA/NSC/DOC(2015)3
symmetrical around the direction of incidence. The total cross sections (per molecule)
for mechanisms A and B are
Z E Z π
d2 σA,B (E; θ, W )
σA,B (E) = dW 2π sin θ dθ . (1.113)
0 0 dΩ dW
The total interaction cross section is
λ−1
T = N σT . (1.115)
Notice that the total inverse mean free path is the sum of the inverse mean free paths
of the different active interaction mechanisms,
λ−1 −1 −1
T = λA + λB . (1.116)
The PDF of the path length s of a particle from its current position to the site of
the next collision is
p(s) = λ−1
T exp (−s/λT ) . (1.117)
The average path length between interactions equals the (total) mean free path,
When the particle interacts with the medium, the kind of interaction that occurs is a
discrete random variable, that takes the values “A” and “B” with probabilities
The PDFs of the polar scattering angle and the energy loss in individual scattering
events are
2π sin θ d2 σA,B (E; θ, W )
pA,B (E; θ, W ) = . (1.120)
σA,B (E) dΩ dW
Notice that pA (E; θ, W ) dθ dW gives the (normalised) probability that, in a scattering
event of type A, the particle loses energy in the interval (W, W + dW ) and is deflected
into directions with polar angle (relative to the initial direction) in the interval (θ,
θ + dθ). The azimuthal scattering angle in each collision is uniformly distributed in the
interval (0, 2π), i.e.,
1
p(φ) = . (1.121)
2π
Our analysis of the interactions in a random-scattering medium involves the DCSs,
which describe the interactions with individual molecules, and the density of molecules
N , which characterises the macroscopic state of the medium. In cases where the DCSs
are affected by the aggregation state of the medium, it could be more appropriate to
52
NEA/NSC/DOC(2015)3
describe each interaction mechanism by means of the so-called differential inverse mean
free path. The differential inverse mean free path for the interaction process A is defined
as
d2 λ−1
A (E; θ, W ) d2 σA (E; θ, W )
=N . (1.122)
dΩ dW dΩ dW
The differential inverse mean free path has the dimensions of (length × solid angle
× energy)−1 ; the product [d2 λ−1 A /(dΩ dW )] dΩ dW is the probability per unit path
length that a particle undergoes a collision of type A with angular deflection within
dΩ and energy loss between W and W + dW . Evidently, the integral of the differential
inverse mean free path gives the inverse mean free path for the process,
d2 λ−1
Z Z
−1 A (E; θ, W )
λA = dW 2π sin θ dθ = N σA . (1.123)
dΩ dW
In the literature, the product N σA is frequently called the macroscopic cross section,
although this name is not appropriate for a quantity that has the dimensions of inverse
length.
s = −λT ln ξ. (1.124)
The interaction type (“A” or “B”) is selected from the point probabilities given by Eq.
(1.119) using the inverse-transform method (Section 1.2.3). The polar scattering angle
53
NEA/NSC/DOC(2015)3
θ and the energy loss W are sampled from the distribution pA,B (E; θ, W ), Eq. (1.120),
by using a suitable sampling technique. The azimuthal scattering angle is generated,
according to the uniform distribution in (0, 2π), as φ = 2πξ.
ˆz φ
ˆy
ˆx
ˆrn+1 θ
ˆdn+1 = (u ,v ,w )
′ ′ ′
ˆdn = (u,v,w)
After sampling the values of W , θ and φ, the energy of the particle is reduced,
En+1 = En − W , and the direction of movement after the interaction, d̂n+1 = (u0 , v 0 , w0 ),
is obtained by performing a rotation of d̂n = (u, v, w) (see Fig. 1.9). The rotation matrix
R(θ, φ) is determined by the polar and azimuthal scattering angles. To explicitly obtain
the direction vector d̂n+1 = R(θ, φ)d̂n after the interaction, we first note that, if the
initial direction is along the z-axis, d̂n = ẑ = (0, 0, 1), the direction after the collision
is4
sin θ cos φ 0
sin θ sin φ = R(φẑ)R(θŷ) 0 , (1.126)
cos θ 1
where
cos θ 0 sin θ cos φ − sin φ 0
R(θŷ) = 0 1 0 and R(φẑ) = sin φ cos φ 0 (1.127)
− sin θ 0 cos θ 0 0 1
are rotation matrices corresponding to active rotations of angles θ and φ about the y-
and z-axes, respectively. On the other hand, if ϑ and ϕ are the polar and azimuthal
angles of the initial direction
d̂n = (sin ϑ cos ϕ, sin ϑ sin ϕ, cos ϑ), (1.128)
the rotation R(−ϑŷ)R(−ϕẑ) transforms the vector d̂n into ẑ. It is then clear that
the final direction vector d̂n+1 can be obtained by performing the following sequence
4
Vectors are defined by specifying their Cartesian components. When a vector is defined within a
paragraph, or in a displayed equation, it is customary to represent it as a one-row matrix. However, in
the product of a matrix by a vector, the vector must be represented as a one-column matrix.
54
NEA/NSC/DOC(2015)3
cos θ
and its direction cosines are
sin θ
u0 = u cos θ + √ [uw cos φ − v sin φ] ,
1 − w2
sin θ
v 0 = v cos θ + √ [vw cos φ + u sin φ] , (1.131)
1 − w2
√
w0 = w cos θ − 1 − w2 sin θ cos φ.
These equations are indeterminate when w ' ±1, i.e., when the initial direction is
nearly parallel or antiparallel to the z-axis; in this case we can simply set
u0 = ± sin θ cos φ, v 0 = ± sin θ sin φ, w0 = ± cos θ. (1.132)
In addition, Eqs. (1.131) are not very stable numerically and the normalisation of d̂n+1
tends to drift from 1 after repeated usage. This must be remedied by periodically
renormalising d̂n+1 . The change of direction expressed by Eqs. (1.131) and (1.132) is
performed by the subroutine DIRECT (see the penelope source file).
The simulation of the track then proceeds by repeating these steps (see Fig. 1.10). A
track is finished either when it leaves the material system or when the energy becomes
smaller than a given energy Eabs , which is the energy where particles are assumed to be
effectively stopped and absorbed in the medium.
It is worth recalling that the kind of analogue trajectory model that we have described
is only valid when diffraction effects resulting from coherent scattering from several
centres (e.g., Bragg diffraction, channelling of charged particles) are negligible. This
means that the simulation is applicable only to amorphous media and, with some care,
to polycrystalline solids.
55
NEA/NSC/DOC(2015)3
Figure 1.10: Generation of random trajectories using detailed simulation. A particle enters
material 1 from the vacuum and, after multiple interactions, crosses the interface between
materials 1 and 2.
variable (interaction event) are statistically determined by present events and depend
only on the event immediately preceding”. Owing to the Markovian character of the
transport, we can stop the generation of a particle history at an arbitrary state (any
point of the track) and resume the simulation from this state without introducing any
bias in the results.
Up to this point we have considered transport in a single homogeneous medium.
In practical cases, however, the material structure where radiation is transported may
consist of various regions with different compositions. We assume that the interfaces
between contiguous media are sharp (i.e., there is no diffusion of chemical species across
them) and passive (which amounts to neglecting, e.g., surface plasmon excitation and
transition radiation). In the simulation code, when a particle arrives at an interface, it
is stopped there and the simulation is resumed with the interaction properties of the
new medium. Obviously, this procedure is consistent with the Markovian property of
the transport process. Thus, interface crossings are consistently described by means
of simple geometrical considerations. The main advantage of Monte Carlo simulation
lies in the ease of handling complicated geometries; this is at variance with conventional
numerical methods, which find great difficulties in accommodating non-trivial boundary
conditions.
Consider two homogeneous media, 1 and 2 (with corresponding mean free paths λT,1
and λT,2 ), separated by an interface, which is crossed by particles that move from the
first medium to the second (as in Fig. 1.10). The average path length between the last
real interaction in medium 1 and the first real interaction in medium 2 is λT,1 + λT,2 ,
as can be easily verified by simulation. This result seemed paradoxical to some authors
and induced confusion in the past. In fact, there is nothing odd here as it can be easily
verified (again by simulation) as follows. Assume particles being transported within a
single homogeneous medium with an imaginary plane that acts as a “virtual” interface,
splitting the medium into two halves. In the simulation, the particles do not see this
56
NEA/NSC/DOC(2015)3
interface, i.e., they do not stop when crossing it. Every time a particle crosses the
plane, we score the length splane of the track segment between the two real interactions
immediately before and after the crossing. It is found that the average value of splane
is 2λT , in spite of the fact that the free path length between consecutive collisions was
sampled from an exponential PDF with the mean free path λT [yes, the scored values
splane were generated from this PDF!]. The explanation of this result is that, as a
consequence of the Markovian character, the average path length from the plane (an
arbitrary fixed point in the track) back to the last collision (or up to the next collision)
is λT .
In mixed simulations of electron/positron transport, it is necessary to limit the length
s of each “free jump” so that it does not exceed a given value smax . To accomplish this,
we still sample the free path length s to the next interaction from the exponential PDF
(1.117), but when s > smax we only let the particle advance a distance smax along the
direction of motion. At the end of the truncated free jump we do nothing (i.e., the
particle keeps its energy and direction of motion unaltered); however, for programming
convenience, we shall say that the particle suffers a delta interaction (actually, a “non-
interaction”). When the sampled value of s is less than smax , a real interaction is
simulated. After the interaction (either real or delta), we sample a new free path s,
move the particle a distance s0 = min(s, smax ), etc. From the Markovian character of
the transport, it is clear that the insertion of delta interactions keeps the simulation
unbiased. If this is not immediately clear, here is a direct proof. First we note that the
probability that a free jump ends with a delta interaction is
Z ∞
pδ = p(s) ds = exp(−smax /λT ). (1.133)
smax
To obtain the probability p(s) ds of having the first real interaction at a distance in the
interval (s, s + ds), we write s = nsmax + s0 with n = [s/smax ] and, hence, s0 < smax .
The sought for probability is then equal to the probability of having n successive delta
interactions followed by a real interaction at a distance in (s0 , s0 + ds) from the last,
n-th, delta interaction,
57
NEA/NSC/DOC(2015)3
where p(x) represents the PDF of the set x of random variables which determine the
score q(x). Although in radiation transport problems this PDF is usually unknown, the
simulation of individual showers provides a practical method to generate a set of random
values of the variables x and the associated value of q(x). The only difference to the
case of Monte Carlo integration considered above is that now the PDF p(x) describes
a cascade of random interaction events, each with its characteristic PDF. The Monte
Carlo estimate of Q is
N
1 X
Q= qi , (1.136)
N i=1
where qi is the score of the i-th simulated shower. Thus, for instance, the average energy
Edep deposited within the water phantom per incident electron is obtained as
N
1 X
Edep = ei , (1.137)
N i=1
where ei is the energy deposited by all the particles of the i-th shower. The statistical
uncertainty (standard deviation) of the Monte Carlo estimate [Eq. (1.87)] is
v " #
N
r u
var(q) u 1 1 X 2
σQ = =t qi2 − Q . (1.138)
N N N i=1
As mentioned above, we shall usually express the simulation result in the form Q ±
3σQ , so that the interval (Q − 3σQ , Q + 3σQ ) contains the true value Q with 99.7%
probability. Notice that to evaluate the standard deviation (1.138) we must score the
squared contributions qi2 . In certain cases, the contributions qi can only take the values
0 and 1, and the standard error can be determined without scoring the squares,
r
1
σQ = Q(1 − Q). (1.139)
N
58
NEA/NSC/DOC(2015)3
D MC(z )
Dk ± 3σDk
zk−1 zk z
Figure 1.11: Typical continuous distribution generated by a Monte Carlo simulation, rep-
resented as a histogram. With the definition given by Eq. (1.143), the area of the histogram
is independent of the bin size, except for statistical uncertainties.
backscattered radiation), Edep is less than the kinetic energy Einc of the incident elec-
trons. We are interested in determining D(z) in a limited depth interval, say from
z = zmin to z = zmax . The calculation proceeds as follows. First of all, we have to
select a partition of the interval (zmin , zmax ) into M different depth bins (zk−1 , zk ), with
zmin = z0 < z1 < · · · < zM = zmax . Let eij,k denote the amount of energy deposited
into the k-th bin by the j-th particle of the i-th shower (each incident electron may
produce multiple secondary particles). The average energy deposited into the k-th bin
(per incident electron) is obtained as
N
1 X X
Ek = ei,k with ei,k ≡ eij,k , (1.140)
N i=1 j
The Monte Carlo depth-dose distribution DMC (z) is a stepwise constant function (see
Fig. 1.11),
DMC (z) = Dk ± 3σDk for zk−1 < z < zk (1.142)
with
1 1
Dk ≡ Ek , σDk ≡ σEk . (1.143)
zk − zk−1 zk − zk−1
Notice that the bin average and standard deviation have to be divided by the bin width
to obtain the final Monte Carlo distribution. Defined in this way, DMC (z) is an unbiased
59
NEA/NSC/DOC(2015)3
estimator of the average energy deposited per unit depth in each bin. The limitation here
is that we are approximating the continuous distribution D(z) as a histogram with finite
bar widths. In principle, we could obtain a closer approximation by using narrower bins.
However, care has to be taken in selecting the bin widths because statistical uncertainties
may completely hide the information in narrow bins.
A few words regarding programming details are in order. To evaluate the average
deposited energy and its standard deviation for each bin, Eqs. (1.140) and (1.141), we
must score the shower contributions ei,k and their squares e2i,k . There are cases in which
the literal application of this recipe may take a large fraction of the simulation time.
Consider, for instance, the simulation of the 3D dose distribution in the phantom, which
may involve several thousand volume bins. For each bin, the energies eij,k deposited by
the individual particles of a shower must be accumulated in a partial counter to obtain
the shower contribution ei,k and, after completion of the whole shower, the value ei,k
and its square must be added to the accumulated counters. As only a small fraction of
the bins receive energy from a single shower, it is not practical to treat all bin counters
on an equal footing. The fastest method is to transfer partial scores to the accumulated
counters only when the partial counter will receive a contribution from a new shower.
This can be easily implemented in a computer program as follows. For each quantity of
interest, say Q, we define three real counters, Q, Q2 and QP, and an integer label LQ; all
these quantities are initially set to zero. The partial scores qij of the particles of a shower
are accumulated in the partial counter QP, whereas the global shower contribution qi and
its square are accumulated in Q and Q2, respectively. Each shower is assigned a label,
for instance its order number i, which is stored in LQ the first time that the shower
contributes to QP. In the course of the simulation, the value of QP is transferred to the
global counters Q and Q2 only when it is necessary to store a contribution qij from a new
shower. Explicitly, the Fortran code for scoring Q is
IF(i.NE.LQ) THEN
Q=Q+QP
Q2=Q2+QP**2
QP=qij
LQ=i
ELSE
QP=QP+qij
ENDIF
At the end of the simulation, the residual contents of QP must be transferred to the
global counters.
For some quantities (e.g., the mean number of scattering events per track, the depth-
dose distribution, . . . ) almost all the simulated tracks contribute to the score and the
inherent statistical uncertainties of the simulation results are comparatively small. Other
quantities (e.g., angle and energy distributions of the particles transmitted through a
thick foil) have considerable statistical uncertainties (i.e., large variances) because only
a small fraction of the simulated tracks contribute to the partial scores.
60
NEA/NSC/DOC(2015)3
Statistical uncertainties are evaluated from the variance of the sample, which is an
unbiased estimator of the following integral [cf. Eq. (1.16)]
Z Z
2 2
q(x) − Q p(x) dx = q 2 (x) p(x) dx − Q .
varQ ' (1.145)
Thus, with an adequate choice of weights, we could make var0Q < varQ and, consequently,
increase the efficiency of the simulation of the quantity of interest; the weighted simu-
lation would then attain the desired accuracy with less computer time.
6
We use the term “analogue” to refer to detailed, condensed or mixed simulations that do not
incorporate variance-reduction procedures.
61
NEA/NSC/DOC(2015)3
Of course, interaction forcing should be applied only to interactions that are dynamically
allowed, i.e., for particles with energy above the corresponding “reaction” threshold.
Let wi1 and qi1 denote the weight and the contribution to the score of the i-th
primary, and let wij and qij (j > 1) represent the weights and contributions of the
j-th secondary particles generated by the i-th primary. The Monte Carlo estimate of Q
obtained from the N simulated histories is
1 X
Q= wij qij . (1.148)
N i,j
62
NEA/NSC/DOC(2015)3
Evidently, the estimates Q obtained with interaction forcing and from an analogue
simulation are equal (in the statistical sense, i.e., in the limit N → ∞, their difference
tends to zero). The standard deviation is given by
v
u !2
u1 1 X X
q u
0 2
σQ = var0Q = t wij qij − Q . (1.149)
N N i j
Quantities directly related to forced interactions will have a reduced statistical un-
certainty, due to the increase in number of these interactions. However, for a given
simulation time, other quantities may exhibit standard deviations larger than those of
the analogue simulation because of the time spent in simulating the forced interactions.
Interaction forcing can effectively reduce the statistical uncertainties of some simula-
tion results, particularly the emission of secondary radiation and the energy deposition
in very thin volumes. However, this technique violates energy conservation (because the
sum of energies deposited along a track differs from the energy lost by the projectile)
and, therefore, yields energy deposition spectra that are biased.
It should be noted that our implementation of interaction forcing introduces forced
interactions randomly along the particle trajectory, independently of the geometry, and
keeps the weight of the transported particle unaltered. This is at odds with the conven-
tional technique of interaction forcing, where forced events occur with probability equal
to unity and the scored quantities are weighted by factors that depend on the geometry
(see, e.g., Jenkins et al., 1988, p. 411–412).
63
NEA/NSC/DOC(2015)3
weight w0 and in a certain state, into a number S > 1 of identical particles with weights
w = w0 /S in the same state. Splitting should be applied when the particle “approaches”
the region of interest. The Russian roulette technique is, in a way, the reverse process:
when a particle tends to move away from the region of interest it is “killed” with a certain
probability, K < 1, and, if it survives, its weight is increased by a factor 1/(1−K). Here,
killing means that the particle is just discarded (and does not contribute to the scores
anymore). Evidently, splitting and killing leave the simulation unbiased. The mean and
standard deviation of the calculated quantities are given by Eqs. (1.148) and (1.149).
The effectiveness of these techniques relies on the adopted values of the parameters S
and K, and on the strategy used to decide when splitting and killing are to be applied.
These details can only be dictated by the user’s experience. It should also be noted that
splitting and Russian roulette can be applied in conjunction with interaction forcing
and other variance reduction techniques.
where λ−1 T is the actual total inverse mean free path in the current material. Thus,
the probability of real interactions per unit path length, which is equal to λ−1 T , remains
unaltered. This procedure avoids the need for computing intersections of particle rays
with interfaces at the expense of having to determine which material is at the end of each
free flight. Hence delta scattering will improve the efficiency only for those geometries
where locating a particle (i.e., finding the material at its current position) is faster than
normal tracking.
64
NEA/NSC/DOC(2015)3
assigned different positions and directions, and this gives a net information gain and an
increase in efficiency (see, e.g., Bush et al., 2007).
As a last example, we can quote the so-called “range rejection” method, which
simply consists of absorbing a particle when it (and its possible secondaries) cannot
leave (or reach) regions of interest. Range rejection is useful, e.g., when computing the
total energy deposition of electrons or positrons in a given spatial region. When the
residual range of a particle (and its possible secondaries) is less than the distance to the
nearest limiting surface of the region of interest, the particle will deposit all its energy
either inside or outside the considered region (depending on its current position) and
simulation of the track can be stopped. Range rejection is not adequate for photon
transport simulation because the concept of photon range is not well defined (or, to be
more precise, photon path length fluctuations are very large).
65
NEA/NSC/DOC(2015)3
66
NEA/NSC/DOC(2015)3
Chapter 2
Photon interactions
67
NEA/NSC/DOC(2015)3
E e = E — Ui E
E 00000000 θe E 000000000
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 θ
00000000 000000000
Fluorescence
E´ E+
E 00 00 00 00 00 00 00 00 00 θ E 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 θ+
θe θ—
Ee E—
tabulated DCSs implies a certain loss of accuracy. To minimise this loss, penelope
renormalises the analytical DCSs so as to reproduce total cross sections that are read
from the input material data file. As a consequence, the free path between events and
the kind of interaction are sampled using total cross sections that are nominally exact;
approximations are introduced only in the description of individual interaction events.
In the following, κ stands for the photon energy in units of the electron rest energy,
i.e.,
E
κ≡ . (2.1)
me c2
68
NEA/NSC/DOC(2015)3
with well-defined ionisation energy. The set of orbitals with the same principal and total
angular momentum quantum numbers and the same parity constitute a shell. Each shell
i can accommodate a finite number of electrons, with characteristic ionisation energy
Ui . Notice that the shell ionisation energies are positive; the quantity −Ui represents
the “binding” energy of each individual electron. Figure 2.2 (left diagram) shows the
various notations used to designate the innermost atomic electron shells (i.e., those
with the largest ionisation energies) as well as their ordering in energy and allowed
occupancies. In our simulations, we use the ionisation energies recommended by Carlson
(1975), which were obtained from a combination of experimental data and theoretical
calculations. Figure 2.3 displays the shell ionisation energies of neutral atoms, Z = 1 to
99, that are larger than 100 eV.
E≥0
n>3 X
3d5/2 M5
3d3/2 M4
3p3/2 M3
3p1/2 M2
3s1/2 M1
2p3/2 L3
ℓ α2 α1
2p1/2 L2
η β1
2s1/2 L1
β4 β3 L series
K series
1s1/2 K
α2 α1 β3 β1
Figure 2.2: Various notations for inner atomic electron shells (left) and allowed radiative
transitions (right) to these shells. Transitions that are different from the ones indicated in the
diagram (e.g., K-M4) are also possible, but their transition probabilities are extremely small.
Considering the interaction with the photon field as a first-order perturbation (which
is appropriate for fields with low photon densities) it follows that only one-electron
transitions are allowed. That is, in the photoelectric effect, the photon is absorbed by
an individual electron in the “active” shell i, which leaves the parent atom with kinetic
energy Ee = E − Ui . Evidently, photoionisation of a given shell is only possible when
the photon energy exceeds the corresponding ionisation energy; this gives rise to the
characteristic absorption edges in the photoelectric cross section (see Fig. 2.4).
The photoelectric cross sections used in previous versions of penelope were obtained
by interpolation from a numerical table extracted from the LLNL Evaluated Photon
69
NEA/NSC/DOC(2015)3
5
10
4
10 L1
Ui (eV)
L3
M1
M5
3
10
N1
N3 N6,7
O1-5
N4,5
102
0 10 20 30 40 50 60 70 80 90 100
Z
Figure 2.3: Shell ionisation energies of neutral atoms, Ui , in eV. Symbols represent values
given by (Carlson, 1975), joined by straight segments for visual aid.
Data Library (EPDL; Cullen et al., 1997). The present version of the code uses a new
database that has been calculated with the program photoabs (Salvat, 2014). This
program uses the same theory as in the original calculations by Scofield (1973) of the
EPDL tables, but implements more accurate numerical algorithms. Our cross sections
practically coincide with those in the EPDL, although they are tabulated in a denser grid
of energies to describe the structure of the cross section near absorption edges. Because
of numerical difficulties, the program photoabs is able to compute the partial cross
section of a given shell up to a certain maximum energy. For higher energies the partial
cross section was obtained by extrapolating the numerical table using an analytical
formula derived by Pratt (1960a), which is different from the extrapolation scheme
adopted in the EPDL. In addition, the new database includes a screening normalisation
correction (Pratt, 1960b; Pratt et al., 1973a,b; Saloman et al., 1988; Salvat, 2014) which
70
NEA/NSC/DOC(2015)3
107
106
105
σph (barn)
104
U
103 Fe
102 C
10 2 3 4 5 6
10 10 10 10 10
E (eV)
Figure 2.4: Atomic photoelectric cross sections for carbon, iron and uranium as functions
of the photon energy E.
For compound materials (and also for mixtures) the molecular cross section σph (E)
is evaluated by means of the additivity approximation, that is, as the sum of the atomic
cross sections of the elements involved. In the energy range between successive absorp-
tion edges, the photoelectric cross section is a continuous function of the photon energy
(see Fig. 2.4). In penelope, the molecular cross section is defined by means of a table
of numerical values σph (Ei ) for a grid of photon energies Ei , suitably spaced to account
for the fast variation of the cross section near absorption edges, which is stored in mem-
ory. Photon mean free paths are determined by linear log-log interpolation from this
table. Knowledge of the atomic cross sections is needed only when a photoabsorption
event has effectively occurred in order to select the element that has been ionised (whose
probability is proportional to the atomic cross section).
71
NEA/NSC/DOC(2015)3
When the ionisation occurs in an inner K-, L-, M- or N-shell, the initial energy of the
photoelectron is set equal to Ee = E − Ui ; the residual atom, with a vacancy in the
shell, subsequently relaxes to its ground state by emitting x rays and Auger electrons.
If the ionisation occurs in an outer shell, we assume that the photoelectron leaves the
target atom with kinetic energy equal to the energy deposited by the photon, Ee = E,
and we disregard the emission of subsidiary fluorescent radiation (see Section 2.6).
The direction of emission of the photoelectron, relative to that of the absorbed photon,
is defined by the polar and azimuthal angles θe (Fig. 2.1) and φe . We consider that the
incident photon is not polarised and, hence, the angular distribution of photoelectrons
is independent of φe , which is uniformly distributed in the interval (0, 2π). The polar
angle θe is sampled from the K-shell cross section derived by Sauter (1931) using K-shell
hydrogenic electron wave functions. The Sauter DCS (per electron) can be written as
5 3
sin2 θe
dσph Z β 1
= α4 re2 1 + γ(γ − 1)(γ − 2)(1 − β cos θe ) , (2.4)
dΩe κ γ (1 − β cos θe )4 2
72
NEA/NSC/DOC(2015)3
photon mean free path. On the other hand, when the photon energy exceeds the K-
edge, most of the ionisations occur in the K-shell and then the Sauter distribution
represents a good approximation.
Introducing the variable ν = 1 − cos θe , the angular distribution of photoelectrons
can be expressed in the form
1 1 ν 1
p(ν) = (2 − ν) + βγ(γ − 1)(γ − 2) , A= − 1, (2.6)
A+ν 2 (A + ν)3 β
apart from a normalisation constant. Random sampling of ν from this distribution can
be performed analytically. To this end, p(ν) can be factorised in the form
with
1 1
g(ν) = (2 − ν) + βγ(γ − 1)(γ − 2) (2.8)
A+ν 2
and
A(A + 2)2 ν
π(ν) = . (2.9)
2 (A + ν)3
The variable ν takes values in the interval (0,2), where the function g(ν) is definite
positive and attains its maximum value at ν = 0, while the function π(ν) is positive and
normalised to unity. Random values from the probability distribution π(ν) are generated
by means of the sampling formula (inverse-transform method, see Section 1.2.2)
Z ν
π(ν 0 ) dν 0 = ξ, (2.10)
0
The efficiency of this algorithm is ∼ 0.33 at low energies and increases slowly with Ee ;
for Ee = 1 MeV, the efficiency is 0.4. As photoelectric absorption occurs at most once
in each photon history, this small sampling efficiency does not slow down the simulation
significantly.
73
NEA/NSC/DOC(2015)3
74
NEA/NSC/DOC(2015)3
102
10
F (q,Z )
1
Pb
0.1 Sn
Cu
−2
Si
10 C
10−3
−3 −2 0.1 1 10
10 10
q/(mec)
Figure 2.5: Atomic form factors of neutral atoms of the indicated elements, taken from the
EPDL (Cullen et al., 1997).
75
NEA/NSC/DOC(2015)3
scattering factor. Figure 2.6 displays these cross sections for aluminium, silver and gold
atoms.
10−20
10−21
Au
−22
10
σRa (cm2)
Ag
−23
10
Al
−24
10
−25
10
10−26 2
10 103 104 105 106
E (eV)
Figure 2.6: Total cross sections for Rayleigh scattering of photons by neutral atoms of
aluminium, silver and gold, as functions of the energy E of the incident photon. The solid
curves represent values taken from the EPDL (Cullen et al., 1997). Dashed curves are cross
sections calculated by numerical integration of the approximate DCS given by Eq. (2.12).
Anomalous scattering factors are available for all elements (Cullen et al., 1997) but
not for arbitrary compounds. On the other hand, the molecular cross section obtained
from the additivity approximation has a complicated structure that is not suited for
analytical sampling methods. For the sake of simplicity, the polar angle θ is sampled
from the DCS given by Eq. (2.12), i.e., disregarding anomalous scattering effects. This
approximate method is sufficient for most applications because, at the energies where
anomalous scattering effects become significant, coherent scattering is much less proba-
ble than photoelectric absorption (see Fig. 2.12 below).
1 + cos2 θ
pRa (cos θ) = [F (q, Z)]2 , (2.21)
2
where the momentum transfer q can take values in the interval from 0 to
76
NEA/NSC/DOC(2015)3
with
1 + cos2 θ
g(cos θ) ≡ and π(q 2 ) ≡ [F (q, Z)]2 . (2.24)
2
Notice that, for a compound, [F (q, Z)]2 has to be replaced by the sum of squared form
factors of the atoms in the molecule.
The function π(q 2 ) can be considered as the (unnormalised) PDF of the variable
q 2 , which takes values in the interval (0, qmax
2
). In penelope, random values of q 2
distributed according to this PDF are generated by using the RITA algorithm (see
Section 1.2.4) with 150 grid points.
The angular deflection cos θ can then be sampled by the rejection method (Section
1.2.5) because the function g(cos θ) is a valid rejection function (i.e., it is positive and
less than or equal to unity). The algorithm for sampling cos θ proceeds as follows:
(i) Using the RITA algorithm, sample a random value of q 2 from the distribution
π(q 2 ), restricted to the interval (0, qmax
2
).
(ii) Set
1 q2
cos θ = 1 − . (2.25)
2 κ2
(iii) Generate a new random number ξ.
It is worth noting that this sampling method is essentially independent of the adopted
form factor, and is directly applicable to molecules. The efficiency of the algorithm (i.e.,
the fraction of generated values of cos θ that is accepted) increases with photon energy.
At low energies, it equals 2/3 (exactly) for all elements. For E = 100 keV, the efficiencies
for hydrogen and uranium are 100% and 86%, respectively.
77
NEA/NSC/DOC(2015)3
target electron is ejected to a free state with kinetic energy Ee = E − E 0 − Ui > 0, where
Ui is the ionisation energy of the considered shell, and the residual atom is left in an
excited state with a vacancy in the i-th shell.
In the case of scattering by free electrons at rest, the conservation of energy and mo-
mentum implies the following relation between the energy E 0 of the scattered (Compton)
photon and the scattering angle θ [cf. Eq. (A.19)]
E
E0 ≡ ≡ EC , (2.26)
1 + κ(1 − cos θ)
where κ = E/me c2 , as before. The DCS for Compton scattering by a free electron at
rest is given by the familiar Klein-Nishina formula (see, e.g., Heitler, 1954),
KN
2
r2
dσCo EC EC E
= e + 2
− sin θ . (2.27)
dΩ 2 E E EC
Although this simple DCS was generally used in old Monte Carlo transport codes, it
represents only a rough approximation for the Compton interactions of photons with
atoms. In reality, atomic electrons are not at rest, but move with a certain momentum
distribution, which gives rise to the so-called Doppler broadening of the Compton line.
Furthermore, transitions of bound electrons are allowed only if the energy transfer E−E 0
is larger than the ionisation energy Ui of the active shell (binding effect).
The impulse approximation accounts for Doppler broadening and binding effects
in a natural, and relatively simple, way. The DCS is obtained by considering that
electrons in the i-th shell move with a momentum distribution ρi (p). For an electron in
an orbital ψi (r), ρi (p) ≡ |ψi (p)|2 , where ψi (p) is the wave function in the momentum
representation. The DCS for Compton scattering by an electron with momentum p
is derived from the Klein-Nishina formula by applying a Lorentz transformation with
velocity v equal to that of the moving target electron. The impulse approximation to
the Compton DCS (per electron) of the considered shell is obtained by averaging over
the momentum distribution ρi (p).
After some manipulations, the Compton DCS of an electron in the i-th shell can be
expressed as (Eq. 21 in Brusa et al., 1996)
2
d2 σCo,i re2
EC EC E 2 dpz
= + − sin θ F (pz ) Ji (pz ) , (2.28)
dE 0 dΩ 2 E E EC dE 0
where re is the classical electron radius. EC is the energy of the Compton line, defined
by Eq. (2.26), i.e., the energy of photons scattered in the direction θ by free electrons
at rest. The momentum transfer vector is given by q ≡ ~k − ~k0 , where ~k and ~k0 are
the momenta of the incident and scattered photons; its magnitude is
1√ 2
q= E + E 02 − 2EE 0 cos θ. (2.29)
c
78
NEA/NSC/DOC(2015)3
The quantity pz is the projection of the initial momentum p of the target electron on
the direction of the scattering vector ~k0 − ~k = −q; it is given by2
p·q EE 0 (1 − cos θ) − me c2 (E − E 0 )
pz ≡ − = (2.30)
q c2 q
or, equivalently,
pz E(E 0 − EC )
= . (2.31)
me c EC cq
Notice that pz = 0 for E 0 = EC . In addition,
E cos θ − E 0 pz
dpz me c E
= + . (2.32)
dE 0 cq EC cq me c
The function Ji (pz ) in Eq. (2.28) is the one-electron Compton profile of the active
shell, which is defined as
ZZ
Ji (pz ) ≡ ρi (p) dpx dpy , (2.33)
where ρi (p) is the electron momentum distribution. That is, Ji (pz ) dpz gives the proba-
bility that the component of the electron momentum in the z-direction is in the interval
(pz , pz + dpz ). Notice that the normalisation
Z ∞
Ji (pz ) dpz = 1 (2.34)
−∞
where fi is the number of electrons in the i-th shell and Ji (pz ) is the one-electron profile
of this shell. The functions J(pz ) and Ji (pz ) are both bell-shaped and symmetrical about
pz = 0 (see Fig. 2.7). Extensive tables of Hartree-Fock Compton profiles for the elements
have been published by Biggs et al. (1975). These numerical profiles are adequate for
bound electron shells. In the case of conductors, the one-electron Compton profile for
conduction electrons may be estimated by assuming that these form a free-electron gas
2
The expression (2.30) contains an approximation; the exact relation is obtained
p by replacing the
electron rest energy me c2 in the numerator by the electron initial total energy, (me c2 )2 + (cp)2 .
79
NEA/NSC/DOC(2015)3
with ρe electrons per unit volume. The one-electron profile for this system is (see, e.g.,
Cooper, 1985)
p2z
feg 3 3
Ji (pz ) = 1 − 2 Θ(pF − |pz |), Jifeg (0) = , (2.37)
4pF pF 4pF
where pF ≡ ~(3π 2 ρe )1/3 is the Fermi momentum. For scattering in a compound material,
the molecular Compton profile is obtained as the sum of atomic profiles of the atoms in
a molecule (additivity rule).
1500
1000
me c J(pz)
Au
Cu
500
Al
0
10−3 10−2 0.1
pz/me c
Figure 2.7: Atomic Compton profiles (pz > 0) for aluminium, copper and gold. The
continuous curves are numerical Hartree-Fock profiles tabulated by Biggs et al. (1975). The
dashed curves represent the analytical profiles defined by Eq. (2.54). (Adapted from Brusa
et al., 1996).
where qC is the momentum transfer associated with the energy E 0 = EC of the Compton
line,
1
q
qC ≡ E 2 + EC2 − 2EEC cos θ. (2.39)
c
Expression (2.38) is accurate only for small |pz |-values. For large |pz |, Ji (pz ) tends to zero
and the factor F (pz ) has no effect on the DCS. We use the values given by expression
(2.38) only for |pz | < 0.2 me c and take F (±|pz |) = F (±0.2 me c) for |pz | > 0.2 me c.
Owing to the approximations introduced, negative values of F may be obtained for
large |pz |; in this case, we must set F = 0.
80
NEA/NSC/DOC(2015)3
We can now introduce the effect of electron binding: Compton excitations are allowed
only if the target electron is promoted to a free state, i.e., if the energy transfer E − E 0
is larger than the ionisation energy Ui of the active shell. Therefore the atomic DCS,
including Doppler broadening and binding effects, is given by
2
d2 σCo re2
EC EC E
= + − sin2 θ
dE 0 dΩ 2 E E EC
!
X dpz
× F (pz ) fi Ji (pz ) Θ(E − E 0 − Ui ) , (2.40)
i
dE 0
2 Al, E = 10 keV
θ = 60º
(barn/sr)
1
(E/Z) d2σCo /dE ′ dΩ
2 θ = 180º
0
0.90 0.95 1.00
E ′/E
Figure 2.8: DCS for Compton scattering of 10 keV photons by aluminium atoms at the
indicated scattering angles. The continuous curves represent the DCS (2.40) calculated using
the Hartree-Fock Compton profile (Biggs et al., 1975). The dashed curves are results from Eq.
(2.40) with the analytical profiles given by Eq. (2.54). (Adapted from Brusa et al., 1996).
81
NEA/NSC/DOC(2015)3
In the case of scattering by free electrons at rest we have Ui = 0 (no binding) and
Ji (pz ) = δ(pz ) (no Doppler broadening). Furthermore, from Eq. (2.31) E 0 = EC , so
that photons scattered through an angle θ have energy EC . Integration of the DCS, Eq.
(2.40), over E 0 then yields the Klein-Nishina cross section,
KN
2
re2 EC
dσCo EC E 2
=Z + − sin θ , (2.41)
dΩ 2 E E EC
for the Z atomic electrons [cf. Eq. (2.27)]. For energies of the order of a few MeV and
larger, Doppler broadening and binding effects are relatively small and the free-electron
theory yields results practically equivalent to those of the impulse approximation.
The angular distribution of scattered photons is given by the directional DCS,
Z 2 2
re2 EC
dσCo d σCo 0 EC E 2
= dE = + − sin θ
dΩ dE 0 dΩ 2 E E EC
X Z pi,max
× fi Θ(E − Ui ) F (pz )Ji (pz ) dpz , (2.42)
i −∞
where pi,max is the highest pz -value for which an electron in the i-th shell can be excited.
It is obtained from Eq. (2.30) by setting E 0 = E − Ui ,
E(E − Ui )(1 − cos θ) − me c2 Ui
pi,max (E, θ) = p . (2.43)
c 2E(E − Ui )(1 − cos θ) + Ui2
Except for energies just above the shell ionisation threshold, the function F (pz ) in the
integral can be replaced by unity, since pz Ji (pz ) is an odd function and its integral is
close to zero, i.e., Z pi,max
F (pz )Ji (pz ) dpz ' ni (pi,max ), (2.44)
−∞
where Z pz
ni (pz ) ≡ Ji (p0z ) dp0z . (2.45)
−∞
Notice that ni (pz ) is a monotonously increasing function of pz , which varies from 0 at
pz = −∞ to unity at pz = ∞; the quantity ni (pi,max ) represents the fraction of electrons
in the i-th shell that can be effectively excited in a Compton interaction. We can then
write 2
re2 EC
dσCo EC E 2
' + − sin θ S(E, θ). (2.46)
dΩ 2 E E EC
The function X
S(E, θ) = fi Θ(E − Ui ) ni (pi,max ) (2.47)
i
can be identified as the incoherent scattering function in the impulse approximation
(see, e.g., Ribberfors and Berggren, 1982). The total cross section can then be obtained
as Z 1
dσCo
σCo ' 2π d(cos θ). (2.48)
−1 dΩ
82
NEA/NSC/DOC(2015)3
For comparison purposes, and also to calculate the energy deposition, it is useful to
consider the cross section differential in only the energy of the scattered photon,
Z 2
dσCo d σCo
≡ dΩ. (2.49)
dE 0 dE 0 dΩ
The EPDL (Cullen et al., 1997), the xcom program (Berger and Hubbell, 1987; Berger,
1992; Berger et al., 2005) and several Monte Carlo codes describe Compton scattering by
means of the theory of Waller and Hartree (1929), which accounts for binding effects but
disregards Doppler broadening, i.e., photons scattered through an angle θ are assumed
to have energy E 0 = EC . This theory leads to the DCS
WH KN
dσCo dσCo
= SWH (qC ), (2.51)
dE 0 dE 0
where qC is the momentum transfer for the Compton line, given by Eq. (2.39), and
SWH (qC ) is the Waller-Hartree incoherent scattering function, which can be calculated
in terms of the atomic ground-state wave function. It is a monotonically increasing
function of qC that takes values from SWH (0) = 0 to SWH (∞) = Z. Tables of the
Waller-Hartree incoherent scattering function for all elements from Z = 1 to 100 have
been compiled by Hubbell et al. (1975, 1977); accurate analytical approximations for
SWH (qC ) are given by Baró et al. (1994a).
Figure 2.9 displays energy DCSs for Compton scattering by aluminium and gold
atoms obtained from the impulse approximation, the Klein-Nishina formula and the
Waller-Hartree theory [Eqs. (2.49), (2.50) and (2.51), respectively]. These results clearly
show the differences between the physics of the impulse approximation and the cruder
Waller-Hartree and free-electron approximations. The Klein-Nishina and Waller-Hartree
DCSs have a threshold at
0
Eth = E/(1 + 2κ). (2.52)
The most conspicuous feature of the impulse approximation DCS is the absence of
a threshold energy, which is a direct manifestation of the Doppler broadening. For
relatively small energy transfers (E 0 ∼ E) the Klein-Nishina DCS increases with the
energy of the scattered photon, whereas the energy DCS obtained from the impulse
approximation vanishes at E 0 = E due to the effect of binding, which also causes the
characteristic edge structure, similar to that of the photoelectric cross section (see Fig.
2.4). The Waller-Hartree DCS decreases smoothly when the energy of the scattered
83
NEA/NSC/DOC(2015)3
0.8
4
0.6
0.4
(E/Z) dσCo /dE ′ (barn)
2
Al, E = 50 keV 0.2 Al, E = 500 keV
0 0.0
0.8
4
0.6
0.4
2
0.2
Au, E = 50 keV Au, E = 500 keV
0 0.0
0.7 0.8 0.9 1.0 0.2 0.4 0.6 0.8 1.0
′ ′
E /E E /E
Figure 2.9: Energy DCSs for Compton scattering of 50 and 500 keV photons by aluminium
and gold atoms. The continuous curves represent the DCS (2.49), computed using the analyt-
ical Compton profiles (2.54). The dashed curves are obtained from the Klein-Nishina formula
(2.50), i.e., assuming that the atomic electrons are free and at rest. Dot-dashed curves rep-
resent results from the Waller-Hartree theory, Eq. (2.51). (Adapted from Brusa et al., 1996).
photon approaches E, in qualitative agreement with the behaviour of the DCS from the
impulse approximation.
The left panel of Fig. 2.10 shows total cross sections for Compton scattering by
aluminium and gold atoms as functions of the energy E of the incident photon. While
total cross sections obtained from the impulse approximation and from the Waller-
Hartree theory tend to zero for small E, the Klein-Nishina total cross section goes to
a finite value for E → 0. For energies larger than a few tens of keV, the total cross
section obtained from the Waller-Hartree theory does not differ significantly from the
result of the impulse approximation, reflecting the fact that the total cross section is
quite insensitive to Doppler broadening, i.e. the areas under the impulse approximation
and Waller-Hartree curves in Figs. 2.9 are practically the same.
A quantity of interest in dosimetry is the energy-deposition cross section,
Z
dσCo
σCo,E ≡ (E − E 0 ) dE. (2.53)
0 dE
84
NEA/NSC/DOC(2015)3
Energy-deposition cross sections for gold, computed using the impulse approximation,
the Waller-Hartree and the Klein-Nishina DCSs, are displayed on the right-hand panel
of Fig. 2.10. As pointed out by Ribberfors (1983), values of σCo,E obtained from the
Waller-Hartree theory are systematically smaller than those derived from the impulse
approximation. Clearly, this is a consequence of Doppler broadening, which makes
possible energy transfers larger than the maximum value, E −EC , allowed in the Waller-
Hartree theory (see Figs. 2.9). Interestingly, in the low-energy domain, the simpler
Klein-Nishina DCS yields values of the energy-deposition cross section σCo,E that are
closer to the result of the impulse approximation.
50 107
Impulse approx.
40
Waller-Hartree
Au
30 106 Klein-Nishina
20
σCo, E (eV barn)
10
105
σCo (barn)
8
104
6 Al
Au
4 3
10
2
0 2 3 4 5 6 7 102 3
10 10 10 10 10 10 10 104 105 106
E (eV) E (eV)
Figure 2.10: Total cross sections for Compton scattering of photons by aluminium and
gold atoms as functions of the photon energy E (left panel). Continuous curves are results
obtained from the impulse approximation with the analytical profiles (2.54). The dashed
and dot-dashed curves represent results from the Waller-Hartree theory, Eq. (2.51), and from
the Klein-Nishina formula, Eq. (2.50), respectively. Crosses are total cross sections given by
Ribberfors (1983) for aluminium, calculated from the impulse approximation using numerical
non-relativistic Hartree-Fock Compton profiles. The right plot shows energy-deposition cross
sections, Eq. (2.53), for Compton scattering by gold atoms, calculated from the theoretical
models indicated in the legend. (Adapted from Brusa et al., 1996).
85
NEA/NSC/DOC(2015)3
nd2 n−1 h n i
JiA (pz ) = Ji,0 d1 + d2 Ji,0 |pz | exp d1n − d1 + d2 Ji,0 |pz | (2.54)
2
with 1/n
2 1−n √
r
n−1 1
n = 2, d1 = = , d2 = d = 2.
n 2 n 1
The quantity Ji,0 ≡ Ji (0) is the value of the profile at pz = 0 obtained from the Hartree-
Fock orbital. In previous versions of penelope, this quantity was extracted from the
tables of Biggs et al. (1975). In the present version of the code we use more accurate
Ji (0) values, which were calculated numerically from the radial wave functions given by
the MCDF program of Desclaux (1975, 1977). A list of these values for all shells of
the elements Z = 1 to 99 is included in the file pdatconf.p14. Notice that JiA (pz ) is
normalised according to Eq. (2.34). With the profiles (2.54),
2
1
2 exp d12 − d1 − d2 Ji,0 pz if pz < 0,
Z pz
A A 0 0
ni (pz ) ≡ Ji (pz ) dpz = 2 (2.55)
−∞ 1 2
1 − 2 exp d1 − d1 + d2 Ji,0 pz if pz > 0.
Thus, the incoherent scattering function (2.47) can be expressed analytically and the
integral (2.48) evaluated very quickly with the aid of function SUMGA (Section B.2 in
Appendix B). On the other hand, the sampling equation nA A
i (pz ) ≡ ξni (pi,max ) (see
Section 1.2.2) can be solved analytically,
1 h 2
1/2 i
d − d − ln 2A if A < 21 ,
d2 Ji,0 1
1
pz = (2.56)
1 h 2 1/2 i
1
d1 − ln 2(1 − A) − d1 if A > 2 ,
d2 Ji,0
where A ≡ ξnA i (pi,max ). Atomic Compton profiles obtained from the approximation
given by Eq. (2.54) are accurate for small pz and oscillate about the Hartree-Fock values
for intermediate momenta (see Fig. 2.7). The relative differences are normally less than
5%, except for large momenta for which J(pz ) is very small. Similar differences are found
between the DCS computed from Hartree-Fock and analytical Compton profiles (see Fig.
2.8). For most applications (e.g., studies of detector response, dosimetry, radiotherapy,
etc.), the effect of these differences on the simulation results is not important. The
impulse approximation with the analytical one-electron profiles (2.54) then provides a
conveniently simple method to introduce Doppler broadening and binding effects in the
simulation of Compton scattering.
86
NEA/NSC/DOC(2015)3
For photons with energies E lower than, and of the order of, the ionisation energy
of the K shell, the total cross section obtained from Eq. (2.48) (with F (pz ) = 1) may
differ by a few percent from the result of integrating the DCS (2.40) numerically. In the
simulation code, we use a more accurate calculation scheme in which the contribution
of the second term in the expression (2.38) of F (pz ) is estimated by using the Compton
profile of a free-electron gas, Eq. (2.37), with a Fermi momentum such that Jifeg = Ji,0 .
This reduces the error of the calculated total atomic cross sections to less than about 1
%.
In penelope, the maximum number of electron shells for each material is limited.
For heavy elements, and also for compounds, the number of shells may be fairly large.
In this case, outer shells with similar ionisation energies are grouped together and re-
placed by a single shell with a Ji,0 value and an effective ionisation energy equal to the
corresponding averages of the grouped shells. This grouping does not alter the average
effects of Doppler broadening and binding.
87
NEA/NSC/DOC(2015)3
κ2 − 2κ − 2
d(cos θ) 1
Pτ (τ ) = Pθ (cos θ) = + + (2κ + 1) + κ2 τ S(E, θ). (2.61)
dτ τ2 τ
where
2κ(1 + κ)
a1 = ln(1 + 2κ), a2 = , (2.63)
(1 + 2κ)2
1 1 (1 + 2κ)2
P1 (τ ) = , P2 (τ ) = τ (2.64)
ln(1 + 2κ) τ 2κ(1 + κ)
and
The function in braces is positive, it equals 1 at the end points of the interval (τmin ,1),
and is less than unity inside this interval. In addition, the ratio of incoherent scattering
functions is also less than unity for any value of θ < π. Hence, the function T (cos θ) is
a valid rejection function. The functions Pi (τ ) (i = 1, 2) are normalised PDFs in the
interval (τmin , 1), which can be easily sampled by using the inverse-transform method.
The generation of random values of τ according to the PDF given by Eq. (2.61) can
then be performed by combining the composition and rejection methods (Section 1.2).
The algorithm to sample cos θ proceeds as follows:
(i) Sample a value of the integer i (=1, 2) according to the point probabilities
a1 a2
π(1) = and π(2) = . (2.66)
a1 + a2 a1 + a2
88
NEA/NSC/DOC(2015)3
1−τ
cos θ = 1 − , (2.68)
κτ
and compute the quantities pi,max (E, θ), Eq. (2.43), and
X
S(E, θ) = fi Θ(E − Ui ) nAi (pi,max ). (2.69)
i
The efficiency of this algorithm, i.e., the probability of accepting a generated cos θ-value,
increases monotonically with photon energy and is nearly independent of Z; typical
values are 35%, 80% and 95% for E = 1 keV, 1 MeV and 10 MeV, respectively.
Once the direction of the emerging photon has been set, the active electron shell i
is selected with relative probability equal to Zi Θ(E − Ui ) nA i (pi,max (E, θ)). A random
value of pz is generated from the analytical Compton profile (2.54) using the sampling
formula (2.56). If pz is less than −me c, it is rejected and a new shell and a pz -value
are sampled3 . Finally, the factor F (pz ) in the PDF (2.40) is accounted for by means of
a rejection procedure. It should be noted that the approximation F ' 1 is valid only
when the DCS is integrated over E 0 ; otherwise the complete expression (2.38) must be
used. Let Fmax denote the maximum value of F (pz ), which occurs at pz = 0.2me c or
−0.2me c; a random number ξ is generated and the value pz is accepted if ξFmax < F (pz ),
otherwise the process of selecting a shell and a pz -value is reinitiated. The energy E 0 of
the emerging photon is then calculated from Eq. (2.30), which gives
τ
q
0 2 2
E =E (1 − tτ cos θ) + sign(pz ) (1 − tτ cos θ) − (1 − tτ )(1 − t) , (2.70)
1 − tτ 2
where
t ≡ (pz /me c)2 and sign(pz ) ≡ pz /|pz |. (2.71)
For photons with energy larger than 5 MeV, for which Doppler broadening is negli-
gible, we set E 0 = EC (which amounts to assuming that pz = 0). In this case, the active
electron shell i is sampled with relative probability fi and binding effects are accounted
for by simply rejecting E 0 -values such that E − E 0 < Ui .
The azimuthal scattering angle φ of the photon is sampled uniformly in the interval
(0, 2π). We assume that the Compton electron is emitted with energy Ee = E − E 0 − Ui
3
Notice that, due to the approximation introduced in Eq. (2.38), a value pz < −me c would yield a
negative energy for the scattered photon.
89
NEA/NSC/DOC(2015)3
in the direction of the momentum transfer vector q = ~k − ~k0 , with polar angle θe and
azimuthal angle φe = φ + π, relative to the direction of the incident photon. cos θe is
given by
E − E 0 cos θ
cos θe = √ . (2.72)
E 2 + E 02 − 2EE 0 cos θ
When E 0 = EC , this expression simplifies to
1/2
E + m e c2
E − EC
cos θe = , (2.73)
E 2me c2 + E − EC
which coincides with the result (A.20). Since the active electron shell is known, char-
acteristic x rays and Auger electrons emitted in the de-excitation of the ionised atom
can also be followed. This is important, for instance, to account for escape peaks in
scintillation or solid state detectors
Table 2.1: Average number nr of random numbers ξ needed to simulate a single incoherent
scattering event for photons with energy E in aluminium, silver and gold.
E (eV) Al Ag Au
3
10 16.6 11.9 13.4
104 11.0 11.4 11.5
105 9.5 9.8 10.0
106 8.2 8.2 8.3
107 7.5 7.5 7.5
As a measure of the efficiency of the sampling algorithm, we may consider the average
number nr of random numbers ξ required to simulate an incoherent scattering event. nr
is practically independent of the atomic number and decreases with photon energy (see
Table 2.1). The increase of nr at low energies stems from the loss of efficiency of the
algorithm used to sample cos θ. Although the simulation of incoherent events becomes
more laborious as the photon energy decreases, this has only a small influence on the
speed of practical photon transport simulations because low-energy photons interact
predominantly via photoelectric absorption (see Fig. 2.12 below).
90
NEA/NSC/DOC(2015)3
field of an electron, the target electron recoils after the event with appreciable kinetic
energy; the process is known as “triplet production” because it causes three visible
tracks when observed, e.g., in a cloud chamber. If the target electron is at rest, triplet
production is only possible for photons with energy larger than 4me c2 .
For the simulation of pair-production events in the field of an atom of atomic number
Z, we shall use the following semiempirical model (Baró et al., 1994a). Our starting
point is the high-energy DCS for arbitrary screening, which was derived by Bethe and
Heitler (1934) from the Born approximation (see also Motz et al., 1969; Tsai, 1974,
1977). The Bethe-Heitler DCS for a photon of energy E to create an electron-positron
pair, in which the electron has a kinetic energy E− = E − me c2 , can be expressed as
(Tsai, 1974)
(BH)
dσpp 2
2 2
2
= re αZ[Z + η] + (1 − ) (Φ1 − 4fC ) + (1 − )(Φ2 − 4fC ) . (2.74)
d 3
Notice that the “reduced energy” = (E− +me c2 )/E is the fraction of the photon energy
that is taken away by the electron; the kinetic energy of the positron is E+ = E − E− −
2me c2 = (1 − )E − me c2 . The screening functions Φ1 and Φ2 are given by integrals
that involve the atomic form factor and, therefore, must be computed numerically when
a realistic form factor is adopted (e.g., the analytical form factor described in Section
2.2). To obtain approximate analytical expressions for these functions, we shall assume
that the Coulomb field of the nucleus is exponentially screened by the atomic electrons
(Schiff, 1951, 1968; Tsai, 1974), i.e., the electrostatic potential of the atom is assumed
to be (Wentzel model)
Ze
ϕW (r) = exp(−r/R), (2.75)
r
with the screening radius R considered as an adjustable parameter (see below). The
corresponding atomic electron density is obtained from Poisson’s equation,
1 2 1 1 d2 Z
ρW (r) = ∇ ϕ(r) = [rϕ(r)] = exp(−r/R), (2.76)
4πe 4πe r dr2 4πR2 r
and the atomic form factor is
Z ∞
sin(qr/~) 2 Z
FW (q, Z) = 4π ρW (r) r dr = . (2.77)
0 qr/~ 1 + (Rq/~)2
The screening functions for this particular form factor take the following analytical
expressions (Tsai, 1974, 1977)
Φ1 = 2 − 2 ln(1 + b2 ) − 4b arctan(b−1 ) + 4 ln(Rme c/~)
4
Φ2 = − 2 ln(1 + b2 ) + 2b2 4 − 4b arctan(b−1 ) − 3 ln(1 + b−2 )
3
+ 4 ln(Rme c/~), (2.78)
where
Rme c 1 1
b= . (2.79)
~ 2κ (1 − )
91
NEA/NSC/DOC(2015)3
The quantity η in Eq. (2.74) accounts for pair production in the field of the atomic
electrons (triplet production), which is considered in detail by Hubbell et al. (1980) and
Tsai (1974). In order to simplify the calculations, the dependence of the triplet cross
section on the reduced energy, , is assumed to be the same as that of the pair cross
section. The function fC in (2.74) is the high-energy Coulomb correction of Davies et al.
(1954) given by
with a = αZ. The total atomic cross section for pair (and triplet) production is obtained
as Z max (BH)
(BH) dσpp
σpp = d, (2.81)
min d
where
The values of η∞ for the elements Z = 1–99 are given in Table 2.2.
The approximation given by Eq. (2.74) with the fitted value of the screening radius,
fails at low energies where it systematically underestimates the total cross section (it
can even become negative). To compensate for this fact we introduce an empirical
correcting term F0 (κ, Z), which acts in a way similar to the Coulomb correction. To
92
NEA/NSC/DOC(2015)3
Table 2.2: Reduced screening radius, Rme c/~, and high-energy triplet contribution, η∞ , for
electron-positron pair production obtained from the tables of Hubbell et al. (1980) as described
in the text. Notice that ~/me c = 3.8616 × 10−13 m is the Compton wavelength of the electron.
93
NEA/NSC/DOC(2015)3
facilitate random sampling, the Bethe-Heitler DCS, Eq. (2.74), including this low-energy
correction and a high-energy radiative correction, is written in the form
" 2 #
dσpp 2 1
= re2 αZ[Z + η] Cr 2 − φ1 () + φ2 () , (2.85)
d 3 2
where
φ1 () = g1 (b) + g0 (κ),
φ2 () = g2 (b) + g0 (κ), (2.86)
with
1 7
g1 (b) = (3Φ1 − Φ2 ) − 4 ln(Rme c/~) = − 2 ln(1 + b2 ) − 6b arctan(b−1 )
2 3
− b2 4 − 4b arctan(b−1 ) − 3 ln(1 + b−2 ) ,
1 11
g2 (b) = (3Φ1 + Φ2 ) − 4 ln(Rme c/~) = − 2 ln(1 + b2 ) − 3b arctan(b−1 )
4 6
1
+ b2 4 − 4b arctan(b−1 ) − 3 ln(1 + b−2 ) ,
2
g0 (κ) = 4 ln(Rme c/~) − 4fC (Z) + F0 (κ, Z). (2.87)
Cr = 1.0093 is the high-energy limit of Mork and Olsen’s radiative correction (Hubbell
et al., 1980).
The correcting factor F0 (κ, Z) has been determined by requiring that the total cross
section for pair production obtained from the expression given in Eq. (2.85) (with η = 0)
coincides with the total cross sections for pair production in the field of the nucleus tab-
ulated by Hubbell et al. (1980). By inspection and numerical fitting, we have obtained
the following analytical approximation
F0 (κ, Z) = (−0.1774 − 12.10a + 11.18a2 )(2/κ)1/2
+ (8.523 + 73.26a − 44.41a2 )(2/κ)
− (13.52 + 121.1a − 96.41a2 )(2/κ)3/2
+ (8.946 + 62.05a − 63.41a2 )(2/κ)2 . (2.88)
The functions φ1 and φ2 are now positive except for -values very near the endpoints
of the allowed interval, given by Eq. (2.82), for high-atomic-number elements. To avoid
inconsistencies, these functions are set equal to zero when they take negative values.
The relative differences between the total atomic cross sections obtained from the
DCS given by Eq. (2.85) and the total cross sections tabulated by Hubbell et al. (1980)
are appreciable near the threshold [actually, (2.85) shifts the threshold for pair produc-
tion to values slightly larger than 2me c2 ], but decrease rapidly with increasing photon
energy. At E = 3 MeV, the differences reduce to 4% and do not exceed 2% for en-
ergies larger than 6 MeV, for almost all the elements. Although these differences are
94
NEA/NSC/DOC(2015)3
not important, they may be larger than the uncertainties in the cross sections given by
Hubbell et al. (1980). To avoid systematic errors, in penelope we use a database of
atomic cross sections for pair and triplet production, σpair (E) and σtriplet (E), generated
with the xcom program (Berger et al., 2005) for a dense grid of photon energies. The
total cross section,
σpp (E) = σpair (E) + σtriplet (E) , (2.89)
and the probability of triplet production, ptriplet = σtriplet /σpp , are obtained by interpola-
tion. The Bethe-Heitler DCS is only used to sample the kinetic energies of the produced
pair.
It is also worth noting that the Bethe-Heitler theory predicts that the pair-production
DCS, considered as a function of the reduced energy , is symmetrical about = 1/2
(see Fig. 2.11). This dependence on is reasonably accurate only for photon energies
larger than ∼5 MeV. For lower photon energies, the effect of the electrostatic field of the
atom (which slows down the electron and accelerates the positron) becomes increasingly
important, with the result that the actual DCS becomes asymmetrical and the mean
value of becomes less than 1/2 (see, e.g., Motz et al., 1969). At these relatively
low energies, however, pair production is not dominant and, moreover, the produced
particles have ranges that are much less than the mean free path of the absorbed photon.
Therefore, no appreciable simulation errors are incurred by using the Bethe-Heitler DCS,
Eq. (2.85), for energies down to the threshold.
95
NEA/NSC/DOC(2015)3
40
200 MeV
Pb
dσpp /dǫ (barn) 30 50
20
20
10
5
10
2.5
1.5
0
0.0 0.2 0.4 0.6 0.8 1.0
ǫ
Figure 2.11: DCS for pair-production in lead as a function of the electron reduced energy,
= (E− + me c2 )/E. (Adapted from Baró et al., 1994a).
with 2
2 1 1
u1 = − φ1 (1/2), u2 = φ2 (1/2), (2.92)
3 2 κ
−3 2 −1
3 1 1 1 1 1 1
π1 () = − − , π2 () = − (2.93)
2 2 κ 2 2 2 κ
and
U1 () = φ1 ()/φ1 (1/2), U2 () = φ2 ()/φ2 (1/2). (2.94)
The functions πi () are normalised PDFs in the interval (κ−1 ,1 − κ−1 ), from which
random values of can be easily sampled by using the inverse-transform method. In
this interval, the functions Ui () are positive and less than unity, i.e., they are valid
rejection functions. The generation of random values of from the distribution (2.91)
can now be performed by combining the composition and rejection methods (see Section
1.2) according to the following algorithm:
(i) Sample a value of the integer i (=1, 2) according to the point probabilities
u1 u2
p(1) = and p(2) = . (2.95)
u1 + u2 u1 + u2
(ii) Sample from πi () using the sampling formulas (inverse-transform method, see
Section 1.2.2)
1 1 1
+ − (2ξ − 1)1/3 if i = 1,
2 2 κ
= (2.96)
1 1 1
+ − 2ξ if i = 2.
κ 2 κ
96
NEA/NSC/DOC(2015)3
(v) Deliver .
Notice that the quantity 2ξ − 1 may be negative and, therefore, taking its cube root
will lead to a computer error; provision of this fact must be made when programming
the algorithm. The efficiency of the algorithm is greater than 70% for energies near the
threshold, and increases with increasing photon energies. For E = 1 GeV it is of the
order of 95% for all the elements in the periodic table.
Triplet production occurs with probability, ptriplet = σtriplet /σpp . Although we do
not follow the recoiling target electron, we consider that triplet production may leave
the target atom with a vacancy in an inner shell. The active-electron shell is selected
randomly, by assuming that the Z atomic electrons have equal probabilities of being
ejected.
Actually, the complete DCS for pair production is a function of the directions of the
pair of particles. As the final state involves three bodies (the nucleus and the produced
pair), the directions of the produced particles cannot be obtained from only their kinetic
energies. The polar angles of the directions of movement of the electron and positron (θ−
and θ+ , Fig. 2.1) relative to the direction of the incident photon are sampled from the
leading term of the expression obtained from high-energy theory (Heitler, 1954; Motz
et al., 1969)
p(cos θ± ) = a (1 − β± cos θ± )−2 , (2.97)
where a is a normalisation constant and
p
E± (E± + 2me c2 )
β± = (2.98)
E± + m e c 2
is the particle velocity in units of the speed of light. Random values of cos θ± are
obtained by using the inverse-transform method (see Section 1.2.2), which leads to the
sampling formula
2ξ − 1 + β±
cos θ± = . (2.99)
(2ξ − 1)β± + 1
As the directions of the produced particles and the incident photon are not necessarily
coplanar, the azimuthal angles φ− and φ+ of the electron and the positron are sampled
independently and uniformly in the interval (0, 2π).
It is worth stressing the fact that the produced charged particles have ranges that
are much smaller than the mean free path of the photons. Furthermore, the charged
particles immediately enter a multiple elastic scattering process which randomises their
97
NEA/NSC/DOC(2015)3
As mentioned above, penelope uses tables of total cross sections for photoelectric
absorption and Rayleigh scattering extracted from the EPDL (Cullen et al., 1997).
98
NEA/NSC/DOC(2015)3
105 105
coherent coherent
104 incoherent 104 incoherent
photoelectric photoelectric
pair product. pair product.
103 total 103 total
102 102
µ/ρ (cm2/g)
µ/ρ (cm2/g)
H2O Al
10 10
1 1
0.1 0.1
10−2 10−2
10−3 2 10−3 2
10 103 104 105 106 107 108 109 10 103 104 105 106 107 108 109
E (eV) E (eV)
5 5
10 10
coherent coherent
4 incoherent 4 incoherent
10 10
photoelectric photoelectric
pair product. pair product.
103 total 103 total
102 102
µ/ρ (cm2/g)
µ/ρ (cm2/g)
I Pb
10 10
1 1
0.1 0.1
10−2 10−2
10−3 2 10−3 2
10 103 104 105 106 107 108 109 10 103 104 105 106 107 108 109
E (eV) E (eV)
Figure 2.12: Partial and total mass attenuation coefficients of water, aluminium, iodine and
lead as functions of the photon energy. Notice the different low-E behaviour of µCo /ρ for
insulators (water and iodine) and conductors (aluminium and lead).
99
NEA/NSC/DOC(2015)3
Cross sections of these two processes for energies different from those in the tables are
calculated by linear log-log interpolation. Total cross sections for pair production are
obtained from tables generated with the program xcom (Berger et al., 2005). Values
of σpair (E) and σtriplet (E) for arbitrary energies are evaluated by cubic spline log-log
interpolation of the functions (1 − 2me c2 /E)−3 σpair (E) and (1 − 4me c2 /E)−3 σtriplet (E),
which vary slowly with the photon energy.
Mean free paths for incoherent scattering are calculated from the DCSs given by
the impulse approximation, as described in Section 2.3. For E greater than ∼ 50 keV,
the resulting values are very close to those given by the xcom program, which were
calculated from the Waller-Hartree theory, Eq. (2.51), with the incoherent scattering
functions of Hubbell et al. (1975, 1977). At lower energies, our mean free paths for
Compton scattering deviate from those given by xcom, because the Waller-Hartree
theory neglects Doppler broadening. The evaluation of the total atomic cross section
for Compton scattering [see Eq. (2.48)] involves a numerical quadrature, which is per-
formed by using the function SUMGA (SectionB.2 in Appendix B). Partial and total mass
attenuation coefficients for water, aluminium, iodine and lead are displayed in Fig. 2.12.
As already mentioned, penelope simulates photon transport by using the conven-
tional detailed (interaction by interaction) method. To sample the path length to the
next interaction site and the type of event that occurs there, the values of total and
partial attenuation coefficients at the current energy E are required. During simulation,
these attenuation coefficients are obtained by interpolation from pre-calculated tables
stored in memory. In penelope, energy-dependent quantities are usually tabulated
for a logarithmic grid of 200 energies, Ei (i = 1, . . . , 200), which spans the complete
energy range considered in the simulation, and values of these quantities at intermedi-
ate energies E are obtained by linear log-log interpolation. This scheme works well for
pair production and for Compton scattering, whose partial attenuation coefficients vary
smoothly with energy. However, it is not applicable to photoelectric absorption and
Rayleigh scattering because µph (E) is not continuous and µRa (E) varies very rapidly in
the vicinity of absorption edges (see Fig. 2.12). To ensure accuracy, the grid of energies
where µph (E) is tabulated must include the absorption edges and, therefore, cannot
be the same for all materials. On the other hand, µRa (E) must be tabulated densely
in the regions where anomalous scattering occurs. Consequently, interpolation of the
attenuation coefficients for photoelectric absorption and Rayleigh scattering is lengthier
than for other interactions.
Many interpolations of µph (E) and µRa (E) can be avoided by using the following
simple method, which involves delta interactions (see Section 1.4.5). Let µph,max be
the maximum value of µph (E) in the grid interval (Ei , Ei+1 ). Transported photons
are allowed to undergo delta interactions, and we consider photoelectric absorption and
delta interactions as a combined process (“ph+δ”) with partial attenuation coefficient
equal to µph,max , which is constant within each grid interval. That is, the attenuation
coefficient for delta interactions is defined by
100
NEA/NSC/DOC(2015)3
Similarly, Rayleigh scattering is combined with delta interactions, and the attenuation
coefficient of the latter is set equal to
where µRa,max is the maximum value of µRa (E) in the grid interval (Ei , Ei+1 ). To
sample the length of the free flight to the next interaction, we use the augmented total
attenuation coefficient
Note that interpolation of µRa and µph is not required at this point. The kind of inter-
action that occurs at the end of the free flight is sampled from the relative probabilities
of the various interaction mechanisms (“Ra+δ”, “ph+δ”, “Co” and “pp”), which are
proportional to the corresponding partial attenuation coefficients,
µRa,max µRa,δ + µRa µph,max µph,δ + µph
pRa+δ = 0
= , pph+δ = =
µ µ0 µ 0 µ0
µCo µpp
pCo = 0 , ppp = 0 . (2.106)
µ µ
If the result of the sampling is, e.g., “ph+δ”, the interaction may be either true pho-
toelectric absorption or a delta interaction. The kind of interaction that takes place
is determined by random sampling from the corresponding point probabilities πph =
µph (E)/µph,max and πδ = 1 − πph . Thus, only when the outcome is “ph+δ” (“Ra+δ”),
do we need to evaluate the partial attenuation coefficient for photoelectric absorption
(Rayleigh scattering) to determine whether the interaction is photoelectric absorption
(scattering) or a delta interaction. The costly interpolation of µph (E) [or µRa (E)] is
performed only when the probability of photoabsorption [or Rayleigh scattering] is ap-
preciable.
101
NEA/NSC/DOC(2015)3
Excited ions with a vacancy in an inner shell relax to their ground state through a
sequence of radiative and non-radiative transitions. In a radiative transition, the vacancy
is filled by an electron from an outer shell and an x ray with characteristic energy is
emitted. In a non-radiative transition, the vacancy is filled by an outer electron and
the excess energy is released through emission of an electron from a shell that is further
out (Auger effect). Each non-radiative transition generates an additional vacancy that,
in turn, migrates “outwards”. The production of vacancies in inner shells and their
subsequent relaxation must be simulated in detail, since the energetic x rays and/or
electrons emitted during the process may transport energy quite a distance from the
excited ion.
penelope can simulate the emission of characteristic x rays and Auger electrons
that result from vacancies produced in K, L, M and N shells by photoelectric absorption,
Compton scattering, triplet production, and electron/positron impact (see Chapter 3).
In practical simulations, we introduce a suitable cutoff energy, Ec [see Eq. (2.111) below],
and consider the shells with ionisation energies Ui larger than Ec as inner shells. Shells
with ionisation energies less than Ec , or beyond the N7 subshell, are regarded as outer
shells. Although the partial cross sections and relaxation data of subshells N6 and N7
are included in the database and considered in the calculations, the results for these
two subshells may not be reliable when their ionisation energies alternate with those
of the O1-5 subshells (see Fig. 2.3). The relaxation of vacancies in ionized atoms is
followed until all inner shells are filled up, i.e., until the vacancies have migrated to
outer shells. Vacancies in these outer shells originate secondary radiation with energy
lower than Ec , whose main effect is to spread out the excitation energy of the ion in
the surrounding material. To obtain a reliable description of the spatial distribution of
absorbed dose and other macroscopic transport characteristics, we only have to follow
energetic secondary radiation that is able to propagate to distances of the order of, say,
1% of the penetration distance (or range) of the primary radiation. Radiation with
lower energy does not need to be followed, since its only effect is to blur the “primary”
dose distribution on a small length scale.
To simplify the description of ionisation processes of outer shells (i.e., photoelectric
absorption, Compton scattering, and electron/positron impact), we simply assume that,
when ionisation occurs in an outer shell, a secondary (delta) electron is emitted from
the parent ion with a kinetic energy Es equal to the energy deposited by the primary
particle,
0
E −E
in Compton scattering,
Edep = E in photoelectric absorption, (2.107)
W in electron/positron impact (see Chapter 3).
That is, the whole excitation energy of the ion is taken up by the ejected electron and
no fluorescent radiation is simulated. In reality, the emitted electrons have energies that
are less than the values given by Eq. (2.107) and can be followed by characteristic x
rays, which have mean free paths that are usually much larger than the Bethe range
of photoelectrons. By giving an artificially increased initial energy to the electron we
102
NEA/NSC/DOC(2015)3
allow it to transport energy further from the ion so as to partially compensate for the
neglect of other radiation emitted during the de-excitation cascade.
In the case of ionisation of an inner shell i (i.e., a shell with Ui > Ec ), we consider
that the electron is ejected with kinetic energy
Es = Edep − Ui , (2.108)
and that the target atom is left with a vacancy in shell i. As mentioned above, we
consider only characteristic x rays and Auger electrons emitted in the first stages of
the relaxation process, until all inner shells are filled up. This secondary radiation
is assumed to be emitted isotropically from the excited atom. We use the following
notation to designate the possible transitions
• Radiative: S0-S1 (an electron from the S1 shell fills the vacancy in the S0 shell, leaving
a hole in the S1 shell). The considered radiative transitions (for elements with Z > 18
with the M-shell filled) are shown in Fig. 2.2.
• Non-radiative: S0-S1-S2 (an electron from the S1 shell fills the vacancy in the S0 shell,
and the released energy is taken away by an electron in the S2 shell; this process leaves
two vacancies in the S1 and S2 shells).
Non-radiative transitions of the type LI-LJ-Xq, which involve an electron transition
between two L-subshells and the ejection of an electron from an outer shell Xq are
known as L-shell Coster-Kronig transitions.
The information furnished to penelope for each element consists of a table of pos-
sible transitions, transition probabilities and energies of the emitted x rays or electrons
for ionised atoms with a single vacancy in the K shell or in an L, M or N subshell.
These data are entered through the material definition file. The transition probabilities
are extracted from the LLNL Evaluated Atomic Data Library (Perkins et al., 1991).
Figure 2.13 displays transition probabilities for the transitions that fill a vacancy in the
K shell as functions of the atomic number Z; the curve labelled “Auger” corresponds
to all non-radiative transitions. We see that for low-Z elements, relaxation proceeds
mostly through non-radiative transitions. It is worth noting that the ratio of proba-
bilities of the radiative transitions K-S2 and K-S3 (where S stands for L, M or N) is
approximately 1/2, as obtained from the dipole approximation (see, e.g., Bransden and
Joachain, 1983); radiative transitions K-S1 are strictly forbidden (to first order) within
the dipole approximation.
The energies of x rays emitted in radiative transitions resulting from single vacan-
cies in the K and L shells were taken from the recent compilation by Deslattes et al.
(2003). X-ray energies for transitions of vacancies in M shells were taken from Bear-
den’s (1967) review and reevaluation of experimental x-ray wavelengths. In the case of
radiative transitions S0-S1 not included in Bearden’s tabulation, the energy of the x ray
is approximated as
0 0
Ex = US0 − US1 , (2.109)
0
where USi is the ionisation energy of an electron in the shell Si of the neutral atom,
which was taken from the LLNL Evaluated Atomic Data Library (Perkins et al., 1991).
103
NEA/NSC/DOC(2015)3
10−3
0 10 20 30 40 50 60 70 80 90 100
Z
Figure 2.13: Relative probabilities for radiative and non-radiative (Auger) transitions that
fill a vacancy in the K-shell of atoms.
The ionisation energies in this library are the negatives of the eigenvalues of the DHFS
self-consistent equations for neutral atoms in their ground states. For tightly bound
0
shells, with US0 i & 200 eV, the theoretical values USi agree closely with Carlson’s (1975)
recommended shell ionisation energies (Salvat and Fernández-Varea, 2009). The energy
of the electron emitted in the non-radiative transition S0-S1-S2 is set equal to
0 0 0
Ee = US0 − US1 − US2 . (2.110)
Note that these recipes correspond to assuming that the presence of the vacancy (or
vacancies) does not alter the ionisation energies of the active electron shells, which is an
approximation. It should be mentioned that these transition energies are also used to
determine the energies of the emitted radiation at any stage of the de-excitation cascade,
which means that we neglect possible relaxation of the ion (see, e.g., Sevier, 1972).
Therefore, our approach will not produce Lα and Lβ x-ray satellite lines; these arise from
the filling of a vacancy in a doubly-ionised L shell (generated, e.g., by a Coster-Kronig
transition), which releases energy that is slightly different from the energy liberated
when the shell contains only a single vacancy. It is also worth recalling that the adopted
transition probabilities are approximate. For K shells they are expected to be accurate
to within about 1%, but for other shells they are subject to much larger uncertainties.
Even the L-shell fluorescence yield (the sum of radiative transition probabilities for an
L-shell vacancy) is uncertain by about 20% (see, e.g., Hubbell, 1989; Perkins et al.,
1991).
The simulation of the relaxation cascade is performed by subroutine RELAX. The
transition that fills the initial vacancy is randomly selected according to the adopted
transition probabilities by using Walker’s aliasing method (Section 1.2.3.1). This transi-
tion leaves the ion with one or two vacancies. If the energy of the emitted characteristic x
104
NEA/NSC/DOC(2015)3
ray or Auger electron is larger than the corresponding absorption energy, the state vari-
ables of the particle are stored in the secondary stack (which contains the initial states
of all particles produced during the current shower that have not yet been simulated).
The generation of the cascade continues by repeating the process for each remaining
vacancy. It ends either when the K, L, M and N subshells have been filled up or when
there is not enough energy to produce “effective” fluorescence radiation (with energy
larger than the cutoff energy, Ec ). The excitation energy of the residual ion is assumed
to be deposited locally.
It is important to bear in mind that we are disregarding the emission and transport
of soft x rays and slow electrons. This sets a lower limit to the photon energies for which
penelope is applicable. As indicated above, the database of interaction cross sections
covers the energy range above ∼ 50 eV and, consequently, only radiation with energy
higher than this value can be followed. Additionally, we do not consider the relaxation
of shells with principal quantum number larger than 4 (O, P, and Q subshells). Hence,
simulation results are expected to be reliable only for photons with energies higher than
105
NEA/NSC/DOC(2015)3
energy levels (Sevier, 1972). The natural width Γ of an atomic energy level and the
lifetime τ of the states of that level are related by the time-energy uncertainty relation,
Γτ ' ~. (2.112)
As noted by Richtmyer et al. (1934), in the case of excitations which produce a single
vacancy in an inner shell i, the subsequent decay of the excited state involves the filling
of that vacancy by electrons from nearest shells, a process practically independent of
the condition of the excited electron. Consequently, all excited levels with a vacancy
in shell i have approximately the same level width, Γi , the so-called core-level width,
and the same mean lifetime τi = ~/Γi . Calculated values of core-level widths of free
atoms are given in the LLNL Evaluated Atomic Data Library (Perkins et al., 1991).
Campbell and Papp (2001) provide a set of recommended widths for K to N7 levels
of atoms obtained from consideration of available experimental data. These corel-level
widths are tabulated in the file pdatconf.p14 of the penelope database. Typically,
the widths Γi increase with the binding energy of the shell; they are of the order of 0.1
eV or less for weakly bound shells, and reach values of the order of 100 eV for K shells
of transuranic elements. The corresponding lifetimes have values of the order of 10−14
to 10−17 seconds.
Let us consider an atom with a vacancy in shell i at t = 0. The probability of decay
per unit time is constant and equal to τi−1 (see, e.g., Merzbacher, 1970), the reciprocal
of the lifetime. That is, the probability that the filling of the vacancy occurs during the
time interval between t and t + dt is τ −1 dt. It may be observed that atomic decay bears
a similarity to the interaction process studied in Section 1.4, which is characterised by
a constant interaction probability λ−1 per unit path length. The PDF p(t) of the time
t when the atom decays can be obtained as follows. By definition, the probability that
the atom remains in the excited state at time t is
Z ∞
F(t) = p(t0 ) dt0 . (2.113)
t
The probability that the vacancy will be filled in the time interval between t and t + dt
can be expressed as F(t) τi−1 dt. Hence, p(t) satisfies the integral equation
Z ∞
−1
p(t) = τi p(t0 ) dt0 , (2.114)
t
106
NEA/NSC/DOC(2015)3
assuming that a vacancy in shell i is filled after a random time t, which is sampled from
the PDF (2.115),
t = −τi ln ξ . (2.116)
The lifetimes τi are obtained from the level widths in the tables of Campbell and Papp
(2001), which include data for elements with atomic number Z from 10 to 92, except for
a few N subshells. For elements with Z > 92, and for N subshells that are missing in the
tables of Campbell and Papp, the level widths are extracted from the LLNL Evaluated
Atomic Data Library (Perkins et al., 1991). It is worth mentioning that we simulate
relaxation cascades using atomic lifetimes that correspond to excited states with a single
vacancy. To account partially for the possible occurrence of multiple vacancies, when in
the course of the de-excitation cascade we find ν > 1 vacancies in the active shell, the
lifetime is set equal to τi /ν.
d2 σ(bζ 0 , aζ) E 2
0
= re2 0 |J (b, k0 ζ 0 ; a, kζ)| , (2.117)
dE dΩ E
where E 0 = ~ω 0 = c~k 0 is the energy of the scattered photon, dΩ is a solid angle element
in the direction k̂0 , and J (b, k0 ζ 0 ; a, kζ) is a sum of products of dimensionless matrix
elements. The interesting feature here is that the quantity J (b, k0 ζ 0 ; a, kζ) is linear in ζ
and anti-linear in ζ 0 . It is convenient to express all polarisation states in the “natural”
basis {ˆ1 (k), ˆ2 (k)} of linear polarisation (see Section C.1 in Appendix C). In this basis,
107
NEA/NSC/DOC(2015)3
the states of the incident and the scattered photons are represented as
X X
ζ= di ˆi (k̂), ζ0 = fj ˆj (k̂0 ) (2.118)
i j
with
Tis ≡ J (b, k0 ˆ0s ; a, kˆi ). (2.120)
The DCS (2.117) then takes the form
d2 σ(bζ 0 , aζ) 2 E
X
∗ ∗
∗
= r e f r f s T is T jr di dj
dE 0 dΩ E 0 rs,ij
X
= fr fs∗ Ssr,ij di d∗j , (2.121)
rs,ij
11 22 12 21
∗ ∗ ∗ ∗
11 T11 T11 T21 T21 T11 T21 T21 T11
∗ ∗ ∗ ∗
S=
22
T12 T12
∗
T22 T22
∗
T12 T22
∗
T22 T12 2 E.
∗ re (2.123)
12 T11 T12 T21 T22 T11 T22 T21 T12 E0
∗ ∗ ∗ ∗
21 T12 T11 T22 T21 T12 T21 T22 T11
The products di d∗j and fr fs∗ are the elements of the polarisation density matrices of
incident and scattered photons (see Section C.2 of Appendix C),
can be regarded as the elements of the density matrix ρ(sc) of the scattered photons. We
can then write
d2 σ(bζ 0 , aζ) X
0
= fr fs∗ ρ(sc) 0 (sc)
sr = Tr(ρ ρ ), (2.126)
dE dΩ rs
108
NEA/NSC/DOC(2015)3
where “Tr” indicates the trace (sum of diagonal elements) of the matrix. In addition, by
virtue of the identity (C.49), the matrix ρ0 can be interpreted as the operator F of an
ideal polariser that transmits photons with the polarisation ˆ0α of the scattered beam.
In the case of completely polarised photons, Eq. (2.126) does not contain any new
physics. However, now we can interpret the expression on the right-hand side as follows.
The interaction with the atom modifies the density matrix of the incident photon beam
through the transformation ρ → ρ(sc) and the DCS is simply the expectation value of
a measurement with the polarising filter F = ρ0 on the beam that results from the
interaction. When the polarisation of scattered photons is not observed, the operator
F is that of the transparent filter, F = I2 . We then obtain from Eq. (2.126)
d2 σ(b, aζ)
= Tr(ρ(sc) ). (2.127)
dE 0 dΩ
The great advantage of expressions (2.126) and (2.127) is that they are also valid
for photon beams with partial polarisation. We can readily verify this assertion for the
familiar case in which the incident beam is unpolarised (ρ = 12 I2 ), and the polarisation
of the scattered beam is not observed (F = I2 ). Formula (2.127) then gives
d2 σ(b, a) 1X 1
0
= [Sss,11 + Sss,22 ] = [S11,11 + S11,22 + S22,11 + S22,22 ]
dE dΩ 2 s 2
E 1 ∗ ∗ ∗ ∗
= re2 [T11 T11 + T21 T21 + T12 T12 + T22 T22 ], (2.128)
E0 2
which is the result obtained with the habitual method of summing over final polarisation
states and averaging over initial states.
It is convenient to use the four-vector representation of polarisation states, Eq.
(C.61), to describe the polarisation of photon beams. Let P and Q denote the polarisa-
tion four-vectors of the incident and scattered photons, corresponding to the polarisation
vectors ζ and ζ 0 , respectively. The DCS can then be expressed in the form,
d2 σ(bQ, aP) 1 T
0
= DT
Q Z34 SDP = Q (AP), (2.129)
dE dΩ 2
with
A ≡ 2 X T Z34 SX . (2.130)
1 T
The factor 2
Q represents the action of an ideal filter that selects the final polarisation
state [see Eq. (C.65)]. The matrix A transforms the Stokes vector of the incident photons
into that of the scattered radiation,
109
NEA/NSC/DOC(2015)3
assume that the incident photons propagate in the direction ẑ, and take the polarisation
vectors ˆ1 and ˆ2 in the directions of the x and y axes, respectively. That is,
0 1 0
k̂ = 0 , ˆ1 = 0 , ˆ2 = 1 . (2.132)
1 0 0
Photons are scattered into directions k̂0 defined by the polar and azimuthal scattering
angles, θ and φ, respectively. To describe the polarisation of scattered photons, we
use Stokes vectors with respect to the basis of linear polarisation states {ˆ1 (k̂0 ), ˆ2 (k̂0 )}
defined by Eqs. (C.6) in Appendix C (see also Fig. C.1). Then,
cos φ sin θ cos φ cos θ − sin φ
0 0
k̂0 =
sin φ sin θ ,
ˆ
1 = sin φ cos θ ,
ˆ
2 = cos φ .
(2.133)
cos θ − sin θ 0
For simulation purposes, this convention has the advantage that the inverse of the
rotation R(θ, φ), Eq. (C.5), transforms the vectors k̂0 , ˆ01 and ˆ02 into the triad (2.132).
Note that ˆ01 lies on the scattering plane, defined by the directions k̂ and k̂0 , and ˆ02 is
on the plane z = 0, see Fig. 2.14.
z z
k k
k′ k′
θ ǫ̂2′ ǫ̂2′
θ
ǫ̂1′ ǫ̂1′
ǫ̂2 ǫ̂2
ǫ̂1 ǫ̂1
y y
x x
φ
Figure 2.14: Linear polarisation vectors used in the description of scattering events. The
left diagram corresponds to the general case of scattering with φ 6= 0. The right diagram
represents the case φ = 0, i.e., the scattering plane (hatched) coincides with the zero-azimuth
plane; the polarisation vectors ˆ1 and ˆ01 are both on this plane. This is the situation assumed
in calculations of the matrix A(0) .
Most formulas take simpler forms when the polarisation vectors ˆ1 and ˆ01 are both on
the plane of scattering. Hence, to calculate the matrix A it is advantageous to proceed
in two stages. We first perform a rotation of angle φ of the polarisation vectors ˆ1 and ˆ2
110
NEA/NSC/DOC(2015)3
about the k̂ axis, i.e., a rotation of the zero-azimuth plane (see Fig. 2.14). The rotated
zero-azimuth plane then coincides with the scattering plane and, therefore, the rotated
vector ˆ1 also lies on that plane. The rotated polarisation vectors are (for simplicity we
use the same symbols as for the original vectors)
cos φ − sin φ
ˆ1 = sin φ , ˆ2 = cos φ . (2.134)
0 0
We have
ˆ1 ·ˆ01 = cos θ, ˆ2 ·ˆ02 = 1, ˆ1 ·ˆ02 = ˆ2 ·ˆ01 = 0. (2.135)
The effect of the rotation on the Stokes vector of the incident beam is described by the
transformation (C.68), P0 = R(φ)P. Hence the matrix A can be expressed as
A = A(0) R(φ), (2.136)
where the matrix A(0) corresponds to the case of scattering in the zero-azimuth plane
(with φ = 0), where the polarisation vectors take the forms (2.133) and (2.134) and
satisfy the orthogonality relations (2.135).
111
NEA/NSC/DOC(2015)3
Then
(0)
ARa = 2 X T Z34 S (0) X
cos2 θ
1 1 0 0 1 0 0 0 0 0 0 1 0 0 1
2
r 0 0
1 10
1 0 0 0
1 0 0 1
0 0 −1
= e |F(q)|2 .
2
0 0 −i i 0 0 0 1 0 0 cos θ 0 0 1 −i 0
1 −1 0 0 0 0 1 0 0 0 0 cos θ 0 1 i 0
That is,
cos2 θ + 1 0 cos2 θ − 1
0
(0) re2
2 0 2 cos θ 0 0
ARa = |F(q)| . (2.142)
2 0 0 2 cos θ 0
2 2
cos θ − 1 0 0 cos θ + 1
Finally, from Eq. (2.129), the DCS for Rayleigh scattering of polarised photons is
dσRa (Q, P) 1 (0)
= QT {ARa R(φ)P}. (2.143)
dΩ 2
When polarisation of the scattered photons is not observed, the DCS is given by this
expression with the Stokes vector QI = (2, 0, 0, 0) of the transparent filter,
dσRa (P) (0)
= (1, 0, 0, 0){ARa R(φ)P}
dΩ
1
re2 cos(2φ)P1 − sin(2φ)P3
= |F(q)|2 cos2 θ + 1, 0, 0, cos2 θ − 1
2
P2
sin(2φ)P1 + cos(2φ)P3
re2
|F(q)|2 cos2 θ + 1 + (cos2 θ − 1) [sin(2φ)P1 + cos(2φ)P3 ] .
= (2.144)
2
Note that terms which depend on φ yield null contributions when integrated over this
angle. We can then consider the cross section differential in only the polar deflection,
Z 2π
dσRa (P) dσRa (P) cos2 θ + 1
= dφ = 2πre2 |F(q)|2 , (2.145)
d(cos θ) 0 dΩ 2
which is independent of the polarisation of the incident photons. This feature, which is
a consequence of the assumed isotropy of the target atoms, implies that the distribution
of the polar angle θ for polarised photons is the same as for unpolarised radiation.
Finally, the total cross section for Rayleigh scattering of incident photons with arbitrary
polarisation P is
Z 1 2
re
σRa (P) = 2π |F(q)|2 (cos2 θ + 1) d(cos θ), (2.146)
−1 2
irrespective of the polarisation of the incident photons.
112
NEA/NSC/DOC(2015)3
(cos2 θ + 1) + C cos2 θ − 1
0 0
r2 E 02 0 2 cos θ 0 0
= e 2 . (2.151)
2 E 0 0 (2 + C) cos θ 0
cos2 θ − 1 0 0 cos2 θ + 1
113
NEA/NSC/DOC(2015)3
re2 E 02 2 2
= cos θ + 1 + C + (cos θ − 1) [sin(2φ)P 1 + cos(2φ)P 3 ] . (2.153)
2 E2
Again, terms that depend on φ yield null contributions when integrated over this angle.
The cross section differential in only the polar deflection is
2π
E 02
Z
dσCo (P) dσCo (P)
= dφ = πre2 2 (cos2 θ + 1 + C). (2.154)
d(cos θ) 0 dΩ E
Because of the symmetry of the interaction, this DCS is independent of the polarisation
of the incident photons. Hence, the distribution of the polar angle θ for scattering of
polarised radiation is the same as for unpolarised photons. Inserting expression (2.149),
we obtain
02
0
dσCo (P) 2 E E E 2
= πre 2 + 0 − sin θ , (2.155)
d(cos θ) E E E
which is the Klein-Nishina DCS, Eq. (2.27), multiplied by the factor 2π that results
from integration over φ.
From the foregoing discussion it is clear that photons scattered into the direction
(θ, φ) have the polarisation defined by the Stokes vector
P0 = BCo P, (2.156)
(0)
where the matrix BCo is equal to the product ACo R(φ). However, in our Monte Carlo
simulations, individual photons are followed. Since the Stokes vector of a photon state
has its zeroth component equal to unity [see Eq. (C.61)], the Stokes vector of a scattered
114
NEA/NSC/DOC(2015)3
photon will always be renormalised in this way. Hence, we can disregard constant factors
in the matrix BCo and write
(cos2 θ + 1) + C cos2 θ − 1
0 0
0 2 cos θ 0 0
BCo =
0 0 (2 + C) cos θ 0
2 2
cos θ − 1 0 0 cos θ + 1
1 0 0 0
0 cos(2φ) 0 − sin(2φ)
× . (2.157)
0 0 1 0
0 sin(2φ) 0 cos(2φ)
(0) (0)
From the similarity between the matrices ARa and ACo , Eqs. (2.142) and (2.151), we see
that polarisation changes in Rayleigh scattering are described by a matrix BRa which is
given by this expression with C = 0.
It is interesting to note that the transformation matrix (2.157) does not mix the
component of circular polarisation P2 with other components (the only non-zero element
in the third column and in the third row is the one on the diagonal). This implies that,
if polarisation of the incident photons has no circular component, P2 = 0, the scattered
photons also have P20 = 0. That is, scattering is not able to produce circular polarisation
when it is not present in the incident beam. If we were interested in describing only
the transport of photons with P2 = 0, we could simply remove the component P2 of
the Stokes vector and of the transformation matrices. In fact, this is equivalent to
the linear-polarisation approximation adopted in the EGS5 code (Namito et al., 1993;
Hirayama et al., 2006).
115
NEA/NSC/DOC(2015)3
adopted by Fernández et al. (1998) in their vector Monte Carlo code mcshape for the
simulation of polarised photons in simple planar geometries.
As shown in previous Sections, the probability distribution function (PDF) of the
polar deflection cos θ is independent of the polarisation of the incident photons. There-
fore, cos θ can be sampled using the same algorithms as in the scalar mode. The PDF
of the azimuthal scattering angle φ (with cos θ fixed) is given by the DCSs (2.144) or
(2.153). We have
where N is a normalisation constant. Note that the PDF for Rayleigh scattering, cf. Eq.
(2.144), is obtained by setting C = 0. It is clear that polarisation of the incident photon
only affects the distribution of azimuthal angles. In the case of circularly polarised
photons, with P2 6= 0 and P1 = P3 = 0, this distribution is still uniform.
Random values of φ from the PDF (2.158) can be sampled by a rejection method
(see Section 1.2.5). This PDF has extrema, maxima and minima, at angles φextr such
that
tan(2φextr ) = P1 /P3 . (2.159)
It can be readily verified that the maximum value of p(φ) occurs at an angle φmax such
that
−P1 −P3
sin(2φmax ) = p 2 and cos(2φmax ) = p . (2.160)
P1 + P32 P12 + P32
Let us consider the function
(i) Sample a value φ from the uniform distribution U0,2π (φ), i.e., generate a random
number ξ and set φ = 2πξ.
(iv) Deliver φ.
Note that this sampling algorithm is exact. Furthermore, its efficiency improves when
the value of C increases. The least favourable case is found when C = 0 (which occurs
for Rayleigh scattering and for forward Compton scattering, with θ = 0). Efficiency
116
NEA/NSC/DOC(2015)3
is higher than (or equal to) 50%, i.e., on average we have to generate less than four
random numbers to get an accepted value of φ.
The simulation of random histories is similar to that of unpolarised radiation (see
Section 1.4.4). After the n-th interaction, a photon propagates in a direction k̂n , with
energy E and polarisation described by the Stokes vector Pn . The direction vector
k̂n can be represented by means of its direction cosines, (u, v, w), or by its polar and
azimuthal angles, (ϑ, ϕ),
u cos ϕ sin ϑ
k̂ = v = sin ϕ sin ϑ .
(2.163)
w cos ϑ
Note that4
ϑ = arccos w, ϕ = ATAN2(y, x). (2.164)
In the Monte Carlo code, direction cosines are convenient for fast calculation of space
displacements, while the angles (ϑ, ϕ) are better suited for defining rotations (see below).
The Stokes vector Pn is referred to the “natural” basis of polarisation vectors, ˆ1 (k̂n )
and ˆ2 (k̂n ), defined by Eqs. (C.6), and normalised with its zeroth component equal to
unity. The rotation
cos ϕ cos ϑ − sin ϕ cos ϕ sin ϑ
R(ϑ, ϕ) ≡ R(ϕẑ) R(ϑŷ) = sin ϕ cos ϑ cos ϕ sin ϕ sin ϑ
(2.165)
− sin ϑ 0 cos ϑ
transforms the unit vectors {ẑ, x̂, ŷ} of the laboratory frame into the corresponding
triad {k̂n , ˆ1 (k̂n ), ˆ2 (k̂n )}.
The polar and azimuthal scattering angles in the next, (n + 1)-th interaction of
the photon are sampled from the relevant PDFs as described above. To determine the
direction k̂n+1 and polarisation Pn+1 of the scattered photon we perform the following
sequence of rotations:
1) A rotation R−1 (ϑ, ϕ) = R(−ϑŷ)R(−ϕẑ), which transforms the vectors {k̂n , ˆ1 (k̂n ),
ˆ2 (k̂n )} into {ẑ, x̂, ŷ}. This rotation keeps the relative orientations of the unit base
vectors unaltered and, therefore, it does not modify the Stokes vector Pn .
2) A rotation R(φẑ)R(θŷ) that describes the effect of an interaction with the sampled
scattering angles for photons incident in the direction of the z axis. This rotation
transforms the vectors {ẑ, x̂, ŷ} into
cos φ sin θ cos φ cos θ − sin φ
0 0
k̂0 =
sin φ sin θ ,
ˆ
1 = sin φ cos θ ,
ˆ
2 = cos φ .
(2.166)
cos θ − sin θ 0
4
The Fortran intrinsic function ATAN2(y, x) gives the arc-tangent of y/x resolved into the correct
quadrant, the result is in the range (−π, π).
117
NEA/NSC/DOC(2015)3
Polarisation of the scattered photon, relative to the “natural” basis of polarisation vec-
tors for the direction k̂0 , ˆ1 (k̂0 ) and ˆ2 (k̂0 ), is obtained from Eq. (2.156),
P0 = BRa or Co Pn , (2.167)
and is renormalised so that P00 = 1. That is, the transformed Stokes parameters are
given by
After computing the parameters P10 to P30 , the Stokes four-vector P0 is obtained by setting
P00 = 1. In the case of Compton scattering, the constant C is given by Eq. (2.149). For
Rayleigh scattering, C = 0.
3) A rotation R(ϑ, ϕ) = R(ϕẑ)R(ϑŷ), which inverts the rotation of the first step. Again,
this rotation leaves the Stokes vector unaltered so that Pn+1 = P0 . The final direction
vector is
cos ϕ cos ϑ − sin ϕ cos ϕ sin ϑ cos φ sin θ
k̂n+1 = R(ϑ, ϕ)k̂0 =
sin ϕ cos ϑ cos ϕ sin ϕ sin ϑ sin φ sin θ , (2.169)
− sin ϑ 0 cos ϑ cos θ
and its direction cosines are given by the same formulas as for unpolarised particles [see
Eqs. (1.131)],
sin θ
u0 = u cos θ + √ [uw cos φ − v sin φ] ,
1 − w2
sin θ
v 0 = v cos θ + √ [vw cos φ + u sin φ] , (2.170)
1 − w2
√
w0 = w cos θ − 1 − w2 sin θ cos φ.
118
NEA/NSC/DOC(2015)3
Chapter 3
In this Chapter we consider the interactions of fast electrons and positrons of kinetic
energy E with matter. For the sake of simplicity, we start by assuming that the particles
move in a single-element medium of atomic number Z and density ρ, with N atoms per
unit volume. The extension to compounds, and mixtures, is normally done on the
basis of the additivity approximation, i.e., the molecular DCS is approximated as the
incoherent sum of the atomic DCSs of all the atoms in a molecule.
E E—W
E 00000000 E 00000000
00 00 00 00 00 00 00 00 θ 00 00 00 00 00 00 00 00 θ
θs
E s = W — Ui
W
E+
E 00 00 00 00 00 00 00 00 00 θ 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 E θ+
000000000
E—W
θ—
E—
Bremsstrahlung emission Positron annihilation
The possible interactions of electrons and positrons with the medium are elastic
119
NEA/NSC/DOC(2015)3
scattering, inelastic collisions and bremsstrahlung emission (see Fig. 3.1); positrons can
also undergo annihilation, either in flight or at rest. The atomic DCSs adopted in
penelope are defined either as analytical functions or by means of numerical tables, or
as a combination of both. These DCSs, which are sufficiently accurate for most practical
simulation purposes, allow both fast and accurate random sampling of the individual
interactions. It is worth pointing out that multiple-scattering distributions are quite
insensitive to the fine details of the single-scattering DCSs. If the adopted DCSs have a
physically reasonable shape, only the values of a few integrals of the DCS have a direct
influence on the simulation results (Liljequist, 1987; Fernández-Varea et al., 1993a).
As a consequence, a general-purpose simulation procedure can be made fairly simple by
using approximate DCSs with the proviso that they exactly reproduce the correct values
of the relevant integrals. The DCSs described below represent a compromise between
reliability and simplicity; they are simple enough to allow the use of fast sampling
methods and, at the same time, they are flexible enough to account for the relevant
features of the interactions.
Owing to the large number of interactions suffered by a fast electron or positron
before coming to rest, detailed simulation is unfeasible at high energies. In penelope
we overcome this practical difficulty by using a mixed simulation procedure (see Chapter
4) instead of the habitual condensed simulation schemes adopted in other high-energy
simulation codes — e.g., etran (Berger and Seltzer, 1988a,b,c), its3 (Halbleib et al.,
1992), egs4 (Nelson et al., 1985), geant3 (Brun et al., 1989), egsnrc (Kawrakow and
Rogers, 2001), mcnp (X-5 Monte Carlo Team, 2003), geant4 (Agostinelli et al., 2003;
Allison et al., 2006), fluka (Ferrari et al., 2005), egs5 (Hirayama et al., 2006). The
formulation of mixed simulation is complicated by the fact that the sampling of hard
interactions is done from restricted DCSs, with cutoffs that vary with the particle energy
during the evolution of a track. This limits the complexity of the DCSs that can be
efficiently used in a simulation code.
In this Section we consider the theoretical description of elastic collisions of electrons and
positrons with isolated neutral atoms of atomic number Z at rest. By definition, elastic
interactions are those in which the initial and final quantum states of the target atom
are the same, normally the ground state. The angular deflections of electron trajectories
in matter are mainly (but not completely) due to elastic scattering. Notice that there
is a certain energy transfer from the projectile to the target, which causes the recoil of
the latter (see Section A.1.1 in Appendix A). Because of the large mass of the target
(∼ 3600Zme ), the average energy lost by the projectile is a very small fraction of its
initial energy (a few meV for scattering of 30 keV electron by aluminium atoms) and is
usually neglected, which is equivalent to assuming that the target has an infinite mass
and does not recoil.
120
NEA/NSC/DOC(2015)3
Elastic collisions of electrons and positrons with kinetic energies larger than a few
hundred eV can be described as scattering of the projectile by the electrostatic field
of the target (Mott and Massey, 1965). The charge distribution of the target atom
consists of the nucleus and the electron cloud. The density of atomic electrons ρe (r)
can be calculated by using available Hartree-Fock codes (e.g., the one of Desclaux, 1975,
1977). For atoms with closed-shell configurations, the electron distribution is spherically
symmetrical; for atoms with open shells, we assume that an average over directions is
performed to give a spherical density ρe (r). To account for the effect of the finite size of
the nucleus on the elastic DCS (which is appreciable only for projectiles with energy E
larger than a few MeV), the density of protons within the nucleus may be approximated
by the Fermi distribution (Hahn et al., 1956)
ρ0
ρn (r) = , (3.1)
exp [(r − Rn )(4 ln 3/t)] + 1
where Rn is the mean radius (or half-density radius) and t is the surface (or “skin”)
thickness (defined as the distance over which ρn drops from ∼ 0.9 to ∼ 0.1 of its central
value). These two parameters are given by
where Aw is the atomic weight of the element. The constant ρ0 , which equals twice the
proton density at r = Rn , is determined by normalisation,
Z ∞
Z = 4π ρn (r) r2 dr. (3.3)
0
Within the static-field approximation (Mott and Massey, 1965; Walker, 1971; Salvat
et al., 2005), the DCS for elastic scattering of electrons or positrons is obtained by
solving the partial-wave expanded Dirac equation for the motion of the projectile in the
field of the target atom. The interaction energy is given by
where z0 is the charge of the projectile in units of e (−1 for electrons, +1 for positrons).
The term Vex (r), which applies only for electrons, represents a local approximation
to the exchange interaction between the projectile and the atomic electrons (see, e.g.,
Salvat, 1998, 2003). We shall limit our considerations to the case of spin-unpolarised
projectiles, i.e., their spin is randomly oriented. The effect of elastic interactions can
121
NEA/NSC/DOC(2015)3
dσel
= |f (θ)|2 + |g(θ)|2 , (3.6)
dΩ
where
∞
1 X
f (θ) = {(` + 1) [exp(2iδ`+ ) − 1] + ` [exp(2iδ`− ) − 1]} P` (cos θ),
2ik `=0
∞
1 X
g(θ) = {exp(2iδ`− ) − exp(2iδ`+ )} P`1 (cos θ) (3.7)
2ik `=0
are the direct and spin-flip scattering amplitudes, respectively. The quantity
p 1 1/2
k≡ = E(E + 2me c2 ) (3.8)
~ ~c
is the wave number of the projectile, P` (cos θ) are Legendre polynomials, P`1 (cos θ)
are associated Legendre functions and δ`± are the phase shifts. These are determined
from the asymptotic behaviour of the Dirac radial functions for large r (Walker, 1971;
Salvat et al., 2005). Thus, to determine each phase shift we must solve the radial Dirac
equations for the potential V (r). The convergence of the partial-wave series (3.7) slows
down when the energy of the projectile increases. This makes the calculation difficult
for energies larger than a few MeV (in the case of scattering by gold atoms, about 10,000
phase shifts are required at E = 10 MeV). The partial-wave DCS, Eq. (3.6), rigorously
accounts for spin and other relativistic effects, as well as for finite nuclear size effects.
Single elastic collisions are determined by the values of the polar and azimuthal
scattering angles, θ and φ, respectively. Owing to the assumed spherical symmetry of
the scattering centres, single- and multiple-scattering angular distributions are axially
symmetrical about the direction of incidence, i.e., they are independent of the azimuthal
scattering angle φ. For simulation purposes, it is convenient to measure polar angular
deflections produced by single-scattering events in terms of the variable [see Eq. (1.76)]
instead of the scattering angle θ. Note that µ varies from 0 (forward scattering) to 1
(backward scattering). The DCS per unit angular deflection is
dσel dσel
= 4π . (3.10)
dµ dΩ
122
NEA/NSC/DOC(2015)3
and
Z
3 dσel
σel,2 = (1 − cos2 θ) dΩ
2 dΩ
Z 1
(µ − µ2 )pel (µ) dµ = 6σel hµi − hµ2 i ,
= 6σel (3.18)
0
where h· · · i indicates the average value in a single collision. The quantities λel,1 and
λel,2 , Eq. (3.16), determine the first and second moments of the multiple-scattering
distributions (see Section 4.1). The inverse of the first transport mean free path,
2
λ−1
el,1 = N σel,1 = hµi, (3.19)
λel
gives a measure of the average angular deflection per unit path length. By analogy with
the “stopping power”, which is defined as the mean energy loss per unit path length
(see Section 3.2.3), the quantity 2λ−1 1
el,1 is sometimes called the “scattering power” .
1
At high energies, where the scattering is concentrated at very small angles, hµi ' hθ2 i/4 and
λ−1
el,1 ' hθ2 i/(2λel ).
123
NEA/NSC/DOC(2015)3
In the present version of penelope, elastic collisions of electrons and positrons are
simulated by using numerical partial-wave cross sections for free neutral atoms. These
cross sections were calculated with the program elsepa (ELastic Scattering of Elec-
trons and Positrons by Atoms) written by Salvat et al. (2005). This program performs
accurate relativistic (Dirac) partial-wave calculations of elastic scattering of electrons
and positrons by free atoms, and allows consideration of different scattering-potential
models. For the calculation of the elastic-scattering database, we used the static-field
approximation. The electrostatic potential of the target atom was obtained by consider-
ing the Fermi nuclear charge distribution, Eq. (3.1), and the self-consistent Dirac-Fock
electron density for free atoms generated by the code of (Desclaux, 1975, 1977). For elec-
tron projectiles, the exchange potential of Furness and McCarthy (1973) was adopted.
The program elsepa is able to perform partial-wave calculations for projectiles with
energies up to about 100 MeV. At higher energies, the partial-wave calculation of DCSs
is impractical, because of the slow convergence of the series and the accumulation of
numerical round-off errors. At these high energies, elsepa computes cross sections for
elastic scattering using a combination of the Born approximation for scattering by the
bare finite nucleus and a numerical high-energy screening correction. The cross sections
generated by elsepa provide the most reliable theoretical description available of elastic
scattering for projectiles with kinetic energies higher than about 10 keV.
When the energy of the projectile decreases, the accuracy of the static-field approxi-
mation worsens progressively, due to the combined effects of inelastic absorption (which
causes a depletion of the elastic-channel wave function) and atomic-charge polarisabil-
ity (the target atom is polarised by the electric field of the projectile, and the field of
the induced dipole acts back on the projectile). These effects can be accounted for by
introducing local corrections to the static potential (3.5) (see, e.g., Salvat, 2003) and
references therein]. Calculations with elsepa, including these low-energy effects, yield
elastic-scattering DCSs that, at large angles, differ from the static-field DCSs by about
20% at E = 1 keV and by up to 50% at E = 100 eV. However, differences between
total cross sections are much smaller, due to a partial cancellation of the two effects.
Unfortunately, both inelastic absorption and dipole polarisation depend strongly on the
state of aggregation of the target atom. Owing to the lack of a general theory for the
evaluation of these low-energy effects for scattering in condensed materials, the DCSs
in the elastic-scattering database were calculated from the static-field approximation.
This simplification implies that penelope provides a faithful description of multiple
elastic scattering of electrons and positrons with energies higher than about 1 keV; for
lower energies, the simulation results should be considered as semi-quantitative.
An extensive database of elastic-scattering DCSs was generated by running the pro-
gram elsepa using the static-field approximation with the electrostatic and exchange
potentials described above2 . This database, which hereafter will be referred to as the
2
A similar database (covering the energy range from 50 eV to 300 keV, and generated with a
preliminary version of elsepa) is distributed by the NIST (Jablonski et al., 2003).
124
NEA/NSC/DOC(2015)3
elsepa database, consists of 198 ASCII files that contain DCSs, dσel /dΩ, total cross
sections, σel , and first and second transport cross sections, σel,1 and σel,2 , for elastic
scattering of electrons and positrons by neutral atoms of the elements Z = 1 − 99. The
database files for electrons and positrons are named eeldxZZZ.p08 and peldxZZZ.p08,
where ZZZ (three digits) is the atomic number of the target atom. The DCSs are tabu-
lated at fixed grids of kinetic energies E and angles θ (the same for all elements). The
E-grid is nearly logarithmic, with 96 points (15 points per decade), and spans the inter-
val from 50 eV up to 100 MeV. The angular grid consists of 606 angles, distributed with
a higher density near θ = 0 to allow accurate interpolation of the DCS for the high-
est energies considered. These grids are appropriate for interpolation of the tabulated
functions using cubic spline log-log interpolation in E and linear log-log interpolation
in µ ≡ (1 − cos θ)/2. The elsepa database is distributed with the ICRU Report 77
(2007), which includes a graphical interface that displays plots of the DCS and the first
transport cross section.
Figure 3.2 displays DCSs from the elsepa database for elastic scattering of electrons
and positrons of various energies by atoms of carbon, silicon, silver and gold. The plots
illustrate the variation of the DCS with the atomic number Z, the charge of the projectile
and the energy E. Since the interaction V (r) is attractive for electrons and repulsive
for positrons, scattering is more intense for electrons (which can fall deeply into the
potential well of the atom) than for positrons (which are repelled from the nucleus and
cannot “feel” the inner part of the atom). The DCS for low-energy electrons exhibits a
diffraction-like structure, while the DCS for positrons decreases monotonously with the
deflection θ, and µ. The Born approximation (see, e.g., Mott and Massey, 1965) predicts
a structureless DCS that decreases with µ and is proportional to the squared charge of
the projectile (i.e., the same DCS for electrons and positrons). This approximation
considers the scattering field as a perturbation (to first order) and, hence, it is valid
only for weak fields, i.e., for low-Z elements or, in the case of heavy elements, for
large impact parameters (which correspond to small scattering angles). The difference
between the (partial-wave) DCSs for electrons and positrons gives a clear indication of
the applicability of the Born approximation.
Figure 3.3 shows elastic mean free paths and transport mean free paths for elec-
trons in aluminium and gold. At low energies, the differences between the DCSs of the
two elements (see Fig. 3.2) produce very visible differences between the corresponding
transport mean free paths. When E increases, the DCS becomes strongly peaked in
the forward direction and hµ2 i becomes much smaller than hµi. In the high-energy
limit, σel,2 ' 3σel,1 (λel,2 ' λel,1 /3). The total cross section, ∝ 1/(ρλel ), decreases
monotonously with E to reach a constant value at high energies. This saturation is a
relativistic effect: the total cross section measures the interaction probability, which is
proportional to the time spent by the projectile within the region where the scatter-
ing field is appreciable. This time is determined by the speed of the projectile, which
approaches c from below when the projectile energy increases. In the non-relativistic
theory, the speed vn.r. = (2E/me )1/2 increases without limit with E and the calculated
non-relativistic total cross section tends to zero at high energies.
125
NEA/NSC/DOC(2015)3
10−14
10−16
0.1 keV −16
10 0.1 keV
10−18
dσel /dΩ (cm2/sr)
10−20
−20 10
10 10
10−22
10−22 100
100
C (Z = 6) Si (Z = 14)
10−24 electrons 10−24 electrons 1000
positrons 1000 positrons
10−26 10−26
0.1 1 10 50 100 150 0.1 1 10 50 100 150
θ (deg) θ (deg)
−14
10 10−14
0.1 keV
10−18
1 10−18 1
10
10−20 10
−20
100 10 100
−22
10
Ag (Z = 47) Au (Z = 79)
1000 10−22 1000
electrons electrons
positrons positrons
10−24
−24
10
0.1 1 10 50 100 150 0.1 1 10 50 100 150
θ (deg) θ (deg)
Figure 3.2: DCS for elastic scattering of electrons and positrons by carbon, silicon, silver, and
gold atoms as a function of the polar deflection angle θ. Notice the change from logarithmic
to linear scale at θ = 10 deg.
126
NEA/NSC/DOC(2015)3
4 4
10 10
ρλel,2
3 3
10 10 ρλel,2
2 2
10 10
10
ρλel 10 ρλel
1 1
0.1 2 3 4 5 6 7
0.1 2 3 4 5 6 7
10 10 10 10 10 10 10 10 10 10 10 10
E (eV) E (eV)
Figure 3.3: Elastic mean free path, λel , and first and second transport mean free paths, λel,1
and λel,2 , for electrons scattered in aluminium and gold as functions of the kinetic energy of
the projectile.
In penelope, the DCSs for compounds (and mixtures) are calculated from atomic
total and transport cross sections by means of the additivity approximation (incoherent
sum of scattered intensities). This amounts to neglecting chemical binding effects. A
more accurate approach, which yields a good estimate of these effects, is provided by
the following independent-atom approximation (Walker, 1968; Yates, 1968). Assume
that the interaction of the projectile with each atom is still given by the free-atom static
potential (3.5). The molecular DCS may then be evaluated by adding the waves (not the
currents) scattered from the various atoms in the molecule and averaging over molecular
orientations. The resulting DCS is given by
dσel X sin(qaij /~)
fi (θ)fj∗ (θ) + gi (θ)gj∗ (θ) ,
= (3.20)
dΩ i,j
qaij /~
where q = 2~k sin(θ/2) is the momentum transfer, aij is the distance between the
atoms i and j and fi , gi are the scattering amplitudes, Eq. (3.7), for the atom i. It
has been claimed that DCSs obtained from this formulation agree with experiments to
within ∼ 2% (Walker, 1968; Yates, 1968). DCSs for scattering of 100 eV and 2.5 keV
electrons in water vapour, obtained from the simple additivity rule and computed from
Eq. (3.20), are compared in Fig. 3.4. It is seen that, for energies above a few keV,
127
NEA/NSC/DOC(2015)3
chemical binding causes a slight distortion of the DCS at small angles, and a slight
rippling for intermediate angles. Therefore, the use of the additivity approximation
(i.e., neglecting chemical binding effects) in Monte Carlo simulation at these energies is
justified.
10−15
H2O
10−16 100 eV
dσel /dΩ (cm2/sr)
10−17
2.5 keV
10−18 coherent
incoherent
10−19
10−20
0 30 60 90 120 150 180
θ (deg)
Figure 3.4: DCSs for elastic scattering of electrons by water molecules, calculated as the
coherent sum of scattered waves, Eq. (3.20), and from the additivity approximation (incoherent
sum).
As mentioned above, the angular distribution in single elastic events is axially sym-
metrical about the direction of incidence. Hence, the azimuthal scattering angle φ is
sampled uniformly in the interval (0, 2π) using the sampling formula φ = 2πξ. The
polar deflection µ in each individual collision is generated from the DCSs in the elsepa
database, by using an interpolation scheme similar to the one described by (Benedito
et al., 2001). Partial-wave DCSs will also be utilised for mixed simulations (see Chapter
4), in which only hard events, with deflection µ larger than a given cutoff value µc , are
sampled individually.
At initialisation time, penelope reads a table of partial-wave DCSs, total cross
sections and transport cross sections that, for elemental media, is a duplicate of the
corresponding elsepa database files. In the case of compounds the table has the same
format, but contains molecular cross sections (generated from the atomic cross sections
by using the additivity rule). These input cross sections are tabulated at the energies
of the elsepa grid (which is nearly logarithmic, with 15 points per decade). The first
action of penelope is to produce a new table of cross sections for a denser grid of
128
NEA/NSC/DOC(2015)3
energies, with 200 logarithmically-spaced points (Ei ; i = 1, . . . , 200), which spans the
complete energy range used in the simulation. This table is obtained from the input
table by means of log-log cubic spline interpolation in E. For each grid energy Ei the
program determines the PDF for the angular deflection µ,
1 dσel 4π dσel
pel (Ei ; µ) = = , (3.21)
σel dµ σel dΩ
which is tabulated at the 606 angular deflections µj in the elsepa database. With the
aid of log-log cubic spline interpolation in µ, these numerical PDFs are transformed
into continuous distributions, from which random values of the angular deflection µ are
generated by using the RITA method (see Section 1.2.4).
In detailed simulations (including energy loss events), the kinetic energy of the pro-
jectile varies along the track and we need to simulate elastic events for energies E differ-
ent from those in the simulation grid. In principle, when Ei < E < Ei+1 , we should first
interpolate along the energy axis to obtain the PDF pint (E, µ) and then perform the
random sampling of µ from the interpolated PDF. Evidently, this procedure would be
too time consuming. A convenient alternative is to use linear interpolation of the PDF
in ln E, which largely simplifies the numerical operations (see below). The accuracy of
this interpolation is determined by the spacing of the adopted grid of energies Ei . With
the simulation grid used in penelope (200 logarithmically spaced points), interpolation
errors are typically smaller than 0.1% in the less favourable cases, i.e., when the energy
E lies close to the midpoint of the interval (Ei , Ei+1 ). In general, these interpolation
errors are much smaller than the intrinsic uncertainties of the partial-wave DCS (asso-
ciated with the simplifications in the underlying physics model) and have a negligible
impact on the simulation results.
The interpolated PDF at E can be regarded as a mixture of the PDFs at Ei and
Ei+1 ,
pel,int (E; µ) = πi pel (Ei ; µ) + πi+1 pel (Ei+1 ; µ) (3.22)
with interpolation weights
ln Ei+1 − ln E ln E − ln Ei
πi = and πi+1 = , (3.23)
ln Ei+1 − ln Ei ln Ei+1 − ln Ei
respectively. Note that these weights are positive and add to unity. Therefore the
random sampling of µ from pint (E; µ) can be performed by using the composition method
(see Section 1.2.6). The sampling algorithm proceeds as follows:
(i) Sample the variable k, which can take the values i or i + 1 with point probabilities
πi and πi+1 , respectively, and
(ii) Sample µ from the distribution pel (Ek ; µ) by using the RITA method (Section
1.2.4).
Notice that with this “interpolation by weight” method we only need to sample µ from
the tabulated angular PDFs, i.e., for the energies of the grid. This requires only the set
129
NEA/NSC/DOC(2015)3
of parameters and flags used by the RITA sampling routine for each Ei to be stored in
memory.
In mixed simulations (see Chapter 4), individual hard events cause angular deflec-
tions µ in a certain interval (µc , 1). With the help of a slight modification, the algorithm
described above can be used to generate µ-values restricted to that interval. We recall
that, with the inverse-transform method, for a given random number ξ we generate an
angular deflection µ(ξ) by solving the sampling equation
Z µ
pel (E; µ0 ) dµ0 = ξ, (3.24)
0
where the PDF pel (E; µ) is assumed to be normalised to unity. Evidently, µ(ξ) increases
monotonically with ξ. A mixed-simulation algorithm is defined by specifying the mean
(h)
free path λel between hard elastic events as a function of energy (see Section 4.3). The
relation Z 1
1 1
(h)
= pel (E; µ) dµ, (3.25)
λel λel µc
then determines the cutoff deflection µc (E). We note that
Z µc
λel
pel (E; µ) dµ = 1 − (h) ≡ ξc . (3.26)
0 λel
Therefore, to generate random values of µ, distributed according to the PDF pel (E; µ)
restricted to the interval (µc , 1), we can still use the inverse transform (3.24) but with
random numbers ξ in the interval (ξc , 1). That is, the sampling equation (restricted
inverse transform) Z µ
pel (E; µ) dµ = ξc + ξ(1 − ξc ), (3.27)
0
yields values of µ distributed according to pel (E; µ) in the interval (µc , 1). In pene-
lope, this restricted inverse transform is performed by using the RITA method (without
Walker’s aliasing).
130
NEA/NSC/DOC(2015)3
sections were calculated by the partial-wave method (they are the same as those in the
elsepa database); total cross sections for higher energies were generated by using the
Born approximation with a high-energy screening correction. In the present version of
penelope, the MW model is used to describe elastic events for energies larger than
about 100 MeV.
The MW DCS is expressed as
(MW)
dσel
= σel pMW (µ), (3.28)
dµ
where the single-scattering distribution pMW (µ) is defined by a simple analytical expres-
sion, with a physically plausible form, depending on two adjustable parameters. These
parameters are determined in such a way that the values of hµi and hµ2 i obtained from
pMW (µ) are equal to those of the actual (partial-wave) DCS:
Z 1
1 σel,1
hµiMW ≡ µpMW (µ) dµ = hµi = (3.29)
0 2 σel
and Z 1
2 1 σel,1 1 σel,2
hµ iMW ≡ µ2 pMW (µ) dµ = hµ2 i = − . (3.30)
0 2 σel 6 σel
Thus, the MW model will give the same mean free path and the same first and second
transport mean free paths as the partial-wave DCS. As a consequence (see Chapter 4),
detailed simulations using this model will yield multiple-scattering distributions that do
not differ significantly from those obtained from the partial-wave DCS, quite irrespec-
tively of other details of the “artificial” distribution pMW (µ).
To set the distribution pMW (µ), we start from the Wentzel (1927) angular distribu-
tion,
A0 (1 + A0 )
pW,A0 (µ) ≡ , (A0 > 0) (3.31)
(µ + A0 )2
which describes scattering by an exponentially-screened Coulomb field within the Born
approximation (see, e.g., Mott and Massey, 1965), that is, it provides a physically
plausible angular distribution, at least for light elements or high-energy projectiles. It
is also worth mentioning that the multiple-scattering theory of Molière (1947, 1948) can
be derived by assuming that electrons scatter according to the Wentzel distribution (see
Fernández-Varea et al., 1993a). The first moments of the Wentzel distribution are
Z 1
A0 (1 + A0 ) 1 + A0
hµiW,A0 = µ dµ = A0 (1 + A0 ) ln −1 (3.32)
0 (µ + A0 )2 A0
and Z 1
2 A0 (1 + A0 )
hµ iW,A0 = µ2 dµ = A0 [1 − 2hµiW,A0 ] . (3.33)
0 (µ + A0 )2
Let us define the value of the screening constant A0 so that hµiW,A0 = hµi. The value
of A0 can be easily calculated by solving Eq. (3.32) numerically, e.g., by the Newton-
Raphson method. Usually, we shall have hµ2 iW,A0 6= hµ2 i. At low energies, the Wentzel
131
NEA/NSC/DOC(2015)3
distribution that gives the correct average deflection is too “narrow” [hµ2 iW,A0 < hµ2 i
for both electrons and positrons and for all the elements]. At high energies, the angular
distribution is strongly peaked in the forward direction and the Wentzel distribution
becomes too “wide”. This suggests using a modified Wentzel (MW) model obtained by
combining a Wentzel distribution with a simple distribution, which takes different forms
in these two cases,
• Case I. If hµ2 iW,A0 > hµ2 i (the Wentzel distribution is too wide), we take pMW (µ) as a
statistical admixture of the Wentzel distribution and a delta distribution (a zero-width,
fixed-scattering-angle process)
with
hµ2 iW,A − hµ2 i
A = A0 and B= 2 . (3.35)
hµ iW,A − hµi2
Notice that in this case we usually have hµi 1, so that the delta distribution is at
very small angles. Although we have introduced a discrete peak in the DCS, its effect
is smeared out by the successive collisions and is not visible in the multiple-scattering
angular distributions.
• Case II. If hµ2 iW,A0 < hµ2 i (the Wentzel distribution is too narrow), we express pMW (µ)
as a statistical admixture of a Wentzel distribution (with A not necessarily equal to A0 )
and a triangle distribution in the interval (1/2,1),
The parameters A and B are obtained from the conditions (3.29) and (3.30), which give
5
(1 − B) hµiW,A + B = hµi
6
17
(1 − B) hµ2 iW,A + B = hµ2 i. (3.37)
24
From the first of these equations,
hµi − hµiW,A
B= . (3.38)
(5/6) − hµiW,A
Inserting this value in the second of Eqs. (3.37), we obtain
17 2 5 17 5
− hµ i hµiW,A − − hµi hµ2 iW,A = hµi − hµ2 i. (3.39)
24 6 24 6
For all situations of interest, this equation has a single root A in the interval (0, A0 ) and
can be easily solved by means of the bisection method. The value of B given by Eq.
(3.38) is then positive and less than unity, as required.
In Fig. 3.5 we compare partial-wave DCSs and MW model DCSs for elastic scattering
of electrons of various energies by gold atoms. The considered energies correspond to
132
NEA/NSC/DOC(2015)3
the case-II MW model [so that the distribution pMW (µ) is continuous]. We see that
the MW model does imitate the partial-wave DCSs, but the differences are significant.
Nevertheless, the important fact here is that both DCSs give exactly the same values of
σel , hµi and hµ2 i.
10−12
10−14
(cm2)
1 keV
−16
10
10
dσel /dµ
−18
10
100
Au (Z = 79), e—
10−20 partial-waves
MW model 1000
10−22 −6
10 10−5 10−4 10−3 10−2 0.1 0.3 0.5 0.7 0.9
µ
Figure 3.5: Partial-wave and MW model DCSs for elastic scattering of electrons by gold
atoms. Notice the change from logarithmic to linear scale at µ = 0.1.
As indicated above, the parameters of the MW model are determined by the char-
acteristic functions σel (E), σel,1 (E) and σel,2 (E). penelope reads these functions from
the MW database files [99 files named pdeelZZ.p08, where ZZ (two digits) is the atomic
number of the target atom]. Notice that, with the help of the additivity rule, the MW
model can readily be applied to compounds and mixtures. Before starting the simu-
lation, penelope evaluates a table of the parameters A and B, and stores it in the
computer memory. Instead of B, penelope tabulates the quantity B 0 = +B (case I)
and B 0 = −B (case II); this avoids the need to specify the case, which can be inferred
from the sign of B 0 . It is worth noting that A and B 0 are continuous functions of energy
and, therefore, can be rapidly evaluated, for any energy, by interpolation in the stored
table. In case I, hµi coincides with hµiW,A , which is determined by A, Eq. (3.32). Fig-
ure 3.6 displays the MW model parameters for aluminium and gold, as representative of
low- and high-Z elements. Notice that at high energies, where the case I model applies,
the strength of the delta contribution increases rapidly with energy, indicating that the
partial-wave DCS is much narrower than the Wentzel distribution.
133
NEA/NSC/DOC(2015)3
Al (Z = 13) Au (Z = 79)
0.8 electrons 0.8 electrons
positrons positrons
0.0 0.0
-0.2 -0.2
102 10 4
10 6
10 8
102 104 106 108
E (eV) E (eV)
Figure 3.6: Parameters of the MW model for scattering of electrons and positrons by alu-
minium and gold atoms.
The main advantage of using the MW model is that the random sampling of the polar
deflection µ can be performed analytically. In the case of mixed simulations (see Chapter
4), only hard events, with deflection µ larger than a given cutoff value µc , are sampled
individually. In this Section we describe analytical (i.e., exact) methods for random
sampling of µ in the restricted interval (µc , 1). The azimuthal scattering angle φ is
sampled uniformly in the interval (0, 2π).
• Case I. The cumulative distribution function of pMW−I (µ) is
(1 + A)µ
(1 − B) A + µ if 0 ≤ µ < hµi,
µ
Z
0 0
PMW−I (µ) ≡ pMW−I (µ ) dµ = (3.40)
0 (1 + A)µ
B + (1 − B) if hµi ≤ µ ≤ 1.
A+µ
Because of the analytical simplicity of this function, random sampling of µ can be per-
formed by using the inverse-transform method (Section 1.2.2). The sampling equation
for µ in (0,1) reads
−1
µ = PMW−I (ξ), (3.41)
134
NEA/NSC/DOC(2015)3
with
(1 + A)hµi
ξ0 = (1 − B) . (3.43)
A + hµi
To sample µ in the restricted interval (µc ,1), we can still use the inverse-transform
method, Eq. (3.41), but with the random number ξ sampled uniformly in the interval
(ξc ,1) with
ξc = PMW−I (µc ). (3.44)
135
NEA/NSC/DOC(2015)3
on the basis of the first-order (plane-wave) Born approximation. Extension of the theory
to inelastic collisions in condensed materials has been discussed by Fano (1963). Formal
aspects of quantum theory for condensed matter are quite complicated. Fortunately,
the results are essentially equivalent to those from classical dielectric theory.
The effect of individual inelastic collisions on the projectile is completely specified
by giving the energy loss W and the polar and azimuthal scattering angles θ and φ,
respectively. For amorphous media with randomly oriented atoms (or molecules), the
DCS for inelastic collisions is independent of the azimuthal scattering angle φ. Instead
of the polar scattering angle θ, it is convenient to use the recoil energy Q [see Eqs. (A.29)
and (A.30)], defined by
Q(Q + 2me c2 ) = (cq)2 . (3.47)
The quantity q is the magnitude of the momentum transfer q ≡ p − p0 , where p and p0
are the linear momenta of the projectile before and after the collision. Notice that Q is
the kinetic energy of an electron that moves with a linear momentum equal to q.
Let us first consider the inelastic interactions of electrons or positrons (z02 = 1) with
an isolated atom (or molecule) containing Z electrons in its ground state. The DCS
for collisions with energy loss W and recoil energy Q, obtained from the first Born
approximation, can be written in the form (Fano, 1963)
136
NEA/NSC/DOC(2015)3
by a few global features of the Bethe surface. Relatively simple GOS models can be
devised that are consistent with these features and, therefore, lead to a fairly realistic
description of inelastic interactions (see, e.g., Salvat and Fernández-Varea, 1992).
2.0
1.5
df (Q,W )/dW
1.0
0.5
1
2 0.0
3
4 -2
5 -1
W/Ui 6 0
7
8 1
2 ln(Q/Ui)
Figure 3.7: The GOS for ionisation of the hydrogen atom (Z = 1) in the ground state.
All energies are in units of the ionisation energy Ui = 13.6 eV. The GOS for ionisation of
(non-relativistic) hydrogenic ions is independent of Z if energies are expressed in units of the
ionisation energy.
As mentioned above, the “atomic” DCS for inelastic interactions in dense media
can be obtained from a semiclassical treatment in which the medium is considered as a
dielectric, characterised by a complex dielectric function (k, ω), which depends on the
wave number k and the frequency ω. In the classical picture, the (external) electric field
of the projectile polarises the medium producing an induced electric field that causes the
slowing down of the projectile. The dielectric function relates the Fourier components
of the total (external+induced) and the external electric potentials. It is convenient to
interpret the quantities q = ~k and W = ~ω as the momentum and energy transfers
and consider that the dielectric function depends on the variables Q [defined by Eq.
(3.47)] and W . The DCSs obtained from the dielectric and quantum treatments are
consistent (i.e., results from the former agree with those from quantum calculations for
a low-density medium) if one assumes the identity
Q + me c2 2Z
df (Q, W ) −1
≡W Im , (3.50)
dW me c2 πΩ2p (Q, W )
137
NEA/NSC/DOC(2015)3
where Ωp is the plasma energy of a free-electron gas with the electron density of the
medium, given by
Ω2p = 4πN Z~2 e2 /me . (3.51)
Eq. (3.50) establishes the connection between the atomic GOS (a property of individual
atoms) and the dielectric function (a macroscopic concept). The DCS for the condensed
medium can be expressed in the form [cf. Eq. (3.48)],
d2 σin 2πz02 e4 df (Q, W ) 2me c2
=
dW dQ me v 2 dW W Q(Q + 2me c2 )
β 2 sin2 θr W 2me c2
+ − D(Q, W ) , (3.52)
[Q(Q + 2me c2 ) − W 2 ]2
where the term D(Q, W ), which is appreciable only for small Q, accounts for the so-called
density-effect correction (Sternheimer, 1952). The origin of this term is the polarisability
of the medium, which “screens” the distant transverse interaction causing a net reduction
of its contribution to the stopping power. The density-effect correction D(Q, W ) is
determined by the dielectric function that, in turn, is related to the GOS. Thus, the
GOS contains all the information needed to compute the DCS for electron/positron
inelastic interactions in condensed media.
In the limit of very large recoil energies, the binding and momentum distribution
of the target electrons have a small effect on the interaction. Therefore, in the large-
Q region, the target electrons behave as if they were essentially free and at rest and,
consequently, the GOS reduces to a ridge along the line W = Q, which was named the
Bethe ridge by Inokuti (1971). In the case of hydrogenic ions in the ground state, Fig.
3.7, the Bethe ridge becomes clearly visible at relatively small recoil energies, of the
order of the ionisation energy Ui . For smaller Q’s, the structure of the Bethe surface
is characteristic of the material. In the limit Q → 0, the GOS reduces to the optical
oscillator strength (OOS),
df (W ) df (Q = 0, W )
≡ , (3.53)
dW dW
which is closely related to the (dipole) photoelectric cross section for photons of energy
W (Fano, 1963). Experimental information on the OOS is provided by measurements
of either photoelectric cross sections or dielectric functions (see, e.g., Fernández-Varea
et al., 1993b). The GOS satisfies the Bethe sum rule (Inokuti, 1971)
Z ∞
df (Q, W )
dW = Z for any Q. (3.54)
0 dW
This sum rule, which is a result from non-relativistic theory (see, e.g., Mott and Massey,
1965), is assumed to be generally satisfied. It leads to the interpretation of the GOS as
the effective number of electrons per unit energy transfer that participate in interactions
with given recoil energy Q. The mean excitation energy I, defined by (Fano, 1963;
Inokuti, 1971) Z ∞
df (W )
Z ln I = ln W dW, (3.55)
0 dW
138
NEA/NSC/DOC(2015)3
plays a central role in the Bethe stopping power formula [Eq. (3.120)]. This quantity
has been determined empirically for a large number of materials (see Berger and Seltzer,
1982; ICRU Report 37, 1984, and references therein) from measurements of the stopping
power of heavy charged particles and/or from experimental optical dielectric functions.
In the following, we shall assume that the mean excitation energy of the stopping medium
is known.
where δ(x) is the Dirac delta function and Θ(x) is the step function. The first term
represents resonant low-Q (distant) interactions, which are described as a single reso-
nance at the energy Wk . The second term corresponds to large-Q (close) interactions,
in which the target electrons react as if they were free and at rest (W = Q). Note that
close interactions are allowed for energy transfers W larger than Qk ; for bound shells,
we set Qk = Uk (Fig. 3.8a). It is worth mentioning that the definition (3.56) of the
δ-oscillator differs from the one used in previous versions of penelope, which allowed
only excitations with W > Wk [usually, Wk is larger than Uk , see Eq. (3.63) below].
Notice that the oscillator GOS satisfies the sum rule
Z ∞
Fk (Q, W ) dW = 1 for any Q (3.57)
0
and, consequently, a δ-oscillator corresponds to one electron in the target. The Liljequist
GOS model for the whole atom is given by
df (Q, W ) X
= fk [δ(W − Wk )Θ(Qk − Q) + δ(W − Q)Θ(Q − Qk )] . (3.58)
dW k
where the summation in k extends over all bound electron shells (and the conduction
band, in the case of conductors) and the partial oscillator strength fk is identified with
139
NEA/NSC/DOC(2015)3
the number of electrons in the k-th shell, i.e., fk = Zk . The corresponding OOS reduces
to
df (W ) X
= fk δ(W − Wk ), (3.59)
dW k
which has the same form (a superposition of resonances) as the OOS used by Sternheimer
(1952) in his calculations of the density effect correction. In order to reproduce the high-
energy stopping power given by the Bethe formula (Berger and Seltzer, 1982; ICRU
Report 37, 1984), the oscillator strengths must satisfy the Bethe sum rule (3.54),
X
fk = Z, (3.60)
k
and the excitation energies must be defined in such a way that the GOS model leads,
through Eq. (3.55), to the accepted value of the mean excitation energy I,
X
fk ln Wk = Z ln I. (3.61)
k
As the partial oscillator strength fk has been set equal to the number of electrons in the
k-th shell, the Bethe sum rule is automatically satisfied.
Wm(Q)
W W
W=Q
(E+Uk)/2
W=Q
Wk
Uk Wcb
(a) (b)
Q− Qk Q Qcb = Wcb Q
Figure 3.8: (a) Oscillator model for the GOS of an inner shell with Uk = 2 keV. The
continuous curve represents the maximum allowed energy loss as a function of the recoil energy,
Wm (Q), for electrons/positrons with E = 10 keV. For distant interactions the possible recoil
energies lie in the interval from Q− to Qk . Recoil energies larger than Qk correspond to
close interactions. The largest allowed energy loss Wmax is (E + Uk )/2 for electrons and E
for positrons (see text). (b) Oscillator-GOS model for excitations of the conduction band of
conductors.
The largest contribution to the total cross section arises from low-W (soft) excita-
tions. Therefore, the total cross section is mostly determined by the OOS of weakly
140
NEA/NSC/DOC(2015)3
bound electrons, which is strongly dependent on the state of aggregation. In the case
of conductors and semiconductors, electrons in the outermost shells form the conduc-
tion band (cb). These electrons can move quite freely through the medium and, hence,
their binding energy is set to zero, Ucb = 0. Excitations of the conduction band will
be described by a single oscillator, with oscillator strength fcb , resonance energy Wcb
and cutoff recoil energy Qcb = Wcb (Fig. 3.8b). The parameters fcb and Wcb should be
identified with the effective number of electrons (per atom or molecule) that participate
in plasmon excitations and the plasmon energy, respectively. They can be estimated,
e.g., from electron energy-loss spectra or from measured optical data. When this infor-
mation is not available, we will simply fix the value of fcb (as the number of electrons
with ionisation energies less than, say, 15 eV) and set the resonance energy Wcb equal
to the plasmon energy of a free-electron gas with the same density as that of conduction
electrons, r
p fcb
Wcb = 4πN fcb ~2 e2 /me = Ωp . (3.62)
Z
This gives a fairly realistic model for free-electron-like metals (such as aluminium),
because the resonance energy is set equal to the plasmon energy of the free-electron gas
(see, e.g., Kittel, 1976). A similar approach, with fcb set equal to the lowest chemical
valence of an element, was adopted by Sternheimer et al. (1982, 1983, 1984) in their
calculations of the density effect correction for single-element metals.
Following Sternheimer (1952), the resonance energy of a bound-shell oscillator is
expressed as r
2 fk 2
Wk = (aUk )2 + Ω , (3.63)
3 Z p
where Uk is the ionisation energy and Ωp is the plasma energy corresponding to the
total electron density in the material, Eq. (3.51). The term 2fk Ω2p /3Z under the square
root accounts for the Lorentz-Lorenz correction (the resonance energies of a condensed
medium differ from those of a free atom/molecule). The empirical adjustment factor a
in Eq. (3.63) (the same for all bound shells) is determined from the condition (3.61),
i.e., from r
X 2 fk 2
Z ln I = fcb ln Wcb + fk ln (aUk )2 + Ω . (3.64)
k
3 Z p
For a one-shell system, such as the hydrogen atom, relations (3.60) and (3.61) imply
that the resonance energy Wk is equal to I. Considering the ∼ W −3 dependence of
the hydrogenic OOS, it is concluded that a should be of the order of exp(1/2) = 1.65
(Sternheimer et al., 1982). It is worth noting that the Sternheimer adjustment factor
a is a characteristic of the considered medium; therefore, the DCSs for excitation of a
shell of a given element in two different compounds may be slightly different.
The present GOS model is completely determined by the ionisation energy Uk and
the number of electrons Zk of each electron shell, and by the empirical value of the mean
excitation energy I. In penelope, the target atoms are assumed to be in their ground
state configuration, and the shell ionisation energies given by Carlson (1975) are used.
141
NEA/NSC/DOC(2015)3
The adopted I-values are those proposed by Berger and Seltzer (1982), which were also
used to generate the ICRU Report 37 (1984) tables of stopping powers for electrons
and positrons. Therefore, our inelastic collision model yields stopping powers that are
consistent with the ICRU recommended values (see below).
It should be mentioned that the oscillator model gives a Bethe ridge with zero width,
i.e., the broadening caused by the momentum distribution of the target electrons is ne-
glected. This is not a serious drawback for light projectiles (electrons and positrons),
but it can introduce sizeable errors in the computed cross sections for slow heavy pro-
jectiles with m me . The oscillator model also disregards the fact that, for low-Q
interactions, there is a transfer of oscillator strength from inner to outer shells (see, e.g.,
Shiles et al., 1980). As a consequence, the shell ionisation cross sections obtained from
this GOS model are only roughly approximate. Their use in a Monte Carlo code is
permissible only because the ionisation of inner shells is a low-probability process (see
Fig. 3.9 below) that has a very weak effect on global transport properties. In what fol-
lows, K, L and M shells with ionisation energies Uk larger than the absorption energies
of electrons or photons, EABS(1) or EABS(2) (see Section 7.1.2), will be referred to as
“inner” shells. Electron shells other than K, L and M shells, or with Uk < min(EABS(1),
EABS(2)), will be referred to as “outer” shells.
In mixed (class II) simulations, only hard collisions, with energy loss larger than a
specified cutoff value Wcc , are simulated (see Chapter 4). The effect of soft interactions
(with W < Wcc ) is described by means of a multiple-scattering approximation, which
does not require detailed knowledge of the shell DCSs. Hard collisions may produce
ionisations in deep electron shells, which leave the target atom in a highly excited state
(with a vacancy in an inner shell) that decays by emission of energetic x-rays and
Auger electrons. In penelope we use the GOS model only to describe the effect of the
interactions on the projectile and the emission of knock-on secondary electrons. The
production of vacancies in inner shells, and their subsequent de-excitation, is simulated
by using more accurate ionisation cross sections (see Section 3.2.6).
The present GOS model is directly applicable to compounds (and mixtures), since
the oscillators may pertain either to atoms or molecules. When the value of the mean
excitation energy of the compound is not known, it may be estimated from Bragg’s
additivity rule as follows. Consider a compound Xx Yy , in which the molecules consist
of x atoms of the element X and y atoms of the element Y. The number of electrons
per molecule is ZM = xZX + yZY , where ZX stands for the atomic number of element
X. According to the additivity rule, the GOS of the compound is approximated as the
sum of the atomic GOSs of the atoms so that
142
NEA/NSC/DOC(2015)3
detail/accuracy. In fact, the description of the outer shells can be simplified without
sacrificing the reliability of the simulation results. In penelope, the maximum number
of oscillators for each material is limited. When the number of actual shells is too large,
oscillators with similar resonance energies are grouped together and replaced by a single
oscillator with oscillator strength equal to the sum of strengths of the original oscillators.
The resonance energy of the group oscillator is set by requiring that its contribution to
the mean excitation energy I equals the sum of contributions of the grouped oscillators;
this ensures that grouping will not alter the stopping power of fast particles (with E
substantially greater than the ionisation energy of the grouped oscillators).
The DCS for distant longitudinal interactions is given by the first term in Eq. (3.52),
As mentioned above, the DCS for distant transverse interactions has a complicated
expression. To simplify it, we shall ignore the (very small) angular deflections of the
projectile in these interactions and replace the expression in curly brackets in Eq. (3.52)
by an averaged W -independent value that gives the exact contribution of the distant
transverse interactions to the high-energy stopping power (Salvat and Fernández-Varea,
1992). This yields the following approximate expression for the DCS of distant transverse
interactions,
d2 σdis,t 2πe4 X 1
1 2
= fk ln − β − δF
dW dQ me v 2 k W 1 − β2
where Q− is the minimum recoil energy3 for the energy transfer W , Eq. (A.31), and
δF is the Fermi density effect correction on the stopping power, which has been studied
extensively in the past (Sternheimer, 1952; Fano, 1963). δF can be computed as (Fano,
1963)
1 ∞ df (Q = 0, W ) L2 L2
Z
ln 1 + 2 dW − 2 1 − β 2 ,
δF ≡ (3.69)
Z 0 dW W Ωp
3
The recoil energy Q− corresponds to θ = 0, i.e., we consider that the projectile is not deflected by
distant transverse interactions.
143
NEA/NSC/DOC(2015)3
The function F(L) decreases monotonically with L, and hence, the root L(β 2 ) exists
only when 1 − β 2 < F(0); otherwise it is δF = 0. Therefore, the function L(β 2 ) starts
with zero at β 2 = 1 − F(0) and grows monotonically with increasing β 2 . With the OOS,
given by Eq. (3.59), we have
1 2X fk
F(L) = Ωp 2
(3.71)
Z k
W k + L2
and
L2 L2
1X
fk ln 1 + 2 − 2 1 − β 2 .
δF ≡ (3.72)
Z k Wk Ωp
In the high-energy limit (β → 1), the L value resulting from Eq. (3.70) is large (L
2 2 2
WPk ) and can be approximated as L = Ωp /(1 − β ). Then, using the Bethe sum rule
( fk = Z) and the relation (3.61), we obtain
Ω2p
δF ' ln − 1, when β → 1. (3.73)
(1 − β 2 )I 2
W E + 2me c2
cos2 θclo = . (3.74)
E W + 2me c2
It is worth mentioning that the formula (3.48) was derived by Fano (1963) under the
assumption that the projectile is a charged particle with a mass much larger than that
of the electron. When this assumption is not applied (see, e.g., Bote and Salvat, 2008),
the DCS for close collisions takes the following form
144
NEA/NSC/DOC(2015)3
The formulas (3.67) and (3.68) provide quite a realistic description of distant interactions
with electrons in the conduction band of certain solids, such as aluminium and silicon,
which behave as a nearly-free-electron gas with a characteristic plasmon-excitation line.
In general, for real media, distant excitations of weakly-bound electrons have a continu-
ous energy spectrum that can be described approximately by using several δ-oscillators
of the “conduction-band” type (right diagram in Fig. 3.8) with oscillator strengths fk
and resonance energies Wk selected so as to mimic the continuous OOS of the medium
(see, e.g., Fernández-Varea et al., 1993b). If the spacing between resonance energies is
small enough, the energy-loss distributions obtained from the simulation have realistic
appearances.
In the case of inner-shells, however, the energy loss distribution associated with
single distant interactions with a given atomic electron shell is approximated as a single
resonance (a δ-distribution), while the actual distribution is continuous for energy losses
above the ionisation threshold. As a consequence, energy loss spectra simulated from the
DCSs (3.67) and (3.68) show unphysical narrow peaks at energy losses that are multiples
of the resonance energies. To get rid of this kind of artefact, we will spread the resonance
line by sampling the energy loss in distant interactions with inner-shell electrons from
a continuous distribution pdis (W ) that has the correct average value, hW i = Wk . In
principle, this distribution can be obtained by considering a realistic GOS for inner-
shell excitations. Since such an approach is too elaborate for our purposes, we will
adopt a simple distribution that differs from zero within a finite energy-loss interval
extending from the ionisation threshold, Uk , up to a maximum value Wdis . The shaded
area (for Q < Qk ) in Fig. 3.8a represents the distribution pdis (W ), which replaces the
delta function δ(W − Wk ).
To facilitate random sampling, we use a “triangle” distribution,
2
(Wdis − W ) if Uk ≤ W < Wdis ,
pdis (W ) = (Wdis − Uk )2 (3.76)
0 otherwise.
This distribution is convenient because it is determined by only the maximum energy loss
Wdis and, moreover, it allows all calculations to be performed analytically. Qualitative
considerations based on the dipole approximation indicate that the maximum energy
loss Wdis is nearly independent of the kinetic energy of the projectile when the latter is
much higher than Uk . The requirement
Z ∞
hW i = W pdis (W ) dW = Wk
0
implies that
Wdis = 3Wk − 2Uk . (3.77)
Evidently, when E approaches the ionisation threshold, Wdis should decrease, because
energy losses larger than E are forbidden. For the sake of consistency, when E decreases
145
NEA/NSC/DOC(2015)3
below the value (3.77) we will re-define the resonance energy Wk to ensure that the DCSs
vary smoothly with E. We set
Wk if E > 3Wk − 2Uk ,
0
Wk = (3.78)
(E + 2U )/3 otherwise,
k
and, consistently, we replace the resonance energy by this modified value in all formulas
pertaining to the distant excitations of inner shells. Thus, the maximum allowed energy
loss in these excitations, Eq. (3.77), is given by
Wdis = 3Wk0 − 2Uk , (3.79)
which never exceeds E. Additionally, to get total cross sections with the approximate
threshold behaviour predicted by the (plane-wave) Born approximation (see Section
3.2.6), we also replace the cutoff recoil energy Qk , which for inner shells is equal to Uk ,
by the modified value
Uk
if E > 3Wk − 2Uk ,
0
Qk = E (3.80)
Uk
otherwise.
3Wk − 2Uk
This replacement lowers an excessively high peak of the total cross section at energies
E slightly above Uk , which is caused by the downward shift of the resonance energy Wk0
(see Fig. 3.9 below).
The DCSs for distant longitudinal and transverse excitations of an inner shell are
obtained from expressions (3.67) and (3.68) by replacing the factor δ(W − Wk ) by the
distribution pdis (W ). That is,
d2 σdis,l 2πe4 X 1 2me c2
= 2
f k p dis (W ) 2
Θ(Q0k − Q) (3.81)
dW dQ me v k Wk Q(Q + 2me c )
and
d2 σdis,t 2πe4 X
1 1 2
= fk pdis (W ) ln − β − δF
dW dQ me v 2 k Wk 1 − β2
This ad hoc modification has the further advantage of simplifying the calculation of
integrals of the restricted angular DCSs (see Section 4.3.2).
146
NEA/NSC/DOC(2015)3
When the projectile is an electron, the DCS must be corrected to account for the indis-
tinguishability of the projectile and the target electrons. For distant interactions, the
effect of this correction is small (much smaller than the distortion introduced by our
modelling of the GOS) and will be neglected. The energy loss DCS for binary collisions
of electrons with free electrons at rest, obtained from the Born approximation with
proper account of exchange, is given by the Møller (1932) formula,
" 2
d2 σM 2πe4 1
W W
= 2 2
1+ −
dW dQ me v W E−W E−W
W2
W
+a + 2 δ(W − Q), (3.84)
E−W E
where 2 2
E γ−1
a= = . (3.85)
E + m e c2 γ
To introduce exchange effects in the DCS for close interactions of electrons, we replace
the factor in parenthesis in Eq. (3.75) by the analogous factor in Møller’s formula, i.e.,
we take
(−)
d2 σclo 2πe4 X 1
= 2
fk 2 F (−) (E, W )δ(W − Q) Θ(Q − Q0k ), (3.86)
dW dQ me v k W
with
2
W2
(−) W W W
F (E, W ) ≡ 1 + − 0 +a + . (3.87)
E0 − W E −W E0 − W E 02
For collisions with free electrons at rest, we should take E 0 = E [cf. Eq. (3.84)]. However,
in close collisions with bound electrons, the wave function of the projectile is distorted
by the electrostatic field of the target atom, which produces an increase in the effective
kinetic energy of the projectile. To account partially for this “Coulomb effect”, the
factor F (−) (E, W ) of each term on the right-hand side of Eq. (3.86) is calculated with
the energy E 0 = E + Uk . The replacement of E by the effective kinetic energy E 0
yields cross sections in better agreement with results from experimental measurements
and from more elaborate calculations (see Fig. 3.9 below). On the other hand, in the
final state we have two indistinguishable free electrons, and it is natural to consider the
fastest one as being the “primary”. Accordingly, the maximum allowed energy transfer
in collisions (close and distant) with electrons in the k-th shell is set equal to
Wmax = E 0 /2 = (E + Uk )/2. (3.88)
Positrons in matter are unstable particles that annihilate with electrons giving photons
(see Section 3.4). On the other hand, electron-positron pairs can be created if enough
147
NEA/NSC/DOC(2015)3
electromagnetic energy (> 2me c2 ) is available (either from real or virtual photons). A
positron does not interact with matter as a typical (stable) positively charged parti-
cle, since the competing process of annihilation followed by re-creation can cause the
same transitions as “direct” scattering (see, e.g., Sakurai, 1967). The DCS for binary
collisions of positrons with free electrons at rest, obtained from the first Born approxi-
mation including the “annihilation/creation” mechanism, is given by the Bhabha (1965)
formula,
" 2 3 4 #
d 2 σB 2πe4 1 W W W W
= 2 2
1 − b1 + b2 − b3 + b4 δ(W − Q),
dW dQ me v W E E E E
(3.89)
where
2 2
γ − 1 2(γ + 1)2 − 1 γ − 1 3(γ + 1)2 + 1
b1 = , b2 = ,
γ γ2 − 1 γ (γ + 1)2
2 2
γ − 1 (γ − 1)2
γ − 1 2γ(γ − 1)
b3 = , b4 = . (3.90)
γ (γ + 1)2 γ (γ + 1)2
To approximately account for the effect of annihilation/creation on the DCS for close
inelastic interactions of positrons, we shall use the expression (3.75), with the factor in
parenthesis replaced by the Bhabha factor,
2 3 4
(+) W W W W
F (E, W ) = 1 − b1 + b2 − b3 + b4 . (3.91)
E E E E
That is,
(+)
d2 σclo 2πe4 X 1
= 2
fk 2 F (+) (E, W )δ(W − Q) Θ(Q − Q0k ). (3.92)
dW dQ me v k W
Notice that the maximum energy loss in collisions of positrons with energy E is Wmax =
E.
where Q− and Q+ are the minimum and maximum kinematically allowed recoil ener-
gies given by Eq. (A.31). The contributions from distant longitudinal and transverse
interactions are
0
2πe4 X 1 Qk Q− + 2me c2
dσdis,l
= fk pdis (W ) ln Θ(Q0k − Q− ) (3.94)
dW me v 2 k W Q− Q0k + 2me c2
148
NEA/NSC/DOC(2015)3
and
2πe4 X 1
dσdis,t 1
= fk pdis (W ) ln − β − δF Θ(Q0k − Q− ),
2
(3.95)
dW me v 2 k W 1 − β2
respectively. Note that hereafter we express these DCSs by assuming that all terms
correspond to inner shells; in the case of the conduction band the distribution pdis (W )
and the cutoff recoil energy Q0k should be replaced by δ(W − Wk ) and Qk , respectively.
The energy-loss DCS for close collisions is
(±)
dσclo 2πe4 X 1
= 2
fk 2 F (±) (E, W ) Θ(W − Qk ). (3.96)
dW me v k W
where hW n i denotes the n-th moment of the energy loss in a single collision (notice
(0) (1) (2)
that σin = σin ). σin and σin are known as the stopping cross section and the energy
straggling cross section (for inelastic collisions), respectively.
The mean free path λin for inelastic collisions is
λ−1
in = N σin , (3.100)
where N is the number of scattering centres (atoms or molecules) per unit volume. The
stopping power Sin and the energy straggling parameter Ω2in are defined by
(1) hW i
Sin = N σin = (3.101)
λin
and
(2) hW 2 i
Ω2in = N σin = . (3.102)
λin
Notice that the stopping power gives the average energy loss per unit path length4 . The
physical meaning of the straggling parameter is less direct. Consider a monoenergetic
4
The term “stopping power” is somewhat misleading; in fact, Sin has the dimensions of force.
149
NEA/NSC/DOC(2015)3
electron (or positron) beam of energy E that impinges normally on a foil of material
of (small) thickness ds, and assume that the electrons do not scatter (i.e., they are
not deflected) in the foil. The product Ω2in ds then gives the variance of the energy
distribution of the beam after traversing the foil (see also Section 4.2).
(n)
The integrated cross sections σin can be calculated as
(n) (n) (n) (n)
σin = σdis,l + σdis,t + σclo . (3.103)
and
Z Wmax
2πe4 X
(n) 1 2
σdis,t = fk ln − β − δF W n−1 pdis (W ) dW , (3.105)
me v 2 k 1 − β2 0
respectively.
The integrated cross sections for close collisions are
Z Wmax
(n) 2πe4 X
σclo = fk W n−2 F (±) (E, W ) dW. (3.106)
me v 2 k 0
Qk
In the case of electrons, the integrals in this formula are of the form
" 2 #
2
−
Z
W (1 a)W aW
Jn(−) = W n−2 1 + − + dW (3.107)
E−W E−W E2
(−) E aW 2
J1 = ln W + + (2 − a) ln(E − W ) + (3.109)
E−W 2E 2
and
(−) 2E 2 − W 2 aW 3
J2 = (2 − a)W + + (3 − a)E ln(E − W ) + . (3.110)
E−W 3E 2
For positrons, the integrals in (3.106),
Z " 2 3 4 #
W W W W
Jn(+) ≡ W n−2 1 − b1 + b2 − b3 + b4 dW, (3.111)
E E E E
150
NEA/NSC/DOC(2015)3
(+) 1 ln W W W2 W3
J0 =− − b1 + b2 2 − b3 3 + b4 4 , (3.112)
W E E 2E 3E
(+) W W2 W3 W4
J1 = ln W − b1 + b2 2 − b3 3 + b4 4 (3.113)
E 2E 3E 4E
and
(+) W2 W3 W4 W5
J2 = W − b1 + b2 2 − b3 3 + b4 4 . (3.114)
2E 3E 4E 5E
9 9
10 10
electrons in Al electrons in Au
108
8
10
7
10 cb total
7 6
10 10
σin (barn)
σin (barn)
outer shells
5
total 10
106
cb 4
10
M shells
5 L shells
10 10
3
L shells
4 102
10
K shell 10 K shell
3
10
1
102 104 106 108 102 104 106 108
E (eV) E (eV)
Figure 3.9: Total inelastic cross sections for electrons in aluminium and gold and contri-
butions from the K shell, L and M shells, conduction band (cb) and outer shells, calculated
from our model GOS ignoring density effect corrections (i.e., with δF = 0). In the calcula-
tions we have used the following values of the oscillator strength and the resonance energy for
conduction-band excitations: fcb = 3 and Wcb = 15.8 eV for aluminium, and fcb = 11 and
Wcb = 40 eV for Au. The dotted curves represent ionisation cross sections for the K shell
and the L and M shells taken from the numerical DWBA database described in Section 3.2.6.
Note: 1 barn=10−24 cm2 .
Figure 3.9 displays total inelastic cross sections for electrons in aluminium and gold,
as well as contributions from various groups of shells, as functions of the kinetic energy
of the projectile. The curves labelled “K shell”, “L shells” and “M shells” represent
151
NEA/NSC/DOC(2015)3
1010 1010
electrons positrons
electrons
109 109
(eV cm2/g)
(eV cm2/g)
Au (×100) Au (×100)
8 8
10 10
Sin /ρ
Sin /ρ
Ag (×10) Ag (×10)
107 107
Al Al
106 2 4 6 8 106 2 4 6 8
10 10 10 10 10 10 10 10
E (eV) E (eV)
Figure 3.10: Collision stopping power Sin /ρ for electrons and positrons in aluminium, silver
(×10) and gold (×100) as a function of the kinetic energy. Continuous and dashed curves
are results from the present model. Crosses are data from the tables in the ICRU Report 37
(1984) and in Berger and Seltzer (1982). The dotted curves are predictions from the Bethe
formula (3.120), for electrons and positrons.
cross sections for ionisation in these shells (with the added contributions from L and M
subshells). The cross section for ionisation of a bound shell decreases rapidly with the
shell ionisation energy Uk (because energy transfers less than Uk , which would promote
the target electron to occupied states, are forbidden). As a consequence, collisions occur
preferentially with electrons in the conduction band and in outer bound shells. Inner-
shell ionisation by electron/positron impact is a relatively unlikely process. It should be
noted that our GOS model is too crude to provide an accurate description of inner-shell
ionisation. To illustrate this limitation, Fig. 3.9 includes K-, L and M-shell ionisation
cross sections obtained from the numerical DWBA database described in Section 3.2.6,
which are known to agree reasonably well with experimental data (Bote and Salvat,
2008; Llovet et al., 2014). We see that there are significant differences between the
cross sections from the database and the predictions of our simple GOS model, which
is designed to yield accurate stopping powers only. To get a realistic picture of inner-
shell ionisation, we have to rely on much more elaborate physics models. In fact, even
the Born approximation ceases to be appropriate for projectiles with kinetic energies
near the ionisation threshold. Still, the qualitative good agreement between our cross
sections and those from the numerical database is noteworthy.
152
NEA/NSC/DOC(2015)3
Collision stopping powers for electrons in aluminium, silver and gold obtained from
the present analytical model are compared with sample values from the ICRU Report
37 (1984) stopping power tables [given also in Berger and Seltzer (1982)] for E ≥ 10 keV
in Fig. 3.10. Our results practically coincide with the values in the tables of reference,
because we are using the same values of the mean excitation energy I. In Fig. 3.11,
inelastic mean free paths and stopping powers for low-energy electrons (E = 100 eV
to 100 keV) in aluminium and gold obtained from the present model are compared
with experimental data from several authors. We see that the theory predicts the
energy variation of total integrated cross sections down to relatively low energies. It
should be noted that the adopted value of Wcb , the resonance energy of conduction
band electrons, has a strong effect on the calculated mean free paths. In the case of
free-electron-like materials such as aluminium, Wcb can be identified with the energy of
plasmon excitations (which is the dominant energy-loss mechanism). For other solids,
the outermost electrons have a broad energy loss spectrum and there is no simple way
of predicting this parameter. Fortunately, the stopping power (and, hence, the global
stopping process) is practically independent of the adopted value of Wcb . To generate
data for aluminium, Fig. 3.11, we have set Wcb = 15 eV, which is the measured energy
of volume plasmons in the metal [Eq. (3.62) with fcb = 3 conduction electrons per atom
gives Wcb = 15.8 eV]; in this case, the calculated mean free paths are seen to agree
fairly well with measured data. In the case of gold, Eq. (3.62) with fcb = 11 conduction
electrons per atom gives Wcb = 30 eV. Figure 3.11 shows stopping powers and mean free
paths for electrons in gold obtained with Wcb = 30 and 40 eV. We see that, as indicated
above, the mean free path varies strongly with this parameter, but the stopping power
is practically insensitive to it.
The contribution from distant (longitudinal and transverse) interactions to the stopping
cross section is then [see Eqs. (3.94) and (3.95)]
2πe4 X Qk 2me c2 β 2
(1) 1 2
σdis ' fk ln + ln − β − δF . (3.116)
me v 2 k Wk2 1 − β2
153
NEA/NSC/DOC(2015)3
2
10 Sin/ρ
Sin/ρ
10 10
ρλin (µg/cm2),
ρλin (µg/cm2),
ρλin ρλin
1
1
Wcb = 30 eV
Wcb = 40 eV
0.1
2 3 4 5 2 3 4 5
10 10 10 10 10 10 10 10
E (eV) E (eV)
Figure 3.11: Collision mean free path and stopping power for low-energy electrons in alu-
minium and gold. The plotted quantities are ρλin and Sin /ρ. Special symbols are experimental
data from different sources (see Fernández-Varea et al., 1993b); closed symbols for mean free
paths and open symbols for stopping powers.
1 p 2
+ 1 − 1 − β2 (3.118)
8
for electrons and
2πe4 X
(1) E b2 b3 b4
σclo ' fk ln − b1 + − + (3.119)
me v 2 k Qk 2 3 4
for positrons. Adding the distant and close stopping cross sections, and using the relation
(3.61), we arrive at the familiar Bethe formula for the stopping power,
2πe4
2
(1) (1)
E γ+1 (±)
Sin ≡ N σdis + σclo = N Z ln + f (γ) − δF , (3.120)
me v 2 I2 2
where 2
(−) 2γ − 1
2 1 γ−1
f (γ) = 1 − β − ln 2 + (3.121)
γ2 8 γ
154
NEA/NSC/DOC(2015)3
and
β2
(+) 14 10 4
f (γ) = 2 ln 2 − 23 + + + (3.122)
12 γ + 1 (γ + 1)2 (γ + 1)3
for electrons and positrons, respectively. This formula can be derived from very general
arguments that do not require knowledge of the fine details of the GOS; the only in-
formation needed is contained in the Bethe sum rule (3.54) and in the definition (3.55)
of the mean excitation energy (see, e.g. Fano, 1963). Since our approximate analytical
GOS model is physically motivated, it satisfies the sum rule and reproduces the adopted
value of the mean ionisation energy, it yields (at high energies) the exact Bethe formula.
It is striking that the “asymptotic” Bethe formula is in fact valid down to fairly small
energies, of the order of 10 keV for high-Z materials (see Fig. 3.10). It also accounts
for the differences between the stopping powers of electrons and positrons (to the same
degree as our GOS model approximation).
For ultrarelativistic projectiles, for which the approximation (3.73) holds, the Bethe
formula simplifies to
2πe4
2
E γ+1 (±)
Sin ' N Z ln + f (γ) + 1 . (3.123)
me v 2 Ω2p 2γ 2
The mean excitation energy I has disappeared from this formula, showing that at
very high energies the stopping power depends only on the electron density N Z of
the medium.
as well as the contribution of each oscillator, σk (Wcc ). The active oscillator is sampled
from the point probabilities pk = σk (Wcc )/σ(Wcc ). In the present version of penelope,
these probabilities are calculated at initialisation time and stored in memory. Thus, with
a moderate increase in memory storage, the simulation speed is made fairly independent
155
NEA/NSC/DOC(2015)3
of the number of oscillators [in previous versions of the code, the total cross sections
σk (Wcc ) of all the oscillators were calculated for each interaction].
After selecting the active oscillator, the oscillator branch (distant or close) is deter-
mined and, finally, the variables W and Q (or cos θ) are sampled from the associated
DCS. For close collisions, Q = W and, therefore, the scattering angle is obtained directly
from the energy loss.
The energy loss in distant excitations of the k-th oscillator is sampled from the cor-
responding energy-loss DCS. In the case of the conduction band, W = Wk . For in-
ner shells, the energy loss follows the distribution pdist (W ), Eq. (3.76), restricted to
the interval (Wcc , Wdis ). Using the inverse-transform method (Section 1.2.2) we find
that random values of the energy loss restricted to an arbitrary subinterval (W1 , W2 )
[Uk ≤ W1 < W2 ≤ Wdis ] are provided by the following sampling formula,
p
W = Wdis − (Wdis − W1 )2 − ξ(W2 − W1 )(2Wdis − W1 − W2 ), (3.125)
where Q− is the minimum recoil energy, Eq. (A.31), corresponding to either the res-
onance energy Wk (for the conduction band) or the modified resonance energy Wk0 ,
Eq. (3.78) (for an inner shell). The quantity Q0k is the modified cutoff recoil energy,
Eq. (3.80) (modified only for inner-shell excitations). Random sampling from the PDF
(3.126) can be performed by the inverse-transform method, which gives the sampling
formula
( ξ )−1
Q0k
QS QS
Q = QS 1+ − , (3.127)
Q0k 2me c2 2me c2
where
Q−
QS ≡ . (3.128)
1 + Q− / (2me c2 )
156
NEA/NSC/DOC(2015)3
Once the energy loss and the recoil energy have been sampled, the polar scattering angle
θ is determined from Eq. (A.40),
E(E + 2me c2 ) + (E − Wk0 )(E − Wk0 + 2me c2 ) − Q(Q + 2me c2 )
cos θ = p , (3.129)
2 E(E + 2me c2 ) (E − Wk0 )(E − Wk0 + 2me c2 )
where we have considered that W = Wk0 . The azimuthal scattering angle φ is sampled
uniformly in the interval (0, 2π).
For the formulation of the sampling algorithm, it is convenient to introduce the reduced
energy loss κ ≡ W/(E + Uk ). The PDF of κ in close collisions of electrons with the k-th
oscillator is given by [see Eqs. (3.86) and (3.87)]
(−) −2 (−) 1 1 1
Pk (κ) ≡ κ F (E, W ) Θ(κ − κc ) Θ −κ = 2 +
2 κ (1 − κ)2
1 1 1
− +a 1+ Θ(κ − κc ) Θ −κ , (3.130)
κ(1 − κ) κ(1 − κ) 2
with κc ≡ max(Qk , Wcc )/E. Notice that the maximum allowed value of κ is 1/2. Here,
normalisation is irrelevant.
We introduce the distribution
2
(−) −2 1 γ−1
Φ (κ) ≡ (κ + 5a) Θ(κ − κc ) Θ −κ , a≡ . (3.131)
2 γ
(−)
It may be shown that Φ(−) > Pk in the interval (κc , 21 ). Therefore, we can sample the
reduced energy loss κ from the PDF (3.130) by using the rejection method (see Section
1.2.5) with trial values sampled from the distribution (3.131) and acceptance probability
(−)
Pk /Φ(−) .
Random sampling from the PDF (3.131), can be performed by using the composition
method (Section 1.2.6). We consider the following decomposition of the (normalised)
PDF given by Eq. (3.131):
1
Φ(−)
norm (κ) = [p1 (κ) + (5aκc /2)p2 (κ)] , (3.132)
1 + 5aκc /2
where
κc 2
p1 (κ) = κ−2 , p2 (κ) = (3.133)
1 − 2κc 1 − 2κc
are normalised PDFs in the interval (κc , 12 ). Random values of κ from the PDF (3.131)
can be generated by using the following algorithm:
(i) Generate ξ.
157
NEA/NSC/DOC(2015)3
The rejection algorithm for random sampling of κ from the PDF (3.130) proceeds
as follows:
(−)
Notice that in the third step we accept the κ value with probability Pk /Φ(−) , which
approaches unity when κ is small.
The efficiency of this sampling method depends on the values of the energy E and
the cutoff reduced energy loss κc , as shown in Table 3.1. For a given energy and for Wcc
values which are not too large, the efficiency increases when Wcc decreases.
Table 3.1: Efficiency (%) of the random sampling algorithm of the energy loss in close
collisions of electrons and positrons for different values of the energy E and the cutoff energy
loss κc .
E (eV) κc
0.001 0.01 0.1 0.25 0.4
103 99.9 99.9 99.8 99.7 99.6
105 99.7 98 87 77 70
107 99 93 70 59 59
109 99 93 71 62 63
After sampling the energy loss W = κ(E + Uk ), the polar scattering angle θ is
obtained from Eq. (A.40) with Q = W . This yields
E − W E + 2me c2
cos2 θ = , (3.134)
E E − W + 2me c2
which agrees with Eq. (A.17). The azimuthal scattering angle φ is sampled uniformly
in the interval (0, 2π).
158
NEA/NSC/DOC(2015)3
The PDF of the reduced energy loss κ ≡ W/E in positron close collisions with the k-th
oscillator is given by [see Eqs. (3.91) and (3.92)]
(+) (+)
Pk (κ) = κ−2 Fk (E, W ) Θ(κ − κc ) Θ(1 − κ)
1 b1 2
= − + b2 − b3 κ + b4 κ Θ(κ − κc ) Θ(1 − κ) (3.135)
κ2 κ
with κc ≡ max(Qk , Wcc )/E. The maximum allowed reduced energy loss is 1. Again,
normalisation is not important.
Consider the distribution
The efficiency of this algorithm, for given values of the kinetic energy and the cutoff
reduced energy loss κc , practically coincides with that of the algorithm for electron
collisions described above (see Table 3.1).
According to our GOS model, each oscillator Wk corresponds to a shell with fk electrons
and ionisation energy Uk . After a hard collision with an inner-shell electron, the primary
electron/positron has kinetic energy E − W , the “secondary” electron (delta ray) is
ejected with kinetic energy Es = W − Ui , and the residual ion is left in an excited
state, with a vacancy in shell i, which corresponds to an excitation energy equal to Ui .
This energy is eventually released by emission of energetic x rays and Auger electrons.
However, in penelope the relaxation of ions produced in hard collisions is not followed.
The production of vacancies in inner shells and their relaxation is simulated by an
independent, more accurate, scheme (see Section 3.2.6) that is free from the crude
159
NEA/NSC/DOC(2015)3
approximations involved in our GOS model. To avoid double counting, the excitation
energy Ui of the residual ion is deposited locally. On the other hand, when the impact
ionisation occurs in an outer shell or in the conduction band, the initial energy of the
secondary electron is set equal to W and no fluorescent radiation from the ionised atom
is followed by the simulation program. This is equivalent to assuming that the secondary
electron carries away the excitation energy of the target atom.
To set the initial direction of the delta ray, we assume that the target electron is
initially at rest, i.e., the delta ray is emitted in the direction of the momentum transfer
q. This implies that the polar emission angle θs (see Fig. 3.1) coincides with the recoil
angle θr [which is given by Eq. (A.42)],
2
W 2 /β 2 Q(Q + 2me c2 ) − W 2
2
cos θs = 1+ . (3.137)
Q(Q + 2me c2 ) 2W (E + me c2 )
For distant interactions, the value of W should be set equal to the modified resonance
energy Wk0 (Wk for the conduction band), because the recoil energy Q was sampled
under the assumption that W = Wk0 [see Eq. (3.126)]. In the case of close collisions
(Q = W ), expression (3.137) simplifies to
1/2
W E + 2me c2
cos θs (Q = W ) = , (3.138)
E W + 2me c2
which agrees with the result for binary collisions with free electrons at rest, see Eq.
(A.18). Since the momentum transfer lies on the scattering plane (i.e., on the plane
formed by the initial and final momenta of the projectile), the azimuthal emission angle
is φs = π + φ.
In reality, the target electrons are not at rest and, therefore, the angular distribution
of emitted delta rays is broad. Since the average momentum of bound electrons is
zero, the average direction of delta rays coincides with the direction of q. Thus, our
simple emission model correctly predicts the average initial direction of delta rays, but
disregards the “Doppler broadening” of the angular distribution. This is not a serious
drawback, because secondary electrons are usually emitted with initial kinetic energies
that are much smaller than the initial energy of the projectile. This means that the
direction of motion of the delta ray is randomised, by elastic and inelastic collisions,
after a relatively short path length (much shorter than the transport mean free path of
the projectile).
160
NEA/NSC/DOC(2015)3
target atom and, in the case of electron collisions, it does not account for exchange
effects (which arise from the indistinguishability of the projectile and target electrons).
As a consequence, the PWBA yields the same cross sections for electrons and positrons.
A more elaborate theoretical description of total ionisation cross sections is obtained
from the relativistic distorted-wave Born approximation (DWBA), which consistently
accounts for the effects of both distortion and exchange (see, e.g., Bote and Salvat,
2008, and references therein). DWBA calculations yield total cross sections in fairly
good agreement with experimental data for ionisation of K, L and M shells (see Llovet
et al., 2014). These calculations involve the expansion of free-state wave functions as
partial wave series and the subsequent evaluation of multiple radial integrals. Since
the convergence of partial-wave series worsens with increasing kinetic energies, DWBA
calculations are feasible only for projectiles with relatively small energies, up to about
20Ui .
We have calculated an extensive numerical database of ionisation cross sections for
K, L and M shells of all the elements from hydrogen (Z = 1) to einsteinium (Z = 99),
for projectiles with kinetic energies from threshold up to 1 GeV. The theoretical model
adopted in the calculations combines the DWBA and the PWBA, as described by Bote
and Salvat (2008). The DWBA is used to calculate the ionisation cross section for
projectiles with energies from ∼ Ui up to 16Ui . For higher energies, the cross section
is obtained by multiplying the PWBA cross section by an empirical energy-dependent
scaling factor, which tends to unity at high energies where the PWBA is expected to
be reliable. This calculation scheme accounts for differences between the cross sections
for ionisation by electrons and positrons. Bote et al. (2009, 2011) published analytical
formulas for the easy calculation of cross sections for ionisation of K, L and M shells
of neutral atoms by impact of electrons and positrons. These formulas are coded in a
simple Fortran program that yields cross sections that agree with those in the numerical
database to within about 1 percent. The present database also includes ionisation cross
sections for N shells of heavy elements, which were calculated more recently using the
same methodology as for the K, L and M shells. In the following, the cross section for
ionisation of the i-th shell of a given element by electron (−) and positron (+) impact
(±)
will be denoted by σsi,i (E), where E is the kinetic energy of the particle.
Figure 3.12 displays the cross sections of the numerical database for the ionisation
of K shells and L and M subshells of argon, silver, gold, and uranium atoms by impact
of electrons and positrons, together with results from the PWBA for K and L shells
(Scofield, 1978). The differences between the cross sections of the database and the
PWBA at relatively low energies are due to exchange and Coulomb corrections, which
are not considered in Scofield’s PWBA calculations. The dashed curves in Fig. 3.12
represent cross sections for ionisation by positron impact. Differences between cross
sections for electrons and positrons arise from the distortion of the projectile wave
functions by the electrostatic field of the target atom, which is attractive for electrons
and repulsive for positrons, and from electron exchange effects. It is worth mentioning
that the theoretical model used to generate the database disregards the influence of the
polarisability of the medium (density effect) on inner-shell ionisation. This effect causes
161
NEA/NSC/DOC(2015)3
(E ) (barn)
104
4
10
103
(±)
(±)
σ si,i
σ si,i
K shell L shells
3
10
102 K shell
2
10 10 2
102 104 106 108 10 104 106 108
E (eV) E (eV)
5
10
4
10
Au U
104 M shells
3
10
(E ) (barn)
(E ) (barn)
M shells
103
10
2 L shells
102
(±)
(±)
σ si,i
σ si,i
L shells
K shell 10 K shell
10
1 1
104 106 108 104 106 108
E (eV) E (eV)
Figure 3.12: Cross sections for ionisation of the K shell and the L and M subshells of argon,
silver, gold and uranium atoms by electron and positron impact as functions of the kinetic
energy E of the projectiles. Solid and dashed curves represent the cross sections from the
numerical database for electrons and positrons, respectively. Circles are values calculated by
Scofield (1978) using the PWBA.
162
NEA/NSC/DOC(2015)3
a reduction of the ionisation cross section for projectiles with very high energies (see,
e.g., Scofield, 1978).
In the present version of penelope, ionisation cross sections are obtained from
the numerical database, which consists of 198 files with tables of the cross sections for
ionisation of K, L, M and N shells of the elements (Z = 1 − 99) by electron and positron
(±)
impact. The grid of energies where σsi,i (E) is tabulated varies with the element, because
it has a higher density of points above each ionisation threshold to allow accurate linear
log-log interpolation. The atomic cross section for inner shell ionisation is obtained as
(±)
X (±)
σsi,atom (E) = σsi,i (E), (3.139)
i
where the summation extends over the inner shells of the atom. In the simulation,
we consider only K, L, M and N shells with ionisation energies Ui larger than the
absorption energies of electrons or photons, EABS(1) or EABS(2) (see Section 7.1.2).
There is no need to simulate ionisations of shells that are unable to originate x rays
and Auger electrons with energies higher than the corresponding cutoffs. In the case of
compounds, the molecular cross section is evaluated as (additivity approximation)
(±)
X (±)
σsi,mol (E) = σsi,i (E), (3.140)
i
where the summation now extends over all inner shells of the atoms in the molecule.
As indicated above, the theory presented in Sections 3.2.1 and 3.2.2 does not give realistic
values of the cross sections for ionisation of inner shells (see Fig. 3.9). Hence, it is not
appropriate to simulate inner-shell ionisation by electron and positron impact and the
subsequent emission of fluorescent radiation, i.e., Auger electrons and characteristic
x rays. Nevertheless, the GOS model does provide an appropriate description of the
average (stopping and scattering) effect of inelastic collisions on the projectile.
In previous versions of penelope the impact ionisation of inner shells was considered
as a separate process, which did not alter the energy and the direction of the projectile
particle. With the adopted DWBA cross sections, this approach had the advantage of
yielding a nearly correct number of ionisations per unit path length, without altering the
modelling of inelastic collisions, but at the expense of occasionally producing negative
doses (x rays leave sites where no energy is deposited). In the present version of the
code we have changed strategy and consider ionisations of inner shells as real inelastic
collisions. This is accomplished by setting the total cross section for collisions with
electrons in each inner shell equal to the DWBA cross section, and by renormalising the
total cross sections of outer shells so as to keep the value of the collision stopping power
unaltered. The energy loss and the recoil energy in ionizing events are sampled using
the algorithm described in Section 3.2.5. With the present scheme, x rays and Auger
163
NEA/NSC/DOC(2015)3
electrons are emitted only when the projectile delivers sufficient energy, thus preventing
the occurrence of negative energy deposits.
Our renormalisation procedure is based on the observation that the total cross sec-
tion is dominated by contributions from the lower oscillators (i.e., those with smaller
resonance energies). Let us consider the total cross section, σin , decomposed into con-
tributions from the various oscillators,
X X
σin (E) = σin,i (E) + σin,j (E), (3.141)
i j
where the first summation is over inner shells (K to N7 shells with binding energies
less than the cut-off energy Ec defined by Eq. (2.111)), which we have separated from
the contributions from outer shells. In order to get the correct average number of
ionisations, we replace the total cross section of each inner shell, σin,i (E), with the
(±)
DWBA cross section σsi,i (E), without altering details of the PDFs of the energy loss
and scattering angle defined by the GOS model. Furthermore, to approximately account
for the density effect, we reduce the DWBA cross sections by a factor equal to the ratio
of the cross sections obtained from the GOS model with and without the density effect
correction, δF . Finally, to keep the stopping power unaltered, the total cross section of
outer shells, σin,j (E), is multiplied by an energy-dependent scaling factor, N (E), the
same for all outer shells, such that the adopted stopping power is reproduced exactly.
That is, we set X X
σin (E) = σsi,i (E) + N (E) σin,j (E). (3.142)
i j
164
NEA/NSC/DOC(2015)3
but information on the angular distributions is completely lost and has to be regained
from suitable approximations. Angular deflections of the projectile are considered to be
accounted for by the elastic scattering DCS and, consequently, the direction of movement
of the projectile is kept unaltered in the simulation of radiative events.
W W Rme c 1
= 2
= , b= , (3.144)
E + me c γ me c2 ~ 2γ 1 −
and
The quantity η in Eq. (3.143) accounts for production of bremsstrahlung in the field
of the atomic electrons (see, e.g., Seltzer and Berger, 1985); in the high-energy limit
η ' 1.2.
The Bethe-Heitler formula indicates that, for a given value of Z, the quantity
W dσbr /dW varies smoothly with E and W . It is therefore customary to express the
DCS for bremsstrahlung emission by electrons in the form
dσbr Z2 1
= 2 χ(Z, E, κ), (3.146)
dW β W
165
NEA/NSC/DOC(2015)3
where W is the energy of the emitted photon, κ is the reduced photon energy, defined
as
κ ≡ W/E, (3.147)
which takes values between 0 and 1. The quantity
dσbr
χ(Z, E, κ) = (β 2 /Z 2 )W (3.148)
dW
is known as the “scaled” bremsstrahlung DCS; for a given element Z, it varies smoothly
with E and κ. Seltzer and Berger (1985, 1986) produced extensive tables of the
scaled DCS for all the elements (Z =1–92) and for electron energies from 1 keV to
10 GeV. They tabulated the scaled DCSs for emission in the (screened) field of the
nucleus (electron-nucleus bremsstrahlung) and in the field of atomic electrons (electron-
electron bremsstrahlung) separately, as well as their sum, the total scaled DCS. The
electron-nucleus bremsstrahlung DCS was calculated by combining analytical high-
energy theories with results from partial-wave calculations by Pratt et al. (1977, 1981)
for bremsstrahlung emission in screened atomic fields and energies below 2 MeV. The
scaled DCS for electron-electron bremsstrahlung was obtained from the theory of Haug
(1975) combined with a screening correction that involves Hartree-Fock incoherent scat-
tering functions. Seltzer and Berger’s scaled DCS tables constitute the most reliable
theoretical representation of bremsstrahlung energy spectra available at present.
The penelope database of scaled bremsstrahlung DCSs consists of 99 files, one
for each element from hydrogen to einsteinium, which were generated from the origi-
nal database of Seltzer and Berger. The file of the element Z contains the values of
χ(Z, Ei , κj ) for a set of electron kinetic energies Ei , which covers the range from 1 keV
to 10 GeV and is suitably spaced to allow accurate natural cubic spline interpolation in
ln E. For each energy Ei in this grid, the table contains values of the scaled DCS for a
given set of 32 reduced photon energies κj (the same for all elements), which span the
interval (0,1), with a higher density at the upper end of this interval to reproduce the
structure of the bremsstrahlung “tip” (see Fig. 3.13). The spacing of the κ-grid is dense
enough to allow linear interpolation of χ(Z, Ei , κj ) in κ.
In the case of compounds (or mixtures) we use the additivity rule and compute the
molecular DCS as the sum of the DCSs of all the atoms in a molecule. Consider a
compound Xx Yy , whose molecules consist of x atoms of the element X and y atoms of
the element Y. The molecular DCS is
dσbr,mol Z2 1 Z2 1
= x X2 χ(ZX , E, κ) + y Y2 χ(ZY , E, κ). (3.149)
dW β W β W
To simulate each radiative event in a compound, we should first select the element (X
or Y) where the emission occurs and then sample the photon energy and direction from
the corresponding atomic DCS. This is a lengthy process and requires storing the scaled
DCSs for all the elements present. To simplify the simulation, we shall express the
molecular DCS in the same form as the atomic DCS, Eq. (3.146),
2
dσbr,mol Zeq 1
= 2 χmol (Zeq , E, κ), (3.150)
dW β W
166
NEA/NSC/DOC(2015)3
1 keV 1 keV
15 Al 10 keV Au 10 keV
100 keV 10 100 keV
1 MeV 1 MeV
10 MeV 10 MeV
χ(Z,E,κ) (barn)
χ(Z,E,κ) (barn)
100 MeV 100 MeV
10
0 0
0.0 0.5 1.0 0.0 0.5 1.0
κ = W/E κ = W/E
Figure 3.13: Numerical scaled bremsstrahlung energy-loss DCSs of aluminium and gold for
electrons with the indicated energies (Seltzer and Berger, 1986).
where
1 2
xZX2 + yZY2
Zeq ≡ (3.151)
x+y
is the “equivalent” atomic number Zeq and
xZX2 yZY2
χmol (Zeq , E, κ) = 2
χ(Z X , E, κ) + 2
χ(ZY , E, κ) (3.152)
Zeq Zeq
is the molecular scaled DCS. Radiative events will be sampled directly from the molec-
ular DCS (3.150). This method may introduce slight inconsistencies in the angular
distribution of the emitted photons (see below), which usually have a negligible effect
on the simulation results.
The radiative DCS for positrons reduces to that of electrons in the high-energy limit
but is smaller for intermediate and low energies. Owing to the lack of more accurate
calculations, the DCS for positrons is obtained by multiplying the electron DCS by a
κ-independent factor, i.e.,
(+) (−)
dσbr dσ
= Fp (Z, E) br . (3.153)
dW dW
The factor Fp (Z, E) is set equal to the ratio of the radiative stopping powers for positrons
and electrons, which has been calculated by Kim et al. (1986) (cf. Berger and Seltzer,
167
NEA/NSC/DOC(2015)3
where
106 E
t = ln 1 + 2 . (3.155)
Z me c2
Expression (3.154) reproduces the values of Fp (Z, E) tabulated by Kim et al. (1986) to
an accuracy of about 0.5%.
168
NEA/NSC/DOC(2015)3
109 109
0)
0)
10
10
(×
(×
(eV cm2/g)
(eV cm2/g)
108 108
)
Au
Au
10
10
(×
(×
Ag
Ag
7 7
10 10
Al
Al
6 6
10 10
Sbr/ρ
Sbr/ρ
5 5
10 10
positrons
104 104 electrons
4 5 6 7 8 9 4 5 6 7 8 9
10 10 10 10 10 10 10 10 10 10 10 10
E (eV) E (eV)
Figure 3.14: Radiative stopping power Sbr /ρ for electrons and positrons in aluminium,
silver (×10) and gold (×100) as a function of the kinetic energy. Solid and dashed curves
are results from the present model. Crosses are data from the tables in the ICRU Report 37
(1984) and in Berger and Seltzer (1982).
improvements, penelope reads the radiative stopping power for electrons from the in-
put material data file, and renormalises the DCS, Eq. (3.146), (i.e., multiplies it by a
κ-independent factor) so as to exactly reproduce the input radiative stopping power.
As mentioned above, the stopping power gives the average energy loss per unit path
length. Thus, when an electron/positron with kinetic energy E advances a small distance
ds within a medium, it loses an (average) energy dE = −S(E) ds, where
dE
S(E) = Sin (E) + Sbr (E) = − (3.159)
ds
is the total (collisional+radiative) stopping power. Figure 3.15 compares the radiative
and collision stopping powers of aluminium, silver and gold for electrons. It is seen that
radiative losses dominate for projectiles with kinetic energies above a critical value, Ecrit
(indicated by diamonds in Fig. 3.15), which decreases with the atomic number. Electrons
and positrons with energies well above Ecrit tend to radiate high-energy photons, with a
corresponding sudden reduction of the kinetic energy in each event. For energies higher
than Ecrit the radiative stopping power is approximately proportional to the energy,
169
NEA/NSC/DOC(2015)3
where the distance X0 is known as the radiation length. The values of this parameter,
determined graphically from the Sbr (E) curves in Fig. 3.15, are ρX0 = 25 g/cm2 for
aluminium, ρX0 = 9.2 g/cm2 for silver, and ρX0 = 6.6 g/cm2 for gold. Since the
radiative stopping powers for electrons and positrons with very high energies are equal
(see Fig. 3.14), these particles have the same radiation lengths. The energy straggling
parameter of high-energy electrons and positrons is also dominated by radiative events.
109 Ag (×10)
(eV cm2/g)
8
10
7
10
106
Sbr/ρ
Al
105
Sbr(E )
4
Sin(E )
10 E/X0
4 5 6 7 8
10 10 10 10 10 10
E (eV)
Figure 3.15: Radiative and collision stopping powers for electrons in aluminium, silver (×10)
and gold (×100) as functions of the kinetic energy (solid and dashed curves, respectively).
Dot-dashed lines represent the high-energy approximation given by Eq. (3.160). Diamonds
indicate the critical energy Ecrit at which the radiative stopping power starts dominating for
each material.
Many electron transport calculations and old Monte Carlo simulations are based on the
so-called continuous slowing down approximation (CSDA), which assumes that particles
lose energy in a continuous way and at a rate equal to the stopping power. Evidently,
the CSDA disregards energy-loss fluctuations and, therefore, it provides only the average
value of the energy lost by a particle along a given path length.
A quantity of much practical importance is the so-called CSDA range (or Bethe
range), R(E), which is defined as the average path length travelled by a particle of
170
NEA/NSC/DOC(2015)3
kinetic energy E (in an infinite medium) in the course of its slowing down, i.e., before
being absorbed. It is given by
E
dE 0
Z Z
ds
R(E) = 0
dE 0 = , (3.161)
dE Eabs S(E 0 )
where we have considered that particles are effectively absorbed when they reach the
energy Eabs . Notice that the CSDA range gives the average path length, actual (or
Monte Carlo generated) path lengths fluctuate about the mean R(E); the distribution of
ranges has been studied by Lewis (1952). Figure 3.16 displays CSDA ranges for electrons
and positrons in aluminium and gold, this information is useful, e.g., in estimating the
maximum penetration depth of a beam and for range rejection (a variance-reduction
method). Compare Fig. 3.16 with Figs. 3.10 and 3.14 (right plots only) to get a feeling
of how differences in stopping power between electrons and positrons are reflected in
the CSDA ranges of these particles.
2
10
10
1
ρ R (E ) (g/cm2)
0.1
−2
10
−3
10
Au
−4
10 Al
−5
10
electrons
10−6 positrons
−7
10
2 3 4 5 6 7 8 9
10 10 10 10 10 10 10 10
E (eV)
Figure 3.16: CSDA ranges for electrons and positrons in aluminium and gold as functions
of the kinetic energy of the particle.
The CSDA can also be used to estimate the stopping time of electrons and positrons.
Assuming that particles are effectively absorbed when their kinetic energy reaches the
value Eabs = 50 eV, the lower limit of the energy range covered by the penelope
database, the average time of flight of an electron or positron with initial kinetic energy
171
NEA/NSC/DOC(2015)3
E is Z Z E
ds 1 dE
tstop = = , (3.162)
v Eabs v(E) S(E)
where v(E) = βc is the (energy-dependent) speed of a particle with kinetic energy E
[see Eq. (A.7)].
The CSDA sets a correspondence between the travelled path length s and the average
energy E, which takes a simple form when the energy of the projectile is well above the
critical energy Ecrit . Under such conditions, radiative energy losses dominate and the
approximation (3.160) applies. That is,
Electrons with initial energy E(0) after travelling a path length s acquire an average
energy E(s). The relation
Z E(0)
dE 0
E(0)
s= 0
' X0 ln (3.164)
E(s) S(E ) E(s)
implies that
E(s) = E(0) exp(−s/X0 ) . (3.165)
Hence, when the electron travels a distance equal to the radiation length X0 the energy
drops by a factor e ∼ 2.71. The importance of the radiation length is due to this
straightforward physical interpretation.
The radiative yield or bremsstrahlung yield, Ybr (E), is the average fraction of the
initial kinetic energy E of an electron that is emitted as bremsstrahlung photons when
the electron comes to rest, assuming that the medium where it moves is unbounded.
The average energy emitted as radiation is
Z R(E) 0 Z E 0 Z E
dE dE ds 0 Sbr (E 0 )
Ebr = ds = 0
dE = 0)
dE 0 . (3.166)
0 ds br 0 ds br dE 0 S(E
Hence,
E
Sbr (E 0 )
Z
Ebr 1
Ybr (E) = = dE 0 . (3.167)
E E 0 S(E 0 )
Knowledge of the radiative yield is useful, e.g., to calculate the energy taken by brems-
strahlung photons away from the active volume of an electron detector. Figure 3.17
displays radiative yields of electrons and positrons in carbon, aluminium, silver and
gold, as functions of the kinetic energy E. It shows that Ybr (E) increases with the
atomic number of the medium, and is roughly proportional to Z. The radiative yields
of positrons are smaller than those of electrons, because of their smaller stopping power
(see Fig. 3.14). The relative differences increase with atomic number, and decrease when
the kinetic energy of the particle increases.
A related quantity is the photon number yield, Yph (E; Wcr ), which is defined as the
average number of photons having energy W larger than the given cutoff energy, Wcr ,
172
NEA/NSC/DOC(2015)3
Au
Ag
0.1
Al
Ybr(E)
10−2 C
−3
10
electrons
positrons
−4
10 4 5 6 7 8 9
10 10 10 10 10 10
E (eV)
Figure 3.17: Radiative yields of electrons and positrons in carbon, aluminium, silver and
gold.
that are emitted during the slowing down of a particle with initial kinetic energy E. It
can be calculated as follows,
R(E) E
λ−1 0
Z Z
br (E ; Wcr )
Yph (E; Wcr ) = λ−1 0
br (E ; Wcr ) ds = dE 0 . (3.168)
0 Eabs S(E 0 )
Note that the number of photons emitted with energies W in an interval (W1 , W2 ) can
be obtained as the difference between the corresponding photon number yields, i.e.,
Yph (E; W1 ) − Yph (E; W2 ). That is, from Yph (E; Wcr ) we can build the energy spectrum
of all photons emitted by a particle with initial kinetic energy E when it comes to rest.
From the photon number yield we can also obtain the average number Nph of photons
emitted with energy W > Wcr when a particle slows from an initial energy E0 down to
an arbitrary final energy E, lower than E0 ,
Photon number yields of electrons and positrons in aluminium and gold, for various
cutoff energies Wcr , are displayed in Fig. 3.18. Again, the yields are smaller for positrons
than for electrons, and the differences are larger for heavier elements.
173
NEA/NSC/DOC(2015)3
Yph(E ; Wcr)
0.1 0.1
103
103
10−2 10−2
104
−3 −3
10 104 105 106 Wcr = 107 10 105 106 Wcr = 107
−4 −4
10 4 5 6 7 8 9 10 4 5 6 7 8 9
10 10 10 10 10 10 10 10 10 10 10 10
E (eV) E (eV)
Figure 3.18: Photon number yields of electrons and positrons in aluminium and gold, for
the indicated values of the cutoff energy Wcr , as functions of the kinetic energy E.
The direction of the emitted bremsstrahlung photon is defined by the polar angle θ (see
Fig. 3.1) and the azimuthal angle φ. For isotropic media, with randomly oriented atoms
or molecules, the bremsstrahlung DCS is independent of φ and can be expressed as
d2 σbr dσbr Z2 1
= pbr (Z, E, κ; cos θ) = 2 χ(Z, E, κ) pbr (Z, E, κ; cos θ), (3.170)
dW d(cos θ) dW β W
174
NEA/NSC/DOC(2015)3
175
NEA/NSC/DOC(2015)3
Now, it is clear that when β tends to unity, the shape function concentrates at forward
directions.
We found that the benchmark partial-wave shape functions of Kissel et al. (1983)
can be closely approximated by the analytical form (3.174) if one considers A and β as
adjustable parameters (Acosta et al., 2002). Explicitly, we write
" 2 #
cos θ − β 01 − β 02
3
pbr,fit (cos θ) = A 1+
8 1 − β 0 cos θ
(1 − β 0 cos θ)2
" 2 #
cos θ − β 0 1 − β 02
3
+ (1 − A) 1− , (3.175)
4 1 − β 0 cos θ (1 − β 0 cos θ)2
with β 0 = β(1 + B). The parameters A and B have been determined, by least squares
fitting, for the 144 combinations of atomic number, electron energy and reduced photon
energy corresponding to the benchmark shape functions tabulated by Kissel et al. (1983).
Results of this fit are compared with the original partial-wave shape functions in Fig.
3.19. The largest differences between the fits and the data were found for the higher
atomic numbers, but even then the fits are very accurate, as shown in Fig. 3.19. The
quantities ln(AZβ) and Bβ vary smoothly with Z, β and κ and can be obtained by
cubic spline interpolation of their values for the benchmark cases. This enables rapid
evaluation of the shape function for any combination of Z, β and κ. Furthermore, the
random sampling of the photon direction, i.e., of cos θ, can be performed by means of a
simple, fast analytical algorithm (see below). For electrons with kinetic energies larger
than 500 keV, the shape function is approximated by the classical dipole distribution,
i.e., by the analytical form (3.175) with A = 1 and β 0 = β.
Let us now consider simulation of hard radiative events (W > Wcr ) from the DCS
defined by Eqs. (3.170) and (3.175). penelope reads the scaled bremsstrahlung DCS
from the database files and, by natural cubic spline interpolation/extrapolation in ln E,
produces a table for a denser logarithmic grid of 200 energies (and for the “standard”
mesh of 32 κ’s), which is stored in memory. This energy grid spans the full energy range
considered in the simulation and allows accurate (and fast) linear interpolation of the
scaled DCS in the variable ln E, which is more adequate than E when interpolation over
a wide energy interval is required.
Notice that in the Monte Carlo simulation the kinetic energy of the transported
electron (or positron) varies in a random way and may take arbitrary values within
a certain domain. Hence, we must be able to simulate bremsstrahlung emission by
electrons with energies E not included in the grid.
176
NEA/NSC/DOC(2015)3
2 κ = 0 (+1.5)
8
p (cos θ)
p (cos θ)
κ = 0.6 (+1.0) κ = 0 (+6)
κ = 0.8(+2)
κ = 0.95
κ = 0.95
0 0
-1.0 -0.5 0.0 0.5 1.0 -1.0 -0.5 0.0 0.5 1.0
cos θ cos θ
2 κ = 0 (+1.5) 8
κ = 0.6 (+1.0)
p (cos θ)
p (cos θ)
κ = 0 (+4.5)
κ = 0.8(+0.5)
1 4
κ = 0.6 (+3)
κ = 0.8(+1.5)
κ = 0.95
κ = 0.95
0 0
-1.0 -0.5 0.0 0.5 1.0 -1.0 -0.5 0.0 0.5 1.0
cos θ cos θ
Figure 3.19: Shape functions (angular distributions) for bremsstrahlung emission by elec-
trons of the indicated energies in the fields of aluminium and gold atoms. Dashed curves are
partial-wave shape functions of Kissel et al. (1983). Continuous curves are the present analyt-
ical fits, Eq. (3.175). For visual aid, some curves have been shifted upwards in the amounts
indicated in parentheses.
177
NEA/NSC/DOC(2015)3
The PDF for the reduced photon energy, κ = W/E, is given by [see Eq. (3.146)]
1
pbr (E, κ) = χ(Z, E, κ) Θ(κ − κcr ) Θ(1 − κ), (3.176)
κ
where κcr = Wcr /E and χ(Z, E, κ) is calculated by linear interpolation, in both ln E and
κ, in the stored table. That is, χ(Z, E, κ) is considered to be a piecewise linear function
of κ. To sample κ from the PDF (3.176) for an energy Ei in the grid, we express the
interpolated scaled DCS as
With all this we can formulate the following sampling algorithm, which combines a
numerical inverse transform and a rejection,
(i) Generate a random number ξ and determine the index j for which Pj ≤ ξP32 ≤
Pj+1 using the binary-search method.
(ii) Sample κ from the distribution κ−1 in the interval (κj , κj+1 ), i.e.,
This sampling algorithm is exact and very fast [notice that the binary search in step
(i) requires at most 5 comparisons], but is only applicable for the energies in the grid
where χ is tabulated.
To simulate bremsstrahlung emission by electrons with energies E not included in
the grid, we should first obtain the PDF pbr (E, κ) by interpolation along the energy axis
and then perform random sampling of κ from this PDF using the algorithm described
above. This procedure is too time consuming. A faster method consists of assuming
that the grid of energies is dense enough so that linear interpolation in ln E is sufficiently
accurate. If Ei < E < Ei+1 , we can express the interpolated PDF as [cf. Eq. (3.22)]
178
NEA/NSC/DOC(2015)3
ln Ei+1 − ln E ln E − ln Ei
πi = , πi+1 = . (3.182)
ln Ei+1 − ln Ei ln Ei+1 − ln Ei
These weights are positive and add to unity, i.e., they can be interpreted as point
probabilities. Therefore, to perform the random sampling of κ from pbr,int (E, κ) we can
employ the composition method (Section 1.2.6), which leads to the following algorithm:
(i) Sample the integer variable k, which can take the values i or i + 1 with point
probabilities πi and πi+1 , respectively.
With this interpolation-by-weight method we only need to sample κ from the tabulated
PDFs, i.e., for the energies Ei of the grid.
The random sampling of cos θ is simplified by noting that the PDF given by Eq. (3.175)
results from a Lorentz transformation, with speed β 0 , of the PDF (3.172). This means
that we can sample the photon direction cos θ0 in the reference frame K0 from the PDF
(3.172) and then apply the transformation (3.173) (with β 0 instead of β) to get the
direction cos θ in the laboratory frame.
To generate random values of cos θ from (3.175) we use the following algorithm,
which combines composition and rejection methods,
(iii) If ξ1 ≥ A, then
4) Sample a random number ξ and set cos θ0 = −1 + 2ξ.
5) Sample a random number ξ.
6) If ξ > 1 − cos2 θ0 , go to 4).
cos θ0 + β 0
(iv) Deliver cos θ = .
1 + β 0 cos θ0
The efficiencies of the rejections in steps (ii) and (iii) are both equal to 0.66. That is,
on average, we need 4 random numbers to generate each value of cos θ.
179
NEA/NSC/DOC(2015)3
and
cos θ+ = (γ 2 − 1)−1/2 [γ + 1 − 1/(1 − ζ)], (3.185)
and azimuthal angles φ− and φ+ = φ− + π. The quantity γ = 1 + E/(me c2 ) is the total
energy of the positron in units of its rest energy.
The maximum value of ζ is 1/2, its minimum value is found when cos θ− = −1 and
is given by
1
ζmin = . (3.186)
γ + 1 + (γ 2 − 1)1/2
The DCS (per electron) for two-photon annihilation, as observed in the centre-of-
mass system of the positron and the electron, is given by (Heitler, 1954). Nelson et al.
(1985) transformed this DCS to the laboratory system (where the electron is at rest),
their result can be written as
dσan πre2
= [S(ζ) + S(1 − ζ)] , (3.187)
dζ (γ + 1)(γ 2 − 1)
where
1 1
S(ζ) = −(γ + 1)2 + (γ 2 + 4γ + 1) − 2 . (3.188)
ζ ζ
Owing to the axial symmetry of the process, the DCS is independent of the azimuthal
angle φ− , which is uniformly distributed on the interval (0, 2π). For fast positrons,
annihilation photons are emitted preferentially at forward directions. When the kinetic
energy of the positron decreases, the angular distribution of the generated photons
becomes more isotropic (see Fig. 3.20).
180
NEA/NSC/DOC(2015)3
1 MeV
0.8
1
0.6
(rad—1)
100 keV
(barn)
10 keV
0.4 0.1
p(θ)
σan
0.2
10−2
0.0
0 30 60 90 120 150 180 103 104 105 106 107 108
θ (deg) E (eV)
181
NEA/NSC/DOC(2015)3
To sample ζ, we may take advantage of the symmetry of this expression under the
exchange of the two photons, which corresponds to exchanging ζ and 1 − ζ. We first
consider the distribution
(i) Sample a value υ from the distribution π(υ). This is easily done with the inverse-
transform method, which yields the following sampling equation
ξ
1 − ζmin
υ = ζmin . (3.196)
ζmin
(iv) Deliver υ.
ζ = min(υ, 1 − υ) (3.197)
follows the distribution given by Eq. (3.191) when υ is sampled from the distribution
P (υ). The efficiency of this sampling algorithm practically equals 100% for positrons
with kinetic energy E less than 10 keV, decreases when E increases to reach a minimum
value of ∼ 80% at E ∼ 10 MeV and increases monotonically for larger energies.
As the result of annihilation, two photons with energies E− = ζ(E + 2me c2 ) and
E+ = (1 − ζ)(E + 2me c2 ) are emitted in the directions given by Eqs. (3.184) and (3.185).
182
NEA/NSC/DOC(2015)3
Chapter 4
Electron/positron transport
mechanics
In principle, the scattering model and sampling techniques described in Chapter 3 allow
detailed Monte Carlo simulation of electron and positron transport in matter. However,
detailed simulation is feasible only when the mean number of interactions per track is
small (a few hundred at most). This occurs for electrons with low initial kinetic energies
or for thin geometries. The number of interactions experienced by an electron or positron
before being effectively stopped increases with its initial energy and, therefore, detailed
simulation becomes impractical at high energies.
penelope implements a “mixed” simulation scheme (Berger, 1963; Reimer and
Krefting, 1976; Andreo and Brahme, 1984), which combines the detailed simulation
of hard events (i.e., events with polar angular deflection θ or energy loss W larger than
previously selected cutoff values θc and Wc ) with condensed simulation of soft events, in
which θ < θc or W < Wc . Owing to the fact that for high-energy electrons the DCSs for
the various interaction processes decrease rapidly with the polar scattering angle and the
energy loss, cutoff values can be selected such that the mean number of hard events per
electron track is sufficiently small to permit their detailed simulation. In general, this
is accomplished by using relatively small cutoff values, so that each soft interaction has
only a slight effect on the simulated track. The global effect of the (usually many) soft
interactions that take place between each pair of consecutive hard events can then be
simulated accurately by using a multiple-scattering approach. Hard events occur much
less frequently than soft events, but they have severe effects on track evolution (i.e.,
they cause large angular deflections and lateral displacements or considerable energy
losses), which can only be properly reproduced by detailed simulation. The computer
time needed to simulate each track diminishes rapidly when the cutoff values for the
angular deflection and the energy loss are increased. Mixed simulation algorithms are
usually very stable under variations of the adopted cutoff values, whenever these are
kept below some reasonable limits. Mixed simulation is then preferable to condensed
simulation because 1) spatial distributions are simulated more accurately, 2) tracks in
the vicinity of interfaces are properly handled, and 3) possible dependence of the results
183
NEA/NSC/DOC(2015)3
where θ ≡ arccos(d̂ · d̂0 ) is the scattering angle corresponding to the angular deflection
d̂0 → d̂. This equation has to be solved with the boundary condition f (0; r, d̂) =
(1/π)δ(r)δ(1 − cos χ), where χ is the polar angle of the direction d̂. By expanding
f (s; r, d̂) in spherical harmonics, Lewis (1950) obtained exact expressions for the angular
distribution and for the first moments of the spatial distribution after a given path length
s. The probability density F (s; χ) of having a final direction in the solid angle element
dΩ around a direction defined by the polar angle χ is given by
Z ∞
X 2` + 1
F (s; χ) = f (s; r, d̂) dr = exp(−s/λel,` )P` (cos χ), (4.2)
`=0
4π
where P` (cos χ) are Legendre polynomials and λel,` = 1/(N σel,` ) is the `-th transport
mean free path defined by Eq. (3.16). The result given by Eq. (4.2) coincides with
the multiple-scattering distribution obtained by Goudsmit and Saunderson (1940a,b).
Evidently, the distribution F (s; χ) is symmetric about the z-axis, i.e., independent of
the azimuthal angle of the final direction.
From the orthogonality of the Legendre polynomials, it follows that
Z 1
hP` (cos χ)i ≡ 2π P` (cos χ)F (s; χ) d(cos χ) = exp(−s/λel,` ). (4.3)
−1
In particular, we have
hcos χi = exp(−s/λel,1 ) (4.4)
184
NEA/NSC/DOC(2015)3
and
1
hcos2 χi = [1 + 2 exp(−s/λel,2 )] . (4.5)
3
Lewis (1950) also derived analytical formulas for the first moments of the spatial
distribution and the correlation function of z and cos χ. Neglecting energy losses, the
results explicitly given in Lewis’ paper simplify to
Z
hzi ≡ 2π zf (s; r, d̂) d(cos χ) dr = λel,1 [1 − exp(−s/λel,1 )] , (4.6)
Z
2 2
x2 + y 2 f (s; r, d̂) d(cos χ) dr
hx + y i ≡ 2π
Z s Z t
4
= dt exp(−t/λel,1 ) [1 − exp(−u/λel,2 )] exp(u/λel,1 ) du, (4.7)
3 0 0
Z
hz cos χi ≡ 2π z cos χf (s; r, d̂) d(cos χ) dr
Z s
= exp(−s/λel,1 ) [1 + 2 exp(−t/λel,2 )] exp(t/λel,1 ) dt. (4.8)
0
It is worth observing that the quantities (4.4)–(4.8) are completely determined by the
values of the transport mean free paths λel,1 and λel,2 ; they are independent of the elastic
mean free path λel .
(h)
This equation determines the cutoff angle θc as a function of λel . A convenient recipe
(h)
to set the mean free path λel is
(h)
λel (E) = max {λel (E), C1 λel,1 (E)} , (4.10)
185
NEA/NSC/DOC(2015)3
where C1 is a pre-selected small constant (say, less than ∼ 0.1). For increasing energies,
λel attains a constant value and λel,1 increases steadily (see Fig. 3.3) so that the formula
(4.10) gives a mean free path for hard collisions that increases with energy, i.e., hard
collisions are less frequent when the scattering effect is weaker. The recipe (4.10) also
(h)
ensures that λel will reduce to the actual mean free path λel for low energies. In this case,
soft collisions cease to occur (θc = 0) and mixed simulation becomes purely detailed. It
(h)
is worth noticing that, when mixed simulation is effective (i.e., when λel > λel ), the
(h)
mean angular deflection in a path length λel is [see Eq. (4.4)]
(h)
1 − hcos χi = 1 − exp(−λel /λel,1 ) ' C1 . (4.11)
Hence, when using the prescription (4.10), the average angular deflection due to all
(h)
elastic collisions occurring along a path length λel equals C1 .
The PDF of the step length s between two successive hard collisions is
1 (h)
p(s) = (h)
exp(−s/λel ), (4.12)
λel
and random values of s can be generated by means of the sampling formula, Eq. (1.36)
(h)
s = −λel ln ξ. (4.13)
The (unnormalised) PDF of the polar deflection θ in single hard collisions is
dσel (θ)
p(h) (θ) = sin θ Θ(θ − θc ), (4.14)
dΩ
where Θ(x) stands for the step function.
The inverse transport mean free paths λ−1 el,` , see Eqs. (3.14) and (3.16), for the actual
scattering process can be split into contributions from soft and hard collisions, that is
1 1 1
= (s) + (h) , (4.15)
λel,` λel,` λel,`
where Z θc
1 dσel (θ)
(s)
= N 2π [1 − P` (cos θ)] sin θ dθ (4.16a)
λel,` 0 dΩ
and Z π
1 dσel (θ)
(h)
= N 2π [1 − P` (cos θ)] sin θ dθ. (4.16b)
λel,` θc dΩ
Let us assume that an electron starts off from the origin of coordinates moving in
the direction of the z-axis and undergoes the first hard collision after travelling a path
length s. The exact angular distribution produced by the soft collisions along this step
is ∞
X 2` + 1 (s)
F (s) (s; χ) = exp(−s/λel,` )P` (cos χ). (4.17)
`=0
4π
186
NEA/NSC/DOC(2015)3
The exact average longitudinal and transverse displacements at the end of the step are
given by [see Eqs. (4.6) and (4.7)]
! !2
(s)
h
(s)
i 1 s 1 s
hzi(s) = λel,1 1 − exp(−s/λel,1 ) = s 1 − (s)
+ (s)
− . . . , (4.18)
2 λel,1 6 λel,1
(s)
" ! ! #
2 s3 1 λel,1 s
hx2 + y 2 i(s) = (s)
1− 1+ (s) (s)
+ ... , (4.19)
9 λel,2 4 λel,2 λel,1
(s)
where λel,1 , the first transport mean free path for soft collisions, is larger than λel,1 . As
(s)
the mean free path between hard collisions is normally much less than λel,1 (depending
(s)
on the value of C1 ), the value s/λel,1 is, on average, much less than unity (note that
(h)
hsi = λel ). Therefore, the global effect of the soft collisions in the step, i.e., the change
in direction of movement and lateral displacement, is very small (part of the deflection
is caused by the hard interaction at the end of the step).
In penelope, the angular deflection and lateral displacement due to the multiple
soft collisions in a step of length s are simulated by means of the random-hinge method1
(Fernández-Varea et al., 1993a). The associated algorithm can be formulated as follows
(see Fig. 4.1),
(i) The electron first moves a random distance τ , which is sampled uniformly in the
interval (0, s), in the initial direction.
(ii) A single artificial soft scattering event (a hinge) then takes place, in which the
electron changes its direction of movement according to the multiple-scattering
distribution F (s) (s; χ).
s —τ
χ
τ zs
Figure 4.1: Simulation of the global effect of soft collisions between two consecutive hard
collisions by the random-hinge method.
1
The name was coined by Ron Kensek.
187
NEA/NSC/DOC(2015)3
Obviously, this algorithm leads to the exact angular distribution at the end of the
step. The average longitudinal displacement at the end of the simulated step is
! !2
(s) s s 1 s 1 s
hzisim = + hcos χi(s) = s 1 − (s)
+ (s)
− . . . , (4.20)
2 2 2 λel,1 4 λel,1
which agrees closely with the exact result given by Eq. (4.18). Furthermore, the average
simulated transverse displacement is
(s) (s) 1
hx2 + y 2 isim = h(s − τ )2 sin2 χisim = s2 1 − hcos2 χi(s)
3
(s)
" ! #
2 s3 1 λel,1 s
= 1− + ... , (4.21)
9 λ(s)
el,2
2 λ(s)
el,2
(s)
λel,1
which does not differ much from the exact value given by Eq. (4.19). From these facts, we
may conclude that the random-hinge method provides a faithful description of transport
when the step length s is much shorter than the first transport mean free path λel,1 so
that the global angular deflection and lateral displacement are small. Surprisingly, it
does work well also in condensed (class I) simulations, where this requirement is not met.
In spite of its simplicity, the random-hinge method competes in accuracy and speed with
other, much more sophisticated transport algorithms (see Bielajew and Salvat, 2001,
and references therein). It seems that the randomness of the hinge position τ leads to
correlations between the angular deflection and the displacement that are close to the
actual correlations.
1 2
χ
r ^ ^
r+τ d r+s d
t
188
NEA/NSC/DOC(2015)3
in region “2”. The step length s between these two hard collisions is larger than the
distance t from r to the interface (see Fig. 4.2). If the artificial soft elastic collision occurs
in region “1”, the angular deflection in this collision is sampled from the distribution
F (s) (s; χ). Otherwise, the electron reaches the interface without changing its direction
(s)
of movement. Assuming s λel,1 , the mean angular deflection due to soft collisions is
(s) s
1 − hcos χi(s) = 1 − exp(−s/λel,1 ) ' (s)
. (4.22)
λel,1
Additionally, when this assumption is valid, lateral displacements due to soft collisions
are small and can be neglected to a first approximation. As the probability for the soft
collision to occur within region “1” equals t/s, the average angular deflection of the
simulated electron track when it reaches the interface is
t t
1 − hcos χi(s) ' (s) ,
1 − hcos χi = (4.23)
s λel,1
which practically coincides with the exact mean deviation after the path length t within
region “1”, as required. Thus, by sampling the position of the soft collision uniformly in
the segment (0, s) we make sure that the electron reaches the interface with the correct
average direction of movement.
In the random-hinge method, the global effect of the soft collisions experienced by the
particle along a step of length s between two consecutive hard events is simulated as
a single artificial soft scattering event. The angular deflection follows the multiple-
scattering distribution F (s) (s; χ). Unfortunately, the exact Legendre expansion, Eq.
(4.17), is not appropriate for Monte Carlo simulation, since this expansion converges
very slowly (because the associated single-scattering DCS is not continuous) and the
sum varies rapidly with the path length s.
Whenever the cutoff angle θc is small, the distribution F (s) (s; χ) may be calculated
by using the small-angle approximation (see, e.g., Lewis, 1950). Notice that θc can be
made as small as desired by selecting a small enough value of C1 , see Eqs. (4.9) and
(4.10). Introducing the limiting form of the Legendre polynomials
1
P` (cos θ) ' 1 − `(` + 1)θ2 (4.24)
4
189
NEA/NSC/DOC(2015)3
This expression can be evaluated by using the Molière (1948) approximation for the
Legendre polynomials and we obtain (see Fernández-Varea et al., 1993a)
1/2 (s) " (s)
#
λ λ
1 χ el,1 s el,1 2
F (s) (s; χ) = exp (s)
− χ , (4.27)
2π sin χ s 8λel,1 2s
(s)
which does not differ significantly from the Gaussian distribution with variance s/λel,1 .
(s)
This result is accurate whenever s λel,1 and θc 1. It offers a possible method
of generating the angular deflection in artificial soft events. When the result given by
(s)
Eq. (4.27) is applicable, the single parameter λel,1 completely determines the multiple-
scattering distribution due to soft collisions, i.e., other details of the DCS for scattering
angles less than θc are irrelevant. However, in actual Monte Carlo simulations, the
small-angle approximation is seldom applicable.
In most practical cases the number of hard collisions per electron track can be made
relatively large by simply using a small value of the parameter C1 [see Eq. (4.10)].
When the number of steps is large enough, say larger than ∼ 10, it is not necessary
to use the exact distribution F (s) (s; χ) to sample the angular deflection in artificial soft
collisions. Instead, we may use a simpler distribution, Fa (s; χ), with the same mean
and variance, without appreciably distorting the simulation results. This is so because
details of the adopted distribution are washed out after a sufficiently large number of
steps and will not be seen in the simulated distributions. Notice that, within the small-
angle approximation, it is necessary to keep only the proper value of the first moment
to get the correct final distributions. However, if the cutoff angle θc is not small enough,
the angular distribution F (s) (s; χ) may become sensitive to higher order moments of
the soft single-scattering distribution. Thus, by also keeping the proper value of the
variance, the range of validity of the simulation algorithm is extended, i.e., we can
(h)
speed up the simulation by using larger values of C1 (or of λel ) and still obtain the
correct distributions.
190
NEA/NSC/DOC(2015)3
and Z 1
2 (s) 2 (s) 1h (s)
i
hµ i ≡ µ Fa (s; µ) dµ = hµi − 1 − exp(−s/λel,2 ) . (4.29)
0 6
The angular deflection in soft scattering events will be generated from a distribution
Fa (s; µ), which is required to satisfy Eqs. (4.28) and (4.29), but is otherwise arbitrary.
penelope uses the following,
where Uu,v (x) denotes the normalised uniform distribution in the interval (u, v),
1/(v − u) if u ≤ x ≤ v,
Uu,v (x) = (4.31)
0 otherwise.
The parameters a and µ0 , obtained from conditions (4.28) and (4.29), are
This simple distribution is flexible enough to reproduce the combinations of first and
second moments encountered in the simulations [notice that hµi(s) , Eq. (4.28), is always
less than 1/2] and allows fast random sampling of µ.
penelope simulates elastic scattering by using either numerical DCSs from the
elsepa database or the MW DCS model (see Section 3.1). The polar deflection µ
in hard events is sampled by using the algorithms described in Section 3.1. These
algorithms implement the inverse-transform method (Section 1.2.2), i.e., random values
of µ are obtained from the sampling equation [see Eq. (3.24)]
where Z µ
Pel (µ) = pel (E; µ) dµ (4.34)
0
is the cumulative distribution function of µ. To get sampled µ-values greater than the
cutoff deflection µc = (1 − cos θc )/2, we only need to use random numbers ξ restricted
to the interval (ξc , 1) [see Eq. (3.27)].
The angular distribution of soft events Fa (s; µ), Eq. (4.30), is determined by the
first and second transport mean free paths for soft collisions. Evidently, these quantities
(h)
depend on the cutoff deflection. The mean free path λel between hard elastic events
and the cutoff deflection µc are related through [see Eqs. (3.26) and (4.9)]
Z 1
1 1
(h)
= pel (µ) dµ. (4.35)
λel λel µc
191
NEA/NSC/DOC(2015)3
with
A+µ (1 + A)µ
I1 (µ) ≡ A (1 + A) ln − (4.42)
A A+µ
and
(1 + A)µ2
I2 (µ) ≡ A − 2I1 (µ) . (4.43)
A+µ
The quantities ξ0 and ξc are defined by Eqs. (3.43) and (4.37), respectively. The corre-
sponding formulas for the case-II MW model can be derived in a similar way.
192
NEA/NSC/DOC(2015)3
Z E −1
(h) dσin
λin (E) = N dW , (4.44)
Wcc dW
Z E −1
(h) dσbr
λbr (E) = N dW , (4.45)
Wcr dW
193
NEA/NSC/DOC(2015)3
Z Wcc Z Wcr
dσin dσbr
Ss (E) = N W dW + N W dW (4.46)
0 dW 0 dW
and Z Wcc Z Wcr
2 dσin dσbr
Ω2s (E) =N W dW + N W2 dW. (4.47)
0 dW 0 dW
(h)
To prevent λbr (E) from vanishing (infrared divergence), in penelope the radiative
cutoff energy Wcr is required to be larger than or equal to 10 eV.
Let us consider that a particle, electron or positron, travels a step of length s be-
tween two consecutive hard events of any kind (i.e., hard elastic or inelastic collisions,
hard bremsstrahlung emissions, and annihilation in the case of positrons). Along this
step, the particle is assumed to interact only through soft inelastic collisions and soft
bremsstrahlung emission. We consider that the average energy loss in this path length,
Ss (E)s, is much less than the initial energy E so that the DCSs can be assumed to re-
main essentially constant along the step. Let G(s; ω) denote the PDF of the energy loss
ω along the path length s; this distribution satisfies the transport equation (Landau,
1944) Z ∞
∂G(s; ω)
=N [G(s; ω − W ) − G(s; ω)] σs (E; W ) dW (4.48)
∂s 0
with the initial value G(0; ω) = δ(ω). Here, σs (E; W ) stands for the DCS for soft
stopping interactions, i.e.,
dσs dσin dσbr
σs (E; W ) ≡ = Θ(Wcc − W ) + Θ(Wcr − W ), (4.49)
dW dW dW
where Θ(x) is the step function. A closed formal solution of the integral equation (4.48)
may be obtained by considering its Fourier, or Laplace, transform with respect to ω (see,
e.g., Landau, 1944; Blunck and Leisegang, 1950). For our purposes it is only necessary
to know the first moments of the energy loss distribution after the path length s,
Z ∞
n
hω i ≡ ω n G(s; ω) dω. (4.50)
0
where use has been made of the fact that σs (E; W ) vanishes when W < 0. In particular,
we have Z ∞
d
hωi = N W σs (E; W ) dW = Ss , (4.52)
ds 0
194
NEA/NSC/DOC(2015)3
and, hence,
hωi = Ss s, (4.54)
i.e., the energy straggling parameter Ω2s equals the variance increase per unit path
length.
The key point in our argument is that soft interactions involve only comparatively
small energy losses. If the number of soft interactions along the path length s is statisti-
cally sufficient, it follows from the central limit theorem that the energy loss distribution
is Gaussian with mean Ss s and variance Ω2s s,
(ω − Ss (E)s)2
1
G(s; ω) ' exp − . (4.57)
(2πΩ2s (E)s)1/2 2Ω2s (E)s
This result is accurate only if 1) the average energy loss Ss (E)s is much smaller than
E (so that the DCS dσs /dW is nearly constant along the step) and 2) its standard
deviation [Ω2s (E)s]1/2 is much smaller than its mean Ss (E)s (otherwise there would be
a finite probability of negative energy losses), i.e.,
2 1/2
Ωs (E)s Ss (E)s E. (4.58)
Requirement 1) implies that the cutoff energies Wcc and Wcr for delta-ray production
and photon emission have to be relatively small. The second requirement holds for path
lengths larger than scrit = Ω2s /Ss2 .
Now we address ourselves to the problem of simulating the energy losses due to soft
stopping interactions between two consecutive hard events. The distribution (4.57) gives
the desired result when conditions (4.58) are satisfied. In fact, the use of a Gaussian
distribution to simulate the effect of soft stopping interactions was previously proposed
by Andreo and Brahme (1984). Unfortunately, the step lengths found in our simulations
are frequently too short for conditions (4.58) to hold (i.e., s is usually less than scrit ).
To get over this problem, we replace the actual energy loss distribution G(s; ω) by a
simpler “equivalent” distribution Ga (s; ω) with the same mean and variance, given by
Eqs. (4.54) and (4.56). Other details of the adopted distribution have no effect on the
simulation results, provided that the number of steps along each track is statistically
sufficient (say, larger than ∼ 20). penelope generates ω from the following distributions
195
NEA/NSC/DOC(2015)3
where σ = [var(ω)]1/2 is the standard deviation and the numerical factor 1.015387
corrects for the effect of the truncation. Notice that the shape of this distribution is
very similar to that of the “true” energy-loss distribution, Eq. (4.57). Random sampling
from the distribution (4.59) is performed by means of the RITA method (Section 1.2.4)
with Walker’s aliasing.
• Case II. When 3 var(ω) < hωi2 < 9 var(ω), the energy loss is sampled from the uniform
distribution
Ga,II (s; ω) = Uω1 ,ω2 (ω) (4.60)
with √ √
ω1 = hωi − 3 σ, ω2 = hωi + 3 σ. (4.61)
• Case III. Finally, when hωi2 < 3 var(ω), the adopted distribution is an admixture of a
delta and a uniform distribution,
with
3var(ω) − hωi2 3var(ω) + 3hωi2
a= and ω0 = . (4.63)
3var(ω) + 3hωi2 2hωi
It can be easily verified that these distributions have the required mean and variance.
It is also worth noticing that they yield ω values that are less than
hωi + 3σ in case I,
ωmax = ω2 in case II, (4.64)
ω0 in case III.
ωmax is normally much less than the kinetic energy E of the transported particle. Energy
losses larger than E might be generated only when the step length s has a value of the
order of the Bethe range, but this never happens in practical simulation (see below). It
is worth noticing that, after a moderately large number of steps, this simple simulation
scheme effectively yields an energy-loss distribution that has the correct first and second
moments and is similar in shape to the “true” distribution. Further improvements of
the distribution of soft-energy losses would mean considering higher order moments of
the single-scattering inelastic DCS given by Eq. (4.49).
In spatial-dose calculations, the energy loss ω due to soft-stopping interactions can be
considered to be locally deposited at a random position uniformly distributed along the
step. This procedure yields dose distributions identical to those obtained by assuming
196
NEA/NSC/DOC(2015)3
that the energy loss is deposited at a constant rate along the step, but is computationally
simpler. According to this, penelope simulates the combined effect of all soft elastic
collisions and soft-stopping interactions that occur between a pair of successive hard
events, separated a distance s, as a single event (a hinge) in which the particle changes
its direction of movement according to the distribution Fa (s; µ), Eqs. (4.30)–(4.32), and
loses energy ω that is generated from the distribution Ga (s; ω), Eqs. (4.59)–(4.63). The
position of the hinge is sampled uniformly along the step, as in the case of purely
elastic scattering (Section 4.1.2). When the step crosses an interface (see Fig. 4.2),
the artificial event is simulated only when its position lies within the initial material;
otherwise the track is stopped at the interface and restarted in the new material. It
can be easily verified that the particle reaches the interface not only with the correct
average direction of movement, but also with the correct average energy, E − Ss t.
where E0 denotes the kinetic energy of the particle at the beginning of the step. We wish
to obtain expressions for the first and second moments, hωi and hω 2 i, of the multiple-
scattering energy-loss distribution, which define the artificial distribution Ga (s; ω) as
described above. Unfortunately, for a realistic DCS, these moments can only be obtained
after arduous numerical calculations and we have to rely on simple approximations that
can be easily implemented in the simulation code.
Let us consider that, at least for relatively small fractional energy losses, the DCS
varies linearly with the kinetic energy of the particle,
∂σs (E; W )
σs (E0 − ω; W ) ' σs (E0 ; W ) − ω. (4.66)
∂E E=E0
We recall that we are considering only soft energy-loss interactions (inelastic collisions
and bremsstrahlung emission) for which the cutoff energies, Wcc and Wcr , do not vary
with E. Therefore, the upper limit of the integrals in the right hand side of Eq. (4.65)
is finite and independent of the energy of the particle. The stopping power Ss (E0 − ω)
can then be approximated as
Z
Ss (E0 − ω) ≡ N W σs (E0 − ω; W ) dW ' Ss (E0 ) − Ss0 (E0 ) ω, (4.67)
197
NEA/NSC/DOC(2015)3
where the prime denotes the derivative with respect to E. Similarly, for the straggling
parameter Ω2s (E) we have
Z
0
Ωs (E0 − ω) ≡ N W 2 σs (E0 − ω; W ) dW ' Ω2s (E0 ) − Ω2s (E0 ) ω.
2
(4.68)
From Eq. (4.65) it follows that the moments of the multiple-scattering distribution,
Z
hω i = ω n G(s; ω) dω,
n
n Z Z
X n!
= N dω dW ω n−k W k G(s; ω)σs (E0 − ω; W ). (4.69)
k=1
k!(n − k)!
where Z
Mk ≡ N W k σs (E0 ; W ) dW (4.71)
and Z
∂σs (E; W ) dMk
Mk0 ≡N W k
dW = . (4.72)
∂E E=E0 dE E=E0
The equations (4.70) with the boundary conditions hω n is=0 = 0 can now be solved
sequentially to any order. For n = 1 we have
d
hωi = Ss (E0 ) − Ss0 (E0 )hωi, (4.73)
ds
which yields
Ss (E0 ) n 0
o
hωi = 1 − exp [−Ss (E 0 )s] . (4.74)
Ss0 (E0 )
The equation for n = 2 reads,
d 2 h
0
i
hω i = Ω2s (E0 ) + 2Ss (E0 ) − Ω2s (E0 ) hωi − 2Ss0 (E0 )hω 2 i, (4.75)
ds
198
NEA/NSC/DOC(2015)3
var(ω) = hω 2 i − hωi2
2
1 − exp[−2Ss0 (E0 )s] 1 − exp[−Ss0 (E0 )s]
20
= Ω2s (E0 ) − 2Ωs (E0 )Ss (E0 ) . (4.77)
2Ss0 (E0 ) 2Ss0 (E0 )
Since these expressions are derived from the linear approximation, Eq. (4.66), it is
consistent to evaluate hωi and var(ω) from their Taylor expansions to second order,
1 0 2
hωi = Ss (E0 ) s 1 − Ss (E0 ) s + O(s )
2
( )
1 d ln Ss (E)
' Ss (E0 ) s 1 − Ss (E0 ) s (4.78)
2 dE E=E0
and
1 20 0
var(ω) = − Ωs (E0 ) Ss (E0 ) + Ωs (E0 ) Ss (E0 ) s2 + O(s3 )
Ω2s (E0 ) s 2
2
( )
2
1 d ln Ω s (E) d ln Ss (E)
' Ω2s (E0 ) s 1 − + Ss (E0 ) s , (4.79)
2 dE dE E=E0
where the logarithmic derivatives have been introduced for numerical convenience. The
factors in curly brackets account for the global effect of the energy dependence of the
soft energy-loss DCS (within the linear approximation). To simulate soft energy losses,
we sample ω from the artificial distribution Ga (ω; s), Eqs. (4.59) to (4.63), with the “cor-
rect” first moment and variance, given by expressions (4.78) and (4.79). In penelope,
we use step lengths s such that the fractional energy loss along each step is relatively
small (see below) and, consequently, the energy-dependence correction is also small (i.e.,
the correcting factors are close to unity).
199
NEA/NSC/DOC(2015)3
Ours is a mixed algorithm, where hard interactions are described individually from
the associated DCSs (see Chapter 3). These interactions are 1) hard elastic collisions,
“el”, 2) hard inelastic collisions, “in”, 3) hard bremsstrahlung photon emission, “br”,
4) ionisation of inner shells, “si”, and, in the case of positrons, 5) positron annihilation,
(h)
“an”. The mean free path between consecutive hard events, λT , is given by
h i−1 h i
(h) (h) (h) (h) (h)
λT = N σT = N σel + σin + σbr + σsi (+σan ) ≡ Σh , (4.80)
(h)
where σT is the total atomic cross section for hard interactions. We recall that the
inverse mean free path, Σh , gives the interaction probability per unit path length. In the
absence of soft energy-loss events, the PDF of the step length s between two successive
hard events (or from a given point in the track to the next hard event) is
In each hard event, one and only one interaction (i=“el”, “in”, “br”, “si” or “an”) occurs
with probability
(h) (h)
pi = σi /σT . (4.82)
When soft energy-losses are considered, the PDF of the distance s travelled by the
particle to the following hard interaction is not given by Eq. (4.81), because the mean
(h)
free path λT varies with energy and may change appreciably along a single step. The
simplest way to cope with this problem is to limit the length of the step to make sure
that the average energy loss is much smaller than the kinetic energy E at the beginning
(h)
of the step, and consider that λT (E) remains essentially constant along the step. Then,
the mean energy loss in a step is given by
(h)
h∆Ei = λT S(E), (4.83)
where
S(E) = Sin (E) + Sbr (E) (4.84)
is the total stopping power. Since the mean free path between consecutive hard events of
any kind is shorter than the mean free path between hard elastic events, the energy loss
per step can be limited by re-defining the hard mean free path. If we wish to tolerate
average fractional energy losses ∆E/E along a step of the order of C2 (a small value,
say, 0.05), we simply take
(h) E
λel (E) = max λel (E), min C1 λel,1 (E), C2 . (4.85)
S(E)
This effectively limits the average energy loss per step at the expense of increasing
the frequency of hard elastic events. The parameters C1 and C2 in Eq. (4.85), which
are selected by the user, determine the computer time needed to simulate each track.
Ideally, they should not have any influence on the accuracy of the simulation results.
This happens only when their values are sufficiently small (see below).
200
NEA/NSC/DOC(2015)3
10 10
Al, electrons Pb, electrons
1 1
E/S
ρ × length (g/cm2)
ρ × length (g/cm2)
0.1 E/S 0.1
10−2 10−2
(h) λel,1
λel,1 λ el
(h)
10−3 10−3 λ el
10−4 10−4
λel λel
−5 −5
10 10
10−6 10−6
Figure 4.3: Elastic mean free path λel , first transport mean free path λel,1 and E/S(E) for
electrons in aluminium and lead. The solid line represents the mean free path between hard
(h)
elastic events λel obtained from Eq. (4.85) with C1 = C2 = 0.05.
It should be noted that C1 and C2 act on different energy domains. This is illustrated
in Fig. 4.3, where the lengths λel , λel,1 and E/S for electrons in aluminium and lead
(h)
are represented as functions of the kinetic energy. The mean free path λel for hard
elastic events, determined from the prescription (4.85) with C1 = C2 = 0.05 is also
(h)
plotted. For low energies, λel = λel and the simulation is purely detailed (µc = 0).
(h) (h)
For intermediate energies, λel = C1 λel,1 , whereas λel = C2 E/S(E) in the high-energy
domain. From Fig. 4.3 it is clear that increasing the value of C2 does not have any effect
on the simulation of electron tracks with initial energies that are less than ∼ 10 MeV.
(h)
4.3.1 Variation of λT with energy
With the definition (4.85) of the hard elastic mean free path, we only set a limit on
the average step length. However, since s is sampled from the exponential distribution,
its realisations fluctuate amply about the average value. On the other hand, the soft
energy loss ω along a step of given length s also fluctuates about the mean value hωi
given by Eq. (4.78). This means that the inverse mean free path Σh (E) varies along the
step in an essentially unpredictable way.
Let us consider for a moment that the CSDA is applicable (i.e., that the effect of
201
NEA/NSC/DOC(2015)3
where E0 is the initial energy (at s = 0) and Ss (E) is the soft stopping power, Eq. (4.46)
[we consider that no hard interactions occur along the step]. Equivalently,
ds 1
=− . (4.87)
dE Ss (E)
Thus, the inverse mean free path Σh can be formally considered as a function of the path
length s. The probability p(s) ds of having the first hard interaction when the particle
has travelled a length in the interval (s, s + ds) is determined by the equation [cf. Eq.
(1.109)] Z ∞
p(s) = Σh (s) p(s0 ) ds0 , (4.88)
s
with the normalisation condition,
Z ∞
p(s) ds = 1. (4.89)
0
The PDF of the step length s is obtained by inverting the transformation (4.90),
Z s
0 0
p(s) = Σh (s) exp − Σh (s ) ds . (4.95)
0
202
NEA/NSC/DOC(2015)3
It is not practical to sample s from this complicated PDF. It is much more convenient
to sample q [as − ln ξ, cf. Eq. (1.36)] and then determine s from (4.90), which can be
inverted numerically (for practical details, see Berger, 1998). Although this sampling
method effectively accounts for the energy dependence of Σs (E), it is applicable only to
simulations in the CSDA.
A more versatile algorithm for sampling the position of hard events, still within the
CSDA, is the following. We let the electron move in steps of maximum length smax , a
value specified by the user. This determines the maximum energy loss along the step,
Z smax
ωmax = Ss (s) ds. (4.96)
0
Let Σh,max denote an upper bound for the inverse mean free path of hard events in the
swept energy interval, i.e.,
We now assume that the electron may undergo fictitious events in which the energy and
direction remain unaltered (delta interactions). The inverse mean free path of these
interactions is defined as
Σδ (E) = Σh,max − Σh (E), (4.98)
so that the inverse mean free path of the combined process (delta interactions + hard
events) equals Σh,max , a constant. Owing to the Markovian character of the processes,
the introduction of delta interactions does not influence the path-length distribution
between hard events. Therefore, the occurrence of hard events can be sampled by
means of the following simple algorithm,
(i) Sample a distance s from the exponential distribution with inverse mean free path
Σh,max , i.e., s = (− ln ξ)/Σh,max .
(ii) If s > smax , move the electron a path length smax and determine the soft energy
loss ω along this path length. Modify the electron energy2 , E ← E − ω, and
assume that a delta interaction occurs at the end of the step.
(iii) If s < smax , move the electron a step of length s. Determine the energy loss ω and
update the energy, E ← E − ω. Sample a random number ξ.
203
NEA/NSC/DOC(2015)3
It is clear that the path-length s to the first hard interaction generated with this algo-
rithm follows the PDF (4.95). The interesting peculiarity of this algorithm is that it
makes no explicit reference to the CSDA. Therefore, it can be adopted in mixed sim-
ulations with soft energy-loss straggling, provided only that an upper bound exists for
the energy ω lost along the path length smax .
C1 = C2 = 0 C1 = C2 = 0
C1 = C2 = 0.01 C1 = C2 = 0.01
107 C1 = C2 = 0.05 C1 = C2 = 0.05
C1 = C2 = 0.10 7 C1 = C2 = 0.10
10
1/λ(h)(E) (cm—2)
105
5
10
Figure 4.4: Inverse mean free path (interaction probability per unit path length) for hard
interactions of electrons in aluminium and gold for the indicated values of the simulation
parameters. The plotted curves were calculated with Wcc = Wcr = 100 eV. Note that, by
varying the values of C1 and C2 , the inverse mean free path cannot be made smaller than the
contributions from hard inelastic and radiative events.
Fortunately, the energy loss generated from the artificial distribution Ga (ω; s), Eqs.
(4.59)–(4.63), is always less than ωmax , Eq. (4.64). Indeed, in case I we use the truncated
Gaussian distribution (4.59) just to enforce this property. In our mixed simulation
we shall select a maximum step length smax , which serves to set an upper bound for
the energy that the transported electrons may lose along each step. Since the hard
inverse mean free path Σh (E) has a broad minimum (and no local maxima) in the
whole energy interval of interest (see Fig. 4.4), the maximum value of Σh within a
certain energy interval (E1 , E2 ) occurs at one of the end points. This makes the practical
implementation of the above algorithm very easy.
204
NEA/NSC/DOC(2015)3
2me c2 4 cp cpk
× , (4.103)
4 cp cpk µ + (cp − cpk )2 2(Q + me c2 )
3
Distant transverse interactions do not cause scattering.
205
NEA/NSC/DOC(2015)3
with pin (W ) = δ(W − Wk ) for the conduction band. Considering that Q me c2 for the
majority of soft distant collisions, we have
Z Wcc
2πe4 X fk
dσdis,l 1
= 2
pdis (W ) dW , 0 < µ < µk1 , (4.104)
dµ me v k Wk 0 Rk + µ
where
(cp − cpk )2
Rk = (4.105)
4 cp cpk
and
Qk (Qk + 2me c2 ) − (cp − cpk )2
µk1 = µ(Q = Qk ) = . (4.106)
4cp cpk
Again, in the case of inner shells the cutoff recoil energy Qk should be replaced by the
modified value Q0k given by Eq. (3.80).
On the other hand, the DCS for soft (W < Wcc ) close collisions is given by [see Eqs.
(3.86) and (3.92)]
(±)
dσclo 2πe4 X 1
= 2
fk 2 F (±) (E, W ). (4.107)
dW me v k W
The angular deflection and the energy loss are related by (3.134), which implies that
and
dW E(E + 2me c2 )me c2 2(1 − 2µ)
= . (4.109)
dµ [2E(µ − µ2 ) + me c2 ]2
Therefore,
(±)
dσclo 2πe4 X 1 dW
= 2
fk 2 F (±) (E, W ) , µk2 < µ < µk3 , (4.110)
dµ me v k W dµ
where
Qk (Qk + 2me c2 ) − (cp − cpk2 )2
µk2 = µ(Q = Qk ) = ,
4cp cpk2
Wcc (Wcc + 2me c2 ) − (cp − cpk3 )2
µk3 = µ(Q = Wcc ) = , (4.111)
4cp cpk3
with
206
NEA/NSC/DOC(2015)3
where the summation extends over the oscillators with resonance energy Wk less than
Wcc (ionisation energy Uk less than Wcc in the case of inner shells), and each term
contributes only for the µ-intervals indicated above. The mean free path and the first
and second transport mean free paths for soft-inelastic scattering are
(s)
i−1 Z µmax (s)
h
(s) dσin
λin =N dµ, (4.114)
0 dµ
(s)
i−1 Z µmax (s)
h
(s) dσ
λin,1 =N 2µ in dµ (4.115)
0 dµ
and
(s)
i−1 Z µmax (s)
h
(s) dσ
λin,2 =N 6(µ − µ ) in dµ ,
2
(4.116)
0 dµ
(s)
where µmax is the maximum angular deflection in soft inelastic interactions.
In penelope, soft-electronic scattering is simulated together with soft-elastic scat-
tering, by means of the artificial distribution (4.30). The combined process is described
by the transport mean free paths
h i−1 h i−1 h i−1
(s) (s) (s)
λcomb,1 = λel,1 + λin,1 (4.117)
Thus, to account for soft electronic scattering we only have to replace the soft elastic
transport mean free paths by those of the combined process.
207
NEA/NSC/DOC(2015)3
energy loss ω caused by soft-stopping interactions along the step is sampled from the
distribution Ga (s; ω), Eqs. (4.59)–(4.63).
In previous versions of penelope, to simplify the programming, the energy ω was
assumed to be deposited at the hinge. Furthermore, to account (at least partially)
(s) (s)
for the energy dependence of λcomb,1 and λcomb,2 we used a trick, the alternate random
hinge, which was essentially equivalent to assuming that these quantities vary linearly
with energy. It has been observed recently that simulations of electron transport in
multilayers of various materials become sensitive to user parameters when step lengths
are comparable to the layer thickness because the random-hinge method overestimates
energy straggling in steps that end at an interface. To mitigate this deficiency, in the
current version of the code the effect of soft energy-loss events is regarded as a continuous
slowing down process characterised by a (constant) stopping power Ssoft that reproduces
the sampled value ω of the energy loss. This approach amounts to considering that the
energy ω is spread uniformly over the step, which is closer to reality than depositing
this energy locally at the hinge. Additionally, it allows us to account for the fact that a
step ending at an interface has a reduced length and a smaller energy loss.
In the simulation routines, given the step length s to the next hard interaction, we
first sample the soft energy loss ω along a step, and determine the effective stopping
power Ssoft = ω/s. We then sample the position τ of the hinge (see Fig. 4.1), move
the particle this distance in the initial direction, and determine the current energy,
E − Ssoft τ . The soft angular deflection is sampled from the distribution (4.30) evalu-
ated at this energy, and the new direction is determined. Finally, the particle flies the
remaining distance s − τ in the new direction, losing an energy Ssoft (s − τ ). If in the
process the particle reaches an interface after a truncated flight of length s0 , the energy
lost by the particle along that flight is set equal to Ssoft s0 . However, to keep the program
simple, the full energy loss ω is assumed to be deposited at the position of the hinge.
It is worth noting that this gives the correct average energy deposited along the step,
even for steps that are truncated by interfaces because the position of the hinge is uni-
formly distributed along the step4 . The method is quite accurate, and computationally
inexpensive, provided only that the fractional energy loss along each step (which is of
the order of C2 ) is sufficiently small.
An advantage of considering that soft energy-loss interactions slow down electrons
and positrons with constant stopping power is that the calculation of flight times is
almost trivial. Consider an electron with initial energy E, subject to the stopping
power Ssoft . The time in which the electron moves along a trajectory segment of length
s0 is given by
Z Z E
ds 1 dE
t= = .
v E−Ssoft s0 v(E) Ssoft
4
In the case of voxelised tomographic geometries, where the length of the trajectory segment in
each voxel can be calculated easily, the energy loss ω could be spread among the voxels crossed by
the particle. This would reduce statistical dose fluctuations, but leave the average dose in each voxel
unaltered.
208
NEA/NSC/DOC(2015)3
Inserting the expression (A.7) for the velocity v(E), and recalling that Ssoft is a constant,
the integral is elementary,
Z E
1 E + m e c2
t = p dE
cSsoft E−Ssoft s0 E(E + 2me c2 )
1 hp 2
p
0 0 2
i
= E(E + 2me c ) − (E − Ssoft s )(E − Ssoft s + 2me c ) . (4.119)
cSsoft
This formula is utilised in the simulation program for an on-the-fly calculation of the
age of electrons and positrons.
The CSDA with constant stopping power also facilitates the calculation of the av-
erage distribution of fluence with respect to energy, Φ(E) ∆E [see Eq. (5.38)]. This
quantity is built by tallying the path length travelled by a particle while its energy is in
the interval (E, E + ∆E). Assume that a particle with initial energy E0 flies a distance
s0 . At the end of the flight its energy is E1 = E0 − Ssoft s0 . The particle contributes to
Φ(E) ∆E only when the energy intervals (E, E + ∆E) and (E1 , E0 ) overlap, and the
contribution is equal to δE/Ssoft , where δE is the length of the intersection of the two
intervals.
209
NEA/NSC/DOC(2015)3
The combined effect of all soft elastic and stopping interactions in a step is simu-
lated as a single artificial event or hinge, in which the particle changes its direction of
movement, combined with a continuous slowing down process with constant stopping
power Ssoft giving a prescribed total energy loss at the end of the step. When Wcc is less
than the lowest oscillator resonance energy, the simulation of inelastic collisions becomes
purely detailed, i.e., inelastic collisions do not contribute to the soft stopping power.
On the other hand, simulation of bremsstrahlung emission is only possible by means
of a mixed scheme, because of the divergence of the DCS at W = 0 [see Eq. (3.146)].
To test the accuracy of mixed algorithms, and to also perform studies of low-energy
electron and positron transport (with, say, E < 100 keV), it may be convenient to run
strictly detailed simulations (see below). For this purpose, penelope allows the user
to switch off the emission of soft bremsstrahlung photons with energy less than 10 eV.
This option is activated when the Wcr value selected by the user is negative, in which
case the program sets Wcr = 10 eV, disregards soft bremsstrahlung events and simulates
hard events (with W > 10 eV) in a detailed way. Generation of the angular deflection
in artificial events is discontinued when the simulation of elastic and inelastic scattering
(h)
becomes detailed (i.e., when λel = λel , Wcc = 0).
As indicated above, the length of the steps generated by penelope is always less than
smax , an upper bound selected by the user. The simulation code limits the step length
by placing delta interactions along the particle track. These are fictitious interactions
that do not alter the state of the particle. Their only effect is to interrupt the sequence
of simulation operations, which requires altering the values of inner control variables to
permit the simulation to be resumed in a consistent way. The use of bounded step lengths
is necessary to account for the energy dependence of the DCSs for soft interactions.
However, this is not the only reason for limiting the step length. Since energy losses
and deflections at the hinges are sampled from artificial distributions, the number of
hinges per primary track must be “statistically sufficient”, i.e., larger than ∼ 10, to
smear out the unphysical details of the adopted artificial distributions. Therefore, when
the particle is in a thin region, it is advisable to use a small value of smax to make
sure that the number of hinges within the material is sufficient. In penelope, the
parameter smax can be varied freely during the course of the simulation of a single track.
(h)
To ensure internal consistency, smax is required to be less than 4λT . When the user-
(h)
selected value is larger, the code sets smax = 4λT ; in this case, about 2 per cent of the
sampled steps have lengths that exceed smax and are terminated by a delta interaction.
This slows down the simulation a little (∼5%), but ensures that the energy dependence
(h)
of λT is correctly accounted for. In order to eliminate an artefact in the depth-dose
distribution from parallel electron/positron beams near the entrance interface, instead
of the smax value set by the user, penelope uses a random maximum step length [from a
uniform distribution in the interval (0.5, 1.0)×smax ] that averages to 0.75 times the user’s
value. Incidentally, limiting the step length is also necessary to perform simulation of
electron/positron transport in external static electromagnetic fields (see Appendix D).
The state of the particle immediately after an event is defined by its position coor-
dinates r, energy E and direction cosines of its direction of movement d̂, as seen from
210
NEA/NSC/DOC(2015)3
the laboratory reference frame. It is assumed that particles are locally absorbed when
their energy becomes smaller than a preselected value Eabs ; positrons are considered to
annihilate after absorption. The practical generation of random electron and positron
tracks in arbitrary material structures, which may consist of several homogeneous re-
gions of different compositions separated by well-defined surfaces (interfaces), proceeds
as follows:
(i) Set the initial position r, kinetic energy E and direction of movement d̂ of the
primary particle.
(ii) Determine the maximum allowed soft energy loss ωmax along a step and set the
upper bound Σh,max for the inverse mean free path of hard events, Eq. (4.97). The
results depend on the adopted smax , which can vary along the simulated track.
(iii) Sample the distance s to be travelled to the following hard event (or delta inter-
action) as
s = − ln ξ/Σh,max . (4.120)
If s > smax , truncate the step by setting s = smax .
(iv) Sample the energy loss ω due to soft stopping interactions along the step s from the
distribution Ga (s; ω), Eqs. (4.59)–(4.63), and determine the soft stopping power
Ssoft = ω/s.
(v) Generate the length τ = sξ of the segment to the hinge. Let the particle advance
this distance in the direction d̂: r ← r + τ d̂.
(viii) Simulate the hinge: Sample the polar angular deflection µ = (1−cos θ)/2 from the
distribution Fa (s; µ), Eq. (4.30), corresponding to the current energy E. Sample
the azimuthal scattering angle as φ = 2πξ. Perform a rotation R(θ, φ) of the
vector d̂ according to the sampled polar and azimuthal angles (as described in
Section 1.4.4) to obtain the new direction: d̂ ← R(θ, φ)d̂.
Deposit the energy ω at r.
Go to (xiii) if E < Eabs .
(ix) Let the particle advance the distance s − τ in the direction d̂: r ← r + (s − τ )d̂.
(x) Do as in (vi).
211
NEA/NSC/DOC(2015)3
(xi) Reduce the kinetic energy: E ← E − Ssoft (s − τ ). If in step (iii) the step length is
truncated, i.e., if s = smax , simulate a delta interaction and go to (ii).
(xiii) If the particle is in a material medium, deposit its residual energy on the spot.
(xiv) Simulate the secondary particles produced by the primary particle (or by other
secondaries previously followed) before starting a new primary track.
212
NEA/NSC/DOC(2015)3
p (E ) (1/keV)
p (θ ) (1/deg)
10−3
−3
10
10−4
10−4
e—, E = 500 keV
s = 0.02 cm in Al
mixed; Ci = 0.10, smax = 0.004 cm
= detailed; Ci = 0
10−5 10−5
0 30 60 90 120 150 180 100 200 300 400
θ (deg) E (keV)
7
mixed; Ci = 0.10, smax = 0.004 cm mixed; Ci = 0.10, smax = 0.004 cm
= detailed; Ci = 0 = detailed; Ci = 0
10
2 6
e—, E = 500 keV
s = 0.02 cm in Al
5
D (z ) (MeV/cm)
10
p (z ) (1/cm)
1 3
2 ×50
0.1
1
e—, E = 500 keV
s = 0.02 cm in Al
10−2 0
-0.02 -0.01 0.00 0.01 0.02 -0.02 -0.01 0.00 0.01 0.02
z (cm) z (cm)
Figure 4.5: Results from the simulations of 500 keV electrons in aluminium described in the
text. Crosses, detailed simulation; continuous curves, mixed simulation. p(θ) and p(E) are
the PDFs of the direction of motion (specified by the polar angle θ) and the kinetic energy E
of the electrons, after travelling the prescribed 200 µm. p(z) is the PDF of the z-coordinate of
the final electron position, at the end of the simulated tracks. The function D(z) represents
the “depth-dose” function, i.e., the average energy deposited in the material per unit length
along the z-direction (the residual energy at the end of the track is not included in the dose).
213
NEA/NSC/DOC(2015)3
origin of coordinates moving in the direction of the z axis. During generation of each
electron track, we scored the energy deposited at different “depths” (z-coordinate) to get
the “depth-dose” distribution. Simulation of a track was discontinued when the electron
had travelled a path length s equal to 0.02 cm, and the PDFs of the final electron energy
and position coordinates were tallied. Notice that no secondary radiation was followed
and that the kinetic energy of the electrons at s = 0.02 cm was not included in the dose
distribution (i.e., the calculated “dose” does not represent the quantity that would be
obtained from a measurement).
The results displayed in Fig. 4.5 are from equivalent detailed and mixed simulations
with Eabs = 10 keV and smax = 40 µm. Detailed simulation was performed by setting
C1 = C2 = 0, Wcc = 0 eV and Wcr = −100 eV. Notice that when the user enters
a negative value of the cutoff energy loss for radiative events, penelope sets Wcr =
10 eV, disregards the emission of soft bremsstrahlung photons with W ≤ 10 eV (which
represents a negligible fraction of the stopping power) and simulates bremsstrahlung
events with W > 10 eV as usual, that is, in a detailed way. The mixed simulation results
shown in Fig. 4.5 were generated with C1 = C2 = 0.10, Wcc = 2 keV, Wcr = −100 (i.e.,
radiative events were described as in the detailed simulation), and smax = 0.004 cm.
In the detailed simulation, 100 million electron tracks were generated by running
the program on a computer a with an Intel Core i7-3770 at 3.40 GHz for about 30
hours, which corresponds to a simulation speed of 925 tracks/s. The average numbers
of elastic, inelastic and bremsstrahlung interactions that had to be simulated to produce
each detailed track were 1297, 1181 and 0.03, respectively. On the same computer, the
mixed simulation generated 100 Million tracks in about 37 minutes, which represents
a simulation speed of 44,766 tracks/s, 48 times faster than that of detailed simulation.
The reason for this higher speed is that, on average, there were only 4.71 hard elastic
collisions, 3.86 hard inelastic collisions, 0.03 hard bremsstrahlung events and 3.31 delta
interactions along each track. It is worth recalling that detailed simulation is nominally
exact, the results are affected only by (small) statistical uncertainties. From Fig. 4.5
we conclude that, in this case, the mixed algorithm provides results that are essentially
equivalent to those from the detailed simulation. Further calculations with different
values of C1 showed that the mixed algorithm is fairly stable under variations of this
parameter over the accepted range (0,0.2). In most practical cases, where the track
length of charged particles is not restricted, the gain in speed obtained from mixed
simulation is much larger than the moderate gain found in the present study.
In general, our mixed simulation algorithm yields very accurate results (i.e., agree-
ing with those from detailed simulation) for electron and positron transport in infinite
media, but not necessarily for limited geometries. The existence of interfaces poses
considerable problems to condensed (class I) simulation, for which a satisfactory solu-
tion/approximation is far from trivial and difficult to implement. The present mixed
(class II) algorithm handles interface crossing in a more accurate, but still approximate
way. The rule to ensure accuracy for transport in the vicinity of interfaces is to use a
small-enough value of smax .
214
NEA/NSC/DOC(2015)3
Chapter 5
Monte Carlo simulation finds important applications in radiation dosimetry and metrol-
ogy, which may require calculations of local and global characteristics of radiation fields
and of the energy imparted by radiation to matter. In this Chapter we present basic
concepts and quantities of common use in radiation dosimetry, and we consider their
calculation by Monte Carlo methods. In previous Chapters we have introduced various
macroscopic quantities (inverse mean free paths, stopping powers, energy straggling pa-
rameters, . . . ) that are defined as integrals of the interaction cross sections. Here the
emphasis is on transport characteristics, that is, on quantities that involve the emission
and transport of secondary radiation released in the interactions of energetic particles.
We essentially follow the terminology of the ICRU Report 85 (2011) on fundamen-
tal quantities and units for ionizing radiation. However, the sequence of definitions of
radiometric quantities presented here is opposite to that adopted in the ICRU report.
We start from the microscopic properties of the radiation field and the differential cross
sections of the various interaction mechanisms, and we obtain macroscopic (average)
quantities by integration. The discrete nature of matter and radiation fields (considered
respectively as ensembles of individual atoms and energetic particles) is thus incorpo-
rated in a natural way.
Monte Carlo simulation is also based on a microscopic picture of radiation and mat-
ter. Simulation provides the most detailed description of radiation fields and of the
spatial distributions of absorbed dose in material structures. It can be employed for
calculating intermediate dosimetric quantities (such as linear energy absorption, photon
mass energy-absorption coefficients, and linear energy transfers of charged particles) for
different energies and materials. Programming a Monte Carlo calculation of these quan-
tities helps to uncover the assumptions, and subtleties, underlying their definitions. Sim-
ulation also allows approximations to be avoided, such as the continuous-slowing down
approximation for charged particles, which are frequently adopted in conventional calcu-
lations (see, e.g., Kellerer et al., 1992). Conversely, the so-called track-length estimators
utilise macroscopic quantities for improving the efficiency of Monte Carlo calculations
of absorbed dose and secondary particle emission (Sections 5.2.3 and 6.5).
215
NEA/NSC/DOC(2015)3
and
δ(Ω − Ω0 ) = δ(cos θ − cos θ0 ) δ(φ − φ0 ), (5.2b)
where θ and φ are the polar and azimuthal angles of the unit vector Ω.
In the case of classical particles, their instantaneous positions and velocities can be
determined with arbitrarily high accuracy. The evolution of radiation fields, however,
is governed by the laws of quantum mechanics, which imply that particles cannot be
assigned definite values of position and momentum. Indeed, for non-relativistic particles,
results from measurements of these two quantities yield random values with standard
deviations satisfying Heisenberg’s uncertainty relation,
~
∆ri ∆pi ≥ (i = x, y, z). (5.3)
2
Thus, a particle with well-defined momentum has a poorly defined position. Interac-
tions with the atoms of the medium can be regarded as position measurements (Schiff,
1968), which determine the position vector r of the particle with an uncertainty ∆r1 of
the order of the atomic radius. The Thomas-Fermi model (see e.g., Condon and Od-
abaşi, 1980) leads to the approximate expression Z −1/3 a0 for the atomic radius, where
216
NEA/NSC/DOC(2015)3
a0 is the Bohr radius. After the interaction, the components of the linear momentum
have uncertainties ∆pi ∼ ~/(2∆ri ) = ~Z 1/3 /(2a0 ). In transport studies, r and p are
considered as independent variables, that is, quantum correlations between position and
momentum are disregarded. This simplification is acceptable only when the momentum
of the particle is much larger than its uncertainty, i.e., pi ∆pi . Hence, the trajectory
picture underlying transport calculations and Monte Carlo simulation is valid for elec-
trons and positrons with kinetic energies much higher than (∆pi )2 /(2me ) ∼ 0.4Z 2/3 Eh ,
where Eh = 27.2114 eV is the Hartree energy.
where v(E) is the speed of particles with energy E. To clarify the physical meaning
of the angular current density, we recall that an oriented surface element of area dA
with normal unit vector n̂ is represented by the vector dA = n̂ dA. Let us consider a
surface element dA at the position r and a particle that at the time t is at the point r1
moving with velocity v1 = v1 Ω1 ; in a time interval dt, the particle will cross the surface
element dA at r only if the point r1 is within the space region swept by the surface
dA when it is translated a distance −v1 dt (see Fig. 5.1); the volume of this region is
|v1 ·dA|dt = |n̂·Ω1 | v1 dt dA. Hence, the quantity
is the net number of particles in the ranges dE and dΩ that cross the surface element
dA placed at r during the time interval dt. Note that particles moving in directions Ω
such that n̂·Ω > 0 (< 0) give positive (negative) contributions.
In most practical cases, the radiation field is present only during a finite time interval,
i.e., n(t, r, E, Ω) = 0 when t → ±∞, and one is usually interested in total quantities,
integrated over time. Let us consider a finite volume V limited by a closed surface S;
an element of this surface is represented by a vector dA ≡ n̂ dA where n̂ is the outward
normal to the surface. The total number of particles that enter the volume V through
its limiting surface is
Z ∞ Z Z ∞ Z
Nin (S) = − dE dΩ dt dA·j(t, r, E, Ω)Θ(−n̂·Ω)
0 −∞ S
Z ∞ Z Z ∞ Z
= − dE dΩ dt dA (n̂·Ω)v(E) n(t, r, E, Ω)Θ(−n̂·Ω), (5.6)
0 −∞ S
where we have introduced the unit step function Θ(x) (= 1 if x > 0, = 0 otherwise)
to count only particles that enter the volume (i.e., with directions Ω such that n̂·Ω <
0). If we remove this step function, particles that enter and leave the volume would
217
NEA/NSC/DOC(2015)3
a) b) z
n̂ Ω
r dA
v1 θ
v1 dt y
x Ω
dA = n̂ dA
not contribute, and the integral would give the net number of particles absorbed in V
(i.e., the number of particles entering that are absorbed minus the number of particles
generated in the volume). When S is a sphere of small radius rs , the surface integral in
(5.6) can be easily evaluated by using spherical polar coordinates with the origin at the
centre of the sphere and the polar axis along the direction of Ω (see Fig. 5.1), so that
n̂·Ω = cos θ. We have
Z Z π
2
− dA (n̂·Ω) n(t, r, E, Ω)Θ(−n̂·Ω) = 2πrs dθ sin θ (− cos θ) n(t, r, E, Ω)
S π/2
Hence Z ∞ Z Z ∞
Nin (sphere) = πrs2 dE dΩ dt v(E) n(t, r, E, Ω), (5.8)
0 −∞
218
NEA/NSC/DOC(2015)3
The angular current density is awkward to handle because of its vector nature. A
more convenient quantity is the angular flux density, which is defined as the magnitude
of the angular current density,
Φ(t, r, E, Ω) ≡ v(E) n(t, r, E, Ω). (5.11)
Notice that Φ(t, r, E, Ω) dE dΩ dA dt is the number of particles in the ranges dE and
dΩ that in the time interval dt cross a small surface element dA placed at r and
perpendicular to Ω, i.e., dA = Ω dA. The SI unit of angular flux density is (J·m2 ·s)−1 .
The integral of the angular flux density over directions is the flux density,
Z
Φ(t, r, E) ≡ dΩ Φ(t, r, E, Ω). (5.12)
That is, Φ(t, r, E) dA dE dt gives the number of particles with energies in (E, E + dE)
that cross a small surface of area dA, placed at r and perpendicular to the direction of
motion of each particle, during the time interval dt. Additionally, according to Eq. (5.8),
Φ(t, r, E) dA dE dt is the number of particles incident on a small sphere of cross-sectional
area dA, centred at r, with energies in (E, E + dE) during time dt.
219
NEA/NSC/DOC(2015)3
where r0i , vi and Ei are, respectively, the initial position vector (at t = 0), the velocity
and the energy of the i-th particle. The average fluence in a volume V is
Z Z ∞ Z Z ∞
1 X
Φ = dr dE dΩ dt v(E) δ(r − r0i − vi t) δ(Ω − v̂i ) δ(E − Ei )
V V 0 −∞ i
Z Z ∞
1X
= dr dt vi δ(r − r0i + vi t) . (5.21)
V i V −∞
The integral over r is now trivial: the delta function δ(r − r0i + vi t) simply implies that
a particle contributes only when its trajectory intersects the volume V. Furthermore,
the product dt vi is the path length ds that particle i travels within the volume V during
the time dt. Hence,
1X
Φ= (path length of particle i in V). (5.22)
V i
That is, the average fluence gives the total path length of particles per unit volume. It
has dimensions of (surface)−1 and is expressed in m−2 or a multiple of it. The equality
(5.22) is valid also for real radiation fields, provided only that particles follow classical
220
NEA/NSC/DOC(2015)3
Note that
dRin
, Ψ(r) = (5.24)
dA
where dRin is the total radiant energy of particles incident on a small sphere of cross-
sectional area dA, centred at r. The average energy fluence in a finite volume V is
Z
1
Ψ≡ dr Ψ(r). (5.25)
V V
That is, Z Z ∞ Z Z ∞
1
Ψ= dr dE dΩ dt E v(E) n(t, r, E, Ω). (5.26)
V V 0 −∞
1X
Ψ= Eik × (path length of particle i with energy Eik in V), (5.27)
V ik
where the subscript k denotes the different energies acquired by a particle along its
trajectory.
The fluence rate, Φ(t, r), and the energy-fluence rate Ψ(t, r) are defined as
Z Z ∞ Z Z ∞
Φ(t, r) ≡ dΩ dE Φ(t, r, E, Ω) = dΩ dE v(E) n(t, r, E, Ω) , (5.28)
0 0
and
Z Z ∞ Z Z ∞
Ψ(t, r) ≡ dΩ dE Ψ(t, r, E, Ω) = dΩ dE E v(E) n(t, r, E, Ω), (5.29)
0 0
221
NEA/NSC/DOC(2015)3
where Z
n(t, r) = dΩ n(t, r, Ω) (5.32)
is the particle number density (i.e., the number of particles per unit volume).
The particle radiance Φ(t, r, Ω) is defined by
Z ∞ Z ∞
Φ(t, r, Ω) ≡ dE Φ(t, r, E, Ω) = dE v(E) n(t, r, E, Ω), (5.33)
0 0
The quantities Φ(t, r, Ω) dA and Ψ(t, r, Ω) dA are, respectively, the number of particles
and the radiant energy that enter a small sphere of cross sectional area dA per unit time
and per unit solid angle in the direction Ω.
The distribution of fluence with respect to energy is defined as
Z ∞ Z Z ∞ Z
Φ(r, E) ≡ dt dΩ Φ(t, r, E, Ω) = dt dΩ v(E) n(t, r, E, Ω), (5.35)
−∞ −∞
The quantities Φ(r, E) dE dA and Ψ(r, E) dE dA are, respectively, the number of par-
ticles and the radiant energy that enter a small sphere of cross sectional area dA with
energies in the interval (E, E + dE).
The distribution of fluence with respect to energy Φ(r, E) is used in dosimetry to
calculate important quantities such as the absorbed dose and the kerma (see below).
In a Monte Carlo simulation we can only determine the average distribution of fluence
with respect to energy in a finite volume V,
Z Z Z ∞ Z
1 1
Φ(E) ≡ dr Φ(r, E) = dr dt dΩ v(E) n(t, r, E, Ω). (5.37)
V V V V −∞
222
NEA/NSC/DOC(2015)3
In the limit of small volumes, Φ(E) reduces to Φ(r, E). Since Φ(E) is a function of
the continuous variable E, it is generated as a histogram (see Section 1.5). Arguments
similar to those employed in the derivation of Eq. (5.22) show that
Z E+∆E path length of particle i while it is
1 X
Φ(E) ∆E ' Φ(E 0 ) dE 0 = inside V and its radiant energy Ei .
E V i
is in the interval (E, E + ∆E)
(5.38)
Therefore, Φ(E) ∆E is the total path length per unit volume of field particles having
radiant energies in the interval (E, E + ∆E). In class II simulation of electrons and
positrons (and other charged particles), the kinetic energy of the transported particle
varies continuously along each trajectory segment and the contributions to Φ(E) ∆E
should be evaluated as described in Section 4.3.3.
For intense fields, the fluence, Φ(r), and the distribution of fluence with respect to
energy, Φ(r, E), are continuous functions of their arguments. In this case,
and
lim Φ(E) ∆E = Φ(r, E) ∆E , (5.40)
V→0
where n̂ is the unit vector normal to the surface. The energy flux Rt (S) is the net
radiant energy that flows across the surface per unit time,
Z ∞ Z Z
RS (t) ≡ dE dΩ dA (n̂·Ω)E v(E) n(t, r, E, Ω). (5.42)
0 S
The number of particles and the radiant energy that cross the surface during the time
interval (t1 , t2 ) are
Z t2 Z t2
NS = dt NS (t) and RS = dt RS (t), (5.43)
t1 t1
respectively.
223
NEA/NSC/DOC(2015)3
224
NEA/NSC/DOC(2015)3
We have already mentioned that Monte Carlo simulation offers the most direct
method for computing the absorbed dose in finite volumes. In Monte Carlo calcula-
tions the tracking of particles P is discontinued when their radiant energy E falls below
the adopted absorption energy Eabs,P . The absorption energies must be finite because
the number of particles in the shower induced by a primary particle, and the simulation
time spent to generate a complete shower (primary particle and all its descendants),
increase without limit when Eabs,P decreases. Normally, the spatial distribution of ab-
sorbed dose is tallied using volume bins with a certain “thickness” `b (e.g., the edge
length for cubic voxels). The absorption energy, Eabs,P , should be selected so that par-
ticles P with radiant energy equal to Eabs,P deposit all of their energy within distances
that are much less than `b . Thus, particles with energy less than Eabs,P are absorbed
inside the same bin where they are released, and distortion of local absorbed dose caused
by the finite values of the absorption energies is expected to be small. That is to say,
in Monte Carlo calculations we may consider that particles with energies below Eabs,P
are absorbed on the spot.
The central problem in classical dosimetry is to obtain the absorbed dose D(r) from
knowledge of the distributions of fluence with respect to energy, ΦP (r, E), of the particles
P present in the radiation field. The fluence distribution can be regarded as a surrogate
of dose; it provides a complete description of the radiation field, from which we can
calculate the absorbed dose in any material medium. It is employed, for instance, to
transform the reading of an ionisation chamber into the absorbed dose in the medium
in the absence of the chamber.
Nowadays, Monte Carlo simulation allows the absorbed dose in finite volume bins to
be tallied directly from the simulated particle histories at practically no cost; a result
of this ease is that not all Monte Carlo users are familiar with the approximations
underlying the practical transformation from the fluence distribution to absorbed dose.
In the following we introduce intermediate quantities for the calculation of the absorbed
dose from the distribution of fluence with respect to energy, and describe the calculation
of these quantities by means of Monte Carlo simulation. These quantities are also useful
in some Monte Carlo simulations where the calculation of the fluence is more efficient
than the straight evaluation of the absorbed dose (see Section 5.2.3).
For simplicity, we assume that the radiation field contains only photons, electrons
and positrons, which will be indicated by the respective labels P = −, γ, and +. We
also consider that the only relevant interactions are those included in the penelope
simulation algorithm. The formulation may be readily generalised to other radiation
(neutrons, protons, etc.) and to include other interaction mechanisms (e.g., photonu-
clear interactions).
Usually, the distribution of fluence with respect to energy is known only for particles
P with radiant energies higher than a certain cutoff energy, ∆P . In calculations of the
absorbed dose, particles with sub-cutoff energies (i.e., with E < ∆P ) are assumed to be
absorbed on the spot. We would like to point out that, when the fluence distribution
is generated by Monte Carlo simulation, the cutoffs ∆P do not need to be equal to the
225
NEA/NSC/DOC(2015)3
absorption energies Eabs,P adopted in the simulation (see below). Let Φsr,P (r, E) denote
the fluence distribution with respect to the energy of particles P from the radiation
source (e.g., from an external beam or from nuclear decays within the material system),
which may extend to energies E below ∆P . The total distribution of fluence of particles
P is
ΦP (r, E) = Φsr,P (r, E) + Φsh,P (r, E) , (5.49)
where Φsh,P (r, E) is the contribution of particles P in the showers originated by the
source particles. We assume that Φsh,P (r, E) is known only for E > ∆P .
We recall that ΦP (r, E) dE is the path length of particles P with energies in the
interval (E, E + dE) per unit volume. Hence, ρ−1 ΦP (r, E) dE is the path length of
these particles per unit mass. To obtain the absorbed dose, we only have to multiply
this quantity by the mean energy that is effectively absorbed (converted into atomic
excitations and sub-cutoff particles) per unit path length of particles P .
It is thus natural to consider the linear energy absorption 2 (LEA) for particles P
of radiant energy E, A∆,P (E), defined as the average energy that is transferred to the
material per unit path length, and is not re-emitted as particles P 0 having radiant
energy higher than the corresponding cutoff ∆P 0 . The LEA can be given in units of
eV/cm, or a multiple of it. Although a similar quantity, the linear energy transfer or
LET, is used only for charged particles (ICRU Report 85, 2011), the concept is also
applicable to uncharged particles. With this generalisation, the contribution to the
absorbed dose D(r) of particles P with energies in the interval (E, E + dE) is given by
the product A∆,P (E) ρ−1 ΦP (r, E) dE. Note that the LEA depends on the values of the
cutoff energies ∆P 0 of all radiation P 0 that can be released following the interactions
of particles P ; the subscript ∆ indicates the set of cutoff energies. Except for a slight
correction (the track-end term, Dend , see below), the absorbed dose can now be expressed
as
Z
1 X
D(r) = A∆,P (E) ΦP (r, E) dE . (5.50)
ρ(r) P
Because the LEA is essentially proportional to the mass density of the medium, it is
convenient to consider the mass energy absorption (MEA), B∆,P (E), defined by
1
B∆,P (E) ≡ A∆,P (E) , (5.51)
ρ(r)
which is largely independent of ρ. Since the product of density and length is the mass
thickness (usually given in g·cm−2 ), the MEA is the mean energy absorbed per unit
mass thickness traversed by particles P of energy E. The MEA can be expressed in
units of eV·cm2 /g or one of its multiples.
2
With the ICRU conventions, the term linear means per unit length.
226
NEA/NSC/DOC(2015)3
w = E − E0 − Q , (5.52)
where E 0 is the energy of the scattered particle, which has to be replaced by zero when
the particle is absorbed (i.e., when E 0 < ∆P ), and Q is the change in the rest energies of
the elementary particles involved in the interaction (including the nucleus if interactions
such as nuclear photoabsorption are considered). For instance, in the case of electron-
positron pair production by photons Q is positive (each event increases the rest energy
by 2me c2 ). On the contrary, positron annihilation gives a negative Q (the rest energy
decreases by 2me c2 ). When the interaction causes the emission of secondary particles
from the target atom, penelope stores them in the secondary stack (see Chapter 7).
The inverse mean free path (or attenuation coefficient) for photons of energy E is
where N is the number of atoms or molecules per unit volume, Eq. (1.102), and
σγ,T (E) = σRa (E) + σCo (E) + σph (E) + σpp (E) (5.54)
is the total cross section (see Chapter 2). We recall that µγ (E) is the interaction
probability (or the average number of interactions) per unit path length. Therefore, the
LEA of photons can be expressed as
where Fγ (E) is the average fraction of the photon energy that is converted into atomic
excitation and sub-cutoff radiation in each interaction.
227
NEA/NSC/DOC(2015)3
The quantity Fγ (E)E is well suited for calculation through Monte Carlo simulation.
To obtain it, we simulate showers that start with a single interaction of a parent photon
of energy E and score the energy Gi absorbed in each shower. After the interaction
of the i-th parent photon, we set Gi = w [see Eq. (5.52)], the energy transferred in
the interaction, and proceed to follow the particles P 0 that are left in the stack. When
the interaction of the primary photon is Rayleigh scattering, ω = 0 and no secondary
particles are produced. In the case of Compton scattering, ω = E − E 0 if the energy
E 0 of the scattered photon is larger than ∆γ , and ω = E otherwise. If a particle
has energy EP 0 higher than ∆P 0 , we update the absorbed-energy counter (i.e., Gi is
replaced by Gi −EP 0 ), and the simulation of P 0 is discontinued to avoid double counting,
because these particles are assumed to contribute to the fluence distribution Φsh,P 0 (r, E 0 ).
However, if P 0 has sub-cutoff radiant energy but is able to release other particles P 00
with energies above the corresponding cutoff, ∆P 00 , we have to track the particle P 0 , and
send to the stack all its descendants P 00 with energies higher than ∆P 00 . After simulating
a large number N of showers, the average energy absorbed in interactions of the parent
photons is obtained as
N
1 X
Fγ (E) E = Gi . (5.56)
N i=1
Electrons and positrons (P = ±) lose energy by way of inelastic collisions (“in”) and
bremsstrahlung emission (“br”). The total energy-loss DCS is (see Chapter 3)
dErel
A∆,P (E) = SP (E) − , (5.58)
ds
where Z E
dσP,T (E)
SP (E) = N W dW (5.59)
0 dW
is the total (collision plus radiative) stopping power, and dErel /ds is the average energy
released as particles P 0 with energies higher than ∆P 0 per unit path length. Since the
total cross section for bremsstrahlung emission is infinite (see Section 3.3.2), caution
must be exercised when computing A∆,P (E) by Monte Carlo simulation. The easiest
strategy is to separate the contribution of soft stopping interactions with energy transfers
less than the cutoff energy ∆P , which cause divergence of the total cross section, but
give a finite contribution to the stopping power. We write
Z ∆P
dσP,T (E)
A∆,P (E) = N W dW + FP (E)E ρ−1 N σP,T (E) , (5.60)
0 dW
228
NEA/NSC/DOC(2015)3
where Z E
dσ−,T (E)
σ−,T = dW , (5.61a)
∆− dW
and Z E
dσ+,T (E)
σ+,T = dW + σan (E) , (5.61b)
∆+ dW
for electrons and positrons, respectively. The integral on the right-hand sides of Eqs.
(5.61) is the total cross section for hard stopping interactions, which is finite, and σan (E)
is the cross section for positron annihilation. The quantity FP (E)E is the average energy
that is effectively absorbed (i.e., deposited in the form of atomic excitations and sub-
cutoff radiations) in a hard interaction.
The average energy absorbed in each interaction, FP (E) E, can be readily calculated
by simulation. As in the case of photons, we generate showers that start with a single
hard interaction of a primary electron or positron having kinetic energy E. After the
interaction of the i-th primary particle, we set Gi = w, the energy transferred in the
interaction [Eq. (5.52)], discontinue the simulation of the primary particle, and proceed
to follow the particles P 0 in the stack. In the event that after the interaction the energy
E of the primary is less than ∆P , it is added to the energy-absorption counter, i.e., we
replace Gi with Gi + E. When the energy EP 0 of a particle P 0 in the stack is larger than
∆P 0 , we replace Gi with Gi − EP 0 and discontinue the simulation of P 0 to avoid double
counting. When P 0 has sub-cutoff radiant energy but is able to release other particles
P 00 with energies higher than ∆P 00 , we track P 0 and send to the stack all its descendants
P 00 with energies higher than ∆P 00 . After simulating a large number N of showers, we
have
N
1 X
FP (E) E = Gi . (5.62)
N i=1
The program LEA.f calculates the LEA for photons, electrons, and positrons using
penelope and the simulation schemes described above. The quantity effectively calcu-
lated is the average deposited energy, FP (E) E, in an interaction (hard interaction in
the case of charged particles). For each energy E of the parent particle, the program
generates a number N of showers that is large enough to give the LEA value with a
statistical uncertainty less than the adopted tolerance, typically 0.1 % (1σ level). The
computer time needed to calculate the LEA increases with the radiant energy of the
particle; the calculation for photons of energies about 10 MeV takes a few minutes on
an Intel Core i7 processor.
For electrons and positrons, the program LEA.f also calculates the restricted stopping
power, defined by
Z ∆P P Z ∆γ P
dσin (E) dσbr (E)
S∆,P (E) ≡ N W dW + N W dW , (5.63)
0 dW 0 dW
which gives the energy loss per unit path length due to inelastic collisions with W < ∆P
and to the emission of bremsstrahlung photons with W < ∆γ . The LEA is larger
229
NEA/NSC/DOC(2015)3
than the restricted stopping power, because in S∆,P (E) we exclude the contribution of
interactions with energy losses in excess of ∆P , while in A∆,P (E) we exclude only the
energies of particles released with EP > ∆P (a part of the transferred energy remains on
the spot as atomic excitations and particles with sub-cutoff energies). Figure 5.2 displays
the MEA for electrons in water and copper, calculated with the cutoffs ∆± = 1 keV
and ∆γ = 0. For comparison, we have also plotted the restricted mass stopping power,
S∆,− (E)/ρ, and the mass stopping power, S− (E)/ρ. The ratio B∆,− /(S∆,− /ρ) equals
unity at low energies and increases monotonically with the energy E of the electron,
reaching a saturation value at energies that are larger than both the ionisation energies
of the atoms and the cutoff energies ∆P . The saturation values are 1.015 for water and
1.025 for copper.
B∆,—(E), S∆,—(E)/ρ, S—(E)/ρ (eV cm2/g)
10
8
S—(E)/ρ
˙ 10
8
S—(E)/ρ
H2O Cu (Z = 29)
7 7
10 10
6 6
10 10
2 4 6 8 2 4 6 8
10 10 10 10 10 10 10 10
E (eV) E (eV)
Figure 5.2: Mass energy absorption, B∆,− (E), restricted mass stopping power, S∆,− (E)/ρ,
and mass stopping power, S− (E)/ρ, of electrons in water and copper, calculated with ∆− =
∆+ = 1 keV and ∆γ = 0. For projectiles with energies less than about 10 keV, the MEA
practically coincides with the restricted mass stopping power.
230
NEA/NSC/DOC(2015)3
where Dend is the contribution of track ends, i.e., of particles with energies E higher
than ∆P that after an interaction emerge with radiant energy below the cutoff, and of
source particles with sub-cutoff energies. Since particles with E < ∆P are assumed to be
absorbed on the spot (i.e., at the first interaction), the contribution of source particles
with energies below the cutoff is
1 X ∆P
Z
Dend, below = N σP,T (E) E ΦP,sr (r, E) dE . (5.65)
ρ(r) P 0
Particles with energy E higher than the cutoff ∆P are absorbed after an interaction in
which the particle emerges with radiant energy E 0 = E − W below ∆P , where, as usual,
W is the energy transferred in the interaction. Let dσP (E)/dW denote the energy-
transfer DCS, differential only in W , of particles P with radiant energy E. For photons,
only Compton scattering needs to be considered, because all other interaction processes
either do not alter the photon energy (Rayleigh scattering) or imply the absorption of
the incident photon (photoelectric effect and pair production). That is,
dσγ (E) dσCo (E)
= . (5.66)
dW dE 0
Since the energy W transferred in the interaction where P is absorbed is already counted
in the first term of expression (5.64), only the remainder E −W contributes to the track-
end term. Therefore, the track-end contribution of particles with energies above their
cutoffs is given by
1 X ∞
Z Z E
dσP (E)
Dend, above = N (E − W ) dW ΦP (r, E) dE . (5.67)
ρ(r) P ∆P E−∆P dW
Note that particles P 0 that may be emitted with energies E > ∆P 0 as the result of
an interaction where P is absorbed, are also accounted for by the first term on the
right-hand side of Eq. (5.64).
In simulations where charged particles are tracked using mixed (class-II) algorithms,
soft interactions also cause the gradual absorption of particles with energies slightly
above the cutoff. To describe the absorption through soft interactions we can utilise the
CSDA, because the average effect of these interactions is appropriately represented by
the restricted stopping power, S∆,P (E) [Eq. (5.63)]. The CSDA can be regarded as the
limit of a discrete interaction process in which the particles lose a fixed energy, Ws,P , at
each interaction. The corresponding energy-loss DCS is assumed to be
dσs,P (E)
= σs,P (E) δ(W − Ws,P ) , (5.68)
dW
where the total cross section σs,P (E) is determined by requiring that the process gives
the correct stopping power, i.e.,
S∆,P (E)
σs,P (E) = . (5.69)
N Ws,P
231
NEA/NSC/DOC(2015)3
The CSDA is obtained as the limit Ws,P = 0 of this interaction process. When only this
process is active, the track end contribution to the absorbed dose is [cf. Eq. (5.67)]
Z ∞ Z E
soft 1 X
Dend, above = N σs,P (E) (E − W ) δ(W − Ws,P ) dW ΦP (r, E) dE.
ρ(r) P ∆P E−∆P
Because the delta distribution implies that we have non-vanishing contributions only
when Ws,P lies in the interval (E − ∆P , E), we can write
Z ∞
soft 1 X n
Dend, above = N σs,P (E) (E − Ws,P )
ρ(r) P ∆P
o
× Θ(Ws,P − E + ∆P ) Θ(E − Ws,P ) ΦP (r, E) dE
Z ∆P +Ws,P
1 X
= N σs,P (E) (E − Ws,P ) ΦP (r, E) dE , (5.70)
ρ(r) P ∆P
where Θ(x) is the unit step function (= 1 if x > 0, and 0 otherwise). For small values
of Ws,P , we have
Z ∆P +Ws,P
soft 1 X
Dend, above ' N σs,P (∆P ) ∆P ΦP (r, ∆P ) dE
ρ(r) P ∆P
1 X
= N σs,P (∆P ) ∆P ΦP (r, ∆P ) Ws,P . (5.71)
ρ(r) P
soft 1 X
Dend, above = ∆P SP (∆P ) ΦP (r, ∆P ) , (5.72)
ρ(r) P
where we have used the identity (5.69), and the fact that at E = ∆P the restricted
stopping power equals the total stopping power, S∆,P (∆P ) = SP (∆P ). The result (5.72)
implies that the product SP (∆P ) ΦP (r, ∆P ) is the number of particles that reach the
energy value ∆P per unit volume as a result of soft interactions.
Summarising, the contribution of track ends to the absorbed dose is
soft
Dend = Dend, above + Dend, below + Dend, above , (5.73)
where the last term (end-track contribution of soft interactions) is to be included only
for charged particles and when soft interactions are described with the CSDA. Recalling
232
NEA/NSC/DOC(2015)3
NA X ∆P
Z
+ E σP,T (E) ΦP,sr (r, E) dE
AM P 0
NA X ∞
Z Z E
dσP,T (E)
+ (E − W ) dW ΦP (r, E) dE
AM P ∆ P E−∆P dW
1 X
+ ∆P SP (E) ΦP (r, ∆P ) . (5.74)
ρ(r) P
In calculations of the average absorbed dose in finite volumes, the cutoff energies ∆P
should be selected so that particles leaving and entering the volume of interest with
energies less than ∆P carry, on average, the same total radiant energies. When this
condition holds, we say that there is radiation equilibrium for particles P with sub-cutoff
energies. Only under these circumstances does Eq. (5.74) yield the correct absorbed
dose. This is not the case, e.g., in the vicinity of a material-vacuum interface, where
there is a net flux of secondary electrons and photons from material to vacuum.
233
NEA/NSC/DOC(2015)3
where the first summation is over the generated showers, and the second is over the
steps, j, of the particles of the i-th shower that intersect the volume V. The second
term on the right-hand side is the contribution of track ends,
1 X
Dend = Ek , (5.77)
MN k
where the summation is over all particles k that reach energies Ek below the corre-
sponding absorption energy Eabs,P (i.e., particles that are effectively absorbed) within
V. Note that the LEA and the mass density are local quantities; the estimator (5.76) is
applicable even when the volume V contains zones of different compositions or densities.
It should be observed that the mass M in these formulas has to be evaluated separately.
Usually, simulation codes deliver the product DM .
A practical difficulty of the track length estimator is that it requires the calculation
of the LEA prior to the simulation run. To ensure consistency, the cutoffs ∆P used
to determine the LEA must be identical to the absorption energies adopted in the
simulation. It should be kept in mind that absorbed doses calculated with the track
length estimator are accurate only when there is complete equilibrium of particles with
sub-cutoff energies.
234
NEA/NSC/DOC(2015)3
electrons of the i-th shell. The energy Xi released as characteristic x rays can be readily
evaluated from the atomic transition probabilities in the EADL (Perkins et al., 1991).
On the other hand,
Z E−Ui
0 1 dσCo,i (E)
hE ii = E0 dE 0 , (5.78)
σCo,i (E) 0 dE 0
where Ui is the ionisation energy of the active shell (only energy transfers W = E − E 0
higher than Ui can cause ionisation), and dσCo,i (E)/dE 0 is the DCS for Compton events
with electrons of the active shell, differential only in the energy of the scattered photon.
This DCS can be obtained by numerical integration of the DCS (2.28) over directions
of the scattered photon,
Z 2
dσCo,i (E) d σCo,i (E)
0
= dΩ . (5.79)
dE dE 0 dΩ
The energy-transfer coefficient is given by
(
1 NA ρ X h
µtr = σph,i (E − Xi ) + σCo,i (E − hE 0 ii − Xi )
E AM i
)
i
+ σtriplet,i E − 2me c2 − Xi + σpair E − 2me c2
, (5.80)
where the summation runs over the shells of the target atom. The cross sections σph,i ,
σCo,i , σtriplet,i , and σpair correspond, respectively, to photoelectric absorption and Comp-
ton scattering by electrons of the i-th shell, triplet production in the field of these
electrons, and nuclear-field pair production. It is convenient to express µtr in terms of
the partial attenuation coefficients (see Section 2.5),
Xh i
µtr = fph,i µph,i + fCo,i µCo,i + ftriplet,i µtriplet,i + fpair µpair , (5.81)
i
where
Xi hE 0 ii + Xi
fph,i = 1 − , fCo,i = 1 − ,
E E
2me c2 + Xi 2me c2
ftriplet,i = 1 − , and fpair = 1 − (5.82)
E E
are the average fractions of the photon energy E that are converted into kinetic energy
of charged particles released in the corresponding interactions. The weighted average f
of these quantities is defined by the equality
µtr = f µ , (5.83)
where µ is the total attenuation coefficient, µ = µph + µRa + µCo + µpp , including the
contribution from Rayleigh scattering, which has fRa = 0. The factor f gives the average
235
NEA/NSC/DOC(2015)3
fraction of the photon energy that is released as kinetic energy of charged particles in
individual interactions of photons.
To remove the dependence on the density ρ of the material, it is customary to define
the mass energy-transfer coefficient as
µtr µ
=f , (5.84)
ρ ρ
where µ/ρ is the total mass attenuation coefficient, Eq. (2.102). Usually, µtr and µtr /ρ
are given in units of cm−1 and cm2 /g, respectively.
The definitions (5.80) to (5.84) apply to elemental materials, and involve only char-
acteristics of the target atom. In the case of homogeneous mixtures and compounds
we can adopt the usual additivity approximation. Let us consider a compound material
containing elements of atomic numbers Zj and atomic weights Aw (Zj ), with correspond-
ing fractions by weight wj . If a “molecule”
P contains nj atoms of the element Zj , the
molar mass of the compound is AM = j nj Aw (Zj ) and nj = wj AM /Aw (Zj ). According
to the additivity approximation, the mass energy-transfer coefficient of the compound
is
( )
µtr NA X X h (j) (j) (j) (j) (j) (j)
i
(j) (j)
= nj σph,i fph,i + σCo,i fCo,i + σtriplet,i ftriplet,i + σpair σpair , (5.85)
ρ AM j i
where the superscript (j) refers to the element Zj . We can also write
(j) (j)
µtr X µtr X
(j) µ µ
= wj = wj f =f . (5.86)
ρ j
ρ j
ρ ρ
The quantity kerma, K, is defined as (and the name is an acronym for) the sum of
the kinetic energies of all charged particles released by photons per unit mass (ICRU
Report 85, 2011). From the definition of the distribution of fluence with respect to
energy Φγ (r, E) [see Eqs. (5.35) and (5.38)], the kerma can be calculated as
Z ∞ Z ∞
µtr (E) µ(E)
K(r) = E Φγ (r, E) dE = f E Φγ (r, E) dE . (5.87)
0 ρ 0 ρ
The kerma is a good approximation to the absorbed dose when there is complete charged-
particle equilibrium and the charged particles released by the photons deposit all of their
kinetic energies in the material. The latter condition does not hold when a part of the ki-
netic energy of charged particles is re-emitted in radiative events, i.e., as bremsstrahlung
photons and x rays. In this case, we need to account for the fact that this radiation
reduces the absorbed dose at r and increases the photon fluence (that is, it contributes
to the absorbed dose elsewhere).
236
NEA/NSC/DOC(2015)3
To facilitate the direct calculation of the absorbed dose from the fluence distribution,
we introduce the mass energy-absorption coefficient, defined by
(j) (j)
µen X X (j) µph,i X X (j) µCo,i
= (1 − gph ) wj fph,i + (1 − gCo ) wj fCo,i
ρ j i
ρ j i
ρ
(j) (j)
X
j
X (j) µtriplet,i X (j) µpair
+ (1 − gtriplet ) w ftriplet,i + (1 − gpair ) wj fpair . (5.88)
j i
ρ j
ρ
The quantities gph , gCo , gtriplet and gpair are, respectively, the average fractions of the
kinetic energy of primary charged particles released in photoelectric, Compton, triplet-
and pair-production interactions that are emitted as bremsstrahlung photons and x
rays during the slowing down of the charged particles. A weighted average g fraction is
defined by
µen µtr µ
= (1 − g) = (1 − g)f . (5.89)
ρ ρ ρ
Note that the product µen E is equal to the LEA, A∆,γ (E), calculated with the cutoffs
∆γ = 0 and ∆− = ∆+ = ∞.
The absorbed dose at r can then be evaluated as
Z ∞ Z ∞
µen (E) µ(E)
D(r) = E Φγ (r, E) dE = (1 − g)f E Φγ (r, E) dE . (5.90)
0 ρ 0 ρ
This expression gives the correct absorbed dose provided only that there is complete
charged-particle equilibrium. Because the g fractions depend on the slowing down of
the primary charged particles, as well as on the production of secondary delta rays,
they cannot be deduced from atomic characteristics and have to be evaluated for each
material under consideration.
The simplest method to estimate the g factors is to use the CSDA, which leads to
relatively simple expressions that can be evaluated by a single numerical quadrature.
As an example, let us consider the calculation of the factor gCo for Compton scattering.
The distribution of the kinetic energy Ee of Compton electrons released in interactions
of photons with electrons of the i-th shell is
1 dσCo,i (E)
PCo,i (Ee ) = , (5.91)
σCo,i (E) dE 0
237
NEA/NSC/DOC(2015)3
to rest. In analogy to the bremsstrahlung yield, we introduce the x-ray yield, defined
as the average fractional energy emitted as x rays resulting from impact ionisations by
a charged particle in the course of its slowing down,
Z Ee " X X #
1 (j) (j) dEe0
Ysi (Ee ) = N nj σsi,k (Ee0 ) Xk
Ee 0 j i
S(Ee0 )
" #
Ee
dEe0
Z
1 X wj X (j) 0 (j)
= NA ρ σsi,k (Ee ) Xk , (5.93)
Ee 0 j
Am (Zj ) k S(Ee0 )
(j)
where σsi,k (Ee ) is the cross section for ionisation of the k-th shell of the element Zj
by impact of electrons with kinetic energy Ee . The average fraction of the energy of
Compton electrons that is radiated can be expressed as
P P(j) R E (j)
j wj σCo,i 0 PCo,i (Ee ) Ee Ytot (Ee ) dEe
i
gCo = P P (j) R E (j) , (5.94)
w
j j σ
i Co,i 0 P Co,i (Ee ) E e dEe
where
Ytot (Ee ) = Ybr (Ee ) + Ysi (Ee ) (5.95)
is the total radiation yield, including bremsstrahlung and x-ray emission.
Seltzer (1993) employed an elaborate scheme to determine mass energy-absorption
coefficients including the effects of energy straggling and delta-ray production, which
were described using the results from Monte Carlo simulations. Tabulations of µ/ρ
and µen /ρ evaluated from Seltzer’s approach, for the elements from hydrogen to ura-
nium (Z = 1 to 92) and for a list of compounds and mixtures, for photon energies be-
tween 1 keV and 20 MeV, are available at http://www.nist.gov/pml/data/xraycoef/
index.cfm. A practical alternative is to obtain the mass energy-absorption coefficients
from simulations with penelope. Although Monte Carlo simulation requires substan-
tial computation times, it has the advantage of including consistently all interactions
and is applicable to any material.
The program LEA.f can be used to calculate the mass energy-absorption coefficient
with penelope. As indicated above, µen = A∆,γ (E)/E, when the cutoff energies are
∆γ = 0 and ∆± = ∞. Comparing the definitions (5.55) and (5.89), we see that Fγ = (1−
g)f . However, the program LEA.F does not calculate the mass-energy transfer coefficient,
µtr , and the associated fraction f , Eq. (5.84). A similar program, named mutren.f, has
been written to calculate both µtr and µen . The calculation of µen is performed using
the same scheme as in LEA.f, and f is obtained as the average fraction of the photon
energy that is transferred to charged particles in an interaction, in accordance with Eq.
(5.89). Figure 5.3 displays mass energy-absorption coefficients and mass attenuation
coefficients for photons in liquid water, air, copper and lead calculated with mutren.f.
The average fractions (1 − g)f and f for water and lead (as representatives of low- and
high-Z materials) are shown in Fig. 5.4.
238
NEA/NSC/DOC(2015)3
The results obtained from our programs are found to differ slightly from those in the
NIST tables, because of the following differences between the underlying physical models
and assumptions. Firstly, penelope uses DCSs for Compton scattering obtained from
the impulse approximation, while the NIST calculations are based on DCSs calculated
from the Waller-Hartree theory, which are known to underestimate the energy transfer
for photons with energies less than about 100 keV (see Ribberfors, 1983; Brusa et al.,
1996). Secondly, the NIST tables were evaluated by considering all of the x rays emitted
through the whole atomic relaxation cascade (even those with very small energies), while
penelope only follows characteristic x rays emitted from vacancies in K, L, M and N
subshells with binding energies higher than 50 eV. Finally, penelope disregards all
photons emitted with energies less than the absorption energy Eabs,γ and, consequently,
the results from mutren.f are slightly dependent on the value of Eabs,γ . Notice, however,
that Eq. (5.90) with the mass energy-absorption coefficients given by mutren.f or LEA.f
should reproduce the absorbed doses obtained from penelope simulations with the
absorption energies Eabs,P = ∆P , provided only that charged-particle equilibrium is
complete.
dE∆
L∆ (E) = Sin (E) − , (5.96)
ds
−
where Sin (E) = hW i N σin (E), Eq. (3.101), is the collision stopping power, and dE∆ /ds
is the average sum of the kinetic energies of delta rays released per unit path length of the
electron. The cutoff ∆ is usually expressed in eV, and L∆ in eV/cm, or some convenient
multiple (e.g., MeV/cm). A related quantity is the restricted collision stopping power,
239
NEA/NSC/DOC(2015)3
µ/ρ µ/ρ
104 104
µen/ρ µen/ρ
103 103
µ/ρ, µen/ρ (cm2/g)
1 1
0.1 0.1
−2 −2
10 10
2 3 4 5 6 7 2 3 4 5 6 7
10 10 10 10 10 10 10 10 10 10 10 10
E (eV) E (eV)
5 5
10 10
µ/ρ µ/ρ
104 104
µen/ρ µen/ρ
103 103
µ/ρ, µen/ρ (cm2/g)
2 2
10 10
Cu (Z = 29) Pb (Z = 82)
10 10
1 1
0.1 0.1
−2 −2
10 10
2 3 4 5 6 7 2 3 4 5 6 7
10 10 10 10 10 10 10 10 10 10 10 10
E (eV) E (eV)
Figure 5.3: Mass energy-absorption coefficients, µen (E)/ρ, and mass attenuation coefficients,
µ/ρ, of water, air, copper and lead as functions of the photon energy. The solid curves represent
values of µen (E) generated by the program mutren.f (i.e., from simulations with penelope)
with the cutoff energies ∆γ = 0 and ∆± = ∞. Crosses are values from the NIST database,
which were calculated with Seltzer’s (1993) method.
240
NEA/NSC/DOC(2015)3
1.0 1.0
0.9 1—g f 0.9 1—g f
0.8 0.8
0.7 0.7
(1 — g)f, f, 1 — g
(1 — g)f, f, 1 — g
(1 — g)f
0.6 0.6
0.5 0.5
(1 — g)f
0.4 0.4
0.3 0.3
0.2 0.2
0.1 H2O 0.1 Pb (Z = 82)
0.0 2 4 6 8
0.0 2 4 6 8
10 10 10 10 10 10 10 10
E (eV) E (eV)
Figure 5.4: Average fraction of energy transferred to charged particles, f , and average fraction
of energy absorbed, (1 − g)f , in photon interactions, as functions of the photon energy. Curves
represent values obtained from simulations with penelope. Crosses are values of (1 − g)f
derived from the NIST database.
defined by
Z ∆ −
dσin (E)
S∆ (E) = N W dW , (5.97)
0 dW
which excludes all energy losses in excess of ∆. Note that L∆ (E) is larger than S∆ (E),
because the sum of kinetic energies of delta rays is smaller than the energy W transferred
in the interaction, which is partially spent in overcoming the binding energy of the
electrons in the target atom (after the interaction, the atom remains in an excited
state). The difference between L∆ (E) and S∆ (E) is small for large values of ∆, but it
becomes significant when ∆ is comparable to the ionisation energies of the atom. Note,
however, that L∆ (∆) = Sin (∆), i.e., the two quantities coincide for E = ∆. As the
LET excludes the actual energies released as delta rays, it is more meaningful than the
restricted stopping power.
In general, the LET differs from the LEA, because the LEA accounts for energies
released by secondary photons, which are not considered in the definition of the LET.
The two quantities coincide only when the total radiative yield (bremsstrahlung plus x
rays) is negligible. When this is the case, the LET for electrons can be calculated by
running the program LEA.f with ∆− = ∆ and ∆γ = ∆+ = 0.
241
NEA/NSC/DOC(2015)3
The quantity cema, C, is defined as (and the name is an acronym for) converted
energy per unit mass. It is given by
Z ∞
Sin (E)
C(r) = Φp (r, E) dE , (5.98)
0 ρ
where Φp (r, E) is the distribution of fluence with respect to energy of primary electrons.
That is, the cema disregards the energy transported by secondary electrons.
A more practical quantity is the restricted cema, C∆ , which is the energy deposited
by electrons (or other charged particles) per unit mass, excluding the kinetic energies of
delta rays. Since electrons with sub-cutoff energies are assumed to be absorbed on the
spot, the definition of restricted cema includes a track-end term (Kellerer et al., 1992),
Z ∞
L∆ (E)
C∆ (r) = Φ− (r, E) dE + Cend . (5.99)
∆ ρ
NA ∞ −
Z Z E
dσin (E)
Cend = (E − W ) dW Φ− (r, E) dE
AM ∆ E−∆ dW
NA
+ ∆ Sin (∆) Φ− (r, ∆) . (5.100)
AM
This result is more general than the expression given by Kellerer et al., which was derived
from the CSDA.
The cema can be considered as the limit of the restricted cema when all secondary
electrons are assumed to be absorbed on the spot. Under these circumstances, L∆ (E) =
Sin (E), and Φ− (r, E) reduces to the distribution of fluence of primary electrons, Φp (r, t).
The restricted cema approaches the absorbed dose from electron fields when sub-cutoff
electron equilibrium exists and radiative energy losses are negligible. Evidently, the
restricted cema provides a better approximation to the absorbed dose than the cema,
which assumes equilibrium of secondary electrons irrespective of their energies.
242
NEA/NSC/DOC(2015)3
Chapter 6
243
NEA/NSC/DOC(2015)3
(Nelson et al., 1985), geant3 (Brun et al., 1989), egsnrc (Kawrakow and Rogers, 2001),
mcnp (X-5 Monte Carlo Team, 2003), geant4 (Agostinelli et al., 2003; Allison et al.,
2006), fluka (Ferrari et al., 2005), egs5 (Hirayama et al., 2006)] have recourse to
condensed (class I) or mixed (class II) simulation, where the global effect of multiple
interactions along a path segment of a given length is evaluated using available multiple-
scattering theories. To avoid large step lengths that could place the particle within a
different medium, these condensed procedures require the evaluation of the distance from
the current position to the nearest interface, an operation with a high computational
cost (see, e.g., Bielajew, 1995). The mixed procedure implemented in penelope is, at
least computationally, analogous to detailed simulation (it gives a “jump-and-knock”
description of particle tracks). In fact, the structure of penelope’s tracking algorithm
was designed to minimise the influence of geometry on the transport physics. This
algorithm operates independently of interface proximity and only requires knowledge of
the material at the current position of the particle. As a consequence, the geometry
package pengeom can be directly linked to penelope. However, since pengeom does
not evaluate the distance to the closest interface, it cannot be used with condensed
simulation codes, such as those referenced above.
With pengeom we can describe any material system consisting of homogeneous
bodies limited by quadric surfaces. To speed up the geometry operations, the bodies
of the material system can be grouped into modules (connected volumes, limited by
quadric surfaces, that contain one or several bodies); modules can, in turn, form part
of larger modules, and so on. This hierarchic modular structure allows a reduction of
the work of the geometry routines, which becomes more effective when the complexity
of the system increases. The present version 2014 of pengeom is able to simulate very
complex material systems, with up to 5,000 bodies and 10,000 limiting surfaces. These
large numbers of elements would be useless if one had to define the geometry manually,
element by element by editing enormous definition files. However, pengeom includes
the option of cloning modules (and groups of modules), an operation which rapidly
increases the number of elements used.
Except for trivial cases, the correctness of the geometry definition is difficult to check
and, moreover, 3D geometrical structures with interpenetrating bodies are difficult to
visualise. A pair of programs, named gview2d and gview3d, have been written to
display the geometry on the computer screen. These programs use specific computer
graphics software and, therefore, they are not portable. The executable files included in
the penelope distribution package run on personal computers under Microsoft Win-
dows; they are simple and effective tools for debugging the geometry definition file.
Almansa et al. (2014) have developed a Java application named PenGeom.jar which
allows the definition of the geometry and its visualisation using the same tracking al-
gorithms as in the Windows viewers. PenGeom.jar is not part of the penelope
distribution package.
In what follows, and in the computer programs, lengths are assumed to be given
in cm. Notice, however, that pengeom operates with arbitrary units; the subroutines
perform correctly provided only that the input step lengths and the geometry parameters
244
NEA/NSC/DOC(2015)3
are expressed in the same units. The position and direction of movement of a particle
are referred to the laboratory coordinate system, a right-handed Cartesian reference
frame which is defined by the position of its origin of coordinates and the unit vectors
x̂ = (1, 0, 0), ŷ = (0, 1, 0), and ẑ = (0, 0, 1) along the directions of its axes.
z0 0 0 αz z
where the vectors r and r0 are considered as one-column matrices. The inverse of this
transformation is the scaling with the reciprocal factors,
S −1 (α) = S(1/αx , 1/αy , 1/αz ). (6.4)
245
NEA/NSC/DOC(2015)3
Evidently, the inverse translation T −1 (t) corresponds to the displacement vector −t,
i.e., T −1 (t) = T (−t).
A rotation R is defined through the Euler angles ω, θ, and φ, which specify a sequence
of rotations about the coordinate axes1 : first there is a rotation of angle ω about the
z-axis, followed by a rotation of angle θ about the y-axis and, finally, a rotation of angle
φ about the z-axis. A positive rotation about a given axis would carry a right-handed
screw in the positive direction along that axis. Positive (negative) angles define positive
(negative) rotations. Although the definition of a rotation by means of the Euler angles
may seem awkward, this is the most direct and compact method to specify a rotation.
Figure 6.1 displays the effect of a rotation, defined by its Euler angles, on an asymmetric
object, an arrow pointing initially along the z axis with an arm in the direction of the
negative y-axis. The rotation angles θ and φ are the polar and azimuthal angles of
the final direction of the arrow, respectively. The first rotation, of angle ω, determines
the final orientation of the arm. It is clear that, by selecting appropriate values of the
Euler angles, we can set the object in any given orientation, that is, we can describe any
rotation. Since a rotation of angle 2π represents a complete turn, the rotation remains
the same when we add an integer multiple of 2π to either of the Euler angles. Hence,
different sets of Euler angles, all of them differing by integer multiples of 2π, represent
the same transformation. In formal studies of the rotation group, it is common to
associate a rotation with a single set of Euler angles, whose values are restricted to their
“natural” intervals: ω ∈ (0, 2π), θ ∈ (0, π) and φ ∈ (0, 2π).
z
ω = π/2 φ = π/4
θ
θ = π/5
y
x
φ
Figure 6.1: Rotation of an asymmetric object, an arrow with an arm, as defined by the
Euler angles ω, θ, and φ. The orientation of the axes is the same in all the diagrams.
z0 z
1
This definition of the Euler angles is the one usually adopted in quantum mechanics (see, e.g.,
Edmonds, 1960).
246
NEA/NSC/DOC(2015)3
where R(ω, θ, φ) is the rotation matrix. To obtain the explicit form of this matrix, we
recall that rotations of angle φ about the z axis and of angle θ about the y axis are
described by the matrices
cos φ − sin φ 0 cos θ 0 sin θ
R(φẑ) = sin φ cos φ 0 and R(θŷ) = 0 1 0 , (6.8)
0 0 1 − sin θ 0 cos θ
respectively. Hence,
0 0 1 − sin θ 0 cos θ 0 0 1
cos φ cos θ cos ω − sin φ sin ω − cos φ cos θ sin ω − sin φ cos ω cos φ sin θ
sin φ cos θ cos ω + cos φ sin ω − sin φ cos θ sin ω + cos φ cos ω sin φ sin θ . (6.9)
The inverse of the rotation R(ω, θ, φ) is R(−φ, −θ, −ω) and, because rotation matrices
are orthogonal, its matrix is the transpose of R(ω, θ, φ), i.e.,
R−1 (ω, θ, φ) = R(−φ, −θ, −ω) = R(−ωẑ) R(−θŷ) R(−φẑ) = RT (ω, θ, φ). (6.10)
Let us now consider transformations C = T (t) R(ω, θ, φ) S(α) that are products of
a scaling S(α), a rotation R(ω, θ, φ) and a translation T (t). C transforms a point r into
z0 0 0 αz z tz
Notice that the order of the factors does matter; the product of the same factors in re-
verse order D = S(α) R(ω, θ, φ) T (t) transforms r into a point r00 = Dr with coordinates
x00 αx 0 0 x + tx
00
y = 0 αy 0 R(ω, θ, φ) y + ty . (6.13)
00
z 0 0 αz z + tz
Evidently, in general, r00 6= r0 .
247
NEA/NSC/DOC(2015)3
Given a surface F (r) = 0, we can generate a new surface by applying a scaling S(α)
followed by a rotation R(ω, θ, φ) and a translation T (t) (we shall always adopt this
order). The implicit equation of the transformed surface is
G(r) = F S −1 (α) R−1 (ω, θ, φ) T −1 (t) r = 0,
(6.14)
which simply expresses the fact that G(r) equals the value of the original function at the
point r0 = S −1 (α) R−1 (ω, θ, φ) T −1 (t) r that transforms into r [i.e., r = T (t) R(ω, θ, φ)
S(α)r0 ]. As an example, Fig. 6.2 shows schematically the transformation of a sphere
into an asymmetric ellipsoid.
y y
y y
x x
x x
248
NEA/NSC/DOC(2015)3
/
2
2
/2
1
/
1
1
/
3
Figure 6.3: Left: Schematic representation of a simple geometry, a sphere with a cylindrical
inset. The solid triangles indicate the outside of the surfaces (SP = +1); number labels in
squares indicate bodies. Right: Three-dimensional view with an excluded wedge to show the
inner structure.
The “location” of a particle is specified by giving its position coordinates r and the
body Bk where it is moving. Given the initial position of a particle, r0 , to determine the
body that contains it we should calculate the SPs of all limiting surfaces and explore
the set of bodies in ascending order to find the one with the right SPs. For complex
systems, with a large number of limiting surfaces, this blind search may be quite lengthy.
The grouping of bodies into modules (see Section 6.2.3) serves to reduce the number of
surfaces that need to be considered to locate a point.
A particle trajectory is simulated as a sequence of connected straight free flights, each
of which ends with an interaction of the particle or with a hinge. When the particle
reaches an interface (i.e., a surface limiting two bodies of different compositions), the
simulation has to be halted and restarted with the interaction cross sections of the
medium beyond the interface. The most basic geometry operation, which is to be
performed millions of times in the course of a single simulation, is the calculation of
intersections of particle track segments with limiting surfaces. Assume that a particle
starts a free flight of length s0 from a point r0 in body Bk moving in the direction d̂.
We wish to determine whether the track segment intersects any of the surfaces F (r) = 0
which limit the body where the particle is moving. The intersections of the ray r0 + sd̂
with the surface occur at distances s from r0 that are solutions of the following “master”
equation
f (s) ≡ F (r0 + sd̂) = 0, (6.15)
where f (s) is the value of the surface function along the ray. In the course of a free
flight of length s0 , the particle will cross the surface only if this equation has a root s
such that 0 < s ≤ s0 . Note that the SP of a surface at the particle position changes
when the particle crosses the surface. By keeping track of the SPs of the surfaces at
the current position of the particle, the body where the particle is moving is identified
unambiguously.
249
NEA/NSC/DOC(2015)3
F (r) = rT A r + AT r + A0 = 0, (6.17)
where
1
Axx A 1A
2 xy 2 xz
A ≡ 12 Axy Ayy 12 Ayz (6.18)
1 1
A A
2 xz 2 yz
Azz
is a symmetric matrix. As usual, vectors such as r and A ≡ (Ax , Ay , Az ) are considered
here as one-column matrices. rT is a one-row matrix, and AT r is the familiar dot
product A·r. The gradient of the quadric surface function is the vector
The advantage of using quadric surfaces is that Eq. (6.15) for the ray intersections
is quadratic,
f (s) = as2 + bs + c = 0 (6.20)
with
250
NEA/NSC/DOC(2015)3
Fr (r) = I1 x2 + I2 y 2 + I3 z 2 + I4 z + I5 = 0, (6.23)
where the coefficients (indices) I1 to I5 can only take the values −1, 0 or 1. Notice
that reduced quadrics have central symmetry about the z-axis, i.e., Fr (−x, −y, z) =
Fr (x, y, z). The real reduced quadrics are given in Table 6.1 and are displayed in Fig. 6.4.
We do not consider imaginary surfaces (e.g., the imaginary ellipsoid x2 +y 2 +z 2 +1 = 0),
which are of no interest here. Additionally, we have omitted quadrics that represent two
planes in various orientations (such as crossing planes x2 − y 2 = 0, parallel planes
z 2 − 1 = 0, and double planes z 2 = 0) because they are more conveniently defined by
using single planes, which do not require taking square roots to calculate ray crossings.
In practice, limiting surfaces are frequently described in “geometrical” form and it
may be inconvenient to obtain the corresponding quadric parameters. Let us try with
a simple example: obtain the parameters of a circular cylinder of radius R such that
its symmetry axis goes through the origin and it is parallel to the vector u = (1, 1, 1).
To facilitate the definition of the geometry, each quadric surface can be specified either
through its implicit equation or by means of its reduced form, which defines the “shape”
of the surface (see Fig. 6.4), and the set of geometrical transformations that produce the
desired surface. Starting from the corresponding reduced form, a quadric is obtained by
applying the following transformations (in the quoted order).
(i) A scaling along the directions of the axes, defined by the scaling factors2 X-SCALE=
αx , Y-SCALE= αy and Z-SCALE= αz . The equation of the scaled quadric is
2 2 2
x y z z
Fs (r) = I1 + I2 + I3 + I4 + I5 = 0. (6.24)
αx αy αz αz
For instance, this transforms the reduced sphere into an ellipsoid with semi-axes
equal to the scaling factors.
(ii) A rotation, R(ω, θ, φ), defined through the Euler angles OMEGA= ω, THETA= θ and
PHI= φ. Notice that the rotation R(ω, θ, φ) transforms a plane perpendicular to
the z-axis into a plane perpendicular to the direction with polar and azimuthal
angles THETA and PHI, respectively. The first Euler angle, ω has no effect when
the initial (scaled) quadric is symmetric about the z-axis.
2
Keywords used to denote the various parameters in the geometry definition file are written in
typewriter font, e.g., X-SCALE). See Section 6.3.
251
NEA/NSC/DOC(2015)3
Thus, a general quadric surface is completely specified by giving the set of indices (I1 ,
I2 , I3 , I4 , I5 ), the scale factors (X-SCALE, Y-SCALE, Z-SCALE), the Euler angles (OMEGA,
THETA, PHI) and the displacement vector (X-SHIFT, Y-SHIFT, Z-SHIFT). Any real quadric
surface can be expressed in this way. The cylinder mentioned in the above example is
defined by
I1 = 1, I2 = 1, I3 = 0, I4 = 0, I5 = −1,
X-SCALE = Y-SCALE = R, Z-SCALE = 1,
√ √
OMEGA = 0, THETA = arccos(1/ 3) = 54.73 deg, PHI = arccos(1/ 2) = 45 deg,
X-SHIFT = Y-SHIFT = Z-SHIFT = 0,
where the rotation angles θ and φ are determined from the relations cos θ = ẑ·u/|u| and
cos φ sin θ = x̂·u/|u| with u = (1, 1, 1).
The implicit equation of the quadric is obtained as follows. The equation (6.24) of
the scaled quadric can be written in matrix form [cf. Eq. (6.17)],
rT A r + AT r + A0 = 0, (6.25)
252
NEA/NSC/DOC(2015)3
z z
x y
1, 1, 1, 0, −1 1, 1 , 0 , 0 , −1 1, −1, 0, 0, −1
sphere cylinder hyperbolic cylinder
Figure 6.4: Non-planar reduced quadric surfaces and their indices [see Eq. (6.23)]. In all
cases, the perspective is the same as for the sphere.
253
NEA/NSC/DOC(2015)3
with
I1 /αx2 0 0
A= 0 I2 /αx2 0 A = (0, 0, I4 /αz ) , A0 = I5 . (6.26)
0 0 I3 /αz2
The equation for the rotated and shifted quadric is [see Eq. (6.14)]
with
From these relations, the parameters of the implicit equation (6.16) are easily obtained.
Note that the transformation (scaling, rotation and translation) of a surface leaves its
SPs unaltered, i.e., points that are inside (outside) the surface transform into points
inside (outside) the transformed surface.
254
NEA/NSC/DOC(2015)3
b is the projection of the gradient of F (r) at r0 along the direction of flight, i.e., the
directional derivative of F (r). Hence, if b > 0 the particle “leaves” the surface (moving
from inside to outside). Conversely, if b < 0 the particle “enters” the surface (moves
from outside to inside). The surface is made fuzzy by simply defining the SP at an
ambiguous point r0 (i.e., such that |c| = |F (r0 )| < ) to be the same as the SP at a
position slightly advanced along the ray, where the sign of F (r) is unambiguous. That
is, we set SP = −1 (inside) if b < 0 and SP = +1 (outside) if b > 0. Summarising, the
side pointer of a fuzzy quadric surface at the point r0 , ambiguous or not, is given by the
following simple algorithm,
Once we have determined the current body, which contains the point r0 where the
particle is, we can sample the length s0 of the free flight to the next interaction by using
the cross sections of the material in the current body. A call to the tracking subroutine
will then simulate a “flight” of the particle to a new position, which will be either the end
of the step (r0 + s0 d̂) or the intersection with one of the surfaces that limit the current
body, whichever occurs first. In other words, the tracking subroutine must calculate the
distances s to the intersections with the limiting surfaces by solving the corresponding
master equation (6.20), and compare these distances with the free-flight length s0 . Note
that there is no need to store the SPs of the limiting surfaces in memory because the
SP of a surface at r0 is simply the sign of the c coefficient of its master equation (6.20),
which has to be re-evaluated each time the tracking routine is invoked. Furthermore, we
can use the calculated c values to verify that the particle effectively is in the declared
body, and apply suitable corrections when this is not the case.
After the crossing of an interface, defined by the Eq. F (r) = 0, the particle is placed
at a point r0 and the tracking subroutine has to identify the new body by computing
the SPs of its limiting surfaces at r0 . Although the particle has just crossed one of
these surfaces, because of round-off errors, its numerical position coordinates may be at
either side of this mathematical surface, and even at a distance such that |F (r0 )| > .
When r0 is ambiguous with respect to the surface (i.e., when |F (r0 )| < ), algorithm
(6.30) gives the correct SP. The difficulty arises when r0 is not ambiguous, in which
case the numerical position may be either before the mathematical surface (undershot)
or beyond it (overshot). In the case of an overshot, the value of F (r0 ) has the correct
sign, and the program will generally give the correct SP. On the contrary, when there
is an undershot, the wrong SP will be assigned. While a slight error in the position
coordinates is tolerable, altering the SP implies changing the body and material where
the particle moves. With mathematical surfaces, incorrect SPs have to be corrected
by keeping track of the surfaces that are crossed by the particle, which complicates
the tracking algorithm. An advantage of using fuzzy surfaces is that, in the case of an
255
NEA/NSC/DOC(2015)3
undershot, the program usually corrects itself, because one additional jump of negligible
length places the particle at an ambiguous position where the correct SP will be assigned.
As indicated above, the tracking subroutine must determine the distances s from the
initial position r0 of the particle to the intersections of the ray r0 + sd̂ with the limiting
surfaces of the current body. Non-trivial situations can arise when r0 is ambiguous
with respect to the surface, as may occur just after a surface crossing, or when the ray
intersects the surface twice and the intersections are very close to each other (e.g., when
the ray is almost tangent to the surface or when the ray crosses a cone near its tip). In
such situations, the tracking subroutine has to evaluate the SP of the surface and also
discriminate whether the surface is going to be crossed again or not. If the surface is
a plane (a = 0), there is only one intersection; the SP is determined by the signs of c
and b, and after updating it we can proceed as if the particle had effectively passed the
surface. For non-planar quadric surfaces, we need to consider only the case in which the
ray does cross the surface (i.e., when the discriminant ∆ is strictly positive). We can
therefore assume that Eq. (6.20) has two different roots, s1 and s2 , sorted in increasing
order (s1 < s2 ). The general situation is sketched in Fig. 6.5, which shows a ray crossing
a quadric surface and the corresponding “master” function, f (s) = as2 + bs + c. Because
the master functions for two r0 points in the same ray differ only by a global displacement
in s, the graph of this function is a characteristic of the ray. However, the values of the
coefficients a, b, and c do depend on the initial position r0 in the ray. The lower plot
in Fig. 6.5 shows the signs of a and b corresponding to different initial positions along
the ray. We note that when the point r0 is an ambiguous point, |c| = |F (r0 )| < and
either s1 or s2 is close to zero. When s1 is negative and s2 ∼ 0, the ray has just crossed
the surface and there are no intersections ahead. When s1 ∼ 0 and s2 is positive, the
ray crosses the surface again at s2 . Unfortunately, round-off errors may still lead to
ambiguities when both |s1 | and |s2 | are small. Therefore, to reveal the existence of a
second intersection ahead, it is preferable to consider some global property of the master
function f (s) that is less sensitive to round-off errors. Figure 6.5 shows that we may
have four different situations, which are characterised by the signs of b and a:
A) b > 0 and a < 0: SP = +1, second crossing at s2 .
B) b ≥ 0 and a > 0: SP = +1, no more crossings.
C) b ≤ 0 and a < 0: SP = −1, no more crossings.
D) b < 0 and a > 0: SP = −1, second crossing at s2 .
When the product ab is negative (cases A and D), s1 ∼ 0 and the second root is positive,
that is, the ray does intersect the surface again at a certain distance from the initial
point r0 , even if the numerical value of s2 turns out to be negative due to round-off
errors. In the latter case, we can simply consider that the intersection is at s2 = 0
because the surface is fuzzy. On the other hand, when ab > 0 (cases B and C with
b 6= 0), s2 ∼ 0 and the first root is negative, so that there are no intersections beyond
r0 . Summarising, in the case of ambiguous points r0 , SP ambiguities are resolved by
considering the sign of b [i.e., of the derivative of f (s) at s = 0], while the existence of
a second crossing ahead is readily recognized from the sign of a.
To complete the description of the tracking algorithm, we only have to specify the
256
NEA/NSC/DOC(2015)3
/
g
/
g
r0 d̂ r0 d̂ D B
A C
f(s)
a<0 a>0
A C D B s
0
s1 s2 s1 s2
SP: −1 +1 −1 +1 −1 +1
Figure 6.5: Top: Intersections of rays r0 + sd̂ with two quadric surfaces, which for simplicity
are represented as spheres; the solid triangles indicate the outside of the surfaces (SP = +1).
The two surfaces differ only in their orientation (i.e., their defining functions differ by a global
negative factor) and, consequently, their gradient vectors g = ∇F (r) are in opposite directions.
The solid blocks (labelled A, B, C and D) indicate the ray segments (not to scale) where the
SP of the surface may be ambiguous, i.e., such that |F (r)| < . Bottom: Ray intersections
described in terms of the master function, f (s) = as2 + bs + c, Eq. (6.20). The path length s
increases to the right. The roots s1 and s2 of the equation f (s) = 0 are the distances at which
the ray intersects the surface, sorted in increasing order (s1 < s2 ). The signs of the coefficients
a and b depend on the initial position r0 of the particle in the ray, as indicated.
value of the fuzziness level , so as to make sure that all points r such that |F (r)| >
are assigned the correct SP. Let δ denote the distance that the fuzzy surface will swell
or shrink along the direction of the ray. When the surface is not a plane, δ should be
much smaller than the distance between the two crossings of the ray, s2 − s1 = ∆1/2 /|a|.
Recalling that the slope of the master function at the intersections is f 0 (si ) = 2asi + b =
±∆1/2 , we set δ = 10−12 (s2 − s1 ) and
∆
= f 0 (si )δ = 10−12 . (6.31a)
|a|
In the case of planes (a = 0), the fuzziness level is assumed to be a constant, i.e.,
≡ 10−12 . (6.31b)
so that the interval of ambiguous points has a half-length δ = /|f 0 (si )| = 10−12 /|b|,
which increases when the angle between the ray and the normal to the plane increases.
257
NEA/NSC/DOC(2015)3
Note that when b = 0 (and a = 0) the ray is parallel to the plane and does not
intersect it. Numerical experiments, using double-precision arithmetic, confirm that the
prescriptions (6.31) do work well. The precise value of the numerical constant 10−12 is
not critical; when it is increased, say by a factor of 100, the ambiguity interval widens
by approximately that factor (i.e., surfaces become fuzzier), but we have not observed
any harmful consequences.
The complete tracking algorithm is described in Table 6.2. This algorithm is robust,
in the sense that it consistently assigns a SP to ambiguous points r0 and determines
the distance to the next crossing, if there is one. Note, however, that two fuzzy surfaces
may not be correctly resolved when they are too close to each other. As a measure
of the accuracy of the algorithm we may use the resolution, defined as the minimal
distance between two surfaces that are neatly resolved. The resolution is determined by
the fuzziness level and by the accumulated numerical round-off errors from the surface
coefficients and from the calculation of distances to interfaces. In general, the resolution
worsens when the distance to the origin of coordinates increases. That is, a small
geometrical structure, which is correctly resolved when placed near the origin, may
become distorted or invisible when it is translated to a more distant position. With the
adopted value of the fuzziness parameter, 10−12 , our algorithm is capable of resolving a
sphere of unit radius located at a distance of 107 length units from the origin.
As we have already mentioned, the obvious method to locate a point consists of com-
puting the SPs for all surfaces and, then, explore the bodies in ascending order looking
for the first that matches the given SPs. During simulation, when a particle attempts
to fly a given distance s0 (step length) in a direction d̂ from a given position r0 within
a body B0 , we need to check whether the particle leaves the body in the course of its
flight and, when this occurs, we should halt the particle just after leaving B0 and resume
simulation with the cross sections of the new material. This requires determining the
intersections of the particle ray r0 + sd̂ (0 < s ≤ s0 ) with all the surfaces that limit
the body B0 (including those that define any other bodies that limit B0 ), and checking
whether the final position r0 + sd̂ remains within B0 or not.
It should be noted that bodies can be concave, i.e., the straight segment joining
any two points in a body may not be wholly contained in the body. Hence, even when
the final position of the particle lies within the initial body, we must analyse all the
intersections of the particle ray with the limiting surfaces of B0 and check if the particle
has left the body after any of the intersections. In addition, when the particle leaves
the initial body, say after travelling a distance s0 (< s0 ), we need to locate the point
r0 = r0 + s0 d̂.
The straight procedure sketched above is robust, and easy to program, but becomes
too slow for complex geometries. We can speed it up by simply disregarding those
elements of the geometry that cannot be reached in a single step (e.g., bodies that are
258
NEA/NSC/DOC(2015)3
Table 6.2: Algorithm for computing the intersections of a ray, r0 + sd̂, with a fuzzy quadric
surface. It solves the master equation f (s) = as2 + bs + c = 0 and gives the number n of
intersections ahead of the ray. If there are any, the algorithm also provides the corresponding
distances sk (k = 1 if n = 1; k = 1, 2 if n = 2) sorted in increasing order. Planes are treated
separately to avoid unnecessary calculations.
n=0
if |a| < 10−36 , then [the surface is a plane]
if |b| > 0, then
= 10−12
if |c| < , then [the point r0 is ambiguous]
SP = sign(b)
else
SP = sign(c)
t = −c/b
if t > 0, set n = 1, s1 = t
end if
else [ray parallel to the plane]
SP = sign(c)
end if
else [the surface is not a plane]
∆ = b2 − 4ac, = 10−12 ∆/|a|
if |c| < , then [the point r0 is ambiguous]
ambig = 1, SP = sign(b)
else
ambig = 0, SP = sign(c)
end if
if ∆ < 10−36 , exit [no “true” intersections]
√ √
−b ∆ −b ∆
t1 = − , t2 = +
2a 2|a| 2a 2|a|
if ambig = 0, then
if t1 > 0, set n = 1, s1 = t1
if t2 > 0, set n = n + 1, sn = t2
else
if ab < 0, set n = 1, s1 = max{t2 , 0}
end if
end if
259
NEA/NSC/DOC(2015)3
“screened” by other bodies or too far apart). Unfortunately, as a body can be limited by
all the other bodies that have been defined previously, the algorithm can be improved
only at the expense of providing it with additional information. We adopt a simple
strategy that consists of grouping sets of bodies together to form modules.
A module is defined as a connected volume, limited only by quadric surfaces, which
contains one or several bodies. A space volume is said to be connected when any
two points in the volume can be joined by a trajectory that is completely contained
within the volume. A module can contain other modules, which will be referred to as
submodules of the first. The volume of a module is filled with a homogeneous material,
which automatically fills the cavities of the module (i.e., volumes that do not correspond
to a body or to a submodule); these filled cavities are considered as a single new body.
A body that is connected and limited only by surfaces can be declared either as a
body or as a module. For the sake of simplicity, modules are required to satisfy the
following conditions: 1) the bodies and submodules of a module must be completely
contained within the parent module (i.e., portions of bodies or submodules that lie
outside the module are not allowed) and 2) a submodule of a module cannot overlap
with other submodules and bodies of the same module (this is necessary to make sure
that a particle can only enter or leave a module through its limiting surfaces). Notice,
however, that the bodies of a module are still assumed to be defined in ascending order,
i.e., a body is limited by its surfaces and by the previously defined bodies of the same
module so that inclusions and interpenetrating bodies can be easily defined.
A module (with its possible submodules) can represent a rigid part (e.g., a radioactive
source, an accelerator head, a detector, a phantom, etc.) of a more complex material
system. To facilitate the definition of the geometry, pengeom allows free translations
and rotations of individual modules. Thus, the definition of a module (see Table 6.3
below) includes the parameters of a rotation R(ω, θ, φ) and a translation T (t), which
are optional and serve to modify the position and orientation of the module (and all its
bodies and submodules) with respect to the laboratory reference frame. As before, the
rotation is applied first.
In practical simulations with finite geometries, the tracking of a particle should be
discontinued when it leaves the material system. In pengeom this is done automatically
by assuming that the complete system is contained within a single convex module, the
enclosure, which comprises the whole system. A space volume is convex if the straight
segment joining any two points in the volume is wholly contained within the volume. It
is also convenient (but not necessary) to require that the enclosure has a finite volume,
so that all rays starting from any point within the volume of the enclosure do intersect
one of its limiting surfaces at a finite distance. When an enclosure is not defined by
the user (i.e., when the geometry consists of several separate modules and/or bodies
that are not inside a single module), pengeom defines the enclosure as a large sphere
of radius 107 length units, centred at the origin of coordinates. It is assumed that
there is a perfect vacuum outside the enclosure, and in any inner volume that is not a
body or a filled module. If the geometry definition contains bodies that extend beyond
the enclosure, they are truncated and only the parts inside the enclosure are retained.
260
NEA/NSC/DOC(2015)3
Hence, particles that leave the enclosure will never return to the material system.
For programming purposes, it is useful to consider each module as the mother of its
bodies and submodules, and as the daughter of the module that contains it. We thus
have a kind of genealogical tree with various generations of modules and bodies (see Fig.
6.6). The first generation reduces to the enclosure (which is the only motherless module).
The members of the second generation are bodies and modules that are daughters of the
enclosure. The n-th generation consists of modules and bodies whose mothers belong
to the (n − 1)-th generation. Each module is defined by its limiting surfaces (which
determine the border with the external world) and those of their descendants (which
determine the module’s internal structure); this is not true for bodies (childless members
of the tree), which can be limited either by surfaces, by other sister bodies or by a
combination of both. Consequently, individual bodies cannot be rotated or translated.
5 6
1
8
1 2 7 4
5
7 4
2 3
3 8
6
9
9
Figure 6.6: Planar cut of a geometry example, showing modules (number labels in circles)
and bodies (number labels in squares), and the associated genealogical tree. Notice that a
module can always be defined as a body limited by their submodules and daughter bodies,
but this affects the structure of the genealogical tree and, therefore, the efficiency (speed) of
the geometry operations.
The benefit of using modules is that, while a particle is moving within a module, the
only accessible bodies are the daughters (bodies and submodules) of that module. This
effectively limits the number of surfaces that need to be analysed at each move. Only
when the particle crosses one of the limiting surfaces of the current module, do we need
to consider the outer geometry. Furthermore, when a particle leaves a module, it remains
within the volume of either the parent module or one of its ancestors. The numerical
work needed to locate and track particles may thus be largely reduced by defining a
well ramified genealogical tree of modules. Optimal organisation is obtained when each
module has a relatively simple inner structure with a small number of daughters. Figure
6.6 shows an example of finely ramified tree. Practical experience indicates that tracking
particles through complex quadric geometries may be faster than with elaborate ray-
261
NEA/NSC/DOC(2015)3
B B
A A
Figure 6.7: Tracking error caused by defining an enclosure that is concave. The example
corresponds to a simple geometry consisting of a hollow cylinder in vacuum. The left diagram
shows the correct tracking of a particle that crosses the material structure without interacting.
When the hollow cylinder is defined as a body, the particle crosses the first wall (A–B), enters
the hollow, moves freely to point C, and then crosses the second wall (C–D). If the hollow
cylinder is defined as a module, pengeom identifies it with the enclosure and the program
malfunctions: the particle crosses the first wall (A–B), enters the hollow at B and, because it
is in the vacuum, flies freely to infinity, failing to “see” the second wall.
tracing methods, such as octree encoding (Meagher, 1982; Glassner, 1984), provided
that the tree of modules is finely ramified.
Although modules may in general be concave, the enclosure module must be convex.
Consider, for instance, the case of a simple geometry consisting of a single hollow cylin-
der in vacuum, Fig. 6.7, which can be defined either as a body or as a module. Since
the hollow cylinder is concave, it must be defined as a body. If it were defined as a mod-
ule, it would be considered as the enclosure and pengeom would malfunction, because
particles that enter the hollow coming from the wall would be assumed to enter the
“external” vacuum, and would not stop at the opposite wall. Note that the pengeom
routines are unable to check whether the root module is convex or concave. This in-
consistency becomes apparent when the geometry is analysed with the two-dimensional
viewer of gview2d (see Section 6.6); the three-dimensional viewer, however, will gen-
erate correct images even when the hollow cylinder is defined as a module (because the
light rays used for rendering three-dimensional images do not penetrate the material
bodies).
262
NEA/NSC/DOC(2015)3
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( A4) reduced form
INDICES=(I2,I2,I2,I2,I2)
X-SCALE=( E22.15 , I4) (DEFAULT=1.0)
Y-SCALE=( E22.15 , I4) (DEFAULT=1.0)
Z-SCALE=( E22.15 , I4) (DEFAULT=1.0)
OMEGA=( E22.15 , I4) DEG (DEFAULT=0.0)
THETA=( E22.15 , I4) DEG (DEFAULT=0.0)
PHI=( E22.15 , I4) RAD (DEFAULT=0.0)
X-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
Y-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
Z-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( A4) implicit form
INDICES=( 0, 0, 0, 0, 0)
AXX=( E22.15 , I4) (DEFAULT=0.0)
AXY=( E22.15 , I4) (DEFAULT=0.0)
AXZ=( E22.15 , I4) (DEFAULT=0.0)
AYY=( E22.15 , I4) (DEFAULT=0.0)
AYZ=( E22.15 , I4) (DEFAULT=0.0)
AZZ=( E22.15 , I4) (DEFAULT=0.0)
AX=( E22.15 , I4) (DEFAULT=0.0)
AY=( E22.15 , I4) (DEFAULT=0.0)
AZ=( E22.15 , I4) (DEFAULT=0.0)
A0=( E22.15 , I4) (DEFAULT=0.0)
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=( E22.15 , I4) DEG (DEFAULT=0.0)
THETA=( E22.15 , I4) DEG (DEFAULT=0.0)
PHI=( E22.15 , I4) RAD (DEFAULT=0.0)
X-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
Y-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
Z-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
BODY ( A4) Text describing the body ...
MATERIAL( A4)
SURFACE ( A4), SIDE POINTER=( 1)
BODY ( A4)
MODULE ( A4)
0000000000000000000000000000000000000000000000000000000000000000
MODULE ( A4) Text describing the module ...
MATERIAL( A4)
SURFACE ( A4), SIDE POINTER=( 1)
BODY ( A4)
MODULE ( A4)
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=( E22.15 , I4) DEG (DEFAULT=0.0)
THETA=( E22.15 , I4) DEG (DEFAULT=0.0)
PHI=( E22.15 , I4) RAD (DEFAULT=0.0)
X-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
Y-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
Z-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
263
NEA/NSC/DOC(2015)3
0000000000000000000000000000000000000000000000000000000000000000
CLONE ( A4) Copies a module and moves it
MODULE ( A4) Original module
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=( E22.15 , I4) DEG (DEFAULT=0.0)
THETA=( E22.15 , I4) DEG (DEFAULT=0.0)
PHI=( E22.15 , I4) RAD (DEFAULT=0.0)
X-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
Y-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
Z-SHIFT=( E22.15 , I4) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
INCLUDE
FILE=(filename.ext)
0000000000000000000000000000000000000000000000000000000000000000
END 0000000000000000000000000000000000000000000000000000000
264
NEA/NSC/DOC(2015)3
element descriptions are inherited by cloned elements, and are useful for understanding
and modifying large geometry definition files. Furthermore, comment lines, starting
with “C ” or “c ” (as in Fortran, but with a blank in the second column) or with “#”,
can be introduced anywhere in the geometry file. The information in comment lines,
however, is not transferred to cloned elements. The program uses only the leftmost
columns of each definition line, any text following the parameter field is ignored.
N.B.: The use of double planes (e.g., z 2 − 1 = 0) should be avoided, because pairs of
single planes (z + 1 = 0 and z − 1 = 0) are easier to handle and may allow possible
surface redundancies to be unveiled (see Section 6.4).
• Bodies
◦ Bodies are delimited by previously defined surfaces, bodies and modules.
◦ The material number (2nd line, an integer) must conform with the convention adopted
in the simulation. Void inner volumes can be described as material bodies with MATERIAL
set equal to 0 (or a negative number).
◦ A line is required to define each limiting surface, with its side pointer, and each limiting
body or module. Limiting surfaces, bodies and modules can be entered in any order.
265
NEA/NSC/DOC(2015)3
If we had chosen the alternative of not declaring all limiting elements, at each free flight
of the transported particle we would have to calculate the intersections of the particle
ray with all the surfaces of the sister bodies and modules, even those that do not limit
the body where the particle is moving. For complex geometries this may be too costly.
In principle, any quadric geometry can be defined with only surfaces and bodies. As
an example, Table 6.4 shows the definition file of the structure displayed in Fig. 6.3. For
complex geometries, however, tracking becomes very slow, and can only be accelerated
by introducing modules and setting a properly ramified genealogical tree. Modules also
offer the advantages of allowing global transformations (rotation and translations) and
cloning.
Table 6.4: Definition file example1 of the geometry shown in Fig. 6.3.
• Modules
◦ The material (which must be explicitly declared) fills the cavities of the module. As
in the case of bodies, MATERIAL = 0 corresponds to vacuum. The filled cavities are
considered as a single new body, which is assigned the same label as the module.
◦ The limiting surfaces must define a connected volume. All inner bodies and modules
266
NEA/NSC/DOC(2015)3
(submodules) must be declared. Notice that these cannot extend outside the module’s
volume and that a submodule cannot overlap with the other submodules and bodies.
◦ Limiting surfaces, inner bodies and submodules can be entered in any order.
◦ Rotation and translation are optional and apply to all elements of the module, except
starred surfaces. The line filled with 1’s ends the definition of elements and starts that
of transformation parameters; it can be omitted if no transformation parameters are
entered.
It should be noted that modules do not need to coincide with bodies of the material
system. In certain cases, it may be convenient to consider modules that contain portions
of bodies, even if this requires splitting homogeneous bodies by means of auxiliary
surfaces.
A single surface can be used to define several bodies and/or modules. Conversely,
the same surface can be defined several times (with different labels), e.g., to keep the
definition of a body complete and independent of those of other bodies. The unnecessary
duplication of a surface does not affect the simulation speed because pengeom identifies
“redundant” surfaces and effectively removes them.
Rotation or translation of a module modifies all the surfaces of its descendants (ex-
cept starred surfaces) and, therefore, a transformed surface must be redefined if it is to
be used again. Thus, if the system contains two identical modules in different positions
(e.g., two detectors in a coincidence experiment), each of them must be defined explic-
itly. In principle, this does not require too much editing work; after generating the first
of the two modules, we can just duplicate its definition blocks and assign new values to
their labels and parameters. A simpler and more versatile method is to use the CLONE
operation, which automatically clones a module (with its submodules and inner bod-
ies) and changes the position and orientation of the cloned module. This operation is
helpful to define systems with repeated structures such as array detectors and multi-leaf
collimators.
• Cloning a module
◦ Rotation and translation apply to all elements of the module, except starred surfaces.
The line filled with 1’s starts the definition of transformation parameters. Notice that it
is necessary to apply a translation or a rotation (or both), to avoid overlaps between the
original and cloned modules (which would make the geometry definition inconsistent).
◦ Bodies cannot be cloned. To clone a body that is limited only by surfaces, define it
as a module.
◦ All the surfaces that define the original module (and its descendants) are cloned
and transformed collectively with the module. In certain cases, however, it may be
convenient to keep some surfaces unaltered (e.g., those that limit both the original and
cloned modules). We can do this by using the keyword SURFACE* in the definition of
the surface; starred surfaces behave as normal surfaces, except for the fact that their
coefficients are not affected by translation/rotation of the cloned module.
◦ When we run one of the geometry viewers (see below), pengeom generates an output
267
NEA/NSC/DOC(2015)3
file, named geometry.rep, that strictly defines the same geometry as the input file.
However, in geometry.rep the elements of all the cloned modules are defined explicitly
(and labelled consecutively). We can edit, and rename, this file to modify the elements
of cloned modules.
268
NEA/NSC/DOC(2015)3
Table 6.5: Definition file example2 illustrating the use of the INCLUDE* and CLONE operations.
269
NEA/NSC/DOC(2015)3
6 3
5 4 1 2
Figure 6.8: Three-dimensional (left) and two-dimensional (right) views of the geometry
described by the definition file example2 listed in Table 6.5. Module 3 groups the original
bodies 1 and 2; module 6 is generated by cloning module 3, and contains bodies 4 and 5.
process can be repeated as many times as required to generate a large array. At each
step, the size (number of cells) of the array is doubled, with only a small amount of
editing work. It is interesting to analyse the structure of the modular tree resulting from
this construction. As shown in Fig. 6.9, each time we clone a module, the tree of the
original module is duplicated; when we group the original module and its clone, their
trees are joined and rooted into the new mother module, which has only two daughters.
Therefore, the final tree is optimally ramified.
1 2 4 5
1 2 3 1 2 3
4 5 6
group
4 5 6
7 ... 3 6
The definition of the geometry may seem somewhat more laborious than with com-
binatorial methods, where the system is described by combining basic bodies of several
simple shapes [see Jenkins et al. (1988) and references therein]. In practice, however,
defining the various surfaces that limit a body may be more convenient, and intuitive,
than considering all the parameters needed to specify that body. The example of a right
elliptical cylinder, which needs 9 parameters, is quite illustrative. With our method, this
body can be defined as a module by means of two planes perpendicular to the z-axis
(only one parameter if the base is the z = 0 plane) and a scaled cylinder (2 parame-
ters); the rotation (3 parameters) of the module gives the required orientation and the
translation (3 parameters) puts it in the required position. The definition as a proper
270
NEA/NSC/DOC(2015)3
body requires defining the three surfaces that limit the cylinder in its actual position,
which is a bit more inconvenient. In any case, the important issue is not how to define
the geometry, but the amount of computation needed to follow a particle through the
material system.
271
NEA/NSC/DOC(2015)3
MODULE PENGEOM_mod
C
C **** Geometry definition parameters and I/O quantities.
C
SAVE ! Saves all items in the module.
C ---- Geometry array sizes.
C Maximum numbers of surfaces, bodies, and limiting elements.
INTEGER*4, PARAMETER :: NS=10000, NB=5000, NXG=250
C Number of bodies in the material system (given by PENGEOM).
INTEGER*4 :: NBODY
C
C ---- Body aliases (user labels).
CHARACTER*4 :: BALIAS(NB)=’ ’
C
C ---- Body materials. MATER(KB) is the material in body KB.
INTEGER*4 :: MATER(NB)=0
C
C ---- Detector definition.
C KDET(KB)=ID if body KB is part of detector ID.
INTEGER*4 :: KDET(NB)=0
C
C **** Warning messages for accidental undershots or round-off
C errors are issued when LVERB=.TRUE.
C
LOGICAL :: LVERB=.FALSE.
C
C **** Last step features (output from subroutine STEP).
C
C ---- Travelled path length, including segments in void volumes.
DOUBLE PRECISION :: DSTOT
C ---- Label of the last surface crossed by the particle before
C entering a material body (defined only when NCROSS /= 0).
INTEGER*4 :: KSLAST
C
END MODULE PENGEOM_mod
SUBROUTINE GEOMIN(PARINP,NPINP,NMAT,NBOD,IRD,IWR)
Reads geometry data from the input file and initialises the geometry package.
• Input arguments:
PARINP : Array containing optional parameters, which may replace the ones en-
tered from the input file. This array must be declared in the main program, even
when NPINP is equal to zero.
NPINP : Number of parameters defined in PARINP (positive).
IRD : Input file unit (opened in the main program).
IWR : Output file unit (opened in the main program).
• Output arguments:
NMAT : Number of different materials in full bodies (excluding void regions).
NBOD : Number of defined bodies and modules.
272
NEA/NSC/DOC(2015)3
Subroutine GEOMIN labels elements of various kinds (surfaces, bodies and modules)
in strictly increasing order; it may also redefine some of the geometry parameters,
whose actual values are entered through the array PARINP. A copy of the geometry
definition file, with the effective parameter values and with the element labels
assigned by pengeom, is printed on the output file (UNIT IWR). This part of the
output file describes the actual geometry used in the simulation.
N.B.: During the simulation, geometry elements are identified by the internal
labels assigned by pengeom, which are written in the output file. These labels
may be different from the user labels in the geometry definition file.
273
NEA/NSC/DOC(2015)3
For the handling and storage of geometric information we take advantage of the
structure of the genealogical tree. The geometry enclosure (see Section 6.2.3) is the
only common ancestor for all bodies and modules. To understand the operation of
the geometry routines, it is convenient to define a matrix FLAG(KB,KS) as follows (the
indices KS and KB indicate the label of a surface and a body or module, respectively),
FLAG(KB,KS) = 1, if KS is a limiting surface of KB and KB is inside KS (i.e., side
pointer = −1).
= 2, if KS is a limiting surface of KB and KB is outside KS (i.e., side
pointer = +1).
= 3, if KB is a body and KS does not directly limit KB, but appears
in the definition of a body that limits KB.
= 4, if KB is a module and KS limits one of its daughters (bodies and
submodules), but does not appear in the definition of KB.
= 5, otherwise.
To locate a point we call subroutine LOCATE, where we proceed upwards in the
genealogical tree of modules. If the point is outside the enclosure, we set MAT = 0 and
return to the main program. Otherwise, we look for a module or body of the second
generation that contains the point. If it exists, we continue analysing its descendants
(if any) and so on. The process ends when we have determined the body IBODY that
contains the point, or as soon as we conclude that the point is outside the material
274
NEA/NSC/DOC(2015)3
bodies of the system (i.e., in a void region). Notice that when we have found that a
module KB does contain the point, we only need to consider the surfaces KS such that
FLAG(KB, KS) = 1, 2 or 4 to perform the next step.
After the body IBODY that contains the initial position of the particle has been iden-
tified, we can call subroutine STEP to move the particle a certain distance DS, dictated
by the tracking main program, along the direction (U,V,W). We start by checking whether
the track segment crosses any of the surfaces that limit IBODY. If after travelling the
distance DS the particle remains within the same body, DSEF is set equal to DS and con-
trol is returned to the main program. It is worth noting that the surfaces KS that define
the initial body are those with FLAG(IBODY,KS)=1 and 2 (proper limiting surfaces) or
=3 (limiting surfaces of limiting bodies). Although it may happen that a surface with
FLAG=3 does not directly limit the body, subroutine STEP cannot know this from the
information at hand and, consequently, all surfaces with FLAG=3 are analysed after each
move. It is clear that, to reduce the number of surfaces to be considered, we should
minimise the number of bodies used to delimit other bodies.
When the particle leaves IBODY and enters a new material, STEP stops it just after
crossing the interface and determines the new body and material (in this case, the output
values of IBODY and MAT are different from the input values). To do this, the limiting
surfaces of the parent module and of all the sisters of the initial body must be analysed (if
they exist). If the new position is outside the parent module, we must analyse all surfaces
that limit the parent’s sisters and go downward in the genealogical tree to determine
the module that contains the point and, if necessary, go upwards again to find out what
the new body is. If the new material is the same as in the initial body, the particle is
allowed to move the remaining distance. Void regions (strict vacuum) are crossed freely
(i.e., the distance travelled within these regions is not counted). Furthermore, when
the particle starts from outside the enclosure, it is allowed to propagate freely until it
reaches a material body. The particle is stopped when it penetrates a different material
(the output value of NCROSS is then larger than zero) or when it leaves the system
(i.e., when, after leaving a material body, its straight trajectory does not intersect a
non-void body; in this case, the value MAT=0 is returned). It is worth mentioning that
the tracking routines may write warning messages in UNIT=26. These warnings refer to
inconsistencies caused by round-off errors, which in most cases occur when the particle
leaves the system (through the spherical enclosure of radius 107 ) and are innocuous.
In the case of tangent surfaces (e.g., a sphere inside a cylinder of the same radius), the
limited accuracy of double precision in Fortran may produce distortions of the geometry
when a particle crosses the touching surfaces, because the program may be unable to
identify which of the two surfaces should be crossed first. Examples of this kind of
conflict are shown in Fig. 6.10. The left diagram represents a sphere, B1 , lying on the
flat surface of a block, B2 . Because of round-off errors, the numerical surfaces are such
that the sphere slightly penetrates the block. In this case a ray, r0 + sd̂, that starts
from the block body will enter the sphere before leaving the block. As this eventuality
is not contemplated, the behaviour of the tracking routines is essentially unpredictable.
The user should make sure that such situations do not occur by altering slightly the
275
NEA/NSC/DOC(2015)3
a) b)
B1 B1
d̂ d̂
r0 r0
B2 B2
pengeom admits up to 10,000 surfaces and 5,000 bodies and modules. When the
input file contains a larger number of elements, the program stops and a corresponding
error message is printed. To describe such complex material systems, it is necessary
276
NEA/NSC/DOC(2015)3
to edit the source file pengeom.f and increase the values of the parameters NS (maxi-
mum number of surfaces) and NB (maximum number of bodies) in the Fortran module
PENGEOM mod. It is assumed that the number of bodies in a module is less than NX = 250,
which is also the upper limit for the number of surfaces that can be used to define a body
or a module (i.e., surfaces with FLAG(KB, KS) < 5). When this value of NX is insufficient,
the module that causes the trouble should be decomposed into several submodules. Al-
though it is possible to increase the parameter NX, this would waste a lot of memory.
Additionally, simulation of a geometry with a module or body defined by such a large
number of elements would be extremely slow.
Evidently, the speed of the geometry subroutines depends greatly on the structure
of the modules’ genealogical tree. The responsibility for optimising it rests with the
user. As indicated above, subroutine GEOMIN issues a detailed report on the geometry
structure as part of the output file. Inspecting this report and checking whether the
modular tree is sufficiently ramified is recommended. For complex geometries it may
be convenient to split large homogeneous bodies into several smaller parts pertaining to
different modules, even when this requires defining new surfaces.
277
NEA/NSC/DOC(2015)3
the energy spectrum and the angular distribution of “detected” particles (i.e., particles
that enter an active body) or, more specifically, to generate a phase-space file, where the
state variables of particles at the detector entrance are recorded. Notice that a detected
particle can leave the detector volume and re-enter it afterwards. Consequently, particles
can be “counted” several times. To avoid multiple counting, special action must be taken
in the main program.
Impact detectors may also be employed to calculate the average distribution of flu-
ence with respect to energy in the volume of the detector, Φ(E) [see Eq. (5.38)]. The
distribution that can be evaluated from the simulation is the following
Z
V Φ(E) = dr Φ(r, E), (6.32)
V
where V is the volume of the impact detector (which is not calculated by the geometry
routines) and Φ(r, E) is the distribution of fluence with respect to energy at the point
r. Usually, V Φ(E) is calculated separately for each kind of particle. The quantity
V Φ(E) ∆E is the total path length travelled within the detector volume by particles
of the considered kind that have energies in the interval (E, E + ∆E). It is worth
noting that V ΦE , the distribution of fluence with respect to energy integrated over the
volume of the detector, has dimensions of length/energy. When the flux density is nearly
constant over the volume of an impact detector, ΦE approximates the distribution of
fluence with respect to energy at points inside the detector.
The distribution of fluence with respect to energy, Eq. (6.32), can be used to obtain
various global quantities of interest in dosimetry (see Chapter 5) and spectroscopy. For
instance, in the case of electrons, the number of ionisations of the K-shell of atoms of
the element Zi within the volume V of the detector is given by
Z
nK,i = V ΦE N xi σsi,K (E) dE, (6.33)
where σsi,K (E) is the atomic cross section for K-shell ionisation of the element Zi (see
Section 3.2.6), N is the number of molecules per unit volume, Eq. (1.102), and xi is the
number of atoms of the element Zi in a molecule. Note that λ−1 si,K = N xi σsi, K is the
average number of ionisations per unit path length. If the detector is a very thin foil,
the probability that an electron that enters the foil causes an ionisation is very small
and, therefore, the value of nK,i evaluated by counting ionisations may be affected by
considerable statistical uncertainties. On the contrary, all electrons that cross the foil
contribute to the fluence, and the average number of ionisations derived from Eq. (6.33)
will usually be more accurate.
Instead of evaluating the distribution of fluence with respect to energy, it may be
advantageous to compute the number nK,i of ionisations by using the following track
length estimator, which is similar to that described in Section 5.2.3 for the calculation of
the absorbed dose. During simulation of the i-th shower, we consider the path lengths
si,j travelled by electrons of energy Ej within the volume V of the detector, and score the
278
NEA/NSC/DOC(2015)3
where the first summation is over individual showers, and the second is over electron
track segments in V. An advantage of using track length estimators is that they allow
the direct evaluation of statistical uncertainties using the general method of Section 1.5.
279
NEA/NSC/DOC(2015)3
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ x --> change window orientation, x-axis, +
+ y --> change window orientation, y-axis, +
+ z --> change window orientation, z-axis, +
+ s --> change the window scale (zoom level), +
+ p --> change the coordinates of the screen centre, +
+ c,m --> change view mode (bodies <-> materials), +
+ r,right --> shift right, l,left --> shift left, +
+ u,up --> shift up, d,down --> shift down, +
+ f,pgup --> shift front, b,pgdn --> shift back, +
+ i,+ --> zoom in, o,- --> zoom out, +
+ 1 --> actual size, h,? --> help, +
+ blank, enter --> repeat last command, q --> quit. +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
intersected. In this case, use the one-character viewer commands to reach the bodies
or, more conveniently, change the coordinates of the window centre to place it near or
within a filled body. Notice that, in the body display mode, the body labels shown
on the screen are the ones used internally by penelope. These internal labels, which
may be different from the labels in the user definition file, are needed for activating
variance-reduction methods locally, for defining impact detectors, and for scoring pur-
poses (e.g., to determine the distribution of energy deposited within a particular body).
The material and the body label shown in the lower right-hand corner of the window
correspond to the central body (the one at the intersection of the axes).
The program gview3d generates three-dimensional pictures of the geometry by us-
ing a simple ray-tracing algorithm, with the source light and the camera at the same
position. Bodies are displayed with the same colour code used by gview2d (in the ma-
terial display mode) and the intensity of each pixel is determined by the angle between
the vision line and the normal to the limiting surface. This method does not produce
shadows and disregards light diffusion, but makes fairly realistic three-dimensional im-
ages. The camera is assumed to be outside the system (placing the camera inside a
body would stop the program). To reveal the inner structure of the system, the pro-
gram can eliminate a wedge (limited by two vertical planes that intersect on the z-axis).
The position and size of the system can be modified by means of one-character com-
mands entered from the graphics window. The command keys and actions are similar
to those of gview2d. It is worth noting that gview3d generates the image pixel by
pixel, whereas gview2d does it by drawing straight lines on the window; as a result,
gview2d is much faster.
It should be mentioned that the use of fuzzy quadric surfaces in the current version
of pengeom gives a dramatic improvement in resolution over previous versions of the
package, which used static surfaces and a rough protection against round-off errors.
The viewers gview2d and gview3d now correctly render very small objects (e.g., a
spherical shell with inner radius of 10−9 units and a thickness of 5 × 10−11 units) as
280
NEA/NSC/DOC(2015)3
well as large structures with small details (e.g., a spherical shell of 106 radius and 10−5
thickness), which could not be displayed with the old versions of the codes.
gview2d and gview3d produce an output file named geometry.rep (which is
generated by subroutine GEOMIN) in the working directory. The programs are stopped
either when an input format is incorrect (reading error) or when a clear inconsistency in
the definition file is found (e.g., when the element that is being defined and the furnished
information do not match). The wrong datum appears in the last printed lines of the
geometry.rep file, usually in the last one. Error messages are also written on that file
so that the identification of inconsistencies is normally very easy. When the structure of
the input file is correct, the codes do not stop and the geometry is displayed for further
analysis.
Most of the possible errors in the input file can only be revealed by direct inspection
of the images generated by gview2d and gview3d. Very frequently, errors are caused
by the omission of a limiting element in the definition of a body or module. Numerical
round-off errors can also cause inconsistencies in the geometry, which may be difficult
to detect. Typically, these errors occur when two bodies, defined by different surfaces,
are in contact.
When the operations CLONE and INCLUDE are not used, the output file geometry.rep
is a duplicate of the input definition file. The only differences between the two files are
the labels assigned to the different surfaces, bodies and modules; in geometry.rep, these
elements are numbered in strictly increasing order. It is important to bear in mind that
pengeom uses this sequential labelling internally to identify bodies and surfaces. When
the input definition file contains CLONE or INCLUDE blocks, the output file geometry.rep
provides a complete definition of the geometry, with the elements of cloned and included
structures inserted and numbered sequentially with the internal labels. This file can be
renamed and used as the definition file (the name geometry.rep cannot be used for a
geometry definition file, because subroutine GEOMIN assigns it to an output file); then,
the definition files of the included structures are no longer needed.
END 0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( ) reduced form
INDICES=( 1, 1, 1, 1, 1)
X-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
281
NEA/NSC/DOC(2015)3
Y-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
Z-SCALE=(+1.000000000000000E+00, 0) (DEFAULT=1.0)
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) RAD (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( ) implicit form
INDICES=( 0, 0, 0, 0, 0)
AXX=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
AXY=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
AXZ=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
AYY=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
AYZ=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
AZZ=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
AX=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
AY=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
AZ=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
A0=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) RAD (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
BODY ( ) text
MATERIAL( )
SURFACE ( ), SIDE POINTER=( 1)
BODY ( )
MODULE ( )
0000000000000000000000000000000000000000000000000000000000000000
MODULE ( ) text
MATERIAL( )
SURFACE ( ), SIDE POINTER=( 1)
BODY ( )
MODULE ( )
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) RAD (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
CLONE ( ) copies one module and moves it
MODULE ( ) original module
1111111111111111111111111111111111111111111111111111111111111111
OMEGA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
THETA=(+0.000000000000000E+00, 0) DEG (DEFAULT=0.0)
PHI=(+0.000000000000000E+00, 0) RAD (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
282
NEA/NSC/DOC(2015)3
Y-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00, 0) (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
INCLUDE
FILE=(filename.ext)
0000000000000000000000000000000000000000000000000000000000000000
To generate a new element, we just duplicate the corresponding data set, modify the
parameter values and eliminate the lines that are unnecessary (i.e., those of parameters
that take their default values). Of course, the defining data set must be placed before
the end-line. The progressing geometry can be visualised with gview2d as soon as
the first complete body or module has been defined. If gview2d stops before entering
the graphics mode, the geometry definition is incorrect and we should have a look at
the geometry.rep file to identify the problem. Normally, the conflicting parameter or
element appears in the last line of this file, together with an error message issued by the
program.
The basic elements of the geometry definition are quadric surfaces. These can be
visualised by using the following file, which defines the inner volume of a reduced quadric
as a single body,
----------------------------------------------------------------
Visualisation of reduced quadric surfaces.
Define the desired quadric (surface 1) by entering its indices.
The region with side pointer -1 (inside the quadric) corresponds
to MATERIAL=1.
0000000000000000000000000000000000000000000000000000000000000000
SURFACE ( 1) Reduced quadric
INDICES=( 1, 1,-1, 0, 1)
0000000000000000000000000000000000000000000000000000000000000000
BODY ( 1) The interior of the quadric
MATERIAL( 1)
SURFACE ( 1), SIDE POINTER=(-1)
0000000000000000000000000000000000000000000000000000000000000000
END 0000000000000000000000000000000000000000000000000000000
The definition files example1 and example2 shown in Tables 6.4 and 6.5 correspond
to the geometries displayed in Figs. 6.3 and 6.8, respectively. The file example2 illus-
trates the use of the INCLUDE* and CLONE operations. Of course, this simple geometry
can be defined in a less intricate way; the definition adopted in example2 is intended to
show that 1) elements defined within included starred files may also be referred to by
means of their original user labels and 2) the transformation of a module also transforms
its limiting surfaces and submodules. We have also enclosed the entire system in a single
module so that you may rotate and/or displace it arbitrarily by editing the definition
file.
Writing a geometry file is nothing more than routine work. After a little practice,
you can define quite complex systems by using only surfaces and bodies. You will soon
realise that the visualisation programs (as well as the actual simulations!) slow down
283
NEA/NSC/DOC(2015)3
when the number of elements in the geometry increases. The only way of speeding up
the programs is to group the bodies into modules. The best strategy for improving the
calculation speed is to build relatively simple modules and combine them into larger
parent modules to obtain a genealogical tree where the number of daughters of each
module is small.
You may save a lot of time by defining each body separately (and checking it care-
fully) and then inserting it into the progressing module that, once finished, will be added
to the file. Notice that the input element labels are arbitrary (as long as they are not
repeated for elements of the same kind) and that we can insert new elements anywhere
in the file, either manually or using the INCLUDE operation. Once the geometry defini-
tion file is complete, we can obtain an equivalent file, with elements labelled according
to the internal sequential order, by running one of the viewer programs and re-naming
the geometry.rep file.
The geometry files example1 and example2, together with several other files of more
complex geometries, are included in the distribution package. They can be directly
visualised by running gview2d and gview3d. The file well defines a scintillation well
detector in great detail; we have defined the system as a module, so that you can rotate
the entire detector by editing the definition file. Notice that, when the detector is tilted,
it is very difficult to get an idea of its geometry from the images generated by gview2d;
this is the reason why the two-dimensional viewer displays only sections of the geometry
on planes that are perpendicular to the coordinate axes. The file saturne describes the
head of a medical accelerator, quite a complicated geometry with 96 surfaces and 44
bodies. The structure phantom, which corresponds to a mathematical anthropomorphic
phantom, consists of 264 surfaces and 169 bodies and modules (Cristy and Eckerman,
1987; Almansa et al., 2014). The file axes defines three cylinders along the axes of
the reference frame. This file can be visualised with gview3d to study the effect of
rotations; notice that the first image generated by gview3d displays the position and
orientation of the reference frame. The file onion defines a set of concentric spherical
shells with radii ranging from 10−9 to 10; this file is useful to demonstrate the robustness
and the actual spatial resolution of our tracking algorithm.
The files glass (a champagne glass) and chair (a chair) show that common objects
can be described quite precisely with only quadric surfaces; in simple cases, such as
glass, we do not need to use modules, which are useful only to accelerate the calcu-
lations, or to allow cloning. The files chair2, and chair32 illustrate the use of the
CLONE operation. The latter describes a small auditorium with 32 chairs and provides
an example of optimally ramified tree.
We cannot finish without a word of caution about the use of pengeom, and other
general-purpose geometry packages. For simple geometries, they tend to waste a lot of
time. It is always advisable to consider the possibility of handling geometric features
directly; this may enable a substantial reduction of the number of operations by taking
full advantage of the symmetries and other peculiarities of the material system.
284
NEA/NSC/DOC(2015)3
Chapter 7
In this Chapter we describe the structure of the penelope code system and its oper-
ation. The kernel of the system is the Fortran subroutine package penelope, which
performs “analogue” simulation of electron-photon showers (i.e., the simulated showers
are intended to be replicas of actual showers) in infinite (unbounded) media of various
compositions. In the following, particles emitted from the source will be referred to as
primary particles. Typically, each shower is initiated by a single primary particle.
Photon histories are generated by using the detailed simulation method (see Section
1.4), i.e., all interaction events are simulated in chronological succession. The genera-
tion of electron and positron tracks is performed by using the mixed procedure described
in Chapter 4. Secondary particles emitted with initial energy larger than the absorp-
tion energy –see below– are stored, and simulated after completion of each primary
track. Secondary particles are produced in direct interactions (hard inelastic collisions,
hard bremsstrahlung emission, positron annihilation, photoelectric absorption, Compton
scattering and pair production) and as fluorescent radiation (characteristic x rays and
Auger electrons). In Rayleigh scattering and Compton scattering, the incident photon
is absorbed and the scattered photon is considered as a secondary particle. penelope
simulates fluorescent radiation that results from vacancies produced in inner shells1 by
photoelectric absorption and Compton scattering of photons, by triplet production and
by electron/positron impact ionisation. Relaxation of these vacancies is followed until
all inner shells are filled up, i.e., until the vacancies have migrated to outer shells.
As it is a subroutine package, penelope cannot operate by itself. The user must
provide a steering main program for his or her particular problem. Nevertheless, this
main program is normally fairly simple because it only has to control the evolution of
the tracks generated by penelope and keep score of relevant quantities. penelope has
been devised to do the largest part of the simulation work. It allows the user to write his
1
Inner shells are K, L, M and N shells that have ionisation energies larger than the cutoff energy Ec
given by Eq. (2.111). Shells with ionisation energies less than Ec are considered as outer shells.
285
NEA/NSC/DOC(2015)3
or her own simulation program, with arbitrary geometry and scoring, without previous
knowledge of the intricate theoretical aspects of scattering and transport theories. In
the case of material systems with quadric geometries, the geometrical operations can be
done automatically by using the package pengeom (see Chapter 6). The distribution
package also includes examples of main programs for cylindrical geometries and for
general quadric geometries. Although these main programs are mostly intended to
illustrate the use of the simulation routines, they do allow the study of many cases of
practical interest. The program system is written mostly in Fortran 77 format, but uses
modules and a few other features of Fortran 90. Therefore, the programs should run on
any platform with a Fortran 90 or later compiler.
7.1 penelope
penelope simulates coupled electron-photon transport in arbitrary material systems
consisting of a number of homogeneous regions (bodies) limited by sharp (and passive)
interfaces. Initially, it was devised to simulate the PENetration and Energy LOss of
Positrons and Electrons in matter; photons were introduced later. The adopted inter-
action models (Chapters 2 to 4), and the associated databases, allow the simulation of
electron/positron and photon transport in the energy range from 50 eV to 1 GeV.
It should be borne in mind that our approximate interaction models become less
accurate when the energy of the transported radiation decreases. Actually, for energies
below ∼ 1 keV, the DCSs are not well known, mostly because they are strongly affected
by the state of aggregation (i.e., by the environment of the target atom). On the
other hand, for electrons and positrons, the trajectory picture ceases to be applicable
(because coherent scattering from multiple centres becomes appreciable) when the de
Broglie wavelength, λB = (150 eV/E)1/2 Å, is similar to or greater than the interatomic
spacing (∼ 2 Å). Therefore, results from simulations with penelope (or with any other
Monte Carlo trajectory code) for energies below 1 keV or so, should be considered to
have only a qualitative (or, at most, semi-quantitative) value. We recall also that, for
elements with intermediate and high atomic numbers, secondary characteristic photons
with energies less than the cutoff energy Ec , Eq. (2.111), are not simulated by penelope.
This sets a lower limit to the energy range for which the simulation is faithful.
The source file penelope.f (about 12,500 lines of Fortran source code) consists of
four blocks of subprograms, namely, preparatory calculations and I/O routines, interac-
tion simulation procedures, numerical routines and transport routines. Only the latter
are invoked from the main program. The interaction simulation routines implement the
theory and algorithms described in Chapters 2 and 3. Although the interaction routines
are not called from the main program, there are good reasons to have them properly
identified. Firstly, these are the code pieces to be modified to incorporate better physics
(when available) and, secondly, some of these subroutines deliver numerical values of the
DCSs (which can be useful to apply certain variance-reduction techniques). In order to
organise these subroutines, we have named them according to the following convention:
286
NEA/NSC/DOC(2015)3
• The first letter indicates the particle (E for electrons, P for positrons, G for photons).
• The second and third letters denote the interaction mechanism (EL for elastic, IN for
inelastic, BR for bremsstrahlung, AN for annihilation, PH for photoelectric absorption, RA
for Rayleigh, CO for Compton, and PP for pair production).
• The fourth (lowercase) letter indicates the theoretical model used to describe the in-
teractions. This serves to distinguish the default model (denoted by the letter “a”) from
alternative models.
• The random sampling routines have four-letter names. Auxiliary routines, which
perform specific calculations, have longer names, with the fifth and subsequent letters
and/or numbers indicating the kind of calculation (T for total cross section, D for DCS)
or action (W for write data on a file, R for read data from a file, I for initialisation of
simulation algorithm).
Thus, for instance, subroutine EELa simulates elastic collisions of electrons while subrou-
tine EINaT computes total (integrated) cross sections for inelastic scattering of electrons.
Subroutine EELd describes electron elastic collisions by using the numerical DCSs from
the elsepa database (see Chapter 3).
287
NEA/NSC/DOC(2015)3
Table 7.1: List of the 280 pre-defined materials included in the pdcompos.p08 file, with their
identifying numbers (adapted from Berger, 1992).
288
NEA/NSC/DOC(2015)3
289
NEA/NSC/DOC(2015)3
290
NEA/NSC/DOC(2015)3
226 Polypropylene
227 Polystyrene
228 Polytetrafluoroethylene (teflon)
229 Polytrifluorochloroethylene
230 Polyvinyl acetate
231 Polyvinyl alcohol
232 Polyvinyl butyral
233 Polyvinyl chloride
234 Polyvinylidene chloride (saran)
235 Polyvinylidene fluoride
236 Polyvinyl pyrrolidone
237 Potassium iodide
238 Potassium oxide
239 Propane
240 Propane, liquid
241 N-propyl alcohol
242 Pyridine
243 Rubber, butyl
244 Rubber, natural
245 Rubber, neoprene
246 Silicon dioxide
247 Silver bromide
248 Silver chloride
249 Silver halides in photographic emulsion
250 Silver iodide
251 Skin (ICRP)
252 Sodium carbonate
253 Sodium iodide
254 Sodium monoxide
255 Sodium nitrate
256 Stilbene
257 Sucrose
258 Terphenyl
259 Testes (ICRP)
260 Tetrachloroethylene
261 Thallium chloride
262 Tissue, soft (ICRP)
263 Tissue, soft (ICRU four-component)
264 Tissue-equivalent gas (methane based)
265 Tissue-equivalent gas (propane based)
266 Tissue-equivalent plastic (A-150)
267 Titanium dioxide
268 Toluene
269 Trichloroethylene
270 Triethyl phosphate
271 Tungsten hexafluoride
272 Uranium dicarbide
273 Uranium monocarbide
274 Uranium oxide
275 Urea
276 Valine
277 Viton fluoroelastomer
278 Water, liquid
279 Water vapour
280 Xylene
291
NEA/NSC/DOC(2015)3
pdcompos.pen . . . This file contains composition data, mass densities and mean
excitation energies for 280 materials, adapted from the database of the estar
program of Berger (1992). The list of materials is given in Table 7.1. The first 99
entries are the elements Z = 1 − 99, ordered by atomic number Z. Materials 100
to 280 are compounds and mixtures, in alphabetical order. Notice that penelope
does not work for elements with atomic number Z > 99. Gases are characterised
by assuming a pressure of 1 atm and a temperature of 20 ◦ C.
material-list.txt . . . List of materials predefined in file pdcompos.pen, with
their identification numbers (same information as in Table 7.1 above).
pdrelax.p11 . . . Relaxation data for singly-ionised atoms with a vacancy in a K, L,
M, or N shell. Each line in this file describes an atomic transition. The quantities
listed are the atomic number of the element, the numerical labels of the active
electron shells (see Table 7.2), the transition probability and the energy of the
emitted x ray or electron, respectively. Transition probabilities and energies were
extracted from the LLNL Evaluated Atomic Data Library (Perkins et al., 1991).
As the energies given in this database are roughly approximate, they were replaced
by more accurate values, when available. Energies of x rays from K- and L-
shell transitions were taken from the recent compilation of Deslattes et al. (2003).
The energies of characteristic M lines are from Bearden’s (1967) review. Other
transition energies are calculated from the energy eigenvalues of the Dirac-Hartree-
Fock-Slater equations for neutral atoms (Perkins et al., 1991).
Table 7.2: Numerical labels used to designate atomic electron shells. In the case of non-
radiative transitions, the label 30 indicates outer shells with small ionisation energies.
99 files named pdeelZZ.p08 with ZZ=atomic number (01–99). These files contain
integrated cross sections for elastic scattering of electrons and positrons by neu-
292
NEA/NSC/DOC(2015)3
tral atoms, calculated by using the partial-wave methods described in Section 3.1
(Salvat et al., 2005). The first line in each file gives the atomic number ZZ; each
subsequent line has 7 columns with the following data:
1st column: kinetic energy (eV), in increasing order.
2nd column: total cross section for electrons.
3rd column: first transport cross section for electrons.
4th column: second transport cross section for electrons.
5th column: total cross section for positrons.
6th column: first transport cross section for positrons.
7th column: second transport cross section for positrons.
The grid of energies is approximately logarithmic, with 15 points per decade, and
is the same for all elements. All cross sections are in cm2 .
99 files named eeldxZZZ.p08 with ZZZ=atomic number (001–099). Tables of differ-
ential cross sections, and integrated cross sections, for elastic scattering of electrons
by free neutral atoms. These files are part of the elsepa database (see Section
3.1) which covers the energy interval from 50 eV to 100 MeV. All cross sections
are in cm2 .
99 files named peldxZZZ.p08 with ZZZ=atomic number (001–099). Tables of dif-
ferential cross sections, and integrated cross sections, for elastic scattering of
positrons by free neutral atoms. These files are part of the elsepa database
(see Section 3.1), and they cover the energy interval from 50 eV to 100 MeV. All
cross sections are in cm2 .
The elsepa database is distributed with the ICRU Report 77 (2007).
99 files named pdebrZZ.p08 with ZZ=atomic number (01–99). They contain the
atomic bremsstrahlung scaled cross sections (energy-loss spectra) and total inte-
grated radiative cross sections of electrons, for a grid of electron kinetic energies
E, from 1 keV to 10 GeV, and 32 reduced photon energies W/E, the same for ell
elements and energies. This grid is dense enough to allow the use of cubic spline
log-log interpolation in E and linear interpolation in W/E. The data in these files
is from a database which was provided to the authors by Steve Seltzer (a brief
description of the methods used to compute the database and a reduced tabulation
is given in Seltzer and Berger, 1986). The format of the bremsstrahlung database
files is the following,
1) The first line contains the atomic number ZZ.
2) Each four-line block contains the electron kinetic energy E, the scaled energy-
loss differential cross section at the 32 fixed reduced photon energies, and the value
of the integrated radiative cross section.
Energies are in eV and the values of the scaled energy-loss cross section are in
millibarn (10−27 cm2 ).
pdbrang.p08 . . . Gives the parameters of the analytical shape function (angular
distribution) of bremsstrahlung photons, which is expressed as a statistical mix-
ture of two Lorentz-boosted dipole distributions, Eq. (3.175). The distribution
293
NEA/NSC/DOC(2015)3
294
NEA/NSC/DOC(2015)3
The grid of energies for each element was obtained by merging a generic grid (the
same for all elements, covering the energy range from 50 eV to 1 GeV) with the grid
of absorption edges of the element, and adding additional points (where needed) in
order to ensure that linear log-log interpolation will not introduce relative errors
larger than about 0.001.
99 files named pdesiZZ.p14 with ZZ=atomic number (01–99), containing total (in-
tegrated) cross sections for ionisation of inner shells (K shell, L, M and N subshells
with binding energies larger than 50 eV) by impact of electrons with kinetic en-
ergies in the range from 50 eV to 1 GeV. These cross sections were calculated
numerically using a combination of the distorted-wave and plane-wave Born ap-
proximations (Bote and Salvat, 2008). The format of the files is the following:
1) The first line gives the atomic number ZZ, the number of grid energies NGE, and
the number NS of shells for which the partial cross sections are tabulated.
2) The second and third lines list the shell number codes and the ionisation ener-
gies (in eV), respectively.
3) Each of the following lines contains a value of the kinetic energy of the projec-
tile (in eV) and the corresponding ionisation cross sections (in cm2 ) of the shells
K, L1 to L3, M1 to M5, and N1 to N7, respectively (all cross sections in barn).
For low-Z elements, L, M and N subshells are empty and, therefore, they do not
appear in the table.
99 files named pdpsiZZ.p14 with ZZ=atomic number (01–99), containing total (in-
tegrated) cross sections for ionisation of inner shells (K shell, L, M and N subshells)
by impact of positrons with kinetic energies in the range from 50 eV to 1 GeV.
These cross sections were calculated numerically by Bote and Salvat (2008) using
a combination of the distorted-wave and plane-wave Born approximations. The
format of the files is the same as that of the pdesiZZ.p14 files.
Atomic cross sections for incoherent scattering of photons, inelastic scattering of elec-
trons and positrons, and positron annihilation are evaluated directly from the analytical
DCSs described in Chapters 2 and 3.
In the material definition file generated by the program material, mean free paths,
transport mean free paths and stopping powers of electrons and positrons are given
in mass-thickness units (1 mtu ≡ 1 g/cm2 ) and eV/mtu, respectively. Photon mass
attenuation coefficients are expressed in cm2 /g. These quantities are practically inde-
pendent of the material density; the only exception is the collision stopping power for
electrons and positrons with kinetic energies larger than about 0.5 MeV, for which the
density-effect correction may be appreciable.
The energy-dependent quantities tabulated in the input material data file determine
the most relevant characteristics of the scattering model. For instance, the modified
Wentzel DCS for electron and positron elastic scattering is completely defined by the
mean free paths and transport mean free paths (see Section 3.1.2). Collision and ra-
diative stopping powers read from the input file are used to renormalise the built-in
295
NEA/NSC/DOC(2015)3
296
NEA/NSC/DOC(2015)3
• ILB(5) : an auxiliary array of 5 labels that describe the origin of secondary particles
(see Table 7.6 below). It is useful, e.g., to study partial contributions from particles
originated by a given process.
• IPOL, SP1, SP2, SP3 : Photon polarisation flag, and Stokes parameters.
• LPAGE, PAGE : Age flag and current value of the particle age.
Table 7.3: Source listing of the Fortran module TRACK mod. This module contains particle
state variables and geometry location parameters.
MODULE TRACK_mod
C
C **** Particle TRACK variables (to be initialised before calling
C subroutine START).
SAVE ! Saves all items in the module.
C
C ---- Energy, position, direction, and weight.
DOUBLE PRECISION :: E,X,Y,Z,U,V,W,WGHT
C ---- Particle type, current body, and material.
INTEGER*4 :: KPAR,IBODY,MAT
C ---- Particle history flags.
INTEGER*4, DIMENSION (5) :: ILB
C
C **** Photon polarisation.
C ---- Polarised photons if IPOL=1, otherwise unpolarised photons.
INTEGER*4 :: IPOL=0
C ---- Stokes parameters.
DOUBLE PRECISION :: SP1,SP2,SP3
C
C **** The particle age (time elapsed since the start of the shower)
C is recorded when LAGE=.TRUE.
LOGICAL :: LAGE =.FALSE.
DOUBLE PRECISION :: PAGE=0.0D0
C
END MODULE TRACK_mod
The position coordinates r =(X,Y,Z) and the direction cosines d̂ =(U,V,W) of the direc-
tion of movement are referred to a fixed rectangular coordinate system, the “laboratory”
system, which can be arbitrarily defined.
N.B.: During the simulation, all energies and lengths are expressed in eV and cm,
respectively.
297
NEA/NSC/DOC(2015)3
MODULE PENELOPE_mod
SAVE ! Saves all items in the module.
C
C **** Maximum number of materials in the geometry.
C
INTEGER*4, PARAMETER :: MAXMAT=10
C
C **** Simulation parameters (must be defined before calling the
C initialisation subroutine PEINIT).
C
C ---- Absorption energies, EABS(KPAR,MAT).
DOUBLE PRECISION, DIMENSION (3,MAXMAT) :: EABS=50.0D0
C ---- Electron/positron transport parameters.
DOUBLE PRECISION, DIMENSION (MAXMAT) :: C1=0.01D0,C2=0.01D0
DOUBLE PRECISION, DIMENSION (MAXMAT) :: WCC=1.0D2,WCR=1.0D2
C
C **** Size of the secondary stack (maximum number of particles that
C can be stored).
INTEGER*4, PARAMETER :: NMS=1000
C
C **** Energy interpolation, number of grid points.
INTEGER*4, PARAMETER :: NEGP=200
C
C **** Global information on the material system (defined by
C subroutine PEINIT).
C ---- Number of materials present.
INTEGER*4 :: NMAT
C ---- Material densities and its reciprocals.
DOUBLE PRECISION, DIMENSION (MAXMAT) :: DEN=1.0D0, RDEN=1.0D0
C
C **** Random-hinge slowing-down parameters (output from subroutines
C JUMP and KNOCK).
C E0STEP ... energy at the beginning of the segment,
C DESOFT ... energy loss along the step,
C SSOFT .... effective stopping power, = DESOFT/step_length.
DOUBLE PRECISION :: E0STEP,DESOFT,SSOFT
C
END MODULE PENELOPE_mod
example programs pencyl and penmain (see Section 7.2), we assume that secondary
photons are initially unpolarised. The simulation of polarised photons is controlled
through the variables IPOL and (SP1,SP2,SP3) in module TRACK mod. The simulation of
photon polarisation effects is activated by setting IPOL=1. The quantities SP1, SP2 and
SP3 are the Stokes parameters of the photon. These parameters must be defined before
starting the simulation of each photon; they are modified internally by the penelope
subroutines.
The age of particles is defined as the time elapsed since the emission of the primary
particle that started the shower. On-the-fly calculation of particle ages is activated by
setting LAGE=.TRUE. in the main program. The variable PAGE must be set equal to
zero when a primary is started, and its value must be updated after each segment of a
298
NEA/NSC/DOC(2015)3
particle’s trajectory (by adding the time spent in travelling that segment). Notice that,
because segment lengths may be altered by the geometry routines, the age increments
must be calculated in the main program. Secondary particles resulting directly from
interactions are assigned initial ages equal to that of the parent particle. The ages of x
rays and Auger electrons are defined by subroutine RELAX, which adds a random delay
(corresponding to the finite lifetimes of atomic levels) to the age of the parent particle
that produced the ionisation.
The Fortran module PENELOPE mod, Table 7.4, contains array dimensions, simula-
tion parameters, material densities, and variables defining the slowing-down of charged
particles. The following array dimensions determine the amount of memory used by the
program:
• MAXMAT : Maximum number of materials in the geometry.
• NMS : Size of the secondary stack, maximum number of particles that can be stored.
• NEGP : Number of data points in the tables of energy-dependent quantities.
These dimensions can be changed by editing the penelope.f source file, if necessary.
The number NEGP of energy grid points is large enough to make sure that interpolation
errors are not larger than the global uncertainties of the cross sections. Increasing the
stack size NMS is not recommended. Stack overflows that may occur with the variance
reduction technique of interaction forcing (Section 1.6.1) are usually due to excessively
high (and ineffective!) forcing factors.
We recall that the label KPAR in module TRACK mod identifies the type of particle:
KPAR=1, electron; KPAR=2, photon; KPAR=3, positron. A particle that moves in material
M is assumed to be absorbed when its energy becomes less than a value EABS(KPAR,M)
(in eV) specified by the user. Positrons are assumed to annihilate, by emission of two
photons, when absorbed. In absorbed dose calculations, EABS(KPAR,M) should be de-
termined so that the residual range of particles with this energy is smaller than the
dimensions of the volume bins used to tally the spatial dose distribution. As the inter-
action database is limited to energies above 50 eV, absorption energies EABS(KPAR,M)
must be larger than this value.
The transport algorithm for electrons and positrons in each material M is controlled
by the following simulation parameters:
• C1(M) : Average angular deflection, C1 ' 1 − hcos θi [Eq. (4.11)], produced by multiple
elastic scattering along a path length equal to the mean free path between consecutive
hard elastic events. A value of about 0.05 is usually adequate. The maximum allowed
value of C1(M) is 0.2.
• C2(M) : Maximum average fractional energy loss, C2 [Eq. (4.85)], between consecutive
hard elastic events. Usually, a value of about 0.05 is adequate. The maximum allowed
value of C2(M) is 0.2.
• WCC(M) : Cutoff energy loss, Wcc (in eV), for hard inelastic collisions.
• WCR(M) : Cutoff energy loss, Wcr (in eV), for hard bremsstrahlung emission.
These parameters determine the accuracy and speed of the simulation. To ensure accu-
299
NEA/NSC/DOC(2015)3
racy, C1(M) and C2(M) should have small values (∼ 0.01). With larger values of C1(M)
and C2(M) the simulation becomes faster, at the expense of a certain loss in accuracy.
The cutoff energies WCC(M) and WCR(M) mainly influence the simulated energy distribu-
tions. The simulation speeds up by using larger cutoff energies, but if these are too large,
the simulated energy distributions may be somewhat distorted. In practice, simulated
energy distributions are found to be insensitive to the adopted values of WCC(M) and
WCR(M) when these are less than the bin width used to tally the energy distributions.
Thus, the desired energy resolution determines the maximum allowed cutoff energies.
The reliability of the whole simulation rests on a single condition: the number of steps
(or random hinges) per primary track must be “statistically sufficient”, i.e., larger than
10 or so.
Other quantities in module PENELOPE mod are:
• NMAT : Number of different materials that have been loaded (output of subroutine
PEINIT, see below).
• DEN(M), RDEN(M) : Mass density of material M, and its reciprocal (output of subroutine
PEINIT). Used to evaluate absorbed doses in homogeneous materials.
• E0STEP, SSOFT, DESOFT : Characteristics of the slowing-down of charged particles in
class II simulation (see Section 4.3.3), delivered as part of the output of subroutine JUMP
(see below). E0STEP is the energy of the particle at the beginning of the track segment,
SSOFT is the effective stopping power of soft energy-loss interactions, and DESOFT is the
energy lost along the step, assuming that the particle flies the whole length of the step.
The simulation package is initialised from the main program with the statement
→ CALL PEINIT(EMAX,NMATER,IWR,INFO,PMFILE)
Subroutine PEINIT reads the data files of the different materials, evaluates relevant
scattering properties and prepares look-up tables of energy-dependent quantities that
are used during the simulation. Its input arguments are:
EMAX . . . Maximum energy (in eV) of the simulated particles. Notice that if the
primary particles are positrons with initial kinetic energy EP, the maximum energy
of annihilation photons may be close to (but less than) EMAX = 1.21(EP + me c2 );
in this special case, the maximum energy is larger than the initial kinetic energy.
NMATER . . . Number of different materials (less than or equal to MAXMAT). A material
can be loaded several times, e.g., to use different sets of simulation parameters in
different volumes.
IWR . . . Output unit.
INFO . . . Determines the amount of information that is written on the output unit.
Minimal for INFO≤1, and increasingly detailed for INFO=1, 2, and 3 (fully detailed
printout).
PMFILE . . . Array of 20-character strings and dimension MAXMAT. The first NMAT ele-
ments are the names of the material-data files. The file with the name PMFILE(M)
defines the material number M (the order of filenames in PMFILE is important!).
300
NEA/NSC/DOC(2015)3
For the preliminary computations, PEINIT needs to know the particle absorption energies
EABS(KPAR,M) and the simulation parameters C1(M), C2(M), WCC(M) and WCR(M) for the
various materials. These variables have to be loaded before invoking subroutine PEINIT.
Notice that we can employ different values of the simulation parameters for different
materials. This possibility can be used to speed up the simulation in regions of lesser
interest.
penelope has been structured in such a way that a particle track is generated as
a sequence of track segments (free flights or “jumps”); at the end of each segment,
the particle suffers an interaction with the medium (a “knock”) where it loses energy,
changes its direction of movement and, in certain cases, produces secondary particles.
Electron-photon showers are simulated by successively calling the following subroutines:
SUBROUTINE CLEANS . . . Initiates the secondary stack, where initial states of sec-
ondary particles are stored.
SUBROUTINE START . . . For electrons and positrons, this subroutine forces the follow-
ing interaction event to be a soft artificial one. It must be called before starting a
new –primary or secondary– track and also when a track crosses an interface.
Calling START is strictly necessary only for electrons and positrons; for photons
this subroutine has no physical effect. However, it is advisable to call START for
any type of particle because it checks whether the energy is within the expected
range, and can thus help to detect bugs in the main program.
SUBROUTINE JUMP(DSMAX,DS) . . . Determines the length DS of the track segment to
the following interaction event.
The input parameter DSMAX defines the maximum allowed step length for elec-
trons/positrons; for photons, it has no effect. As mentioned above, to limit the
step length, penelope places delta interactions along the particle track. These
are fictitious interactions that do not alter the physical state of the particle. Their
only effect is to interrupt the sequence of simulation operations (which requires
altering the values of inner control variables to permit resuming the simulation in
a consistent way). The combined effect of the soft interactions that occur along
the step preceding the delta interaction is simulated by the usual random-hinge
method; notice that each step between hard interactions consists of two track seg-
ments.
To ensure the reliability of the mixed simulation algorithm, the number of arti-
ficial soft events per particle track in each body should be larger than, say, 10.
For relatively thick bodies (say, thicker than 10 times the mean free path between
hard interactions), this condition is automatically satisfied. In this case we can
switch off the step-length control by setting DSMAX=1.0D35 (or any other very
large value). On the other hand, when the particle moves in a thin body, DSMAX
should be given a value of the order of one tenth of the “thickness” of that body.
Limiting the step length is also necessary to simulate particle transport in external
electromagnetic fields.
In the case of electrons/positrons, subroutine JUMP delivers information on the
301
NEA/NSC/DOC(2015)3
energy-loss due to soft interactions along the step through the variables E0STEP,
DESOFT, and SSOFT in module PENELOPE mod. Their respective output values are
the energy E of the particle at the beginning of the track segment, the sampled
soft energy loss ω along the step, and the effective soft stopping power, Ssoft . This
information allows estimation of the energy loss in track segments that are trun-
cated at an interface, and the time spent by the particle in travelling each segment
(see Section 4.3.3).
SUBROUTINE SECPAR(LEFT) . . . Sets the initial state of a secondary particle and re-
moves it from the secondary stack. The output value LEFT is the number of
secondary particles that remained in the stack at the calling time.
As mentioned above, ILB(5) is an array of labels that describe the origin of secondary
particles. The possible values and meanings of these labels are described in Table 7.6.
It is assumed that the user has set ILB(1) equal to 1 (one) when a primary (source)
302
NEA/NSC/DOC(2015)3
Table 7.5: Code number (ICOL) for the various interaction events.
ILB(1) generation of the particle; 1 for primary particles, 2 for their direct de-
scendants, etc. Primary (source) particles are assumed to be labelled
with ILB(1)=1 in the main program.
ILB(2) type KPAR of parent particle, only if ILB(1)>1 (secondary particles and
“scattered” photons).
ILB(3) interaction mechanism ICOL (see Table 7.5) that originated the particle,
only when ILB(1)>1.
ILB(4) a non-zero value identifies particles emitted from atomic relaxation events
and describes the atomic transition where the particle was released. The
numerical value is = Z · 106 + IS1 · 104 + IS2 · 100 + IS3, where Z is the
atomic number of the emitting atom and IS1, IS2 and IS3 are the labels
of the active atomic electron shells (see Table 7.2).
For instance, ILB(4) = 29010300 designates a K-L2 x ray from copper
(Z = 29), and ILB(4) = 29010304 indicates a K-L2-L3 Auger electron
from the same element.
ILB(5) this label can be defined by the user; it is transferred to all descendants
of the particle.
303
NEA/NSC/DOC(2015)3
particle history is initiated. penelope then assigns appropriate labels to each particle in
the induced shower. The ILB label values are delivered by subroutine SECPAR, through
the module TRACK mod, and remain unaltered during the simulation of the particle
track. However, photons are considered as quanta, that is, in the cases of Rayleigh and
Compton scattering the incident photon is absorbed and a new, “scattered” photon is
emitted. The latter is regarded as a descendant of the former; if ILB(1) represents the
generation of the incident photon, the generation of the scattered photon is ILB(1)+1.
To avoid unnecessary manipulations, after a scattering event the scattered photon is
tracked automatically, so that a photon history may represent the evolution of several
photons belonging to different generations.
For simplicity, in the present Section we assume that the energy loss of electrons
and positrons resulting from soft events is deposited at the hinge. The sequence of calls
to generate a random track is then independent of the type of particle that is being
simulated. The generation of random showers proceeds as follows (see Fig. 7.1):
(i) Set the initial state of the primary particle, i.e., assign values to the state variables:
type of particle KPAR, energy E, position coordinates r =(X,Y,Z) and direction of
movement d̂ =(U,V,W). Specify the body and material where the particle moves
by defining the values of IBODY and MAT, respectively. Set WGHT=1 and ILB(1)=1.
When the primary particle is a photon and the simulation of polarised photons is
activated (IPOL=1), specify the Stokes parameters SP1, SP2 and SP3.
(iv) CALL JUMP(DSMAX,DS) to determine the length DS of the next track segment (for
electrons and positrons, DS will never exceed the input value DSMAX).
(vii) CALL SECPAR(LEFT) to start the track of a particle in the secondary stack (this
particle is then automatically removed from the stack).
304
NEA/NSC/DOC(2015)3
• If LEFT>0, go to step (iii). The initial state of a secondary particle has already
been set.
• If LEFT=0, simulation of the shower produced by the primary particle has
been completed. Go to step (i) to generate a new primary particle (or leave
the simulation loop after simulating a sufficiently large number of showers).
Quantities of interest must be tallied by the main program, immediately after the oc-
currence of relevant events. The required information is delivered by the simulation
routines, either as output arguments or through the variables in modules TRACK mod
and PENELOPE mod.
Notice that subroutines JUMP and KNOCK keep the position coordinates unaltered;
the positions of successive events have to be followed by the main program (simply
by performing a displacement of length DS along the direction of movement after each
call to JUMP). The energy of the particle is automatically reduced by subroutine KNOCK,
after generating the energy loss from the relevant probability distribution. KNOCK also
modifies the direction of movement according to the scattering angles of the simulated
event. Thus, at the output of KNOCK, the values of the energy E, the position r =(X,Y,Z)
and the direction of movement d̂ =(U,V,W) define the particle state immediately after
the interaction event.
The subroutine package pengeom (see Chapter 6) can be used to handle arbitrary
quadric geometries. The flow diagram of a main program for penelope and pengeom
is shown in Fig. 7.2. As pengeom performs all geometrical operations automatically,
the structure of the main program is relatively simple (cf. Figs. 7.1 and 7.2).
In order to avoid problems arising from possible overflows of the secondary stack,
when a secondary particle is produced its energy is temporarily assumed as locally de-
posited. Hence, the energy E of a secondary must be subtracted from the corresponding
dose counter when the secondary track is started. Occasional overflows of the secondary
stack are remedied by eliminating the less energetic secondary electron or photon in the
stack (positrons are not eliminated since they will eventually produce quite energetic
annihilation radiation). As the main effect of secondary particles is to spread out the
energy deposited by the primary particle, the elimination of the less energetic secondary
electrons and photons should not invalidate local dose calculations.
It is the responsibility of the user to avoid calling subroutines JUMP and KNOCK with
energies outside the interval (EABS(KPAR,M),EMAX). This could cause improper interpo-
lation of the cross sections. The simulation is aborted (and an error message is printed
in unit 26) if the conditions EABS(KPAR)<E<EMAX are not satisfied when a primary or
secondary track is started (whenever subroutine START is called at the beginning of the
track).
Pseudo-random numbers uniformly distributed in the interval (0,1) are supplied by
function RAND(DUMMY), which implements a 32-bit generator due to L’Ecuyer (see Table
1.1). The seeds of the generator (two integers) are transferred from the main program
through the common block RSEED. The random-number generator can be changed by
305
NEA/NSC/DOC(2015)3
KPAR, E, r = (X,Y,Z), ^
d = (U,V,W) Initial state
WGHT, IBODY, MAT, ILB
CALL CLEANS
CALL START
CALL JUMP
yes
Does the track cross an interface?
r ← r + DS ^
d r ← r + DS ^
d
yes
Gone? CALL KNOCK
yes
Change to new body E<EABS?
CALL SECPAR(LEFT)
yes
LEFT>0?
yes
N<NTOT?
END
Figure 7.1: Flow diagram of the main program for simulating electron-photon showers with
penelope.
306
NEA/NSC/DOC(2015)3
KPAR, E, r = (X,Y,Z), ^
d = (U,V,W), Initial state
WGHT, ILB
CALL CLEANS
CALL START
CALL JUMP(DSMAX,DS)
CALL STEP(DS,DSEF,NCROSS)
yes NCROSS>0?
yes
MAT=0? CALL KNOCK(DE,ICOL)
yes
E<EABS?
CALL SECPAR(LEFT)
yes
LEFT>0?
yes
N<NTOT?
END
Figure 7.2: Flow diagram of the main program for simulating electron-photon showers in
quadric geometries with penelope and pengeom.
307
NEA/NSC/DOC(2015)3
merely replacing the FUNCTION RAND; the new one has to have a single dummy argument.
Some compilers incorporate an intrinsic random-number generator with the same name
(but with different argument lists). To avoid conflict, RAND should be declared as an
external function in all subprograms that call it.
Notice that
• In the simulation routines, real and integer variables are declared as DOUBLE PRECISION
and INTEGER*4, respectively. To prevent type mismatches, the statement
→ IMPLICIT DOUBLE PRECISION (A-H,O-Z), INTEGER*4 (I-N)
is used in all penelope routines and in the example main programs.
• The main program must include the following declarations:
→ USE PENELOPE mod
→ USE TRACK mod
→ COMMON/RSEED/ISEED1,ISEED2 ! Random-number generator seeds.
The source listing of the modules TRACK mod and PENELOPE mod is at the head of the
penelope.f file. This file must be compiled before any other program unit that uses
those modules.
• The subroutines in penelope and pengeom may print warning and error messages
in unit 26, which is also the default output unit in the example main programs pencyl
and penmain described in Section 7.2.
Owing to the long execution time, the code will usually be run in batch mode. It is
advisable to limit the simulation time rather than the number of tracks to be simulated
because the time required to follow each track is difficult to predict. To this end, one can
link a clock routine to the simulation code and stop the computation after exhausting the
allotted time; an example of a clock routine (which runs with any Fortran 95 compiler)
is included in the penelope distribution package.
The following Fortran listing illustrates the structure of a main program for simulation
with quadric geometries (similar to the example program penmain.f described in Section
7.2.2). For the sake of brevity, hereafter and in the programs we use the term “step”
to designate both steps and trajectory segments. The program layout follows the flux
diagram of Fig. 7.2. The simulation of interaction events is controlled by sequential calls
to subroutines START, JUMP and KNOCK. The simplicity of the geometry operations is
noteworthy: all operations are performed internally, and control from the main program
reduces to successive calls to subroutines LOCATE and STEP.
The comment lines beginning with “cu” indicate parts of the program that are spe-
cific to each experiment and have to be coded by the user. These include initialisation
of the random number generator, definition of the source characteristics (i.e., the spec-
308
NEA/NSC/DOC(2015)3
ification of initial states of primary particles) and scoring of relevant quantities and
distributions.
C...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
C PROGRAM MAIN
C
USE PENELOPE_mod ! I/O of PENELOPE
USE TRACK_mod ! Particle track variables
USE PENGEOM_mod ! I/O of the geometry routines
IMPLICIT DOUBLE PRECISION (A-H,O-Z), INTEGER*4 (I-N)
C
CHARACTER PMFILE(MAXMAT)*20 ! Material data files
DIMENSION PARINP(20),DSMAX(5000) ! Geometry parameters.
COMMON/RSEED/ISEED1,ISEED2 ! Random-number generator seeds.
C
cu << Define counter arrays and initialise them to zero
cu Set NTOT (total number of showers to be simulated) >>
C ************ Initialisation of PENELOPE and PENGEOM.
cu << Set the values of the simulation parameters in module PENELOPE_mod
cu and the seeds of the random-number generator in common RSEED >>
cu << Define EMAX (largest energy in the simulation) and NMAT (number
cu of materials in the geometrical structure) >>
PMFILE(1)=material_1.mat ! Material data files (input)
PMFILE(2)=material_2.mat ! etc.
INFO=3 ! Print detailed information on the transport models
OPEN (UNIT=16) ! Output file
CALL PEINIT(EMAX,NMAT,16,INFO,PMFILE) ! Initialises PENELOPE
CLOSE(UNIT=16)
C
NPINP=0 ! All geometry parameters are defined from the input file
OPEN(UNIT=17,FILE=’my-geometry.geo’) ! Geometry definition file
OPEN(UNIT=18,FILE=geometry.rep) ! Geometry report
CALL GEOMIN(PARINP,NPINP,NMATG,NBOD,17,18) ! Initialises PENGEOM
CLOSE(UNIT=17)
CLOSE(UNIT=18)
IF(NMATG.GT.NMAT) STOP ! The geometry contains too many materials
cu << Define DSMAX(IBODY) for all bodies >>
C
C ************ Simulation.
cu << Initialise global counters >>
N=0
C
C ++++++++++++++++++++++++ Generate a new shower
10 N=N+1 ! New shower
309
NEA/NSC/DOC(2015)3
cu << Set the initial state variables of the primary particle, possibly
cu by random sampling from the source distribution. Define _ALL_ the
cu parameters in module TRACK_mod >>
C **** Check if the trajectory intersects the material system
CALL LOCATE ! Determines the body where the particle moves
IF(MAT.EQ.0) THEN ! The particle is outside all material bodies
CALL STEP(1.0D30,DSEF,NCROSS) ! Move the particle ahead
IF(MAT.EQ.0) THEN ! The particle does not enter the system
GOTO 10 ! Exit
ENDIF
ENDIF
CALL CLEANS ! Cleans the secondary stack
C ------------------------ Simulation of a new track
C
20 CALL START ! Starts simulation in current medium
30 CALL JUMP(DSMAX(IBODY),DS) ! Determines the step length
CALL STEP(DS,DSEF,NCROSS) ! Moves particle to end of step
cu << Score relevant quantities >>
IF(NCROSS.GT.0) THEN
IF(MAT.EQ.0) THEN ! The particle is outside the enclosure
GOTO 40 ! Exit
ENDIF
GOTO 20
ENDIF
CALL KNOCK(DE,ICOL) ! Simulates the interaction event
cu << Score relevant quantities >>
IF(E.LT.EABS(KPAR,MAT)) THEN ! The particle is absorbed
GOTO 40 ! Exit
ENDIF
GOTO 30
C
C ------------------------ The simulation of the track ends here
40 CONTINUE
cu << Score relevant quantities >>
C **** Any secondary left?
CALL SECPAR(LEFT)
IF(LEFT.GT.0) THEN
cu << The secondary particle extracts energy from the site; modify
cu deposited energy counters accordingly >>
GOTO 20
ENDIF
C ++++++++++++++++++++++++ The simulation of the shower ends here
C
IF(N.LT.NTOT) GOTO 10
310
NEA/NSC/DOC(2015)3
cu << Calculate final averages and write results in output files >>
END
C...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
SUBROUTINE VSPLIT(NSPLIT)
Splits the current particle into NSPLIT (> 1) identical particles, defines their
weights appropriately, and stores NSPLIT − 1 of them in the secondary stack.
The current particle continues with a reduced statistical weight.
SUBROUTINE VRR(PSURV) and SUBROUTINE VKILL(PKILL)
These subroutines apply the Russian roulette technique. The particle is killed
311
NEA/NSC/DOC(2015)3
with probability PKILL = 1-PSURV (0 < PKILL < 1); if it survives, its weight is
increased by a factor 1/(1-PKILL).
SUBROUTINE JUMPF(DSMAX,DS) and SUBROUTINE KNOCKF(DE,ICOL)
These two subroutines perform interaction forcing. Their action is to artificially in-
sert “forced” interactions of selected kinds randomly along the particle trajectory.
This is accomplished by replacing the cross section σICOL of the desired interaction
by a larger value FORCE(.)×σICOL . The forcing factors FORCE(IBODY,KPAR,ICOL)
[for the bodies in the material structure where interaction forcing is applied, and
for the types of particles and the kinds of interactions (see Table 7.5) that are
forced] have to be specified by the user in the main program. These factors are
transferred through the Fortran module PENVARED mod (Table 7.7).
Forcing factors must be larger than, or equal to unity; obviously, the value FORCE(.)
= 1 means “no forcing”. To keep the simulation unbiased, interactions are allowed
to affect the state of the projectile only with probability WFORCE = 1/FORCE(.),
and, at the same time, the deposited energy and the secondary particles generated
in the interactions are assigned a weight smaller than that of the projectile by a
factor equal to WFORCE. The quantity DEA in module PENVARED mod is the energy
loss of the projectile in the last simulated event (i.e., the value delivered by the
interaction sampling routines for a projectile with unit weight).
MODULE PENVARED_mod
C
C **** Variance-reduction parameters.
C
SAVE ! Saves all items in the module.
C ---- Parameter values defined for each body. NBV is the maximum
C number of bodies. When using PENGEOM, NBV must have the same
C value as the parameter NB in module PENGEOM_mod.
INTEGER*4, PARAMETER :: NBV=5000
C ---- Forcing factors, FORCE(IBODY,KPAR,ICOL).
DOUBLE PRECISION, DIMENSION (NBV,3,8) :: FORCE=1.0D0
DOUBLE PRECISION :: WFORCE
C ---- Bremsstrahlung splitting numbers, IBRSPL(IBODY).
INTEGER*4, DIMENSION (NBV) :: IBRSPL=1
C ---- Energy deposited in the last event (analogue simulation).
DOUBLE PRECISION :: DEA
C
END MODULE PENVARED_mod
To apply interaction forcing, the main program must call subroutines JUMPF and
KNOCKF instead of the usual subroutines JUMP and KNOCK. In addition, subroutine
START must be called before starting a track and after each interface crossing,
even for photons. The output argument DE of subroutine KNOCKF is the effective
deposited energy, i.e., the deposited energy multiplied by WFORCE.
312
NEA/NSC/DOC(2015)3
Combined with interaction forcing, subroutine KNOCKF can also apply bremsstrah-
lung splitting in selected bodies. This technique consists of sampling a “normal”
photon in each radiative event, and then splitting it into a number IBRSPL (> 1) of
photons, all of them with the energy and polar emission angle of the “normal” pho-
ton, weight equal to 1/IBRSPL times the “normal” weight, and azimuthal emission
angles sampled uniformly in the interval from zero to 2π. This method is com-
putationally simple (a single DO loop) and very effective in increasing the number
of photons emitted by electrons and positrons, because each “split” photon is ob-
tained by only applying a rotation to the direction of the normal photon. The
bremsstrahlung splitting number IBRSPL(IBODY) in each body must be specified
by the user in the main program. This number is transferred through the Fortran
module PENVARED mod.
SUBROUTINE JUMPW(DSMAX,DS) and SUBROUTINE KNOCKW(DE,ICOL)
These two subroutines implement Woodcock’s delta-scattering method for photons
(see Section 1.6.3). We recall that this method will improve the efficiency only
for those geometries where locating a particle (i.e., finding the material at its
current position) is faster than normal tracking. The output argument DE of
subroutine KNOCKW is the effective energy deposited in the material; it includes
a weight correction such that no special action needs to be taken in the main
program.
To apply the delta-scattering method, the MAIN program must call subroutines
JUMPW and KNOCKW instead of the usual subroutines JUMP and KNOCK. Furthermore,
subroutine START must be called before starting a photon track and after each
interface crossing.
Woodcock’s method can be applied together with interaction forcing. In this case,
the interaction forcing parameters must be loaded before the first call to subroutine
JUMPW. Notice that, when the geometry is described with pengeom, the delta-
scattering method is incompatible with the use of impact detectors, which require
strict control of interface crossings.
Usually, the variance-reduction parameters [i.e., the splitting number NSPLIT, the
killing probability PKILL, and the forcing factors FORCE(.)] are assumed to be indepen-
dent of the particle energy. Although this scheme is flexible enough for many practical
uses, the parameter values can also be varied during the simulation. NSPLIT, PKILL or
PSURV, and IBRSPL(.) can be modified at any time during the simulation of a particle.
To ensure consistency of the mixed simulation scheme, the values of the forcing factors
FORCE(.) for electrons and positrons should only be changed immediately after a call
to subroutine START.
In spite of the fact that these variance-reduction routines operate automatically and
are robust, they should be invoked with care. Their effect on the efficiency of the
simulation is not always easy to predict. It is therefore advisable to perform tentative
runs with different values of the variance-reduction parameters to check the efficiency
gain (or loss!). In general, particle weights must be prevented from reaching very large
313
NEA/NSC/DOC(2015)3
or very small values. In the first case, a very “heavy” particle can completely hide the
information collected from many lighter particles. Conversely, it is not convenient to
spend time simulating particles with very small weights, which contribute insignificant
amounts to the scores. Therefore, these variance-reduction techniques should be applied
only when the particle weight WGHT is within a limited range (weight window), e.g.,
between 0.05 and 20.
Notice also that repeated splitting and interaction forcing may easily lead to satura-
tion of the secondary stack. The stack size in the original files is NMS = 1,000 particles,
which is large enough for most applications. However, it may be insufficient when using
heavy splitting and/or interaction forcing. The user should make sure that the sec-
ondary stack does not overflow; when the stack is filled up, a warning message is printed
in unit 26, but the simulation is not aborted (because occasional stack overflows may
not have an appreciable effect on the results). Saturation of the stack can be avoided
by increasing the lower limit of the weight window. It is also recommended to apply
interaction forcing only to primary particles; this can be automatically enforced by using
a weight window with its lower limit higher than WFORCE. If needed, the size of the stack
can be increased by editing the file penelope.f and changing the value of the parameter
NMS in the Fortran module PENELOPE mod.
It should be mentioned that, when interaction forcing is applied, energy is conserved
only on average because the energy deposited in the medium is, in general, different from
the energy lost by the projectile. This implies that the spectrum of deposited energy
in a given volume (of interest, e.g., to simulate the response of scintillation detectors)
is distorted. Nevertheless, interaction forcing does increase the efficiency of calculations
of dose distributions and secondary radiation emission.
Range rejection (i.e., killing particles that are far away from the region of interest)
should never be used with photons. In the case of charged particles, this technique
may be applied automatically by considering the absorption energies EABS(KPAR) as
local variables. Because simulation routines work properly when they are passed an
increased value of EABS(KPAR) (i.e., they discontinue the simulation of particles with
energy below that value), we may use this parameter to terminate the tracking charged
particles that move in bodies that are too far from the detector to produce an appreciable
contribution. The example main programs pencyl and penmain implement this strategy
to reduce the simulation work in regions of lesser interest.
314
NEA/NSC/DOC(2015)3
ample main programs are just this, examples. While it is feasible to design simulation
algorithms to faithfully implement the adopted interaction models (i.e., the physics)
and to accurately describe certain types of geometries (e.g., quadric geometries), it is
virtually impossible to develop a generic main program that is able to compute all con-
ceivable information about any practical problem (with arbitrary radiation sources). If
the example programs included in the penelope distribution package cannot accom-
modate your problem, you should consider writing your own main program (see the flow
diagrams in Figs. 7.1 and 7.2, and the program layout in Section 7.1.3).
The two example main programs operate in a similar way. They both read data from
a corresponding input file and output the results in a number of files with fixed names2 .
The input files of pencyl and penmain have similar structures and formats; they are
described in detail in the following Sections3 . Each line in the input data file consists of a
6-character keyword (columns 1–6) and a blank (column 7), followed either by numerical
data (in free format) or by a character string, which start at the 8-th column. Keywords
are explicitly used/verified by the programs (which are case sensitive!). Notice also that
the order of the data lines is important. The keyword “ ” (6 blanks, which we have
denoted by “ ”) indicates comment lines and can be placed anywhere in the file (except
within the geometry definition block of pencyl). The programs ignore any text following
the first blank after the last numerical datum, or after the character string, in each line.
Thus, in the input file layouts given below, the comments in square brackets are ignored.
Lines with certain keywords (e.g., “SPECTR”) can appear an arbitrary number of times,
limited only by the allocated amount of memory. The programs assign default values to
many input variables; lines that declare default values may be removed from the input
file. The execution of a program is aborted when an incorrect input datum is found.
The conflicting quantity usually appears in the last line of the output file. If the trouble
is with arrays having dimensions smaller than required, the program indicates how the
problem can be solved (this may require editing the source file, be careful).
The main programs pencyl and penmain generate an output file with generic in-
formation, such as number of simulated showers, simulation speed, average numbers
of generated secondary particles, average deposited energies, etc. The programs also
generate a number of continuous distributions (depending on the options selected in the
input file). Each simulated distribution is written in a separate file (as a histogram),
with a heading describing its content and in a format ready for visualisation with a
plotting program. The programs compute and deliver the statistical uncertainties (3σ)
of all evaluated quantities and distributions. Many authors quote these uncertainties
as one standard deviation, which means that the probability for the actual value to lie
outside the error bar is 0.317. We prefer to be more conservative and stay at the 3σ
level, for which the probability of “missing the real value” is only 0.003.
Optionally, at the end of a run, pencyl and penmain can write the contents of all
2
Warning: The programs overwrite older output files that are left in the working directory. You
should save all result files on a separate directory before re-running a program.
3
Although the input files of the two programs are similar, they will be described separately. Users
interested in one of the programs will find all the relevant information in the corresponding Section.
315
NEA/NSC/DOC(2015)3
counters to a dump file; using this option, a simulation with poor statistics can be
resumed from exactly the same point where it was stopped (without losing the work
done in the previous run). In addition, the programs can generate the output and dump
files at specified intervals of time; this option allows the user to inspect the results
as they are being computed, and to stop the simulation when the required statistical
accuracy has been reached. In this last case, make sure that execution is not stopped
while the output files are being written to the hard disk; otherwise, the results will be
lost. When run interactively, the programs write the number of simulated showers on
the screen just after closing all output files.
Both pencyl and penmain are designed to be run on a single processor. The distri-
bution package includes two auxiliary programs pencyl-sum and penmain- sum, which
add the values of the counters in a number of dump files generated from independent
runs of pencyl and penmain, respectively. These programs allow the user to run the
same problem on several processors, using different seeds of the random number gener-
ator (see Section 1.2.1), and then combine the results to produce a single set of output
files, with accumulated statistics. They work as effective “poor man’s” parallelisation
devices.
Previous versions of pencyl and penmain have been intensively used to analyse the
reliability of penelope. They have been applied to a variety of experimental situations,
covering a wide energy range. Benchmark comparisons with experimental data have
been published elsewhere (Baró et al., 1995; Sempau et al., 1997, 2003).
316
NEA/NSC/DOC(2015)3
t3
t2 r
C
t1 x y
E0
φ α
source
(x0, y0, z0)
Figure 7.3: An example of cylindrical geometry, a thick-walled cavity (C) with a point
off-axis source (conical beam). In this case, the material structure is symmetrical about the
z-axis, but the radiation flux and other three-dimensional quantities (e.g., absorbed dose and
deposited charge distributions) depend on the azimuthal angle φ.
body. If there are several active bodies, they are selected randomly with probabilities
proportional to the corresponding total activities.
In the distributed form of the program, we assume that both the source and the
material structure are symmetrical about the z-axis because this eliminates the depen-
dence on the azimuthal angle φ. The program takes advantage of this symmetry to
tally 3D dose distributions. It is possible to consider geometries that are not axially
symmetrical, but then the program only delivers values averaged over φ.
The source file pencyl.f includes a (stand-alone) set of geometry routines for track-
ing particles through multilayered cylindrical structures. These routines can be used for
simulation even when the source is off-axis. Cylindrical geometries can be viewed with
the program gviewc, which is similar to gview2d (see Section 6.6) and runs under
Microsoft Windows. This program reads the geometry definition list from the input file
and displays a two-dimensional map of the materials intersected by the window plane.
It is useful for debugging the geometry definition.
The program pencyl delivers detailed information on transport and energy deposi-
tion, which includes energy and angular distributions of emerging particles, depth-dose
distribution, depth-distribution of deposited charge, distributions of deposited energy
in selected materials and 2D (depth-radius) dose and deposited charge distributions in
selected bodies (cylinders). To generate more specific information, the user can define
energy-deposition detectors. Each detector consists of a set of active (non-void) bodies,
which must have been previously defined as parts of the geometry. The output spectrum
of an energy-deposition detector is the distribution of absorbed energy (per shower) in
317
NEA/NSC/DOC(2015)3
The structure of the pencyl input file is the following (the 72-column rulers are just for
visual aid, they do not form part of the input file).
....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
TITLE Title of the job, up to 65 characters.
. (the dot prevents editors from removing trailing blanks)
GSTART >>>>>>>> Beginning of the geometry definition list.
LAYER ZLOW,ZHIG [Z_lower and Z_higher]
CENTRE XCEN,YCEN [X_centre and Y_centre]
CYLIND M,RIN,ROUT [Material, R_inner and R_outer]
GEND <<<<<<<< End of the geometry definition list.
The labels KL,KC denote the KC-th cylinder in the KL-th layer.
.
>>>>>>>> Source definition.
SKPAR KPARP [Primary particles: 1=electron, 2=photon, 3=positron]
SENERG SE0 [Initial energy (monoenergetic sources only)]
SPECTR Ei,Pi [E bin: lower-end and total probability]
SGPOL SP1,SP2,SP3 [Stokes parameters for polarised photons]
SEXTND KL,KC,RELAC [Extended source in KL,KC, rel. activity dens.]
STHICK STHICK [Source height]
SRADII SRIN,SROUT [Source inner and outer radii]
SPOSIT SX0,SY0,SZ0 [Coordinates of the source centre]
SCONE THETA,PHI,ALPHA [Conical beam; angles in deg]
SRECTA THETAL,THETAU,PHIL,PHIU [Rectangular beam; angles in deg]
.
>>>>>>>> Material data and simulation parameters.
Up to MAXMAT materials; 2 lines for each material.
MFNAME mat-filename.ext [Material file, up to 20 chars]
MSIMPA EABS(1:3),C1,C2,WCC,WCR [EABS(1:3),C1,C2,WCC,WCR]
.
>>>>>>>> Local maximum step lengths and absorption energies.
DSMAX KL,KC,DSMAX(KL,KC) [Maximum step length in body KL,KC]
318
NEA/NSC/DOC(2015)3
319
NEA/NSC/DOC(2015)3
The following listing describes the function of each of the keywords, the accompanying
data and their default values.
• Geometry definition
Geometry definition list ... begins with the line “GSTART” and ends with the line
“GEND ” (notice the two blanks). The only allowed keywords in the geometry
list are “GSTART”, “LAYER ”, “CENTRE”, “CYLIND” and “GEND ”. The line after
“GSTART” must be a “LAYER ” line. Each “LAYER ” line contains the z-coordinates
of its lower and upper limiting planes and is followed by a “CENTRE” line (optional)
and by one or several “CYLIND” lines, which contain the material and the inner and
outer radii of the various concentric rings in the layer; empty layers are disregarded.
No blank lines are allowed in the geometry definition list.
Layers must be defined in increasing order of heights, from bottom to top of the
structure. If the “CENTRE” line is not entered, cylinders are assumed to be centred
on the z-axis (XCEN = YCEN = 0.0). Cylinders have to be defined in increasing
radial order, from the centre to the periphery. The two lengths in each “LAYER ”
and “CYLIND” line must be entered in increasing order. The geometry definition
list can be debugged/visualised with the code gviewc (operable under Microsoft
Windows). Notice that gviewc reads the geometry directly from the pencyl input
data file (i.e., the first line in the geometry definition file must be the “TITLE ”
line).
-- Default: none (the geometry must be defined in the input file)
• Source definition
SKPAR ... Type of primary particle (1 = electrons, 2 = photons, or 3 = positrons).
-- Default: KPARP=1
SENERG ... For monoenergetic sources: initial energy SE0 of primary particles.
-- Default: SE0=1.0E6
SPECTR ... For a source with a continuous (stepwise constant) energy spectrum, each
“SPECTR” line gives the lower end point (Ei) of an energy bin of the spectrum and
the associated relative probability (Pi), integrated over the bin. Up to NSEM =
1, 000 lines can be entered, in arbitrary order. The upper end of the spectrum is
defined by entering a line with Ei equal to the upper energy end point, and with
a negative Pi value.
-- Default: none
320
NEA/NSC/DOC(2015)3
SGPOL ... This line activates the simulation of polarisation effects in the scattering
of photons, i.e., it sets IPOL=1 (electrons and positrons are assumed to be unpo-
larised). SP1, SP2, SP3 are the Stokes parameters of primary photons, which define
the degrees of linear polarisation at 45 deg azimuth, of circular polarisation, and of
linear polarisation at zero azimuth, respectively (see Appendix C). It is assumed
that secondary photons are emitted with null polarisation (SP1=SP2=SP3=0.0).
-- Default: none
SEXTND ... For internal extended sources, this line defines an active body KL, KC
(the cylinder KC in layer KL) and its relative activity density, RELAC.
-- Default: none
NOTE: The labels KL, KC that identify each body are defined by the ordering in
the input geometry list. These labels are written on the output geometry report.
STHICK ... For an external source, thickness (height) of the active volume of the
source (cylinder or ring).
-- Default: STHICK=0.0
SRADII ... For an external source, inner and outer radii of the active volume of the
source.
-- Defaults: SRIN=0.0, SROUT=0.0
SPOSIT ... For an external source, coordinates (x0 , y0 , z0 ) of the centre of the source
volume.
-- Defaults: SX0=SY0=SZ0=0.0
SCONE ... Conical source beam (the initial direction of primary particles is sampled
uniformly within the solid angle of a cone). Polar and azimuthal angles of the beam
axis direction, THETA and PHI, and angular aperture, ALPHA, in deg.
-- Defaults: THETA=0.0, PHI=0.0, ALPHA=0.0
The case ALPHA=0.0 defines a monodirectional source, and ALPHA=180.0 corre-
sponds to an isotropic source.
SRECTA ... Rectangular source beam. Limiting polar and azimuthal angles of the
source beam window, (THETAL,THETAU)×(PHIL,PHIU), in deg.
-- Defaults: THETAL=0.0, THETAU=0.0, PHIL=0.0, PHIU=0.0
The case THETAL=THETAU, PHIL=PHIU defines a monodirectional source. To define
an isotropic source, set THETAL=0.0, THETAU=180.0, PHIL=0.0 and PHIU=360.0.
Note that the default source is a pencil beam that moves upwards along the z-axis.
MFNAME ... Name of a penelope input material data file (up to 20 characters). This
file must be generated in advance by running the program material.
-- Default: none
321
NEA/NSC/DOC(2015)3
MSIMPA ... Values of the simulation parameters for this material: absorption en-
ergies, EABS(1:3,M), elastic scattering parameters, C1(M) and C2(M), and cutoff
energy losses for inelastic collisions and bremsstrahlung emission, WCC(M) and
WCR(M).
-- Defaults: EABS(1,M)=EABS(3,M)=0.01*EMAX, EABS(2,M)=0.001*EMAX
C1(M)=C2(M)=0.1, WCC(M)=EABS(1,M), WCR(M)=EABS(2,M)
EMAX is the maximum energy of all particles found in the simulation. It is deter-
mined by the source energies.
For each material we must provide the name of the material-data file and a set
of simulation parameters. The label (material number) assigned by penelope
to each material is determined by the ordering of the material list in the input
file. That is, the first, second, . . . materials are assigned the labels 1, 2, . . . These
labels are also used in the geometry definition. The material file may contain mul-
tiple declarations of the same material, e.g., to specify different sets of simulation
parameters in different bodies with the same composition.
The original programs in the distribution package allow up to 10 materials. This
number can be increased by changing the value of the parameter MAXMAT in the
Fortran module PENELOPE mod (see Table 7.4), which is at the heading of the
penelope.f source file.
DSMAX ... Maximum step length DSMAX(KL,KC) of electrons and positrons in cylin-
der KL,KC. This parameter is important only for thin bodies; it should be given a
value of the order of one tenth of the cylinder thickness or less.
-- Default: DSMAX=0.1 times the cylinder thickness
EABSB ... Local absorption energies EABSB(KPAR,KL,KC) of particles of type KPAR
in body KL,KC. These values must be larger than EABS(KPAR,M), where M is the
material of body KL,KC. When the particle is moving within body KL,KC, the ab-
sorption energy EABS(KPAR,M) is temporarily set equal to EABSB(KPAR,KL,KC).
Thus, the simulation of the particle history is discontinued when the energy be-
comes less than EABSB(KPAR,KL,KC). This feature can be used, e.g., to reduce the
simulation work in regions of lesser interest.
-- Defaults: EABSB(KPAR,KL,KC)=EABS(KPAR,M) (no action)
IFORCE ... Activates forcing of interactions of type ICOL of particles KPAR in cylin-
der KC of layer KL. FORCER is the forcing factor, F, which must be larger than
unity (Section 1.6.1). The values WLOW, WHIG are the limits of the weight window
where interaction forcing is applied (see Section 7.1.3). When several interaction
mechanisms are forced in the same body, the effective weight window is set equal
to the intersection of the windows for these mechanisms.
-- Default: no interaction forcing
322
NEA/NSC/DOC(2015)3
If the mean free path for real interactions of type ICOL is MFP, the program will
simulate interactions of this type (real or forced) with an effective mean free path
equal to MFP/FORCER.
The real effect of interaction forcing on the efficiency is not easy to predict. Please,
do tentative runs with different FORCER values and check the efficiency gain (or
loss!).
TRICK: a negative input value of FORCER, −F, means that each particle should
interact, on average and approximately, F times in a path length equal to the
range of the particle with E = EMAX. This is very useful, e.g., to generate x-ray
spectra.
IBRSPL ... Activates bremsstrahlung splitting in cylinder KC of layer KL for electrons
and positrons with weights in the window (WLOW,WHIG) where interaction forcing
is applied. The integer IBRSPL is the splitting factor.
-- Default: no bremsstrahlung splitting
Note that bremsstrahlung splitting is applied in combination with interaction forc-
ing and, consequently, it is activated only in those bodies where interaction forcing
is active.
IXRSPL ... Splitting of characteristic x rays emitted in cylinder KC of layer KL, from
any element. Each unsplit x ray with ILB(2)=2 (i.e., of the second generation)
when extracted from the secondary stack is split into IXRSPL quanta. The new,
lighter, quanta are assigned random directions.
-- Default: no x-ray splitting
IWOODC ... Activates Woodcock’s delta-scattering method for photons (see Section
7.1.4). The method is very effective for the calculation of dose, preferably combined
with interaction forcing.
-- Default: off
NBE ... Limits, EL and EU, of the interval where energy distributions of emerging
particles are tallied and number of energy bins, NBE (≤ 1, 000).
-- Defaults: EL=0.0, EMAX=EMAX, NBE=100
If NBE is positive, energy bins have uniform width, DE=(EU-EL)/NBE. When NBE is
negative, the bin width increases geometrically with energy, i.e., the energy bins
have uniform width on a logarithmic scale.
NBANGL ... Number of bins for the polar angle θ and the azimuthal angle φ, respec-
tively, NBTH and NBPH (≤ 180).
-- Defaults: NBTH=90, NBPH=1 (azimuthal average)
If NBTH is positive, polar-angle bins have uniform width, DTH=180./NBTHE. When
NBTH is negative, the bin width increases geometrically with THETA, i.e., the bins
have uniform width on a logarithmic scale.
323
NEA/NSC/DOC(2015)3
NOTE: In the output files, the terms “upbound” and “downbound” are used
to denote particles that leave the material system moving upwards (W>0) and
downwards (W<0), respectively4 .
NBZ ... Number of bins for the z-coordinate. Less than or equal to 200.
-- Default: NBZ=100
NBR ... Number of bins for the radial variable, r = (x2 + y 2 )1/2 . Less than or
equal to 200.
-- Default: NBR=100
NBTL ... Limits of the interval where track-length distributions of primary parti-
cles are tallied. Number of track-length bins, NBTL ≤ 200.
-- Defaults: TLMIN=0.0, TLMAX=5*RANGE(EMAX,KPARP,1), NBTL=100
EMERGP ... The program generates the PDFs of the coordinates (X,Y) of points where
trajectories of emerging particles intersect the upper and lower planes of the ge-
ometry definition (upbound and downbound particles, respectively), and the PDF
of the radial distance of the intersections, R=SQRT(X*X+Y*Y).
RADM is the radius of the scoring region, and NBRE is the number of bins of the
radial distributions. The (X,Y) distributions are tallied on a square of side 2*RADM,
with (2*NBRE)2 bins.
-- Default: None
• Energy-deposition detectors
324
NEA/NSC/DOC(2015)3
DOSE2D ... The program will tally 2D, depth-radius, dose and deposited charge
distributions in the body KL,KC (i.e., the cylinder KC of layer KL). The numbers NZ
and NR of z- and r-bins have to be specified by the user, they must be between 1
and 200. Up to ten different bodies can be selected, a DOSE2D line is required for
each body.
-- Default: off
• Job properties
RESUME ... The program will read the dump file dump1.dmp (up to 20 characters)
and resume the simulation from the point where it was left. Use this option very,
very carefully. Make sure that the input data file is fully consistent with the one
used to generate the dump file.
-- Default: off
DUMPTO ... Generate a dump file named dump2.dmp (name given by the user, up to
20 characters) after completing the simulation run. This allows the simulation to
be resumed to improve statistics.
-- Default: off
NOTE: If the file dump2.dmp already exists, it is overwritten.
DUMPP ... When the DUMPTO option is activated, simulation results are written in
the output files every DUMPP seconds. This option is useful to check the progress of
long simulations. It also allows the program to be run with a long execution time,
and to be stopped when the required statistical uncertainty has been reached.
-- Default: DUMPP=1.0E15
END ... Ends the reading of the input file. This line is needed only when the
TIME line is missing.
325
NEA/NSC/DOC(2015)3
7.2.1.2 Example
The example of an input file given below (cyld.in) belongs to the pencyl file set
included in the distribution package. It corresponds to the simulation of a narrow
photon beam with E0 = 1.25 MeV (roughly the average energy of gamma rays from
60
Co) entering a 3”×3” NaI scintillation detector in an Al case, whose inner surface is
partially covered by a layer of Al2 O3 , which diffuses scintillation light back to the crystal
and the photomultiplier. Note that the order of the materials is NaI (MAT=1), Al2 O3
(MAT=2), and Al (MAT=3). The incident beam photons move along the z-axis with θ = 0
(i.e., upwards) and impinge normally on the surface of the detector. The geometry is
shown schematically in the insets of Fig. 7.4, which displays two of the distributions
generated by pencyl. The plotted distributions were obtained from 10 million random
showers; the uncertainty bars represent statistical uncertainties (3σ), which are pretty
small in this case.
• Example input file of the pencyl program (cyld.in).
....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
TITLE NaI detector with Al cover and Al2O3 reflecting foil
GSTART >>>>>>>> Beginning of the geometry definition list.
LAYER -0.24 -0.16 1
CENTRE 0.00 0.00
CYLIND 3 0.00 4.05
LAYER -0.16 0.00 2
CYLIND 2 0.00 3.97
CYLIND 3 3.97 4.05
LAYER 0.00 7.72 3
CYLIND 1 0.00 3.81
CYLIND 2 3.81 3.97
CYLIND 3 3.97 4.05
LAYER 7.72 9.72 4
CYLIND 3 0.00 4.05
GEND <<<<<<<< End of the geometry definition list.
>>>>>>>> Source definition.
SKPAR 2 [Primary particles: 1=electron, 2=photon, 3=positron]
SENERG 1.25e6 [Initial energy (monoenergetic sources only)]
SPOSIT 0.0 0.0 -10.0 [Coordinates of the source centre]
SCONE 0 0 0 [Conical beam; angles in deg]
>>>>>>>> Material data and simulation parameters.
MFNAME NaI.mat [Material file, up to 20 chars]
MSIMPA 1.0e5 1000 1.0e5 0.1 0.1 1.0e4 1000 [EABS(1:3),C1,C2,WCC,WCR]
MFNAME Al2O3.mat [Material file, up to 20 chars]
MSIMPA 1.0e5 1000 1.0e5 0.1 0.1 1.0e4 1000 [EABS(1:3),C1,C2,WCC,WCR]
MFNAME Al.mat [Material file, up to 20 chars]
MSIMPA 1.0e5 1000 1.0e5 0.1 0.1 1.0e4 1000 [EABS(1:3),C1,C2,WCC,WCR]
326
NEA/NSC/DOC(2015)3
The upper plot in Fig. 7.4 shows the distribution of energy Ed deposited into the
NaI crystal volume (per primary photon). The lower plot displays the distribution (per
primary photon) of the energy Eb of downbound photons, i.e., photons that emerge
from the system pointing downwards, with W = cos θ < 0. These distributions show
three conspicuous structures that arise from backscattering of incident photons in the
crystal volume or in the Al backing (B), escape of one of the ∼ 511 keV x rays resulting
from positron annihilation (A) and escape of ∼ 30 keV iodine K x rays (C). The peak A
is so small because pair production is a relatively unlikely process for 1.25 MeV photons
(the energy is too close to the pair-production threshold).
327
NEA/NSC/DOC(2015)3
3
10 1
Ed
p(Ed) (MeV—1)
B A
0.1 C
0.01
0 0.2 0.4 0.6 0.8 1 1.2
Eb (MeV)
0.6
B 3
0.5 1
p(Eb) (MeV—1)
0.4
Eb
0.3
0.2
0.1 A
C
0
0 0.2 0.4 0.6 0.8 1 1.2
Eb (MeV)
Figure 7.4: Partial results from pencyl for the NaI photon detector described in the text
(input file cyld.in). Top: distribution of energy deposited in the NaI crystal (MAT=1). Bottom:
energy distribution of backscattered (downbound) photons.
328
NEA/NSC/DOC(2015)3
penmain provides global simulation results such as the energy and angular distribu-
tions of particles that emerge from the material system, the average energy deposited
in each body, etc. To generate more specific information, the user can define impact
detectors (see Section 6.5) and energy-deposition detectors. Each detector consists of
a set of active (non-void) bodies, which must have been previously defined as parts of
the geometry. The output spectrum from an impact detector is the energy distribution
of particles that have entered any of the active bodies coming from a body that is not
active (i.e., that is not part of the detector). Optionally, for each impact detector, the
program can generate a phase-space file where the state variables of particles at the
detector entrance are recorded. It is also possible to tally the average distribution of
fluence with respect to the energy of particles in the volume of each impact detector.
The output spectrum of an energy-deposition detector is the distribution of absorbed
energy (per shower) in the active bodies. The program also offers the option of tally-
ing a dose map on an orthogonal mesh defined by the user or, for problems with the
corresponding symmetry, on a cylindrical or spherical mesh.
Relevant input data are written in a file named penmain.dat. The output file
penmain-res.dat contains a report on the global simulation and some partial results.
The calculated continuous distributions (histograms) are written in separate files, whose
names have the extension “.dat”. These files are in a format suited for direct visuali-
sation with gnuplot (version 4.2).
The structure of the penmain input file is the following (the 72-column rulers are just
for visual aid, they do not form part of the input file).
....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
TITLE Title of the job, up to 65 characters.
. (the dot prevents editors from removing trailing blanks)
>>>>>>>> Source definition.
SKPAR KPARP [Primary particles: 1=electron, 2=photon, 3=positron]
KPARP=0 activates a user-defined SOURCE model.
SENERG SE0 [Initial energy (monoenergetic sources only)]
SPECTR Ei,Pi [E bin: lower end and total probability]
SGPOL SP1,SP2,SP3 [Stokes parameters for polarised photons]
SPOSIT SX0,SY0,SZ0 [Coordinates of the source]
SBOX SSX,SSY,SSZ [Source box dimensions]
SBODY KB [Active source body; one line for each body]
SCONE THETA,PHI,ALPHA [Conical beam; angles in deg]
SRECTA THETAL,THETAU,PHIL,PHIU [Rectangular beam; angles in deg]
.
>>>>>>>> Input phase-space file (psf).
IPSFN psf-filename.ext [Input psf name, up to 20 characters]
329
NEA/NSC/DOC(2015)3
330
NEA/NSC/DOC(2015)3
.
>>>>>>>> Energy-deposition detectors (up to 25).
ENDETC EL,EU,NBE [Energy window and no. of bins]
EDSPC spc-enddet-##.dat [Output spectrum file name, 20 chars]
EDBODY KB [Active body]
.
>>>>>>>> Absorbed dose distribution.
GRIDX XL,XU,NDBX [X coords of the box vertices, no. of bins]
GRIDY YL,YU,NDBY [Y coords of the box vertices, no. of bins]
GRIDZ ZL,ZU,NDBZ [Z coords of the box vertices, no. of bins]
GRIDR RU,NDBR [Radius of the dose volume, no. of bins]
.
>>>>>>>> Job properties.
RESUME dump1.dmp [Resume from this dump file, 20 chars]
DUMPTO dump2.dmp [Generate this dump file, 20 chars]
DUMPP DUMPP [Dumping period, in sec]
.
RSEED ISEED1,ISEED2 [Seeds of the random-number generator]
NSIMSH DSHN [Desired number of simulated showers]
TIME TIMEA [Allotted simulation time, in sec]
.
END [Ends the reading of input data]
....+....1....+....2....+....3....+....4....+....5....+....6....+....7..
The following listing describes the function of each of the keywords, the accompanying
data and their default values.
• Source definition
331
NEA/NSC/DOC(2015)3
SENERG ... For monoenergetic sources: initial energy SE0 of primary particles.
-- Default: SE0=1.0E6
SPECTR ... For a source with continuous (stepwise constant) energy spectrum, each
“SPECTR” line gives the lower end-point (Ei) of an energy bin of the spectrum and
the associated relative probability (Pi), integrated over the bin. Up to NSEM =
1, 000 lines can be entered, in arbitrary order. The upper end of the spectrum is
defined by entering a line with Ei equal to the upper energy end point, and with
a negative Pi value.
-- Default: none
SGPOL ... This line activates the simulation of polarisation effects in the scattering
of photons, i.e., it sets IPOL=1 (electrons and positrons are assumed to be unpo-
larised). SP1, SP2, SP3 are the Stokes parameters of primary photons, which define
the degrees of linear polarisation at 45 deg azimuth, of circular polarisation, and of
linear polarisation at zero azimuth, respectively (see Appendix C). It is assumed
that secondary photons are emitted with null polarisation (SP1=SP2=SP3=0.0).
-- Default: none
SPOSIT ... For an external source, coordinates (x0 , y0 , z0 ) of the centre of the source
volume.
-- Defaults: SX0=SY0=SZ0=0.0
SBOX ... Extended source box. The source has uniform activity within the volume
of a right prism centred at the point (SX0,SY0, SZ0) and whose sides have lengths
SSX, SSY and SSZ.
-- Defaults: SSX=SSY=SSZ=0.0
In the case of an extended source, the active volume can be restricted to that of
a body or a set of bodies, which must be defined as parts of the geometry. The
activity of the source is assumed to be uniform within the volume of the intersec-
tion of the active bodies and the source box. Note that the initial coordinates of
primary particles are sampled by the rejection method; the sampling efficiency is
equal to the fraction of the source box volume that is occupied by active bodies.
To define each active source body, add the following line:
SBODY ... Active source body. One line for each body.
-- Default: none
The program stops if the source box has not been defined previously
SCONE ... Conical source beam (the initial direction of primary particles is sam-
pled uniformly within the solid angle of a cone). Polar and azimuthal angles of
the beam axis direction, THETA and PHI, and angular aperture, ALPHA, in deg.
-- Defaults: THETA=0.0, PHI=0.0, ALPHA=0.0
The case ALPHA=0.0 defines a monodirectional source, and ALPHA=180.0 corre-
sponds to an isotropic source.
332
NEA/NSC/DOC(2015)3
SRECTA ... Rectangular source beam. Limiting polar and azimuthal angles of the
source beam window, (THETAL,THETAU)×(PHIL,PHIU), in deg.
-- Defaults: THETAL=0.0, THETAU=0.0, PHIL=0.0, PHIU=0.0
The case THETAL=THETAU, PHIL=PHIU defines a monodirectional source. To define
an isotropic source, set THETAL=0.0, THETAU=180.0, PHIL=0.0 and PHIU=360.0.
Note that the default source is a pencil beam that moves upwards along the z-axis.
333
NEA/NSC/DOC(2015)3
and those with WGHT larger than WGMAX will be split. Note that the weight window
has preference over the splitting option, i.e., a particle will be split into NSPLIT
or less particles only if the latter have weights larger than WGMIN.
-- Default: WGMIN=1.0E-35, WGMAX=1.0E35 (no action)
EPMAX ... Maximum energy (in eV) of particles in the phase-space files. EPMAX is
the upper limit of the energy interval covered by the simulation look-up tables. To
minimise interpolation errors, EPMAX should not be much larger than the maximum
energy actually occurring during the simulation.
When the initial state variables of particles are read from a phase-space file, this
parameter is required to initialise penelope and is critical; the code crashes if it
finds a particle that has energy larger than EPMAX.
-- Default: EPMAX=1.0E9 (interpolation is not optimal)
MFNAME ... Name of a penelope input material data file (up to 20 characters). This
file must be generated in advance by running the program MATERIAL.
-- Default: none
MSIMPA ... Values of the simulation parameters for this material: absorption en-
ergies, EABS(1:3,M), elastic scattering parameters, C1(M) and C2(M), and cutoff
energy losses for inelastic collisions and bremsstrahlung emission, WCC(M) and
WCR(M).
-- Defaults: EABS(1,M)=EABS(3,M)=0.01*EPMAX, EABS(2,M)=0.001*EPMAX
C1(M)=C2(M)=0.1, WCC(M)=EABS(1,M), WCR(M)=EABS(2,M)
EPMAX is the maximum energy of all particles found in the simulation. It is deter-
mined by the source energies.
For each material we must provide the name of the material-data file and a set
of simulation parameters. The label (material number) assigned by penelope
to each material is determined by the ordering of the material list in the input
file. That is, the first, second, . . . materials are assigned the labels 1, 2, . . . These
labels are also used in the geometry definition. The input file may contain multi-
ple declarations of the same material, e.g., to specify different sets of simulation
parameters in different bodies with the same composition.
The original programs in the distribution package allow up to 10 materials. This
number can be increased by changing the value of the parameter MAXMAT in the
Fortran module PENELOPE mod (see Table 7.4), which is at the heading of the
penelope.f source file.
334
NEA/NSC/DOC(2015)3
The geometry definition file can be debugged and visualised with the viewers
gview2d and gview3d (see Section 6.6).
The bodies in the material structure are normally identified by the sequential
labels assigned by pengeom. These labels can be identified by running the viewer
gview2d or by inspecting the geometry report file written by pengeom. For
complex geometries, however, it may be more practical to employ user labels, i.e.,
the four-character strings that identify the body in the geometry definition file.
In penmain (and only in the parts of the code that follow the definition of the
geometry), a body can be specified by giving either its pengeom numerical label
or its user label enclosed in a pair of apostrophes (e.g., “BOD1”). However, bodies
that result from the cloning of modules (as well as those defined in an INCLUDEd
geometry file) do not have a user label and only the pengeom numerical label is
acceptable.
PARINP ... The values of certain parameters of the geometry definition may be de-
fined from the main program by means of the array PARINP (an input argument of
the GEOMIN subroutine, Section 6.4)). The entered PARINP(IP) value replaces the
parameter values that are marked with the index IP in the geometry definition
file.
-- Default: none
DSMAX ... Maximum step length DSMAX(KB) (in cm) of electrons and positrons in
body KB. This parameter is important only for thin bodies; it should be given a
value of the order of one tenth of the body thickness or less. Insert one line for
each thin body in the geometrical structure.
-- Default: DSMAX=1.0E20 (no step length control)
EABSB ... Local absorption energies EABSB(KPAR,KB) of particles of type KPAR in
body KB. These values must be larger than EABS(KPAR,M), where M is the ma-
terial of body KB. When the particle is moving within body KB, the absorption
energy EABS(KPAR,M) is temporarily set equal to EABSB(KPAR,KB). Thus, the sim-
ulation of the particle history is discontinued when the energy becomes less than
EABSB(KPAR,KB). This feature can be used, e.g., to reduce the simulation work in
regions of lesser interest.
-- Default: EABSB(KPAR,KB)=EABS(KPAR,M) (no action)
IFORCE ... Activates forcing of interactions of type ICOL of particles KPAR in cylin-
der KC of layer KL. FORCER is the forcing factor, F, which must be larger than
unity (Section 1.6.1). The values WLOW, WHIG are the limits of the weight window
where interaction forcing is applied (see Section 7.1.4). When several interaction
mechanisms are forced in the same body, the effective weight window is set equal
to the intersection of the windows for these mechanisms.
-- Default: no interaction forcing
335
NEA/NSC/DOC(2015)3
If the mean free path for real interactions of type ICOL is MFP, the program will
simulate interactions of this type (real or forced) with an effective mean free path
equal to MFP/FORCER.
The real effect of interaction forcing on the efficiency is not easy to predict. Please,
do tentative runs with different FORCER values and check the efficiency gain (or
loss!).
TRICK: a negative input value of FORCER, −F, means that each particle should
interact, on average and approximately, F times in a path length equal to the
range of the particle with E = EMAX. This is very useful, e.g., to generate x-ray
spectra.
IBRSPL ... Activates bremsstrahlung splitting in cylinder KC of layer KL for electrons
and positrons with weights in the window (WLOW,WHIG) where interaction forcing
is applied. The integer IBRSPL is the splitting factor.
-- Default: no bremsstrahlung splitting
Note that bremsstrahlung splitting is applied in combination with interaction forc-
ing and, consequently, it is activated only in those bodies where interaction forcing
is active.
IXRSPL ... Splitting of characteristic x rays emitted in cylinder KC of layer KL, from
any element. Each unsplit x ray with ILB(2)=2 (i.e., of the second generation)
when extracted from the secondary stack is split into IXRSPL quanta. The new,
lighter, quanta are assigned random directions.
-- Default: no x-ray splitting
336
NEA/NSC/DOC(2015)3
• Impact detectors
IMPDET ... Starts the definition of a new impact detector (see Section 6.5). Up to
25 different detectors can be considered.
EL and EU are the lower and upper limits of the energy window covered by the
detector.
NBE is the number of bins in the output energy spectrum of the detector (≤ 1,000).
If NBE is positive, energy bins have uniform width, DE=(EU-EL)/NBE. When NBE is
negative, the bin width increases geometrically with the energy, i.e., the energy
bins have uniform width on a logarithmic scale.
The integer flag IPSF serves to activate the creation of a phase-space file (psf),
which contains the state variables of all particles that enter the detector. Use this
option with care because psf’s may grow very quickly.
IPSF=0; no psf is created.
IPSF=1; the psf is created.
The integer flag IDCUT allows the tracking of particles that enter the detector to
be discontinued.
IDCUT=0; the simulation of a particle is discontinued when it enters the detector
(useful to stop the simulation of particles recorded in a psf).
IDCUT=1; the presence of the detector does not affect the tracking of particles.
IDCUT=2; the presence of the detector does not affect the tracking of particles.
The distribution of particle fluence with respect to energy (integrated over the
volume of the detector) is tallied. The calculated distribution has dimensions of
length/energy.
-- Default: none
IDSPC ... Name of the output energy-spectrum file (up to 20 characters).
-- Default: spc-impdet-##.dat
IDPSF ... Name of the output phase-space file (up to 20 characters).
-- Default: psf-impdet-##.dat
IDFLNC ... Name of the output file with the energy distribution of particle fluence
(20 characters). This file is generated only when IDCUT=2.
-- Default: fln-impdet-##.dat
IDAGEL ... Activates the evaluation of the age of particles, defined as the time
elapsed since the start of the primary particle that originated the shower. The
program generates the age distribution of detected particles, i.e., particles of the
types declared in lines IDKPAR (see below) that enter the detector with energy in
the window (EL,EU). The age distribution is tallied in the interval between AGEL
and AGEU (both in seconds), which is partitioned into NAGE bins. If NAGE is positive,
the age bins have uniform width. When NAGE is negative, the width of the age
bins is uniform on a logarithmic scale.
-- Defaults: NAGE=100, AGEL=0.0, AGEU must always be specified
337
NEA/NSC/DOC(2015)3
IDAGEF ... Name of the output age distribution file (up to 20 characters).
-- Default: age-impdet-##.dat
IDBODY ... Active body of the detector. One line for each active body.
-- Default: none
NOTE: A body cannot be part of more than one impact detector. Active bodies
cannot be void because the geometry routines would not stop particles at their
limiting surfaces. If you need to define detectors outside the material system, fill
them with an arbitrary material of very small density to avoid perturbing the
transport process.
IDKPAR ... Type of particle that is detected (1=electrons, 2=photons or 3=posi-
trons). One line for each type.
-- Default: All particles are detected
The detector has no effect for particles that are not detected. This feature can be
used, e.g., to make a body or a set of bodies opaque to particles of a certain type.
• Energy-deposition detectors
Generally, the program can calculate the absorbed dose distribution inside a paral-
lelepiped (dose box) whose edges are parallel to the axes of the laboratory frame.
The dose box is defined by giving the coordinates of its vertexes. The dose is
tallied using a uniform orthogonal grid with NDBX, NDBY and NDBZ (≤ 101) bins
(= voxels) along the directions of the respective coordinate axes. These numbers
should be odd, to make sure that the “central” axes (i.e., lines that join the centres
of opposite faces of the box) go through the centres of a row of voxels.
338
NEA/NSC/DOC(2015)3
GRIDX ... x-coordinates of the vertices of the dose box and number of bins in the
x direction.
-- Default: none
GRIDY ... y-coordinates of the vertices of the dose box and number of bins in the
y direction.
-- Default: none
GRIDZ ... z-coordinates of the vertices of the dose box and number of bins in the
z direction.
-- Default: none
The efficiency of the dose map calculation can be increased by taking advantage of
possible symmetries of the system (source and geometry). In problems with axial
symmetry about the z axis, it is advantageous to tally the dose distribution in the
volume of a cylinder of radius RU, about the z axis, limited by the planes z =ZL
and z =ZU. For systems with spherical symmetry about the origin of coordinates,
it is most convenient to consider the radial dose distribution in a sphere of radius
RU. The generation of these symmetric dose maps is activated by entering the line
GRIDR ... Radius RU of the dose zone and number of radial bins.
-- Default: none
Specifically, when the input file contains only the lines GRIDZ and GRIDR , the
program assumes that the dose distribution is axially symmetric and generates a
cylindrical map. When the input file has only the line GRIDR , spherical symmetry
is assumed and the radial distribution of absorbed dose is tallied.
The different types of dose maps are mutually exclusive. Notice that when the
assumed symmetry does not hold, the program may not be able to evaluate the
masses of voxels correctly.
• Job properties
RESUME ... The program will read the dump file dump1.dmp (up to 20 characters)
and resume the simulation from the point where it was left. Use this option very,
very carefully. Make sure that the input data file is fully consistent with the one
used to generate the dump file.
-- Default: off
DUMPTO ... Generate a dump file named dump2.dmp (name given by the user, up to
20 characters) after completing the simulation run. This allows the simulation to
be resumed to improve statistics.
-- Default: off
NOTE: If the file dump2.dmp already exists, it is overwritten.
DUMPP ... When the DUMPTO option is activated, simulation results are written in
the output files every DUMPP seconds. This option is useful to check the progress of
339
NEA/NSC/DOC(2015)3
long simulations. It also allows the program to be run with a long execution time,
and to be stopped when the required statistical uncertainty has been reached.
-- Default: DUMPP=1.0E15
END ... Ends the reading of the input file. This line is needed only when the
TIME line is missing.
340
NEA/NSC/DOC(2015)3
It is worth noting that the use of different absorption energies in neighbouring bodies
may originate visible artefacts in the space distribution of absorbed dose. For instance,
if the values of Eabs for electrons in bodies 1 and 2 are, respectively, 10 keV and 100
keV, electrons entering body 2 from body 1 with E less than 100 keV will be absorbed
at the first interaction, giving an excess of dose in the border of body 2. When the
spatial distribution of absorbed dose is important, absorption energies should be given
essentially the same values over the region of interest.
The allowed values of the elastic-scattering parameters C1 and C2 are limited to the
interval [0,0.2]. Due to the consideration of the energy dependence of the cross sections
for soft interactions and of the hard mean free paths (see Sections 4.2 and 4.3), these
parameters have a very weak influence on the results. Our recommended practice is to
set C1 = C2 = 0.05, which is fairly conservative, as shown by the example described
below. Before increasing the value of any of these parameters, it is advisable to perform
short test simulations to verify that the results remain essentially unaltered with the
augmented parameter value (and that the simulation runs faster; if there is no gain in
speed, keep the conservative values).
We have already indicated that the cutoff energies Wcc and Wcr have a weak influence
on the accuracy of the results provided that they are both smaller than the width of the
bins used to tally energy distributions. It is worth recalling that the DCS for inelastic
collisions and bremsstrahlung emission decrease rapidly with the energy loss W (roughly
as W −2 and W −1 , respectively). As a consequence, for particles with energies larger
than about 100 keV, when Wcc and Wcr are increased, the simulation speed tends to a
saturation value. For these high energies, the gain in speed is small when the cutoffs
are made larger than about 5 keV. On the other hand, these cutoff energies have an
effect on the energy-straggling distributions, which are faithfully described only when
the number of hard interactions is “statistically sufficient”. Therefore, the cutoff energies
should not be too large. Our recommendation is to set the cutoff energies equal to one
hundredth of the typical energy of primary particles, or 5 keV, whichever is the smallest.
Note that, for the sake of consistency, Wcc must be smaller than the absorption energy
of electrons in the material, EABS(1,M) (otherwise, we would lose secondary electrons
that have energies larger than EABS(1,M)). Similarly, Wcr must be less than the photon
absorption energy EABS(2,M). penelope modifies the values of Wcc and/or Wcr when
these conditions are not met.
The maximum allowed step length smax (denoted by DSMAX in the Fortran source
files) should be about, or less than one tenth of the characteristic thickness of the body
where the particle moves. This ensures that, on average, there will be more than 13
soft events8 (hinges) along a typical electron/positron track through that body, which
is enough to “wash out” the details of the artificial distributions used to sample these
events. Notice, however, that penelope internally forces the step length to be less
(h) (h)
than ∼ 4λT (see Section 4.4). Therefore, for thick bodies (thicker than ∼ 15λT ),
the average number of hinges along each track is larger than about 20, and it is not
8
penelope randomises smax in such a way that the actual step length never exceeds the value smax
set by the user and, on average, is equal to 0.75smax .
341
NEA/NSC/DOC(2015)3
necessary to limit the length of the steps. In this case, we can set smax = 1035 cm, or
some other very large value, to switch off the external step-length control.
The example main program pencyl (see Section 7.2.1) can be readily used to study
the effect of the simulation parameters for a material body of a given characteristic
thickness. As an example, Figs. 7.5 and 7.6 display partial results from pencyl simu-
lations for a parallel electron beam of 500 keV impinging normally on the surface of a
200-µm-thick aluminium slab. The absorption energies were set equal to 10 keV (for all
types of particles) and Wcr was given a negative value, which compels penelope to set
Wcr = 10 eV, and to disregard emission of soft bremsstrahlung (with W < 10 eV). That
is, radiative events that yield bremsstrahlung photons with energy higher than 10 eV
were simulated individually. First, we ran pencyl.exe using Wcc = 0 and C1 = C2 = 0;
in this case, penelope performs a purely detailed, collision by collision, simulation
and, therefore, it provides exact results (affected only by statistical uncertainties and by
inaccuracies of the physical interaction model). Differences between these results and
those from mixed simulations are then completely attributable to the approximations
in our mixed transport algorithm. To our knowledge, no other high-energy transport
code allows detailed simulation and this kind of direct validation of electron/positron
transport mechanics.
Figures 7.5 and 7.6 show results from this detailed simulation, obtained from 100
million random showers9 ; the error bars indicate statistical uncertainties (3σ). The
continuous lines in Figs. 7.5 and 7.6 represent results from a mixed simulation with
C1 = C2 = 0.15, smax = 0.002 cm, Wcc = 1 keV (and Wcr = −10 eV, as before).
With these relatively high values of C1 and C2 , the mixed simulation is quite fast, the
speed (generated showers per second) is about 35 times higher than that of the detailed
simulation10 . The continuous lines in Figs. 7.5 and 7.6 represent results from this mixed
simulation obtained from 100 million showers; the associated statistical uncertainties are
similar to those of the detailed simulation. As shown in the plots, the results from the
mixed simulation are practically equivalent to those from detailed simulation. The only
visible difference is in the energy distribution of backscattered electrons (bottom plot
in Fig. 7.6), where mixed simulation tends to slightly overestimate the backscattering
of electrons with energies close to that of the incident beam. It should be noted that
electron (and positron) backscattering is one of the most difficult cases to study because
it involves transport both near and across an interface.
To illustrate the effect of the cutoff energy loss Wcc , we ran a second mixed simulation
with this parameter changed to 10 keV (i.e., one fiftieth of the incident beam energy,
twice the value recommended above). The results, from 100 million simulated showers,
agreed closely with those of the previous mixed simulation with Wcc = 1 keV, except for
the energy distribution of transmitted electrons, which were slightly distorted (see the
top plot in Fig. 7.6); a similar distortion occurs for the distribution of energy deposited
9
The program was compiled with the gfortran compiler and ran on an Intel Core i7-3770 at 3.40
GHz. The generation of the 100 million showers took 63.5 hours.
10
The simulation speed here is bound by the fact that each particle must undergo a minimum number
of soft interactions (hinges). For thick bodies, much higher simulation speeds can be reached.
342
NEA/NSC/DOC(2015)3
z
2
Al
1
% detailed (C1 = C2 = 0, Wcc = 0)
mixed (C1 = C2 = 0.15, Wcc = 1 keV)
mixed (C1 = C2 = 0.15, Wcc = 10 keV)
0
0 50 100 150 200
z (µm)
0.5
% detailed (C1 = C2 = 0, Wcc = 0)
mixed (C1 = C2 = 0.15, Wcc = 1 keV)
0.4 mixed (C1 = C2 = 0.15, Wcc = 10 keV)
p(θ) (1/sr)
0.3 θ
0.2
Al
0.1
0
0 30 60 90 120 150 180
θ (deg)
Figure 7.5: Results from pencyl for a 500-keV electron beam impinging normally on the
surface of a 200-µm-thick aluminium slab (further details are given in the text). Top: depth-
dose distribution within the slab. Bottom: angular distribution of emerging (transmitted and
backscattered) electrons (primaries and secondaries).
343
NEA/NSC/DOC(2015)3
15
% detailed (C1 = C2 = 0, Wcc = 0)
mixed (C1 = C2 = 0.15, Wcc = 1 keV)
mixed (C1 = C2 = 0.15, Wcc = 10 keV)
p(Et) (1/MeV)
10
Et
Al
0
0.1 0.2 0.3 0.4 0.5
Et (MeV)
0.4
Al
0.3 Eb
p(Eb) (1/MeV)
0.2
0.1
% detailed (C1 = C2 = 0, Wcc = 0)
mixed (C1 = C2 = 0.15, Wcc = 1 keV)
mixed (C1 = C2 = 0.15, Wcc = 10 keV)
0.0
0.0 0.1 0.2 0.3 0.4 0.5
Eb (MeV)
Figure 7.6: Results from pencyl for a 500-keV electron beam impinging normally on the
surface of a 200-µm-thick aluminium slab (further details are given in the text). Top: energy
distribution of transmitted (upbound) electrons. Bottom: energy distribution of backscattered
(downbound) electrons. Secondary electrons are included in both cases.
344
NEA/NSC/DOC(2015)3
in the slab. On the other hand, the simulation was only ∼22 % faster than with Wcc = 1
keV. As indicated above, when Wcc and Wcr are larger than ∼ 5 keV, the simulation
speed is fairly insensitive to variations of these cutoff values because most inelastic
collisions and bremsstrahlung emission events involve energy losses much smaller than
∼ 5 keV.
Monte Carlo simulation has proven to be a very valuable tool for education. In the past,
radiation physics used to be considered as a tough subject, mostly because high-energy
radiation is well outside the realm of daily experience. Nowadays, by simply running
a transport simulation code on a personal computer we can learn more than from tens
of obscure empirical formulas and numerical tables, and eventually “understand” many
features of radiation transport (those for which we have run the simulation code and
“digested” the results).
The penelope distribution package includes a binary file named shower.exe that
generates electron-photon showers within a slab and displays them (projected) on the
computer screen plane. The current version of shower operates only under Microsoft
Windows. By default, the program considers one of the 280 materials defined in file
pdcompos.pen and listed in Table 7.1 (and in file material-list.txt). It can also be
run for any material whose definition file (generated by one of the programs material
or tables) is placed in the directory of the executable binary shower.exe. The program
is self-explanatory, and requires only a small amount of information from the user, which
is entered from the keyboard, in response to prompts from the program.
Primary particles of a selected type and energy start moving either in the direction
of the inward normal to the lateral surface (external or internal beams) or along random
directions (isotropic inner source). Electron, photon and positron tracks are displayed in
different colours and intensities that vary with the energy of the particle. The maximum
number of showers that can be plotted in a single shot is limited to 50 because the screen
may become too cluttered. Generating this small number of showers takes a short time,
of the order of a few seconds, even on modest personal computers (provided only that
the absorption energies are sensibly chosen).
Once on the graphic window, the view plane can be rotated about the horizontal
screen axis by typing “r” and the rotation angle in degrees; the screen plane can also
be rotated progressively, by 15 deg steps, by pressing the “enter” key repeatedly. En-
tering the single-character command “n” erases the screen and displays a new bunch
of showers. Observation of single showers projected on a revolving plane gives a truly
three-dimensional perspective of the transport process.
345
NEA/NSC/DOC(2015)3
7.5 Installation
The complete penelope code system is distributed as a single ZIP compressed file
named penelope.zip, which contains the Fortran source files, the example main pro-
grams and auxiliary programs, the database, and documentation. To install penelope
on your computer, simply inflate (unzip) this file, keeping its directory organisation.
The directory structure and contents of the code system are the following (see Fig. 7.7):
fsource
pendbase pdfiles
gview
tables
penelope other
emfields
shower
pencyl
mains
penmain
doc
penelope.f ... basic subroutine package for the simulation of coupled electron-
photon transport in unbounded media.
rita.f ... subroutines for random sampling from single-variate discrete and con-
tinuous probability distributions.
pengeom.f ... subroutine package for tracking particles through modular quadric
geometries (handles systems with up to 10,000 surfaces and 5,000 bodies).
penvared.f ... variance-reduction subroutines (splitting, Russian roulette, interac-
tion forcing with bremsstrahlung splitting, and Woodcock’s photon delta scatter-
ing).
timer.f ... timing subroutines, based on standard intrinsic procedures of Fortran
95. They also work with some Fortran 77 and Fortran 90 compilers.
material.f ... main program to generate material data files.
346
NEA/NSC/DOC(2015)3
To obtain the executable binary file of material, compile and link the source files
material.f, penelope.f and rita.f. Notice that penelope.f and rita.f are de-
clared through an include statement inside material.f and do not have to be listed in
the compilation command. The executable file material.exe must be placed and run
in the same subdirectory as the database files (pendbase). Material data files can also
be generated by running the program tables (see below).
• Directory pendbase. penelope database. The directory pdfiles contains the 995
files listed in Section 7.1.1. Do not remove or alter any of the files in this directory.
gview ... . Contains the geometry viewers gview2d and gview3d (see Section
6.6), which are operable under Microsoft Windows, and several examples of geom-
etry definition files.
shower ... Contains the executable binary files of the programs shower (see Sec-
tion 7.4) and tables, which operate under Microsoft Windows. The code shower
generates electron-photon showers within a slab and displays the showers projected
on the screen plane. The program tables reads material data files and generates
tables of interaction data (cross sections, mean free paths, stopping powers, ranges,
...) as functions of energy. tables can also generate material data files. To use
these codes, just copy the files shower.exe and tables.exe into the directory
pendbase and run them from there. These tools are useful for teaching purposes,
they make radiation physics “visible”.
emfields ... Contains the subroutine package penfield.f, which does simulation
of electron/positron transport under external static magnetic (and electric) fields,
and examples of programs that use it.
tables ... . This directory contains the source file tables.f of the program ta-
bles, which reads a material data file and generates tables of interaction proper-
ties (cross sections, mean free paths, ranges, ...). A number of gnuplot scripts
are provided for plotting the most relevant of these quantities as functions of
the energy. The program tables.exe also calculates interpolated values of these
quantities at specified energies, as well as restricted stopping powers. At the start,
tables asks for the name of the material data file, which is expected to be lo-
cated in the working directory. If the material data file does not exist, and if the
executable binary of tables is in directory pendbase, the program builds that
file by calling the penelope routines.
The subdirectory class-II contains the program tables-class-II.f, which
gives mean-free paths and other transport parameters for hard events of electrons
and positrons. This information is useful to analyse the effect of the simulation
parameters on the speed of mixed (class-II) simulations.
The subdirectory LEA includes the programs LEA.f and mutren.f that calculate
347
NEA/NSC/DOC(2015)3
the linear energy absorption of electrons, positrons and photons from simulations
with penelope (see Chapter 5).
pencyl ... Contains the main program pencyl.f for particle transport in cylindrical
structures, the geometry viewer gviewc.exe for these structures (which operates
under Microsoft Windows), and a layout of the input file. It also includes the
following subdirectories:
- examples: complete sets of input and material-data files for several simple
simulation exercises, each in a separate subdirectory.
- gscripts: a set of gnuplot scripts (with the extension .gnu) that display
continuous distributions generated by pencyl. The script filename.gnu plots
the contents of the output file of the same name and the extension .dat.
- tools: contains the source file pencyl-sum.f of a program that combines data
in dump files resulting from multiple independent runs of the same problem.
penmain ... Contains the generic main program penmain.f for particle transport
in quadric geometries, the file pmcomms.f with common blocks and parameter
definitions (inserted in the main program and its subroutines through include
statements), an example of a subroutine with the definition of a special source,
and a layout of the input file. It also includes the following subdirectories:
- examples: input and material-data files for several simulation exercises.
- gscripts: a set of gnuplot scripts (with the extension .gnu) that display
continuous distributions generated by pencyl. The script filename.gnu plots
the contents of the output file of the same name and the extension .dat.
- tools: contains complementary tools for visualising the contents of phase-space
files, for plotting 3D dose maps in planes perpendicular to the coordinate axes,
and the source file penmain-sum.f of a program that combines data in dump files
resulting from multiple independent runs of the same problem.
The executable files of pencyl and penmain are obtained by compiling and linking the
following groups of source files:
pencyl : pencyl.f, penelope.f, rita.f, penvared.f, timer.f
penmain: penmain.f, penelope.f, rita.f, pengeom.f, penvared.f, timer.f
NOTE: To simplify the typing of compilation commands, all the modules used by a
main program have been declared through include statements within the program (see,
for example, the source file penmain.f) and do not have to be listed in the compilation
command; still, all the associated modules must be in the same directory as the main
program.
The main programs pencyl and penmain generate multiple files with simulated prob-
ability distributions. Each output file has a heading describing its content, which is in
a format ready for visualisation with a plotting program. We use gnuplot, which
is small in size, available for various platforms (including Linux and Windows) and
348
NEA/NSC/DOC(2015)3
free; this software can be downloaded from the distribution sites listed at the gnuplot
Central site, http://www.gnuplot.info. The gnuplot scripts provided in the dis-
tribution package display the different distributions generated by the main programs.
For instance, in Windows, after running pencyl.exe you can visualise the contents of
the output file depth-dose.dat by simply 1) copying the file depth-dose.gnu from the
directory mains/pencyl/gscripts to the directory that contains the simulation results;
and 2) entering the command “wgnuplot depth-dose.gnu” (or clicking the icon of the
script). Some of the scripts assume that the output files have their default names; if the
user assigns different filenames to those output files, the scripts need to be edited and
modified appropriately.
tutorial.pdf ... A guided tour through the penelope code system. Includes brief
descriptions of the programs and subroutine packages, instructions to install the
code system, to build binary executable files, and to run various exercises.
penelope-2014-NEA.pdf ... The present manual.
The simulation programs are written in Fortran language11 . To generate the exe-
cutable binary files of the simulation programs you need to have a Fortran compiler
installed on your computer. For Win32 (Windows 9x/NT/2000/XP/7), a number of
free compilers are available. We use the Fortran compiler gfortran12 from the Free
Software Foundation. Silverfrost 13 offers its Fortran 95 compiler Salford FTN95 Per-
sonal Edition free of charge for personal, non-commercial usage; on execution, programs
compiled with FTN95PE display a banner.
11
Updated information on Fortran can be found at “Clive Page’s list of Fortran Resources”, http:
//www.star.le.ac.uk/~cgp/fortran.html, including Page’s (1988) book, Professional Programmer’s
Guide to Fortran 77, in various formats.
12
http://mingw-w64.sourceforge.net
13
http://www.silverfrost.com/default.aspx
349
NEA/NSC/DOC(2015)3
350
NEA/NSC/DOC(2015)3
Appendix A
Collision kinematics
To cover the complete energy range of interest in radiation transport studies we use
relativistic kinematics. Let P denote the energy-momentum 4-vector of a particle, i.e.,
where W and p are the total energy (including the rest energy) and momentum respec-
tively and c is the velocity of light in vacuum. The product of 4-vectors, defined by
E = W − mc2 , (A.4)
where mc2 is the rest energy. The magnitude of the momentum is given by
where s s
v γ2 − 1 E(E + 2mc2 )
β≡ = = (A.7)
c γ2 (E + mc2 )2
is the velocity of the particle in units of c and
r
1 E + mc2
γ≡ = (A.8)
1 − β2 mc2
351
NEA/NSC/DOC(2015)3
is the total energy in units of the rest energy. From the relation (A.5), it follows that
p
E = (cp)2 + m2 c4 − mc2 (A.9)
and
dp 1 1
= = . (A.10)
dE v cβ
For a photon (and any other particle with m = 0), the energy and momentum are
related by
E = cp. (A.11)
P1 + P2 = P3 + P4 . (A.13)
From this equation, the angles of emergence of the final particles, θ3 and θ4 , are uniquely
determined by their energies, W3 and W4 . Thus,
352
NEA/NSC/DOC(2015)3
x
p3
3
p1 2 θ3 z
1 4 θ4
p4
The different two-body reactions found in Monte Carlo simulation of coupled elec-
tron-photon transport can be characterised by a single parameter, namely the energy
of one of the particles that result from the reaction. The energy of the second particle
is determined by energy conservation. Equations (A.15) and (A.16) then fix the polar
angles, θ3 and θ4 , of the final directions. Explicitly, we have
353
NEA/NSC/DOC(2015)3
1/2
1−τ
cos θ4 = (κ + 1) . (A.20)
κ [2 + κ(1 − τ )]
• Annihilation of positrons with free electrons at rest.
Projectile: Positron m1 = me , W1 = E + me c2 ≡ γ me c2 .
Target: Electron m2 = me , W2 = me c2 .
Annihilation photons: m3 = 0, W3 ≡ ζ(E + 2me c2 ).
m4 = 0, W4 = (1 − ζ)(E + 2me c2 ).
−1/2
cos θ3 = γ 2 − 1 (γ + 1 − 1/ζ) , (A.21)
2
−1/2 1
cos θ4 = γ − 1 γ+1− . (A.22)
1−ζ
Solving Eq. (A.23), we obtain the following expression for the energy transfer W
corresponding to a given scattering angle θ,
h p i
2 2 2 2 4 2 4 2
W = (E + mc ) sin θ + M c − cos θ M c − m c sin θ
E(E + 2mc2 )
× . (A.25)
(E + mc2 + M c2 )2 − E(E + 2mc2 ) cos2 θ
In the case of collisions of particles with equal mass, m = M , this expression simplifies
to
E(E + 2mc2 ) sin2 θ
W = if M = m. (A.26)
E sin2 θ + 2mc2
354
NEA/NSC/DOC(2015)3
1
E 2 θ z
1 θr
2
In this case, θ can only take values less than 90 deg. For θ = 90 deg, we have W = E
(i.e., the full energy and momentum of the projectile are transferred to the target).
Notice that for binary collisions of electrons and positrons (m = me ), the relation
(A.26) becomes identical to (A.17).
For elastic collisions of electrons by atoms and ions, the mass of the target is much
larger than that of the projectile and Eq. (A.25) becomes
2m
W = (1 − cos θ)E if M m and E mc2 . (A.28)
M
where me is the electron rest mass and θ = arccos(p̂· p̂0 ) is the scattering angle. Equiv-
alently, we can write p
Q = (cq)2 + m2e c4 − me c2 . (A.30)
355
NEA/NSC/DOC(2015)3
Notice that, when the collision is with a free electron at rest, the energy loss is completely
transformed into kinetic energy of the recoiling electron, i.e., Q = W . For collisions with
bound electrons, the relation Q ' W still holds for hard ionising collisions (that is, when
the energy transfer W is much larger than the ionisation energy of the target electron
so that binding effects are negligible).
The kinematically allowed recoil energies lie in the interval Q− < Q < Q+ , with end
points given by Eq. (A.29) with cos θ = +1 and −1, respectively. That is
p
Q± = (cp ± cp0 )2 + m2e c4 − me c2
rh i2
p p
= E(E + 2mc2 ) ± (E − W )(E − W + 2mc2 ) + m2e c4 − me c2 . (A.31)
Notice that, for W < E, Q+ is larger than W and Q− < W . When W E, expression
(A.31) is not suitable for evaluating Q− since it involves the subtraction of two similar
quantities. In this case, it is more convenient to use the approximate relation
1 d2 p 2
0 dp W 1 W
cp − cp ' c W− W = 1+ (A.32)
dE 2 dE 2 β 2γ(γ + 1) E
and calculate Q− as p
Q− ' (cp − cp0 )2 + m2e c4 − me c2 (A.33)
or, if cp − cp0 me c2 ,
Thus, for E W ,
Q− (Q− + 2me c2 ) ' W 2 /β 2 . (A.35)
In the non-relativistic limit,
m 1/2 2
Q ≡ q 2 /2me , Q± = E ± (E − W )1/2 . (A.36)
me
356
NEA/NSC/DOC(2015)3
6
107
W= [Q(Q+2mec2)]1/2
5
log10(W/eV)
106
4 105
3 104
2
103
1 102
0
0 1 2 3 4 5 6 7 8
log10(Q/eV)
Figure A.3: Domains of kinematically allowed transitions in the (Q, W ) plane for elec-
trons/positrons. The curves represent the maximum allowed energy loss Wm (Q), given by Eq.
(A.37), for electrons with the indicated kinetic energies (in eV). When E increases, Wm (Q)
approaches the vacuum photon line, W = [Q(Q+2me c2 )]1/2 , which is an absolute upper bound
for the allowed energy losses.
Now it follows that, for given values of E and Q [< Q+ (0)], the only kinematically
allowed values of the energy loss are those in the interval 0 < W < Wm (Q) (see Fig.
A.2).
For a given energy loss W , the quantity
p
qmin ≡ c−1 Q− (Q− + 2me c2 ), (A.39)
is the minimum value of the momentum transfer in an inelastic collision, which occurs
when θ = 0. qmin is always larger than W/c. When the energy of the projectile increases,
β → 1, and qmin decreases and approaches (but never reaches) the value W/c. It is worth
recalling that a photon of energy W in vacuum has a linear momentum q = W/c and,
hence, interactions consisting of emission of bare photons would be located on the line
Q(Q + 2me c2 ) = W 2 of the (Q,W ) plane, the so-called vacuum photon line. This line,
lies outside the kinematically allowed region, i.e., the “recoil” energy of the photon is
less than Q− (see Fig. A.2). Therefore, when the target is a single atom, the emission of
photons by the projectile is not possible1 . When the energy E of the projectile increases,
Q− decreases and tends to the photon line when β tends to unity. Hence, emission
1
In a condensed medium, ultrarelativistic projectiles can emit real photons (Cerenkov radiation)
under certain, quite restricting circumstances (see, e.g., Jackson, 1975).
357
NEA/NSC/DOC(2015)3
W 2 /β 2 Q− (Q− + 2me c2 )
cos2 θr ' ' . (A.43)
Q(Q + 2me c2 ) Q(Q + 2me c2 )
358
NEA/NSC/DOC(2015)3
Appendix B
Numerical tools
fi = f (xi ) (i = 1, . . . , N ). (B.1)
The points (knots) xi do not need to be equispaced, but we assume that they are in
(strictly) increasing order
x1 < x2 < · · · < xN . (B.2)
2) The polynomial pi (x) matches the values of f (x) at the endpoints of the i-th interval,
Consequently, the curve y = ϕ(x) interpolates the table (B.1) and has a continuously
turning tangent.
359
NEA/NSC/DOC(2015)3
hi ≡ xi+1 − xi (i = 1, . . . , N − 1) (B.7)
and
σi ≡ ϕ00 (xi ) (i = 1, . . . , N ), (B.8)
we can write the obvious identity
xi+1 − x x − xi
p00i (x) = σi + σi+1 (i = 1, . . . , N − 1). (B.9)
hi hi
Notice that xi+1 must be larger than xi in order to have hi > 0. Integrating Eq. (B.9)
twice with respect to x, gives for i = 1, . . . , N − 1
(xi+1 − x)3 (x − xi )3
pi (x) = σi + σi+1 + Ai (x − xi ) + Bi (xi+1 − x), (B.10)
6hi 6hi
where Ai and Bi are constants. These can be determined by introducing the expression
(B.10) into eqs. (B.4), this gives the pair of eqs.
h2i h2i
σi + Bi hi = fi and σi+1 + Ai hi = fi+1 . (B.11)
6 6
Finally, solving for Ai and Bi and substituting the result in (B.10), we obtain
σi (xi+1 − x)3
xi+1 − x
pi (x) = − hi (xi+1 − x) + fi
6 hi hi
3
(B.12)
σi+1 (x − xi ) x − xi
+ − hi (x − xi ) + fi+1 .
6 hi hi
To be able to use ϕ(x) to approximate f (x), we must find the second derivatives
σi (i = 1, . . . , N ). To this end, we impose the conditions (B.5). Differentiating (B.12)
gives
where
fi+1 − fi
δi = . (B.14)
hi
Hence,
hi hi
p0i (xi+1 ) = σi + σi+1 + δi , (B.15a)
6 3
hi hi
p0i (xi ) = −σi − σi+1 + δi (B.15b)
3 6
360
NEA/NSC/DOC(2015)3
and, similarly,
hi+1 hi+1
p0i+1 (xi+1 ) = −σi+1
− σi+2 + δi+1 . (B.15c)
3 6
Replacing (B.15a) and (B.15c) in (B.5), we obtain
hi σi + 2(hi + hi+1 )σi+1 + hi+1 σi+2 = 6 (δi+1 − δi ) (i = 1, . . . , N − 2). (B.16)
0 0 0 ··· 0 hN −2 HN −1 σN −1 DN −1
where
Hi = 2(hi−1 + hi ) (i = 2, . . . , N − 1) (B.18)
and
D2 = 6(δ2 − δ1 ) − h1 σ1
Di = 6(δi − δi−1 ) (i = 3, . . . , N − 2) (B.19)
DN −1 = 6(δN −1 − δN −2 ) − hN −1 σN .
(σ1 and σN are removed from the first and last equations, respectively). The matrix
of coefficients is symmetric, tridiagonal and diagonally dominant (the larger coefficients
are on the diagonal), so that the system (B.17) can be easily (and accurately) solved
by Gauss elimination. The spline coefficients ai , bi , ci , di (i = 1, . . . , N − 1) —see Eq.
(B.3)— can then be obtained by expanding the expressions (B.12):
1 hi
σi x3i+1 − σi+1 x3i + 6 (fi xi+1 − fi+1 xi ) + (σi+1 xi − σi xi+1 ),
ai =
6hi 6
1 h i
σi+1 x2i − σi x2i+1 + 2 (fi+1 − fi ) + (σi − σi+1 ),
bi =
2hi 6
(B.20)
1
ci = (σi xi+1 − σi+1 xi ),
2hi
1
di = (σi+1 − σi ).
6hi
361
NEA/NSC/DOC(2015)3
When accurate values of f 00 (x) are known, the best strategy is to set σ1 = f 00 (x1 ) and
σN = f 00 (xN ), since this will minimise the spline interpolation errors near the endpoints
x1 and xN . Unfortunately, the exact values f 00 (x1 ) and f 00 (xN ) are not always available.
The so-called natural spline corresponds to taking σ1 = σN = 0. It results in
a y = ϕ(x) curve with the shape that would be taken by a flexible rod (such as a
draughtman’s spline) if it were bent around pegs at the knots but allowed to maintain its
natural (straight) shape outside the interval [x1 , xN ]. Since σ1 = σN = 0, extrapolation
of ϕ(x) outside the interval [x1 , xN ] by straight segments gives a continuous function
with continuous first and second derivatives [i.e., a cubic spline in (−∞, ∞)].
The accuracy of the spline interpolation is mainly determined by the density of knots
in the regions where f (x) has strong variations. For constant, linear, quadratic and cubic
functions the interpolation errors can be reduced to zero by using the exact values of
σ1 and σN (in these cases, however, the natural spline may introduce appreciable errors
near the endpoints). It is important to bear in mind that a cubic polynomial has, at
most, one inflexion point. As a consequence, we should have at least a knot between
each pair of inflexion points of f (x) to ensure proper interpolation. Special care must
be taken when interpolating functions that have a practically constant value in a partial
interval, since the spline tends to wiggle instead of staying constant. In this particular
case, it may be more convenient to use linear interpolation.
Obviously, the interpolating cubic spline ϕ(x) can be used not only to obtain inter-
polated values of f (x) between the knots, but also to calculate integrals such as
Z b Z b
f (x) dx ' ϕ(x) dx, x1 ≤ a and b ≤ xN , (B.21)
a a
analytically. It is worth noting that derivatives of ϕ(x) other than the first one may
differ significantly from those of f (x).
To obtain the interpolated value ϕ(xc ) —see Eq. (B.3)— of f (x) at the point xc ,
we must first determine the interval (xi , xi+1 ] that contains the point xc . To reduce the
effort to locate the point, we use the following binary search algorithm:
(v) Deliver i.
362
NEA/NSC/DOC(2015)3
where the integrand is coded as an external function subprogram, which gives nominally
exact values. These integrals are evaluated by using the Fortran 77 external function
SUMGA, which implements the twenty-point Gauss method with an adaptive bipartition
scheme to allow for error control. This procedure is comparatively fast and is able to
deal even with functions that have integrable singularities located at the endpoints of
the interval [A, B], a quite exceptional feature.
363
NEA/NSC/DOC(2015)3
364
NEA/NSC/DOC(2015)3
Appendix C
Photon polarisation
The current version of penelope can simulate the scattering of polarised photons ac-
cording to the theory described in Section 2.7. Polarisation effects are accounted for
by using DCSs that depend on the polarisation of the incident and scattered photons.
Hence, the simulation algorithm requires defining the polarisation state of the primary
photons and keeping track of the polarisation changes induced by scattering events. In
the present Appendix we introduce elementary concepts on photon polarisation and we
devise a consistent scheme for describing arbitrary polarisation states, which is tailored
for Monte Carlo simulation of photon multiple scattering processes. Our treatment is
based on the density matrix formalism and the representation of density matrices in
terms of the so-called Stokes parameters, as described, e.g., by Fano (1954a), McMaster
(1954) and Tolhoek (1956).
Clearly, the first polarisation vector, ˆ1 , can be selected arbitrarily among the unit
vectors orthogonal to k̂, and then the second polarisation vector is determined by the
condition k̂ × ˆ1 = ˆ2 . The electric field of a monochromatic plane wave of angular
frequency ω that advances in the direction k̂ is
365
NEA/NSC/DOC(2015)3
where k = (ω/c)k̂ is the wave vector, d1 and d2 are complex numbers such that |d1 |2 +
|d2 |2 = 1, and the real parameter E0 determines the amplitude of the wave. The wave
(C.2a) can be expressed in the equivalent form
where the polarisation vector ζ is complex and has unit magnitude, i.e., ζ ∗·ζ = 1. With
all generality, we can write (apart from an irrelevant phase factor)
with α ∈ (0, π) and β ∈ (0, 2π). The plane wave (C.2b) is elliptically polarised. When
β = 0, the polarisation is linear; the electric field of the wave oscillates in a direction
that forms an angle α/2 with ˆ1 . If α = π/2 and β = ±π/2, we have right-hand circular
polarisation (+) and left-hand circular polarisation (−).
To facilitate the simulation of interactions of polarised electromagnetic radiation,
and to avoid ambiguities, for each direction of propagation k̂ we define a “natural”
basis of polarisation vectors as follows. Let ϑ and ϕ denote the polar and azimuthal
angles of the direction k̂, that is,
cos ϕ sin ϑ
k̂ =
sin ϕ sin ϑ .
(C.4)
cos ϑ
A rotation of angle ϑ about the ŷ axis followed by a rotation of angle ϕ about the ẑ
axis transforms the vector ẑ into k̂. The matrix of this rotation is
cos ϕ − sin ϕ 0 cos ϑ 0 sin ϑ
R(ϑ, ϕ) = R(ϕẑ)R(ϑŷ) = sin ϕ cos ϕ 0 0
1 0
0 0 1 − sin ϑ 0 cos ϑ
cos ϕ cos ϑ − sin ϕ cos ϕ sin ϑ
= sin ϕ cos ϑ cos ϕ sin ϕ sin ϑ .
(C.5)
− sin ϑ 0 cos ϑ
We define the polarisation vectors ˆ1 (k̂) y ˆ2 (k̂) corresponding to the propagation di-
rection k̂ as those that result from rotating the unit vectors x̂ and ŷ (see Fig. C.1), i.e.,
cos ϕ cos ϑ
ˆ1 (k̂) ≡ R(ϑ, ϕ)x̂ =
sin ϕ cos ϑ
(C.6a)
− sin ϑ
366
NEA/NSC/DOC(2015)3
and
− sin ϕ
ˆ2 (k̂) ≡ R(ϑ, ϕ)ŷ =
cos ϕ .
(C.6b)
0
Evidently,
ˆ1 (k̂)׈2 (k̂) = k̂ and ˆ1 (k̂)·ˆ2 (k̂) = 0.
Note that ẑ× k̂ = sin ϑˆ2 (k̂). That is, ˆ2 (k̂) is perpendicular to the plane that contains
the vectors ẑ and k̂. Therefore, the vector ˆ1 (k̂) lies in that plane. To simplify the
writing of formulas, in what follows we will use the notation ˆ1 and ˆ2 to designate the
polarisation vectors, by removing the explicit reference to the propagation direction k̂,
which is implied by the context.
z
k
ǫ̂2
ϑ
ǫ̂1
x y
ϕ
Figure C.1: Vectors ˆ1 (k̂) and ˆ2 (k̂) of the “natural” basis of linear polarisation for waves
that propagate in the direction k̂.
The quantities |d1 |2 and |d2 |2 are the probabilities that in a measurement of the polari-
sation we find the photon in the states |ˆ1 i and |ˆ2 i, respectively. There is a one-to-one
correspondence between polarisation states |ζi and the polarisation vectors of classical
waves, ζ = d1 ˆ1 + d2 ˆ2 . Hereafter we write ζ and ˆi instead of |ζi and |ˆi i, i.e., we use
the same symbol to designate the quantum polarisation states and the unit polarisation
vectors.
367
NEA/NSC/DOC(2015)3
with α ∈ (0, π) and β ∈ (0, 2π). States with β = 0 correspond to linear polarisation
in a direction that makes an angle α/2 with ˆ1 . If β = ±π/2 and α = π/2, we have
right-hand (+) and left-hand (−) circularly polarised photons.
The matrix elements of the density operator in the basis of states of linear polarisation
{ˆ1 , ˆ2 } are X
ρµν = hˆµ |ζ n i pn hζ n |ˆν i (µ, ν = 1, 2). (C.10)
n
If the beam photons are in a single pure state, Eq. (C.7a), the density matrix reduces
to
ρ = |ζihζ| and ρµν = dµ d∗ν , (C.11)
that is, !
d1 d∗1 d1 d∗2
ρ= . (C.12)
d2 d∗1 d2 d∗2
368
NEA/NSC/DOC(2015)3
The quantities Pi are the Stokes parameters, which are important because they provide
a complete description of the polarisation of a beam and, as we will show below, they
can be measured experimentally. From the properties of the Pauli matrices, we have
Trρσi = Pi . (C.17)
This equality defines the Stokes parameters in terms of the density matrix elements ρµν ,
1
ρ= (I2 + P·σ) . (C.19)
2
The Poincaré vector is analogous to the direction of spin of a spin- 12 particle. However,
the spin direction belongs to ordinary space (because it transforms as a common vector
under rotations), while P is in a different vector space (because its components transform
in a special form under space rotations, see Section C.2.1). The determinant of the
density matrix is
1
det ρ = (1 − P 2 ), (C.20)
2
with P 2 = P12 + P22 + P32 .
If the Stokes parameters vanish, P = 0, we have ρ = 12 I2 . That is, all polarisation
directions are equivalent. A density matrix of this type represents unpolarised photons.
369
NEA/NSC/DOC(2015)3
The opposite case is that of a pure state (α, β), Eq. (C.7b), which has the following
density matrix,
!
cos2 (α/2) cos(α/2) sin(α/2) exp(−iβ)
ρ= . (C.21)
cos(α/2) sin(α/2) exp(iβ) sin2 (α/2)
Note that α and β are the polar and azimuthal angles of the Poincaré vector P, and
that
P 2 = P12 + P22 + P32 = 1. (C.23)
It is worth mentioning that in optics the Pauli matrices are usually given in a differ-
ent order, namely, {σ3 , σ1 , σ2 }. We prefer the ordering (C.15) employed in quantum
mechanics, not only because it allows the geometrical interpretation of the state angles
α and β expressed by Eqs. (C.22) but also because the formalism is parallel to that
of polarisation of spin- 21 particles, which is studied in elementary quantum mechanics
courses.
It is clear that P , the magnitude of the Poincaré vector, can take values from 0
(unpolarised photons) to 1 (pure polarisation states). It is natural to refer to P as
the polarisation degree of the photons. The endpoints of the Poincaré vectors fill the
interior of the unit sphere, the so-called Poincaré sphere. The pure states (complete
polarisation) have the endpoints of their Poincaré vectors on the surface of that sphere.
In the case of pure states (P = 1), inverting the relations (C.22), we can obtain the
state angles (α, β) from the Stokes parameters,
P1 + iP2
α = arccos P3 , exp(iβ) = p . (C.24)
1 − P32
The pure states corresponding to the Poincaré vectors P and −P, with respective di-
rections (α, β) and (π − α, β + π), are
!
cos(α/2)
ζ(P) ≡ ˆ(α, β) = , (C.25a)
sin(α/2) exp(iβ)
!
sin(α/2)
ζ(−P) ≡ ˆ(π − α, β + π) = . (C.25b)
− cos(α/2) exp(iβ)
Note that these states are orthogonal,
Hence, by reversing the signs of the Stokes parameters of a pure state, we obtain its
orthogonal state (except, possibly, an irrelevant phase factor). Thus, the state angles
370
NEA/NSC/DOC(2015)3
(α, β), the Poincaré vectors and the density matrices of the states {ˆ1 , ˆ2 } of the linear-
polarisation basis are
! !
1 α = 0, β = 0, 1 2 0
ˆ1 = : ρ(ˆ1 ) = , (C.27a)
0 P(ˆ1 ) = (0, 0, 1), 2 0 0
! !
0 α = π, β = π, 1 0 0
ˆ2 = : ρ(ˆ2 ) = . (C.27b)
1 P(ˆ2 ) = (0, 0, −1), 2 0 2
As a third example, to which we will refer below, we consider the basis of polarisation
states obtained by rotating the vectors of the basis {ˆ1 , ˆ2 } an angle of 45 degrees about
the propagation direction k̂,
! !
1 1 α = π/2, β = 0, 1 1 1
ˆ(45)
1 =√ : (45)
(45)
ρ(ˆ1 ) = , (C.29a)
2 1 P(ˆ1 ) = (1, 0, 0), 2 1 1
! !
1 1 α = π/2, β = π, 1 1 −1
ˆ(45)
2 =√ : (45)
(45)
ρ(ˆ2 ) = . (C.29b)
2 −1 P(ˆ2 ) = (−1, 0, 0), 2 −1 1
The intensity of a photon beam is defined as the number of photons per unit volume
in the beam. Let us consider two photon beams with intensities N1 and N2 and respective
density matrices ρ1 and ρ2 . The incoherent admixture of these two beams gives a beam
with intensity N = N1 + N2 and density matrix
N1 N2
ρ= ρ1 + ρ2 . (C.30a)
N N
The corresponding Stokes parameters are
N1 N2
P= P1 + P2 , (C.30b)
N N
where P1 and P2 are the Poincaré vectors of the initial beams.
A partially polarised beam with Stokes parameters P (P < 1) can be regarded as
an incoherent admixture of an unpolarised beam and a completely polarised beam. To
characterise these beams, we define the reduced Stokes parameters
371
NEA/NSC/DOC(2015)3
The matrix density of the partially polarised beam P can then be expressed as
!
1 1 + P 3 P 1 − iP2
ρ =
2 P1 + iP2 1 − P3
! !
1 1 0 1 1 + P30 P10 − iP20
= (1 − P ) +P . (C.32)
2 0 1 2 P10 + iP20 1 − P30
The second term in the last expression describes a completely polarised beam, because
P102 + P202 + P302 = 1. Hence, the result of mixing an unpolarised beam and a completely
polarised beam P0 , with relative intensities (1 − P ) and P , respectively, has the same
density matrix as the original partially polarised beam. Therefore, any polarisation
measurement on the mixed beam will yield the same results as for the original beam ρ
(see below).
The density matrices of beams in pure polarisation states with Poincaré vectors P
and −P (P = 1) are
! !
1 1 + P3 P1 − iP2 1 1 − P3 −P1 + iP2
ρ(P) = and ρ(−P) = ,
2 P1 + iP2 1 − P3 2 −P1 − iP2 1 + P3
(C.33)
respectively. The density matrix of the beam obtained by mixing these two beams, with
equal intensities, is
1 1 1 1 0
ρ = ρ(P) + ρ(−P) = , (C.34)
2 2 2 0 1
which is the density matrix of an unpolarised beam. This result implies that an unpo-
larised beam can be regarded as an admixture of two completely polarised beams with
equal intensities and “opposite” polarisations P and −P, independently of the direction
of P.
That is, the transformation leaves the length of the Poincaré vectors (the degree of
polarisation) unaltered. As we are going to show, rotations of the unit polarisation
vectors induce rotations of the Poincaré vectors.
1
We recall that a 2×2 matrix U is unitary if U † = U −1 , i.e., if its Hermitian conjugate U † coincides
with its inverse U −1 .
372
NEA/NSC/DOC(2015)3
Let us assume that we change the zero-azimuth plane by an angle φ, i.e., we rotate
the vectors of the basis of linear polarisation an angle φ about the k̂ axis. The vectors
of the new basis are
ˆ01 = R(φk̂)ˆ1 = cos φ ˆ1 + sin φ ˆ2 ,
ˆ02 = R(φk̂)ˆ2 = − sin φ ˆ1 + cos φ ˆ2 . (C.36)
The rotation matrix has elements Rij (φk̂) = ˆi |ˆ0j , i.e.,
!
cos φ − sin φ
R(φk̂) = = cos φI2 − i sin φσ2 . (C.37)
sin φ cos φ
The matrix of the inverse rotation is
!
cos φ sin φ
R(−φk̂) = R−1 (φk̂) = = cos φI2 + i sin φσ2 . (C.38)
− sin φ cos φ
Note that R−1 (φk̂) = R† (φk̂). The coefficients of the expansion of the polarisation state
ζ = di ˆi in the new basis are
0 D E D E
0
dj = ˆj |ζ = R(φk̂)ˆj di ˆi = ˆj R(−φk̂) ˆi di = Rji (−φk̂)di , (C.39)
That is,
1
ρ0 = R(−φk̂)ρR(φk̂) = (cos φI2 + i sin φσ2 ) (I2 − P·σ) (cos φI2 − i sin φσ2 )
2
1 n o
= I2 + [− sin(2φ)P3 + cos(2φ)P1 ]σ1 + P2 σ2 + [cos(2φ)P3 + sin(2φ)P1 ]σ3 . (C.42)
2
Hence,
P30 = cos(2φ)P3 + sin(2φ)P1
P10 = − sin(2φ)P3 + cos(2φ)P1 . (C.43)
373
NEA/NSC/DOC(2015)3
1 1
F (ˆ1 ) = [I2 + σ3 ] = [I2 + Q·σ] . (C.45)
2 2
Now, the operator F [ζ(Q)] for any other polarisation direction Q can be obtained by
means of a unitary transformation of {ˆ1 , ˆ2 }. Therefore, the most general form of that
operator is
1
F [ζ(Q)] = [I2 + Q·σ] . (C.46)
2
Using this formula, we see that the operators of polarisation filters that transmit photons
(45)
with the polarisations ˆ(r) and ˆ1 are [see Eqs. (C.28a) and (C.29a)]
!
1 −i
F (ˆ(r) ) = (C.47)
i 1
374
NEA/NSC/DOC(2015)3
and !
(45) 1 1
F (ˆ1 ) = , (C.48)
1 1
respectively. It can be easily verified that, indeed, the eigenstates of these operators are
(45) (45)
those of the bases {ˆ(r) , ˆ(l) } and {ˆ1 , ˆ2 } defined above.
Note that the matrix of the filter operator F [ζ(Q)] is equal to the density matrix of
a pure state with Poincaré vector Q, Eq. (C.19),
The transmission probability of photons in a pure state ζ(P), with Poincaré vector
P (P = 1) and density matrix ρ(P), through the polariser F [ζ(Q)] is
In the case of a partially polarised beam, with Poincaré vector P (P ≤ 1), the transmis-
sion probability can be readily obtained from the decomposition (C.32). The unpolarised
component is transmitted with probability 1/2, while the transmission probability of the
completely polarised component is given by (C.52). Hence,
1
hF [ζ(Q)]i = (1 − P ) + P Tr{F [ζ(Q)] ρ(P0 )}
2
= Tr{F [ζ(Q)] ρ(P)}. (C.53)
This result can also be derived, in a more general fashion, from elementary considerations
on the density matrix, Eq. (C.9) (see, e.g., Sakurai, 1997; Ballentine, 1998). Using the
relation
(Q·σ)(P·σ) = Q·P + iσ·(Q×P), (C.54)
375
NEA/NSC/DOC(2015)3
we see that
1 1
hF [ζ(Q)]i = Tr [I2 + Q·σ] [I2 + P·σ] .
2 2
1
= (1 + Q·P). (C.55)
2
That is, if P is parallel (antiparallel) to Q, the transmission probability is unity (zero).
When P and Q are mutually orthogonal, the fraction of transmitted photons is 1/2.
Now we are ready to show how the Stokes parameters can be measured experimen-
tally. Let us consider a photon beam in an arbitrary (pure or mixed) polarisation state,
described by the Poincaré vector P (P ≤ 1), and assume that we perform measure-
ments with ideal analysers. The probability of transmission through a linear filter with
polarisation vector ˆ1 [Q = (0, 0, 1)] is
( ! !)
1 0 1 1 + P3 P1 − iP2
hF (ˆ1 )i = Tr = 21 (1 + P3 ). (C.56a)
0 0 2 P1 + iP2 1 − P3
(45)
Similarly, for a linear filter of polarisation ˆ1 [Q = (1, 0, 0)],
( ! !)
(45) 1 1 1 1 1 + P 3 P 1 − iP 2
hF (ˆ1 )i = Tr = 12 (1 + P1 ). (C.56b)
2 1 1 2 P1 + iP2 1 − P3
That is, to determine the Stokes parameters of a photon beam, we only have to per-
(45)
form measurements with the three ideal polarisers ˆ1 , ˆ1 and ˆ(r) . The parameter
P3 characterises the polarisation along {ˆ1 , ˆ2 }: if P3 = 1, the photon is in the pure
state ˆ1 , while P3 = −1 corresponds to total polarisation in the orthogonal direction ˆ2 .
The second Stokes parameter describes circular polarisation: P2 = 1 corresponds to the
pure state ˆ(r) , and P2 = −1 describes photons with left-hand circular polarisation, ˆ(l) .
Similarly, P1 measures the polarisation in a direction that makes an angle of 45 degrees
(45)
with ˆ1 . The values P1 = 1 and P1 = −1 correspond to the pure polarisation states ˆ1
(45)
and ˆ2 , respectively.
From the results in Eqs. (C.56), our ordering of the Stokes parameters, with P3
measuring linear polarisation in the “natural” directions ˆ1 and ˆ2 , may seem awkward.
The ordering used in optics, (P3 , P1 , P2 ), assigns more relevance to linear polarisations,
but alters the relationship (C.22) between the components of the Poincaré vector and
the state angles (α, β) obscuring the geometrical interpretation of the latter.
376
NEA/NSC/DOC(2015)3
Note: Real analysers. Real polarisation filters have maximum efficiency W+ (trans-
mission probability, ≤ 1) for pure states corresponding to a certain Poincaré vector Q
(Q = 1) and minimum efficiency W− for pure states polarised in the opposite direction,
−Q. A real filter can be regarded as the “superposition” of two ideal filters with weights
W+ and W− , and represented by the operator
Using the property (C.54) of the Pauli matrices, and the fact that these matrices are
traceless, we obtain
1
hF [ζ(Q); W+ , W− ]i = [(W+ + W− ) + (W+ − W− )Q·P] . (C.59)
2
It is clear that, if P is parallel (antiparallel) to Q, the transmission probability is W+
(W− ). When P and Q are mutually orthogonal, the fraction of incident photons that is
transmitted is (W+ + W− )/2.
Using the relation (C.54), we see that
1 2
F 2 [ζ(Q); W+ , W− ] = (W+ + W−2 )I2 + (W+2 − W−2 )Q·σ .
(C.60)
2
This operator represents a composite filter consisting of two identical polarisers of the
type F [ζ(Q); W+ , W− ]. It has the same form as the operator F [ζ(Q); W+ , W− ], but
with efficiencies W+2 and W−2 , as could be expected from the fact that the attenuation
of the composite filter is the product of attenuations of the individual filters.
377
NEA/NSC/DOC(2015)3
In the simulations, polarisation states are described by means of the Stokes param-
eters. Pure states with polarisation P are represented by the four-component vector of
Stokes parameters,
P0
P
1
P ≡ (1, P)T = , with P0 = 1. (C.61)
P2
P3
DP = X P, P = X −1 DP , (C.63)
with
1 0 0 1 1 1 0 0
11
0 0 −1 0 0 1 1
X = , X −1 = . (C.64)
20 1 −i 0 0 0 i −i
0 1 i 0 1 −1 0 0
For brevity, the four-vector P will be referred to as the Stokes vector. Similarly, an
ideal filter F [ζ(Q)] that accepts photons with polarisation Q can be represented by the
Stokes vector Q = (1, Q)T . Photons with polarisation P are transmitted through the
filter with probability [see Eq. (C.55)]
1 1
hF [ζ(Q)]i = (1 + Q·P) ≡ QT P. (C.65)
2 2
Or, in terms of the density-matrix four-vectors,
hF [ζ(Q)]i = Tr[ρ(Q)ρ(P)] = DT
Q Z34 DP , (C.66)
378
NEA/NSC/DOC(2015)3
A rotation of the zero-azimuth plane by an angle φ causes the rotation of the Stokes
vector given by Eq. (C.43), i.e.,
1 0 0 0
0
0 cos(2φ) 0 − sin(2φ)
P = R(φ)P with R(φ) = . (C.68)
0 0 1 0
0 sin(2φ) 0 cos(2φ)
Note that the Stokes vector of a filter transforms in the same way, i.e., Q0 = R(φ)Q.
Indeed, from Eq. (C.65) we see that, when we rotate both the beam and the filter, the
results of measurements remain unaltered,
T
Q0 P0 = QT RT (φ)R(φ)P = QT P.
A beam of photons with polarisation P and intensity N (number of photons per unit
volume in the beam) will be represented by the Stokes vector N P. Similarly, the density
matrix of the beam will be defined as N ρ(P), so that the relations (C.63) are still valid.
Note, however, that with this convention the trace of the density matrix, and the zeroth
component of the Stokes vector, are equal to the intensity N of the beam. If the beam
N P is passed through an ideal filter F[ζ(Q)], the transmitted beam has the intensity
1 1
N 0 = N (1 + Q·P) ≡ N QT P, (C.69)
2 2
and its Stokes vector is N 0 Q. The Stokes vector of the transparent filter (F = I2 ) is
1 2
1 0
QI = X −1 = (C.70)
0 0
0 0
379
NEA/NSC/DOC(2015)3
380
NEA/NSC/DOC(2015)3
Appendix D
Electron/positron transport in
electromagnetic fields
381
NEA/NSC/DOC(2015)3
leave the field volume). Injection of a single electron in the medium may give rise to a
complex cascade of delta rays, that accelerate in the direction opposite to the electric
field. To describe these cascades we need accurate cross sections for ionisation of outer
atomic shells by impact of low-energy electrons, much more accurate than the simple
ones implemented in penelope. Therefore, penelope is not expected to yield a reliable
description of this process. The simulation algorithm described here is applicable only to
magnetic fields and, cautiously, to weak electric fields. Notice also that we disregard the
emission of radiation by the charged particle when it is accelerated by the external EM
field (see, e.g., Jackson, 1975); this approximation is not valid for very strong magnetic
and electric fields.
The simulation algorithm described below is designed to track charged particles in
the presence of electromagnetic fields that are constant with time and vary slowly with
position. More specifically, we assume that the particle trajectory can be described as
a succession of short segments such that the electric and magnetic fields are essentially
constant along each segment. When this assumption is not valid (i.e., when the fields
vary too rapidly with position or time), our simple scheme for solving the equation of
motion [Eq. (D.7)] is not applicable.
382
NEA/NSC/DOC(2015)3
Z t
r(t) = r0 + v(t0 ) dt0 . (D.9)
0
Evidently, these equations are too complex for straight application in a simulation code
and we must have recourse to approximate solution methods. We shall adopt the ap-
proach proposed by Bielajew (1988), which is well suited to transport simulations. The
basic idea is to split the trajectory into a number of conveniently short steps such that
the acceleration A does not change much over the course of a step. Along each step, we
then have
v(t) = v0 + t A(r0 , E0 , v̂0 ) (D.10)
1
r(t) = r0 + t v0 + t2A(r0 , E0 , v̂0 ), (D.11)
2
where the subscript “0” indicates values of the various quantities at the starting point
(t = 0). The travelled path length s and the flying time t are related by
Z s 0
ds
t= , (D.12)
0 v
which to first order becomes
t = s/v0 . (D.13)
Then, to first order in the electromagnetic force,
A(r0 , E0 , v̂0 )
v(s) = v0 + s
cβ0
1 A(r0 , E0 , v̂0 )
r(s) = r0 + s v̂0 + s2 .
2 c2 β02
383
NEA/NSC/DOC(2015)3
That is,
1 Z0 e [E 0 − β02 (E 0 · v̂0 )v̂0 + β0 v̂0 ×B0 ]
r(s) = r0 + s v̂0 + s2 . (D.14)
2 me c2 γ0 β02
The particle’s velocity can be calculated directly from Eq. (D.10), which to first
order gives
v(s) = v0 + ∆v (D.15)
with
Z0 e [E 0 − β02 (E 0 · v̂0 )v̂0 + β0 v̂0 ×B0 ]
∆v = s . (D.16)
me c γ0 β0
In the tracking algorithm, the velocity is used to determine the direction vector at the
end of the step,
v0 + ∆v
v̂(s) = . (D.17)
|v0 + ∆v|
Owing to the action of the electromagnetic force, the kinetic energy E of the particle
varies along the step. As the trajectory is accurate only to first order, it is not advisable
to compute the kinetic energy from the velocity of the particle. It is preferable to
calculate E(t) as
E(s) = E0 + Z0 e [ϕ(r0 ) − ϕ(r(s))] (D.18)
where ϕ(r) is the electrostatic potential, E = −∇ϕ. Notice that this ensures energy
conservation, i.e., it gives the exact energy variation in going from the initial to the final
position.
This tracking method is valid only if
1) the fields do not change too much along the step
|E(r(s)) − E(r0 )| |B(r(s)) − B(r0 )|
< δE 1, < δB 1 (D.19)
|E(r0 )| |B(r0 )|
and
2) the relative changes in kinetic energy and velocity (or direction of motion) are small
E(s) − E0 |∆v|
< δE 1, < δv 1. (D.20)
E0 v0
These conditions set an upper limit on the allowed step length, smax , which depends
on the local fields and on the energy and direction of the particle. The method is ro-
bust, in the sense that it converges to the exact trajectory when the maximum allowed
step length tends to zero. In practical calculations, we shall specify the values of the
δ-parameters (which should be of the order of 0.05 or less) and consider step lengths con-
sistent with the above conditions. Thus, the smallness of the δ-parameters determines
the accuracy of the generated trajectories.
To test the accuracy of a tracking algorithm, it is useful to consider the special cases
of a uniform electric field (with B = 0) and a uniform magnetic field (with E = 0),
which admit relatively simple analytical solutions of the equations of motion.
384
NEA/NSC/DOC(2015)3
1h v0k i
r(t) = r0 + tv0⊥ + cosh (act) − 1 + sinh (act) Ê, (D.21)
a c
where v0k and v0⊥ are the components of v0 parallel and perpendicular to the direction
of the field,
v0k = (v0 · Ê)Ê, v0⊥ = v0 − (v0 · Ê)Ê (D.22)
and
Z0 eE Z0 eE
a≡ 2
= . (D.23)
me c γ0 E0
The velocity of the particle is
v(t) = v0⊥ + c sinh (act) + v0k cosh (act) Ê
= v0 + c sinh (act) + v0k [cosh (act) − 1] Ê. (D.24)
Since the scalar potential for the constant field is ϕ(r) = −E ·r, the kinetic energy of
the particle varies with time and is given by
Figure D.1 displays trajectories of electrons and positrons with various initial ener-
gies and directions of motion in a uniform electric field of 511 kV/cm directed along
the positive z-axis. Particles start from the origin (r0 = 0), with initial velocity in the
xz-plane forming an angle θ with the field, i.e., v0 = (sin θ, 0, cos θ), so that all trajec-
tories lie on the xz-plane. Continuous curves represent exact trajectories obtained from
the analytical formula (D.21). The dashed curves are the results from the first-order
tracking algorithm described above [Eqs. (D.14)–(D.20)] with δE = δE = δv = 0.02.
We show three positron trajectories with initial energies of 0.1, 1 and 10 MeV, initially
moving in the direction θ = 135 deg. Three trajectories of electrons that initially move
perpendicularly to the field (θ = 90 deg) with energies of 0.2, 2 and 20 MeV are also
depicted. We see that the tracking algorithm gives quite accurate results. The error can
be further reduced, if required, by using shorter steps, i.e., smaller δ-values.
385
NEA/NSC/DOC(2015)3
a b c
6
z (cm) 2
-2 E
-6 θ
v0
f g h
-10
0 10 20 30
x (cm)
Figure D.1: Trajectories of electrons and positrons in a uniform electric field of 511 kV/cm.
Continuous curves represent exact trajectories obtained from Eq. (D.21). The dashed lines are
obtained by using the first-order numerical tracking method described by Eqs. (D.14)–(D.20)
with δE = δE = δv = 0.02. The displayed trajectories correspond to the following cases. a:
positrons, E0 = 0.1 MeV, θ = 135 deg. b: positrons, E0 = 1 MeV, θ = 135 deg. c: positrons,
E0 = 10 MeV, θ = 135 deg. f: electrons, E0 = 0.2 MeV, θ = 90 deg. g: electrons, E0 = 2
MeV, θ = 90 deg. h: electrons, E0 = 20 MeV, θ = 90 deg.
386
NEA/NSC/DOC(2015)3
e+ e−
B
Figure D.2: Trajectories of electrons and positrons in a uniform magnetic field. The two
particles start from the base plane with equal initial velocities.
In our first-order tracking algorithm [see Eqs. (D.14) and (D.16)], the effects of the
electric and magnetic fields are uncoupled, i.e., they can be evaluated separately. For
uniform electric fields, the algorithm offers a satisfactory solution since it usually admits
relatively large step lengths. In the case of uniform magnetic fields (with E = 0), the
kinetic energy is a constant of the motion and the only effective constraint on the
step length is that the change in direction |∆v|/v0 has to be small. Since the particle
trajectories on the plane perpendicular to the field B are circles and the first-order
387
NEA/NSC/DOC(2015)3
3 b
x (cm) 1
-1 a
v0
-3
θ B
-5
0 10 20 30 40
z (cm)
Figure D.3: Trajectories of electrons and positrons in a uniform magnetic field of 0.2 tesla.
Continuous curves are exact trajectories calculated from Eq. (D.30). The short-dashed lines
are obtained by using the numerical tracking method described in the text with δv = 0.02.
Long-dashed curves are the results from the tracking algorithm with δv = 0.005. a: electrons,
E0 = 0.5 MeV, θ = 45 deg. b: positrons, E0 = 3 MeV, θ = 45 deg.
where (∆r)E and (∆r)B are the displacements caused by the electric and magnetic
fields, respectively. For (∆r)E we use the first-order approximation [see Eq. (D.14)],
The displacement caused by the magnetic field is evaluated using the result (D.30), i.e.,
s 1 1
(∆r)B = − v0⊥ + [1 − cos(sω/v0 )] (ω̂×v0⊥ ) + sin(sω/v0 )v0⊥ (D.34)
v0 ω ω
with
Z0 ecB0
ω≡− , and v0⊥ = v0 − (v0 · ω̂)ω̂. (D.35)
E0
388
NEA/NSC/DOC(2015)3
In our implementation of this tracking algorithm, the allowed step lengths s are
limited by the following constraints [see Eqs. (D.19) and (D.20)]
and
E(s) − E0 (∆v) + (∆v)
< δE 1, E B < δ 1. (D.40)
v
E0 v0
The algorithm is robust, i.e., the accuracy of the generated trajectories increases when
the δ-parameters are reduced. In many practical cases, a good compromise between
accuracy and simulation speed is obtained by setting δE = δB = δE = δv = 0.02.
Notice that, in the case of a uniform magnetic field, the tracking algorithm is now
exact, irrespective of the step length.
This tracking algorithm has been implemented in the subroutine package penfield,
which is devised to work linked to penelope and pengeom. To simulate radiation
transport in a given field/material configuration, the user must provide the steering
main program as well as specific routines that define the EM field (see the examples and
comments in the source file penfield.f).
389
NEA/NSC/DOC(2015)3
390
NEA/NSC/DOC(2015)3
Bibliography
391
NEA/NSC/DOC(2015)3
374 Bibliography
Berger, M. J. (1963), “Monte Carlo calculation of the penetration and diffusion of fast
charged particles,” in B. Alder, S. Fernbach, and M. Rotenberg (editors), Methods in
Computational Physics, volume 1, pages 135–215 (Academic Press, New York).
Berger, M. J. (1992), ESTAR, PSTAR and ASTAR: computer programs for calculating
stopping-power and range tables for electrons, protons and helium ions, Technical
Report NISTIR 4999, National Institute of Standards and Technology, Gaithersburg,
MD.
Numerical tables available from http://www.nist.gov/pml/data/star/index.cfm
Berger, M. J. and S. M. Seltzer (1972), “Response functions for sodium iodide scintilla-
tion detectors,” Nucl. Instrum. Meth. 104, 317–332.
Berger, M. J. and S. M. Seltzer (1988a), “An overview of ETRAN Monte Cario meth-
ods,” in T. M. Jenkins, W. R. Nelson, and A. Rindi (editors), Monte Carlo Transport
of Electrons and Photons, chapter 7 (Plenum, New York).
392
NEA/NSC/DOC(2015)3
Bibliography 375
Bethe, H. A. and W. Heitler (1934), “On the stopping of fast particles and on the
creation of positive electrons,” Proc. R. Soc. A 146, 83–112.
~ and B
Bielajew, A. F. (1988), “Electron transport in E ~ fields,” in T. M. Jenkins, W. R.
Nelson, and A. Rindi (editors), Monte Carlo Transport of Electrons and Photons,
chapter 19 (Plenum, New York).
Bielajew, A. F. (1995), HOWFAR and HOWNEAR: Geometry modeling for Monte Carlo par-
ticle transport, Technical Report PIRS-0341, National Research Council of Canada,
Ottawa.
393
NEA/NSC/DOC(2015)3
376 Bibliography
Bote, D., F. Salvat, A. Jablonski, and C. J. Powell (2009), “Cross sections for ionization
of K, L and M shells of atoms by impact of electrons and positrons with energies up
to 1 GeV: Analytical formulas,” At. Data and Nucl. Data Tables 96, 871–909.
Bote, D., F. Salvat, A. Jablonski, and C. J. Powell (2011), “Erratum to Cross sections
for ionization of K, L and M shells of atoms by impact of electrons and positrons with
energies up to 1 GeV: Analytical formulas,” At. Data and Nucl. Data Tables 97, 186.
Campbell, J. L. and T. Papp (2001), “Widths of the atomic K–N7 levels,” At. Data
Nucl. Data Tables 77, 1–56.
Carlson, T. A. (1975), Photoelectron and Auger Spectroscopy (Plenum Press, New York).
Chan, H.-P. and K. Doi (1983), “The validity of Monte Carlo simulation in studies of
scattered radiation in diagnostic radiology,” Phys. Med. Biol. 28, 109–129.
394
NEA/NSC/DOC(2015)3
Bibliography 377
Cullen, D. E., J. H. Hubbell, and L. Kissel (1997), EPDL97 The Evaluated Data Library,
0
97 Version, Technical Report UCRL-50400, Lawrence Livermore National Labora-
tory, Livermore, California.
Davies, H., H. A. Bethe, and L. C. Maximon (1954), “Theory of bremsstrahlung and pair
production. II. Integral cross section for pair production,” Phys. Rev. 93, 788–795.
Falkoff, D. L. and J. E. MacDonald (1951), “On the Stokes parameters for polarized
radiation,” J. Opt. Soc. Am. 41, 861–862.
Fano, U. (1954b), “Inelastic collisions and the Molière theory of multiple scattering,”
Phys. Rev. 93, 117–120.
Fano, U. (1963), “Penetration of protons, alpha particles and mesons,” Ann. Rev. Nucl.
Sci. 13, 1–66.
Fano, U., L. V. Spencer, and M. J. Berger (1959), “Penetration and diffusion of x rays,”
in S. Flügge (editor), Encyclopedia of Physics, volume 38/2, pages 660–817 (Springer
Verlag, Berlin).
Fernández, J. E., M. Bastiano, and A. Tartari (1998), “The ionization loss of energy in
gases and in condensed materials,” X-Ray Spectrom. 27, 325–331.
Fernández-Varea, J. M., R. Mayol, J. Baró, and F. Salvat (1993a), “On the theory and
simulation of multiple elastic scattering of electrons,” Nucl. Instrum. Methods Phys.
Res. Sect. B 73, 447–473.
395
NEA/NSC/DOC(2015)3
378 Bibliography
396
NEA/NSC/DOC(2015)3
Bibliography 379
Hubbell, J. H., H. A. Gimm, and Øverbø (1980), “Pair, triplet, and total cross sections
(and mass attenuation coefficients) for 1 MeV–100 GeV photons in elements Z = 1
to 100,” J. Phys. Chem. Ref. Data 9, 1023–1147.
ICRU Report 37 (1984), Stopping Powers for Electrons and Positrons (ICRU, Bethesda,
MD).
ICRU Report 77 (2007), Elastic Scattering of Electrons and Positrons (ICRU, Bethesda,
MD).
ICRU Report 85 (2011), Fundamental Quantities and Units for Ionizing Radiation
(ICRU, Bethesda, MD).
Inokuti, M. (1971), “Inelastic collisions of fast charged particles with atoms and
molecules — The Bethe theory revisited,” Rev. Mod. Phys. 43, 297–347.
Inokuti, M., Y. Itikawa, and J. E. Turner (1978), “Adenda: Inelastic collisions of fast
charged particles with atoms and molecules — The Bethe theory revisited,” Rev. Mod.
Phys. 50, 23–35.
Inokuti, M. and D. Y. Smith (1982), “Fermi density effect on the stopping power of
metallic aluminum,” Phys. Rev. 25, 61–66.
Jackson, J. D. (1975), Classical Electrodynamics (John Wiley and Sons, New York), 3rd
edition.
James, F. (1980), “Monte Carlo theory and practice,” Rep. Prog. Phys. 43, 1145–1189.
Jenkins, T. M., W. R. Nelson, and A. Rindi (1988), Monte Carlo Transport of Electrons
and Photons (Plenum, New York).
397
NEA/NSC/DOC(2015)3
380 Bibliography
Kawrakow, I. and D. W. O. Rogers (2001), The EGSnrc code system: Monte Carlo
simulation of electron and photon transport, Technical Report PIRS-701, National
Research Council of Canada, Ottawa.
Kissel, L., C. A. Quarles, and R. H. Pratt (1983), “Shape functions for atomic-field
bremsstrahlung from electrons of kinetic energy 1–500 keV on selected neutral atoms
1 ≤ Z ≤ 92,” At. Data Nucl. Data Tables 28, 381–460.
Kissel, L., B. Zhou, S. C. Roy, S. K. S. Gupta, and R. H. Pratt (1995), “The validity of
form-factor, modified-form-factor and anomalous-scattering-factor approximations in
elastic-scattering calculations,” Acta Cryst. A51, 271–288.
Kittel, C. (1976), Introduction to Solid State Physics (John Wiley and Sons, New York).
Landau, L. (1944), “On the energy loss of fast particles by ionization,” Journal of
Physics-USSR 8, 201–205.
Lewis, H. W. (1950), “Multiple scattering in an infinite medium,” Phys. Rev. 78, 526–
529.
Liljequist, D. (1983), “A simple calculation of inelastic mean free path and stopping
power for 50 eV – 50 keV electrons in solids,” J. Phys. D: Appl. Phys. 16, 1567–1582.
Liljequist, D. (1987), “Critical path length for the similarity of elastic multiple scattering
processes,” J. Appl. Phys. 62, 333–341.
Lindhard, J. and A. Winther (1964), “Stopping power of electron gas and equipartition
rule,” Mat. Fys. Medd. Dan. Vid. Selsk. 34, 1–22.
398
NEA/NSC/DOC(2015)3
Bibliography 381
Ljungberg, M. and S.-E. Strand (1989), “A Monte Carlo program for the simulation of
scintillation camera characteristics,” Comput. Meth. Programs Biomed. 29, 257–272.
Llovet, X., A. J. C. J. Powell, and F. Salvat (2014), “Cross sections for inner-shell
ionization by electron impact,” J. Phys. Chem. Ref. Data 43, 013102.
Manson, S. T. (1972), “Inelastic collisions of fast charged particles with atoms: ioniza-
tion of the aluminum L shell,” Phys. Rev. A 6, 1013–1024.
Merzbacher, E. (1970), Quantum Mechanics (John Wiley and Sons, New York), 3rd
edition.
Møller, C. (1932), “Zur Theorie des Durchgangs schneller Elektronen durch Materie,”
Ann. Physik 14, 531–585.
Molière, G. (1948), “Theorie der Streuung schneller geladener Teilchen II: Mehrfach-
und Vielfachstreuung,” Z. Naturforsch. 3a, 78–97.
Motz, J. W., H. A. Olsen, and H. W. Koch (1969), “Pair production by photons,” Rev.
Mod. Phys. 41, 581–639.
Namito, Y., S. Ban, and H. Hirayama (1994), “Implementation of the Doppler broad-
ening of a Compton-scattered photon into the EGS4 code,” Nucl. Instrum. Meth. A
349, 489–494.
399
NEA/NSC/DOC(2015)3
382 Bibliography
Nelson, W. R., H. Hirayama, and D. W. O. Rogers (1985), The EGS4 Code System,
Technical Report SLAC-265, Stanford Linear Accelerator Center, Stanford, Califor-
nia.
Pratt, R. H. (1960a), “Atomic photoelectric effect at high energies,” Phys. Rev. 117,
1017–1028.
Pratt, R. H. (1960b), “Photoeffect from the L shell,” Phys. Rev. 119, 1619–1626.
Pratt, R. H., A. Ron, and H. K. Tseng (1973a), “Atomic photoelectric effect above 10
keV,” Rev. Mod. Phys. 45, 273–325.
Pratt, R. H., A. Ron, and H. K. Tseng (1973b), “Erratum: Atomic photoelectric effect
above 10 keV,” Rev. Mod. Phys. 45, 663–664.
Reimer, L. and E. R. Krefting (1976), “The effect of scattering models on the results
of Monte Carlo calculations”, National Bureau of Standards Special Publication 460
(US Government Printing Office, Washington DC).
400
NEA/NSC/DOC(2015)3
Bibliography 383
Ribberfors, R. (1983), “X-ray incoherent scattering total cross sections and energy-
absorption cross sections by means of simple calculation routines,” Phys. Rev. A 27,
3061–3070.
Richtmyer, F. K., S. W. Barnes, and E. Ramberg (1934), “The widths of the L-series
lines and of the energy levels of Au(79),” Phys. Rev. 15, 843–860.
Rubinstein, R. Y. (1981), Simulation and the Monte Carlo Method (Wiley, New York).
Sakurai, J. J. (1967), Advanced Quantum Mechanics (Addison and Wesley, New York).
Salvat, F. (2003), “Optical-model potential for electron and positron elastic scattering
by atoms,” Phys. Rev. A 68, 012708.
401
NEA/NSC/DOC(2015)3
384 Bibliography
Sauter, F. (1931), “Über den atomaren Photoeffekt in der K-Schale nach der relativis-
tischen Wellenmechanik Diracs,” Ann. Phys. 11, 454–488.
Schultz, P. J. and K. G. Lynn (1988), “Interaction of positron beams with surfaces, thin
films, and interfaces,” Rev. Mod. Phys. 60, 701–770.
Sempau, J., S. Wilderman, and A. F. Bielajew (2000), “DPM, a fast, accurate Monte
Carlo code optimized for photon and electron radiotherapy treatment planning dose
calculations,” Phys. Med. Biol. 45, 2263–2291.
Sevier, K. D. (1972), Low Energy Electron Spectrometry (Wiley Interscience, New York).
Shiles, E., T. Sasaki, M. Inokuti, and D. Y. Smith (1980), “Self-consistency and sum-
rule tests in the Kramers-Kronig analysis of optical data: applications to aluminum,”
Phys. Rev. B 22, 1612–1628.
402
NEA/NSC/DOC(2015)3
Bibliography 385
Sternheimer, R. M. (1952), “The density effect for the ionization loss in various mate-
rials,” Phys. Rev. 88, 851–859.
Sternheimer, R. M., S. M. Seltzer, and M. J. Berger (1982), “Density effect for the
ionization loss of charged particles in various substances,” Phys. Rev. B 26, 6067–
6076.
Sternheimer, R. M., S. M. Seltzer, and M. J. Berger (1984), “Density effect for the
ionization loss of charge particles in various substances,” At. Data and Nucl. Data
Tables 26, 261–271.
Tolhoek, H. A. (1956), “Electron polarization, theory and experiment,” Rev. Mod. Phys.
28, 277–298.
Tsai, Y. S. (1974), “Pair production and bremsstrahlung of charged leptons,” Rev. Mod.
Phys. 46, 815–851.
Walker, A. J. (1977), “An efficient method for generating discrete random variables with
general distributions,” ACM Trans. Math. Software 3, 253–256.
Walker, D. W. (1971), “Relativistic effects in low energy electron scattering from atoms,”
Adv. Phys. 20, 257–323.
Waller, I. and D. R. Hartree (1929), “On the intensity of total scattering of X-rays,”
Proc. R. Soc. London A 124, 119–142.
403
NEA/NSC/DOC(2015)3
386 Bibliography
X-5 Monte Carlo Team (2003), MCNP—A general Monte Carlo N-particle transport
code, version 5 (Report LA-UR-03-1987, Los Alamos National Laboratory, Los
Alamos, NM).
Zheng-Ming, L. and A. Brahme (1993), “An overview of the transport theory of charged
particles,” Radiat. Phys. Chem. 41, 673–703.
404
OECD Nuclear Energy Agency
12, boulevard des Îles
92130 Issy-les-Moulineaux, France
Tel.: +33 (0)1 45 24 10 15
nea@oecd-nea.org www.oecd-nea.org