an introduction to monte carlo methods in xrf analysis
play

An introduction to Monte Carlo methods in XRF analysis Tom - PowerPoint PPT Presentation

An introduction to Monte Carlo methods in XRF analysis Tom Schoonjans Joint ICTP-IAEA school, Trieste Outline 1. Introduction to Monte Carlo methods 2. Monte Carlo simulation of energy dispersive X-ray fluorescence (ED-XRF) spectrometers


  1. An introduction to Monte Carlo methods in XRF analysis Tom Schoonjans Joint ICTP-IAEA school, Trieste

  2. 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

  3. 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

  4. Origins of the Monte 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

  5. Monte Carlo simulation 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.

  6. Monte Carlo simulation 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

  7. Generating random variables with a specified distribution • Continuous random variable: x min ≤ X ≤ x max • Probability density function: f ( x ) ≥ 0 with: x max ∫ ( x ) dx = 1 f x min x • ∫ F ( x ) = ( u ) du Cumulative distribution function: f x min • Monotonously increasing, F ( x min ) = 0, F ( x max ) = 1 x = 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 [ x min , x max ]

  8. Generating random variables with a specified distribution • Discrete random variables: X = { x 1 ,..., x n } • Corresponding probabilities of events n ∑ { x 1 ,..., x n }: { P 1 ,..., P n } = 1 P i i = 1 • R : uniform random number in [0,1] • Select event for index k ={1,..., n }: k − 1 k ∑ ∑ < R ≤ P i P i i = 1 i = 1

  9. 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

  10. Pseudo random number generators 1. Linear congruential generators • Short period: maximum 2 32 or 2 64 • Easily implemented • X n + 1 = ( aX n + b ) mod m 2. Mersenne twister • Most commonly used PRNG nowadays • Period: 2 19937 -1 • Passes the Diehard test package • GPU implementation available (MTGP)

  11. Pseudo random number 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

  12. Example: estimation of π y a x -a Random selection of a points within a square of 2a x 2a = 4a 2 area -a ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ π = 4 a 2 π A circle ⎟ ≈ 4 N circle ⎟ = 4 ⎜ ⎜ ⎟ ⎜ 4 a 2 ⎝ ⎠ A square N total ⎝ ⎠ ⎝ ⎠

  13. Example: estimation of π y a x -a Random selection of a points within a square of 2a x 2a = 4a 2 area -a ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ π = 4 a 2 π A circle ⎟ ≈ 4 N circle ⎟ = 4 ⎜ ⎜ ⎟ ⎜ 4 a 2 ⎝ ⎠ A square N total ⎝ ⎠ ⎝ ⎠

  14. Monte Carlo simulation of X-ray fluorescence spectrometers

  15. Brute force algorithm

  16. A general Monte Carlo simulation of ED-XRF spectrometers • 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

  17. 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

  18. Initial photon properties: • Energy • Degree of linear polarization • Intensity (weight) • Point or Gaussian source • Discrete or continuous

  19. Sample properties: • position and orientation • n parallel layers • Thickness • Density • Composition

  20. Detector properties: • position and orientation • crystal • window • zero/gain • Collimator (optional)

  21. Stepsize? Atom type? Interaction type? New direction?

  22. Selection of the step 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 ) ρ exp( − µ ρ t ) dt = 1 − exp( − µ ρ x ) ≡ R ⇒ x = − 1 µ ρ ln(1 − R ) ⇔ x = − 1 x ∫ F ( x ) = µ µ ρ ln ( R ) 0

  23. Selection of atom type Current layer contains n e different elements, each element present with a weight fraction w i µ i k + 1 k ∑ ∑ m i ≤ R < m i = w i w i m i with n e ∑ i = 0 i = 0 µ i w i i = 0

  24. Selection of interaction type Three possibilities: 0 ≤ R ≤ σ RZ 1. Rayleigh scattering: µ Z σ RZ < R ≤ σ RZ + σ CZ 2. Compton scattering µ Z µ Z σ RZ + σ CZ 3. Photoelectric effect < R ≤ 1 µ Z

  25. 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

  26. Compton scattering • Energy-loss according to Compton formula: − 1 ⎛ ⎞ m e c sin θ i m e c 2 (1 − cos θ i ) − 2 p z E i E i + 1 = E i 1 + ⎜ ⎟ 2 ⎝ ⎠ • 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 p z of the scattering electron on the energy-transfer

  27. Photoelectric effect Which shell experienced effect? ⎧ K shell: 0 ≤ R < τ K ⎪ τ ⎪ ⎪ L 1 shell: τ K τ ≤ R < τ K + τ L 1 ⎪ ⎪ τ ⎪ shell = L 2 shell: τ K + τ L 1 ≤ R < τ K + τ L 1 + τ L 2 ⎨ ⎪ τ τ ⎪ ⎪ L 3 shell: τ K + τ L 1 + τ L 2 ≤ R < τ K + τ L 1 + τ L 2 + τ L 3 ⎪ τ τ ⎪ ⎪ ... ⎩

  28. Photoelectric effect Fluorescence yield: fluorescence or Auger effect? Using yields for primary vacancies! 0 ≤ R < ω shell Fluorescence if: Take into account Coster-Kronig transitions!

  29. Shell LY Get from rng: NO Is Y = 3? 0 < R < 1 YES Y = 2 NO L? Is Y = 2? Is R < f12 Y = 1 YES NO YES Is R < L? Is R < f23 L+f13 L? f12 NO YES YES NO Shell = L3 Shell = L2 Shell = L1 Definitive selection of L-shell to be involved in transition

  30. Shell MY Get from rng: NO Is Y = 5? 0 < R < 1 YES YES Y = 4 Y = 2 YES Y = 3 NO NO Is Y = 4? Is Y = 3? Is Y = 2? NO Y = 1 YES YES M? M? M? Is R < f34 Is R < f23 Is R < f12 YES Y = 4 NO NO YES YES Y = 3 YES M+ f24 M? M+ f13 M? Is R < f23 Is R < f12 NO NO YES Y = 4 NO M+ Is R < f12 M + f14 M? f13 NO M+ M+ Is R < f12 Is R < f23 M? M+ f35 M? Is R < f45 Is R < f34 M + f14 M + f15 M? M + f25 M? f13 f24 NO YES YES YES YES NO NO NO Shell = M5 Shell = M4 Shell = M3 Shell = M2 Shell = M1 Definitive selection of M-shell to be involved in transition

  31. Photoelectric effect Which fluorescence line? Determine using the shell’s radiative rates: ⎧ KL 2 line: 0 ≤ R < p KL 2 ⎪ ⎪ KL 3 line: p KL 2 ≤ R < p KL 2 + p KL 3 ⎪ ⎪ line = ⎨ KM 2 line: p KL 2 + p KL 3 ≤ R < p KL 2 + p KL 3 + p KM 2 ⎪ KM 3 line: p KL 2 + p KL 3 + p KM 2 ≤ R < p KL 2 + p KL 3 + p KM 2 + p KM 3 ⎪ ⎪ ⎪ ... ⎩ Scattering angle θ i and azimuthal angle φ i are chosen random: cos θ i = (2 R − 1) ϕ i = 2 π R

  32. M 2 M 3 L 3 K M 1 L 2 M 4 L 1 M 5

  33. Photoelectric effect: K shell M 2 M 3 L 3 K M 1 L 2 M 4 L 1 M 5

  34. Photoelectric effect: K shell M 2 M 3 L 3 K M 1 L 2 M 4 L 1 Fluorescence yield: 0 < ω K (Z)< 1 Photon emission or Auger effect? M 5

  35. Photoelectric effect: K shell M 2 M 3 L 3 K M 1 L 2 M 4 L 1 M 5

  36. Photoelectric effect: K shell M 2 M 3 L 3 K M 1 L 2 M 4 L 1 M 5

  37. Photoelectric effect: K shell M 2 M 3 L 3 K M 1 L 2 M 4 L 1 M 5

  38. Photoelectric effect: K shell M 2 M 3 L 3 K M 1 L 2 M 4 L 1 M 5

  39. Photoelectric effect: K shell M 2 M 3 L 3 K M 1 L 2 M 4 L 1 Fluorescence yield: 0 < ω LX (Z)< 1 Photon emission or Auger effect? Coster-Kronig transitions? M 5

  40. Photoelectric effect: K shell M 2 M 3 L 3 K M 1 L 2 M 4 L 1 Fluorescence yield: 0 < ω LX (Z)< 1 Photon emission or Auger effect? Coster-Kronig transitions? M 5

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend