an introduction to monte carlo methods in xrf...
TRANSCRIPT
![Page 1: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/1.jpg)
An introduction toMonte Carlo methods in
XRF analysisTom Schoonjans
Joint ICTP-IAEA school, Trieste
![Page 2: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/2.jpg)
Outline
1. Introduction to Monte Carlo methods
2. Monte Carlo simulation of energy dispersive X-ray fluorescence (ED-XRF) spectrometers
3. Overview of available codes
![Page 3: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/3.jpg)
Monte Carlo method:definition
Refers to any technique of statistical sampling, employed to approximate solutions to quantitative problems which may be too complex to solve analytically
![Page 4: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/4.jpg)
Origins of theMonte Carlo method
Developed twice independently
1. Enrico Fermi: moderation of neutrons
2. Metropolis, Ulam and Von Neumann: Manhattan project and ENIAC
The beginning of the Monte Carlo method by N. Metropolis, 1987
![Page 5: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/5.jpg)
Monte Carlosimulation method
• Widespread statistical simulation tool based on the use of random numbers
• A given problem is converted to its probabilistic analogue
• Used in mathematics, physics, engineering, biology, artificial intelligence, economy etc.
![Page 6: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/6.jpg)
Monte Carlosimulation method
• Phenomena occurring in the examined system must be characterized by probability density function (pdfs)
• Perform simulations by random sampling from the pdfs
• Desired result is taken as an average over a number of observations
• Engine is most often a pseudo random number generator
![Page 7: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/7.jpg)
Generating random variables with a specified distribution
• Continuous random variable: xmin ≤ X ≤ xmax
• Probability density function: f(x) ≥0with:
• Cumulative distribution function:
• Monotonously increasing, F(xmin) = 0, F(xmax) = 1x = F-1(R) inverse cdf, with 0 ≤ R ≤1
The values selected using the inverse cdf will reproduce the distribution f(x)in the interval [xmin, xmax]
fxmin
xmax∫ (x )dx =1F(x ) = f
xmin
x
∫ (u)du
![Page 8: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/8.jpg)
Generating random variables with a specified distribution
• Discrete random variables: X = {x1,...,xn}
• Corresponding probabilities of events {x1,...,xn}: {P1,...,Pn}
• R: uniform random number in [0,1]
• Select event for index k={1,...,n}:
Pi
i=1
n
∑ =1
Pi
i=1
k−1
∑ < R ≤ Pi
i=1
k
∑
![Page 9: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/9.jpg)
Random number generators
• Critical component of all Monte Carlo simulations!
• Initially performed using lists of “true” random numbers
• Von Neumann: first pseudo random number generator (middle-square method)
• Properties: speed, period length, uniformity, coverage
A Million Random Digits with 100,000 Normal Deviates by the RAND corporation
![Page 10: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/10.jpg)
Pseudo randomnumber generators
1. Linear congruential generators
• Short period: maximum 232 or 264
• Easily implemented
•
2. Mersenne twister
• Most commonly used PRNG nowadays
• Period: 219937-1
• Passes the Diehard test package
• GPU implementation available (MTGP)
X
n+1 = (aXn+ b) mod m
![Page 11: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/11.jpg)
Pseudo randomnumber generators
3. /dev/random
• special device file on Unix(-like) operating systems
• very high quality randomness (for cryptographic applications!)
• entropy pool fed with noise produced by device drivers, network interfaces etc.
• blocks → slow!
• non-blocking version: /dev/urandom (Linux only)
• Windows alternative: CryptGenRandom and rand_s
![Page 12: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/12.jpg)
Example: estimation of π
Random selection of points within a square of 2a x 2a = 4a2 area
x
ya
a-a
-a
π = 4a2π4a2
⎛
⎝⎜⎞
⎠⎟= 4
Acircle
Asquare
⎛
⎝⎜
⎞
⎠⎟ ≈ 4
Ncircle
Ntotal
⎛
⎝⎜⎞
⎠⎟
![Page 13: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/13.jpg)
Example: estimation of π
Random selection of points within a square of 2a x 2a = 4a2 area
x
ya
a-a
-a
π = 4a2π4a2
⎛
⎝⎜⎞
⎠⎟= 4
Acircle
Asquare
⎛
⎝⎜
⎞
⎠⎟ ≈ 4
Ncircle
Ntotal
⎛
⎝⎜⎞
⎠⎟
![Page 14: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/14.jpg)
Monte Carlo simulation of X-ray fluorescence
spectrometers
![Page 15: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/15.jpg)
Brute force algorithm
![Page 16: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/16.jpg)
• Basic idea: predict the response of X-ray imaging and spectroscopy experiments
• Optimize and design experimental setups in silico
• Dose calculation
• Estimation of detection limits
• Quantification
A general Monte Carlo simulation of ED-XRF spectrometers
![Page 17: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/17.jpg)
A general Monte Carlo simulation of ED-XRF spectrometers
• Simulates the fate of individual photons
• Trajectories are modeled as consisting of a number of straight steps.
• At the end of each step, an interaction will occur, leading to a change in direction and energy
![Page 18: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/18.jpg)
![Page 19: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/19.jpg)
Initial photon properties:• Energy• Degree of linear polarization• Intensity (weight)• Point or Gaussian source• Discrete or continuous
![Page 20: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/20.jpg)
Sample properties:• position and orientation• n parallel layers• Thickness• Density• Composition
![Page 21: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/21.jpg)
Detector properties:• position and orientation• crystal• window• zero/gain• Collimator (optional)
![Page 22: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/22.jpg)
Stepsize?Atom type?Interaction type?New direction?
![Page 23: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/23.jpg)
Selection of thestep length
• Determined by the density, thickness and the absorption coefficients of the sample layers
• Inverse cdf is based on the Bouguer-Lambert-Beer equation:
f (x ) = µρ exp(−µρx )
F(x ) = µ0
x
∫ ρ exp(−µρt)dt =1− exp(−µρx ) ≡ R⇒ x = −1µρln(1− R)⇔ x = −
1µρln(R)
![Page 24: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/24.jpg)
Selection of atom type
Current layer contains ne different elements, each element present with a weight fraction wi
wi
i=0
k
∑ mi≤ R < w
ii=0
k+1
∑ mi
with mi=
µi
wi
i=0
ne
∑ µi
![Page 25: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/25.jpg)
Selection ofinteraction type
Three possibilities:
1. Rayleigh scattering:
2. Compton scattering
3. Photoelectric effect
0 ≤ R ≤σRZ
µZ
σRZ
µZ
< R ≤σRZ+σ
CZ
µZ
σRZ+σ
CZ
µZ
< R ≤1
![Page 26: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/26.jpg)
Rayleigh scattering• Energy remains
unchanged
• Scattering angle θi and azimuthal angle φi must be selected in accordance with the appropriate differential Rayleigh cross section.
• Inverse CDFs are calculated numerically
![Page 27: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/27.jpg)
Compton scattering• Energy-loss according to
Compton formula:
• Scattering angle θi and azimuthal angle φi must be selected in accordance with the appropriate differential Compton cross section.
• Takes into account the influence of the momentum pz of the scattering electron on the energy-transfer
Ei+1 = Ei 1+
Ei
mec2(1− cosθ
i)−2pz
mecsin
θi
2
⎛
⎝⎜
⎞
⎠⎟
−1
![Page 28: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/28.jpg)
Photoelectric effect
Which shell experienced effect?
shell =
K shell: 0 ≤ R <τK
τ
L1 shell: τK
τ≤ R <
τK+ τ
L1
τ
L2 shell: τK+ τ
L1
τ≤ R <
τK+ τ
L1+ τ
L2
τ
L3 shell: τK+ τ
L1+ τ
L2
τ≤ R <
τK+ τ
L1+ τ
L2+ τ
L3
τ...
⎧
⎨
⎪⎪⎪⎪⎪⎪
⎩
⎪⎪⎪⎪⎪⎪
![Page 29: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/29.jpg)
Photoelectric effect
Fluorescence yield: fluorescence or Auger effect?
Using yields for primary vacancies!
Fluorescence if:
Take into account Coster-Kronig transitions!
0 ≤ R <ωshell
![Page 30: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/30.jpg)
Is Y = 3?
YES
Get from rng: 0 < R < 1NO
Is Y = 2?
Is R < f23L?
YES NO
YES
Is R < f12L?NO
Y = 1
YESY = 2
Is R < f12
L+f13L?
NO
YES
Shell = L3 Shell = L2 Shell = L1
NO
Shell LY
Definitive selection of L-shellto be involved in transition
![Page 31: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/31.jpg)
Definitive selection of M-shellto be involved in transition
Is Y = 5?
Shell MY
Get from rng: 0 < R < 1NO
Shell = M5
YES
Is Y = 4?
Is R < f45M?
YES
Shell = M4
YES
NO
Is Y = 3?NO
Is R < f34M?
YESY = 4
YES
Is R < f34M+ f35
M?
NO
YES
Shell = M3
NO
Is Y = 2?
Is R < f23M?
YES
YESY = 3
Is R < f23M+ f24
M?
NO
YESY = 4
Is R < f23M+
f24M + f25
M?
NO
YES
Shell = M2
NO
Is R < f12M?
NONO
Y = 1
YESY = 2
Is R < f12M+ f13
M?
NO
YESY = 3
Is R < f12M+
f13M + f14
M?
NO
YESY = 4
Is R < f12M+
f13M + f14
M + f15M?
NO
Shell = M1
YES NO
![Page 32: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/32.jpg)
Photoelectric effectWhich fluorescence line?
Determine using the shell’s radiative rates:
Scattering angle θi and azimuthal angle φi are chosen random:
line =
KL2line: 0 ≤ R < p
KL2
KL3line: p
KL2≤ R < p
KL2+ p
KL3
KM2line: p
KL2+ p
KL3≤ R < p
KL2+ p
KL3+ p
KM2
KM3line: p
KL2+ p
KL3+ p
KM2≤ R < p
KL2+ p
KL3+ p
KM2+ p
KM3
...
⎧
⎨
⎪⎪⎪⎪
⎩
⎪⎪⎪⎪
cosθi= (2R −1)
ϕi= 2πR
![Page 33: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/33.jpg)
K
L3
L2
L1
M1
M2M3
M4
M5
![Page 34: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/34.jpg)
K
L3
L2
L1
M1
M2M3
M4
M5
Photoelectric effect: K shell
![Page 35: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/35.jpg)
K
L3
L2
L1
M1
M2M3
M4
M5
Photoelectric effect: K shell
Fluorescence yield: 0 < ωK(Z)< 1Photon emission or Auger effect?
![Page 36: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/36.jpg)
K
L3
L2
L1
M1
M2M3
M4
M5
Photoelectric effect: K shell
![Page 37: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/37.jpg)
K
L3
L2
L1
M1
M2M3
M4
M5
Photoelectric effect: K shell
![Page 38: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/38.jpg)
K
L3
L2
L1
M1
M2M3
M4
M5
Photoelectric effect: K shell
![Page 39: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/39.jpg)
K
L3
L2
L1
M1
M2M3
M4
M5
Photoelectric effect: K shell
![Page 40: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/40.jpg)
K
L3
L2
L1
M1
M2M3
M4
M5
Photoelectric effect: K shell
Fluorescence yield: 0 < ωLX(Z)< 1Photon emission or Auger effect?
Coster-Kronig transitions?
![Page 41: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/41.jpg)
K
L3
L2
L1
M1
M2M3
M4
M5
Photoelectric effect: K shell
Fluorescence yield: 0 < ωLX(Z)< 1Photon emission or Auger effect?
Coster-Kronig transitions?
![Page 42: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/42.jpg)
XRF cross sections:cascade effect
• Occurs whenever multiple shells of a particular element can be excited
• Two components: radiative and non-radiative
• Leads to considerable boost in the observed intensity of L- and M-lines: several times larger than intensity through primary excitations
• Very obvious when using monochromatic excitations
• Very often neglected in quantification and simulations
• Complex implementation
• Many fundamental parameters involved → accuracy?
![Page 43: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/43.jpg)
New photon coordinates
Photon direction:
Photon coordinates:
sinΘi+1 cosΦ i+1
sinΘi+1 sinΦ i+1cosΘ
i+1
⎡
⎣
⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥
=
cosΘicosΦ
i− sinΦ
isinΘ
icosΦ
i
cosΘisinΦ
icosΦ
isinΘ
isinΦ
i
− sinΘi
0 cosΘi
⎡
⎣
⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥
sinθicosφ
i
sinθisinφ
i
cosθi
⎡
⎣
⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥
xi+1 = xi + Si sinΘ i+1 cosΦ i+1yi+1 = y i + Si sinΘ i+1 sinΦ i+1xi+1 = xi + Si cosΦ i+1 ri
ri+1
φi
θi
ri-1
(Θi,Φi)
(Θi+1,Φi+1)
![Page 44: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/44.jpg)
Photon termination
• After each interaction, a new step length will be calculated and so on...
• The procedure stops when either the photon is absorbed by the sample or leaves it.
• Upon leaving the sample, a check is performed to determine whether or not the photon hits the detector
![Page 45: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/45.jpg)
Brute force algorithm: inefficient
• Very large number of photons must be simulated
• Possible loss of photons due to thin, low absorbent samples, low fluorescence yields, and detector geometry
• Usually requires supercomputer
![Page 46: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/46.jpg)
Code optimizations: variance reduction
![Page 47: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/47.jpg)
Selection of thestep length
• Force photons to stay within the system
• Largest index m is found according to:
• Step length calculated as:
• Photon weight multiplied with Pabs
![Page 48: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/48.jpg)
Forced detection
• For each photon at each interaction point
• Calculate the probabilities of all possible pathways of the photon to reach a random point on the detector
• Fractional photons added to virtual MCA
![Page 49: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/49.jpg)
Fluorescence yield
• Multiply photon weight with fluorescence yield of selected sub-shell
• Avoids the loss of simulated photons to low energy cascade photons
• Cascade effect simulation taken into account by variance reduction through corrected XRF production cross sections
![Page 50: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/50.jpg)
Detectorresponse function
![Page 51: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/51.jpg)
Case study:NIST SRM 1155
• Stainless steel Cr18Ni12
• HASYLAB Beamline L
• Excitation energy: 16 keV
• Exposure: 300 s RT
• Degree of polarization ∼ 92 %
• Beam-size: 10 x 10 µm2
Cr 18.37%
Ni 12.35%
Mo 2.386%
Mn 1.619%
Cu 0.1734%
Co 0.1052%
V 0.0508%
C 0.0445%
S 0.0175%
![Page 52: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/52.jpg)
Experimental data
![Page 53: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/53.jpg)
Raw simulation result
![Page 54: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/54.jpg)
Semiconductor detectors
• Incident X-rays will ionize the semiconductor material, leading to the production of electron-hole pairs
• The number of pairs is proportional the energy of the incoming photon
• Influenced by an electric field, the electrons and holes migrate to the electrodes
• Results in a pulse that will be measured in the outer circuit
• Dead time leads to some photons not being counted
![Page 55: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/55.jpg)
Spectral artifacts:peak broadening
• XRF lines experience Gaussian peak-broadening, due to the statistical nature of the photon-charge conversions and to electronic noise
• Incoming lines are not discrete, but have a Lorentzian profile
• Spectral peaks follow a Voigt profile, a convolution of a Gaussian and a Lorentzian distribution
• Usually approximated as Gaussians or pseudo-Voigt functions
![Page 56: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/56.jpg)
After Gaussian convolution
![Page 57: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/57.jpg)
After Gaussian convolution
![Page 58: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/58.jpg)
0 20 40 60 80 100Incident photon energy (keV)
0.00
0.02
0.04
0.06
0.08
Fluo
resc
ence
esc
ape
ratio
Si−KL 3Ge−KL 3Ge−KM 3Ge−L 3M5
Detector escape peaks• Photons produced in
detector crystal through XRF or Compton scattering may leave detector
• Results in detection of a pulse with energy lower than expected
• Escape peak ratios calculated based on crystal composition and thickness
• Calculated analytically or with Monte Carlo simulation
![Page 59: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/59.jpg)
Detector escape peaks
Compton escape ratios in Si drift detector
20 40 60 80 100Incident photon energy (keV)
20
40
60
80
100
Com
pton
pho
ton
ener
gy (k
eV)
0.0000
0.0036
0.0071Compton escape ratios in Ge detector
20 40 60 80 100Incident photon energy (keV)
20
40
60
80
100
Com
pton
pho
ton
ener
gy (k
eV)
0
2.04× 10−4
4.08× 10−4
![Page 60: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/60.jpg)
With escape peaks
![Page 61: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/61.jpg)
With escape peaks
![Page 62: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/62.jpg)
Detector pulsepile-up simulation
• Emergence of peaks at energy values corresponding to the sum of XRF peaks
• Due to the limitations of the electronics connected to the detector
• Magnitude strongly correlated to beam intensity
• Monte Carlo simulation using exponential pulse interval distribution
![Page 63: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/63.jpg)
Cu−KL 3
(esc)
Cu−KM 3
Scatter
Pulse pile−up peaks
0 10 20 30 40 50Energy (keV)
100
102
104
106
Inte
nsity
(cou
nts/
chan
nel)
Detector pulsepile-up simulation
![Page 64: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/64.jpg)
With pulse pile-up...
![Page 65: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/65.jpg)
...and some Poisson noise
![Page 66: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/66.jpg)
Higher order interactions
![Page 67: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/67.jpg)
Higher order interactions
![Page 68: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/68.jpg)
Individual interaction contributions to intensity• XRF CS of Cr-KL23
@16 keV: 8.3116287@Ni-KL23: 70.221933@Fe-KL23: 109.02429!!
• XRF CS of Fe-KL23
@16 keV: 12.699491@Ni-KL23: 97.242868
• XRF CS of Ni-KL23
@16 keV: 18.460541
Expressed in cm2/g
# Cr-KL23 Fe-KL23 Ni-KL23
1 655007 3084620 482088
2 406554 194120 3066
3 29652 2558 28
4 706 27 < 1
![Page 69: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/69.jpg)
Overview ofavailable codes
![Page 70: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/70.jpg)
Geant4
• Low energy electromagnetic package
• Support for cascade effect
• Toolkit, not a finalized program
• Allows for very complex geometries
• Electron-matter interactions
• Open source
![Page 71: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/71.jpg)
MCSHAPE
• Dedicated XRF code
• Advanced modeling of electrons produced by Compton, Auger and photoelectric effect
• University of Bologna: Jorge Fernandez and Viviana Scot
• Source code not distributed, binaries only
![Page 72: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/72.jpg)
XRMC
• X-ray spectroscopy and imaging experiments
• Complex sample geometries using quadrics
• Highly extensible
• University of Sassari
• Open source: GPLv3
![Page 73: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/73.jpg)
References
• L. Vincze et al. Spectrochim. Acta Part B, 48(4):553–573, 1993.
• L. Vincze et al. Spectrochim. Acta Part B, 50(2):127–147, 1995.
• T. Schoonjans et al. Spectrochim. Acta Part B, 70:10–23, 2012.
![Page 74: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/74.jpg)
Acknowledgements• Laszlo Vincze
• Claudio Ferrero
• Manuel Sanchez del Rio
• Armando Solé
• Geert Silversmit
• Philip Brondeel
• Karen Appel
• Jan Garrevoet
• Beta testers
• Everyone that ever contributed code or reported bugs!
![Page 75: An introduction to Monte Carlo methods in XRF analysisindico.ictp.it/event/a13226/session/6/contribution/32/material/slides/0.pdf · Monte Carlo methods in XRF analysis Tom Schoonjans](https://reader031.vdocuments.net/reader031/viewer/2022031814/5cd5a3d888c993ea4e8bd276/html5/thumbnails/75.jpg)
Acknowledgements• Laszlo Vincze
• Claudio Ferrero
• Manuel Sanchez del Rio
• Armando Solé
• Geert Silversmit
• Philip Brondeel
• Karen Appel
• Jan Garrevoet
• Beta testers
• Everyone that ever contributed code or reported bugs!
Thank you!