monte carlo modeling for electron microscopy and microanalysis oxford series in optical and imaging...

225

Upload: ceco27

Post on 29-Jul-2015

297 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences
Page 2: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

Monte Carl o Modelin g fo r Electro nMicroscopy an d Microanalysis

Page 3: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

OXFORD SERIES IN OPTICA L AND IMAGING SCIENCES

EDITORS

MARSHALL LAP PJUN-ICHI NISHIZAWABENJAMIN B . SNAVELYHENRY STAR KANDREW C . TA MTONY WILSO N

1. D . M. Lubma n (ed.) . Lasers and Mass Spectrometry

2. D . Sarid . Scanning Force Microscopy With Applications to Electric, Magnetic,and Atomic Forces

3. A . B . Schvartsburg . Non-linear Pulses in Integrated and Waveguide Optics

4. C . J. Chen . Introduction to Scanning Tunneling Microscopy

5. D . Sarid . Scanning Force Microscopy With Applications to Electric, Magnetic,and Atomic Forces, revised edition

6. S . Mukamel. Principles of Nonlinear Optical Spectroscopy

1. A . Hasegaw a an d Y . Kodama. Solitons in Optical Communications

8. T . Tani. Photographic Sensitivity: Theory and Mechanisms

9. D . Joy. Monte Carlo Modeling for Electron Microscopy and Microanalysis

Page 4: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

Monte Carlo Modelingfor Electro n Microscopy

and Microanalysis

DAVID C . JO Y

New York OxfordOXFORD UNIVERSIT Y PRES S

1995

Page 5: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

Oxford Universit y Press

Oxford Ne w Yor kAthens Aucklan d Bangko k Bomba y

Calcutta Cap e Town Da r es Salaam Delh iFlorence Hon g Kon g Istanbu l Karach i

Kuala Lumpur Madra s Madri d Melbourn eMexico City Nairob i Pari s Singapor e

Taipei Toky o Toront o

and associate d companie s i nBerlin Ibada n

Copyright © 199 5 b y Oxford University Press , Inc .

Published b y Oxford University Press, Inc. ,200 Madiso n Avenue , New York , New Yor k 1001 6

Oxford i s a registered trademar k of Oxford University Press

All right s reserved. N o par t o f thi s publication may b e reproduced ,stored i n a retrieval system , or transmitted , in any form o r b y any means ,

electronic, mechanical , photocopying, recording , o r otherwise ,without th e prior permission o f Oxford University Press.

Library o f Congress Cataloging-in-Publicatio n Dat aJoy, David C, 1943 —

Monte Carl o modelin g for electron microscopy and microanalysi s /David C . Joy.

p. cm. — (Oxfor d series in optica l and imagin g sciences : 9)Includes bibliographical references .

ISBN 0-19-508874-31. Electro n microscopy—Compute r simulation . 2 . Electro n prob e

microanalysis—Computer simulation . 3. Mont e Carlo method .I. Title . II . Series .QH212.E4J67 199 5

502'.8'25—dc20 94-3564 2

A disk , 3!/2-inc h MS-DO S format , containing al l the source cod e i nthis boo k i s available b y mail fro m Davi d C . Joy, P.O . Bo x 23616 ,Knoxville, T N 37933-1616, U.S.A. The cost , includin g postage an d

handling, i s $10.00 (U.S. and Canada) o r $15.00 (elsewhere) .Payments accepte d i n the for m o f a check o r a money order .

1 3 5 7 9 8 6 4 2

Printed i n the Unite d State s o f Americ aon acid-free pape r

Page 6: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

PREFACE

Electron microscop y an d electron bea m microanalysi s are techniques tha t are nowin daily use i n many scientifi c disciplines an d technologies . Thei r importanc e de -rives fro m th e fac t tha t the information they generate comes fro m highl y localizedregions of the specimen, the data produced are unique in scope, and the images andspectra produced can be quantified to give detailed numerical data about the sample.For quantification to be possible, however , it is necessary to be able to describe howa bea m o f electron s interact s wit h a soli d specimen—an d suc h a descriptio n i sdifficult t o provide because of the very varied and complex nature of the interactionsbetween energeti c electrons an d solids .

The purpose of this book i s to demonstrate how thi s interaction ca n be accu -rately simulate d and studied on a personal computer , b y applyin g simpl e physica lprinciples an d th e mathematica l techniqu e o f Mont e Carl o (o r random-number )sampling. Th e aim is to provide a practical rathe r tha n a theoretical guid e t o thistechnique, and the emphasis is therefore on how to program and subsequently use aMonte Carlo model . Th e bibliography list s other books that cover the mathematicsof Monte Carlo sampling and the physical theory of electron scatterin g in detail. Tomake the programs develope d her e a s accessible a s possible, a disk—for us e withMS-DOS-compatible computers—has bee n mad e available ; i t contains al l o f thesource code described in this book together with executable (i.e., runnable) versions.To order se e facing copyrigh t page.

This book woul d not have been possibl e withou t the generou s cooperation o fmany othe r people . I am especiall y gratefu l t o Dr . Dale Newbur y of N.I.S.T. , fo rfirst introducin g me to Monte Carlo models, and to him and Dr. Robert Myklebust ,also o f N.I.S.T. , fo r sharin g thei r cod e wit h me . Dr . Hug h Bisho p o f A.E.R.E .Harwell, whos e Ph.D . wor k produce d th e firs t electro n bea m Mont e Carl o pro -grams, kindly lent me a copy of his thesis and provided some invaluable backgroundinformation. Dr . Peter Duncumb, of the University of Cambridge an d Tube Invest-ments Ltd., whose pioneering wor k on Monte Carlo modeling usin g minicomputersultimately made thi s book possible , len t me copies o f his earl y reports an d papersand has been unfailingl y helpful i n answerin g man y questions abou t the develop -ment o f the technique . Th e program s give n in this volum e hav e been refine d an dimproved through the efforts o f many colleagues wh o have used them over the pastfew years . Vita l improvements i n science , substance , and style have been made by

Page 7: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

Vi PREFAC E

Drs. John Armstrong (California Institute of Technology), Ed Cole (Sandia), Zibig-niew Czyzewsk i (Universit y of Tennessee) , Raynal d Gauvi n (Universit e d e Sher -brooke), Davi d Howit t (Universit y o f California) , Davi d Hol t (Imperia l College ,London), Pegg y Moche l (Universit y of Illinois) , Joh n Rus s (Nort h Carolina Stat eUniversity), and Oliver Well s (IBM). To them, to my student s Suichu Luo, Xinle iWang, an d Xia o Zhang , an d t o man y other s wh o hav e give n o f thei r tim e an dexpertise, I am deeply grateful. An y errors and problems tha t remain ar e strictly myown responsibility.

Finally, I dedicat e thi s boo k t o m y wif e Carolyn , withou t whos e lov e an dencouragement thi s manuscrip t woul d hav e remaine d jus t anothe r pil e o f flopp ydiscs.

Knoxville D . J.August 1994

Page 8: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CONTENTS

1. An Introduction to Monte Carlo Methods 3

1.1. Electro n Bea m Interaction—The Problem 31.2. Th e Monte Carl o Method 41.3. Brie f History o f Monte Carlo Modelin g 51.4. Abou t This Book 7

2. Constructing a Simulation 9

2.1. Introductio n 92.2. Describin g th e Problem 92.3. Programmin g the Simulatio n 1 22.4. Readin g a PASCAL Program 1 32.5. Runnin g the Simulation 2 3

3. The Single Scattering Model 25

3.1. Introductio n 2 53.2. Assumption s of the Singl e Scatterin g Mode l 2 53.3. Th e Single Scattering Mode l 2 63.4. Th e Single Scatterin g Mont e Carl o Cod e 3 73.5. Note s on the Procedures an d Functions Use d in the Program 4 63.6. Runnin g the Program 5 0

4. The Plural Scattering Model 56

4.1. Introductio n 5 64.2. Assumption s o f the Plural Scatterin g Mode l 5 64.3. Th e Plural Scatterin g Mont e Carl o Cod e 6 24.4. Note s on the Procedures an d Functions Used in the Program 7 14.5. Runnin g the Program 7 5

5. The Practical Application of Monte Carlo Models 77

5.1. Genera l Consideration s 7 75.2. Whic h Type of Monte Carl o Model Shoul d Be Used? 7 7

Page 9: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

viii CONTENT S

5.3. Customizin g the Generic Programs 7 85.4. Th e "All Purpose" Progra m 7 95.5. Th e Applicability of Monte Carlo Technique s 7 9

6. Backscattered Electrons 81

6.1. Backscattere d Electron s 8 16.2. Testin g th e Mont e Carl o Models o f Backscattering 8 16.3. Prediction s o f the Mont e Carlo Model s 9 06.4. Modelin g Inhomogeneous Material s 9 76.5. Note s o n the Program 10 56.6. Incorporatin g Detector Geometr y an d Efficienc y 11 1

7. Charge Collection Microscopyand Cathodoluminescence 114

7.1. Introductio n 11 47.2. Th e Principles o f EBIC and C/L Imag e Formation 11 47.3. Mont e Carlo Modelin g o f Charge Collectio n Microscop y 11 9

8. Secondary Electrons and Imaging 134

8.1. Introductio n 13 48.2. Firs t Principles—S E Models 13 68.3. Th e Fast Secondar y Mode l 14 28.4. Th e Parametric Mode l 15 6

9. X-ray Production and Microanalysis 174

9.1. Introductio n 17 49.2. Th e Generation o f Characteristi c X-ray s 17 49.3. Th e Generatio n o f Continuum X-rays 17 59.4. X-ra y Production i n Thin Film s 17 79.5. X-ra y Production i n Bulk Sample s 19 1

10. What Next in Monte Carlo Simulations? 199

10.1. Improvin g the Mont e Carlo Mode l 19 910.2. Faste r Mont e Carl o Modelin g 20 210.3. Alternative s t o Sequentia l Mont e Carl o Modelin g 20 310.4. Conclusion s 20 5

References 20 7

Index 21 3

Page 10: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

Monte Carl o Modelin g fo r Electro nMicroscopy an d Microanalysi s

Page 11: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

This page intentionally left blank

Page 12: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

1AN INTRODUCTION TO MONTE CARLO

METHODS

1.1 Electron beam interaction—the problem

The interaction of an electron bea m with a solid i s complex. Within a distance of afew ten s t o a few hundred s o f angstroms o f entering th e target , th e electro n wil linteract wit h the sampl e i n som e way . The interactio n coul d b e th e resul t o f th eattraction between the negatively charged electron and the positively charged atomicnucleus (and equally the repulsion between the negatively charged atomic electronsand negative charg e o n the inciden t electron) , i n whic h case th e electro n wil l bedeflected throug h som e angl e relativ e t o it s previou s directio n o f travel , bu t it senergy wil l remain essentially unaltered. This i s called a n elastic scattering event .Alternatively, the incident electron could cause the ionization of the atom by remov-ing an inner-shell electro n fro m it s orbit , so producing a characteristic x-ra y or anejected Auger electron; it could have a collision wit h a valence electron to produce asecondary electron ; it could interact wit h the crystal lattice of the solid to generatephonons; or , i n on e o f severa l othe r possibl e ways , i t coul d giv e up som e o f it senergy to the solid. These types of interactions in which the electron changes bothits directio n o f trave l an d it s energ y ar e example s o f inelastic scatterin g events .After travelin g a further distance , the electron wil l then again b e scattered , eithe relastically o r inelastically a s before, and this process wil l continue until either theelectron gives up all of its energy to the solid and comes to thermal equilibrium withit or until it manages to escape fro m th e soli d i n some way.

While at a sufficiently atomisti c leve l this train of scattering events is presum-ably quit e deterministic—give n sufficien t informatio n abou t th e electro n an d th eparameters describin g it—t o a n observe r abl e t o watc h the electro n a s i t travelsthrough the solid , th e sequenc e o f events makin g up th e trajectory fo r an y give nelectron woul d appear t o be entirel y random . Ever y electro n woul d experience adifferent se t of scattering event s and every trajectory woul d be unique. Since, in atypical electron microscope, there are actually about 1010 electrons impinging on thesample each second, it is clear that there is not likely to be any simple or compactway t o describ e th e spatia l distributio n o f th e innumerabl e interaction s tha t ca noccur or the various radiations resulting from these events. At best it will be possibleto assign probabilitie s t o specifi c events , suc h as the chanc e o f an electron being

3

Page 13: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

4 MONT E CARL O MODELING

backscattered (i.e. , being scattere d through more than 90°) o r of being transmitte dthrough the target; but any more detailed analysis of the interaction will be impossi-ble. The Monte Carlo method described here uses such probabilities, together with theidea of sampling by using random numbers, to compute one possible set of scatteringevents for an electron as it travels into the solid. By repeating this process many times,a statistically valid and detailed picture of the interaction process can be constructed.

1.2 The Monte Carlo method

One of the very earliest publishe d paper s on "Monte Carlo" methods (Kahn, 1950 )provides an excellent statement of the basis o f the method—"By applyin g randomsampling techniques to the problem [o f interest] deductions about the behavior o f alarge numbe r o f [electrons ] ar e mad e fro m th e stud y o f comparativel y few . Th etechnique is quite analogous t o public opinion polling of a small sample t o obtaininformation concernin g th e populatio n o f the entir e country. " Th e us e o f rando msampling to solve a mathematical problem can be characterized a s follows. A gameof chance is played in which the probability of success P is a number whose value isdesired. If the game i s played N times with r wins then r/N i s an estimate of P. The"game o f chance" will be a direct analogy , or a simplified version, of the physicalproblem to be solved. To play the game of chance on a computer, the roulette wheelor dice are replaced b y random numbers. The implication of a "random" number isthat any number within a specified range (usually 0 to 1 ) has an equal probability ofbeing selected , and all the digits that make up the number have an equal probability(i.e., 1 in 10 ) of occurring. Thus to take a simple and relevant example, consider anelectron tha t can b e scattere d elasticall y o r inelastically , th e probabilit y o f eithe roccurrence being determined by its total cross section. If the probability that a givenscattering even t i s elasti c i s ps an d pi i s th e probabilit y o f a n inelasti c scatterin geventoandityaoiueabeta

two alternatives by picking a random number RND (0 < RN D < 1 ) and specifyingthat i f RN D ^ pe, the n a n elasti c even t occurs , otherwis e a n inelasti c even t i sassumed to have occurred. I f this selection procedur e i s applied a large number oftimes, then the predicted rati o of elastic to inelastic events will match the expecte dprobability derive d fro m th e give n probabilitie s p e an d p;, sinc e a fractio n pe

of th e random number s wil l be ^pe. Rando m numbers can als o be used t o makeother decisions . For example , i f the probability p(%) o f the electron bein g scattere dthrough som e angl e 6 i s known , eithe r experimentally o r fro m som e theoretica lmodel, then a specific scattering angle a ca n be obtained o r picking another randomnumber and solving fo r a th e equation:

Page 14: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

INTRODUCTION T O MONT E CARL O METHOD S 5

which equate s RN D to th e probability o f reaching th e angl e a give n th e know ndistribution o f p(Q). B y repeatin g thes e random-numbe r samplin g processe s eac htime a decision must be made, a Monte Carlo simulatio n of one particular electro ntrajectory throug h the solid can be produced. Th e result o f such a procedure i s notnecessarily o r even probabl y a trajectory representing on e tha t could be observe dexperimentally unde r equivalent conditions . However , by simulatin g a sufficientl ylarge numbe r of suc h trajectories , a statistically significan t mixture of al l possiblescattering event s will have been sampled and the composite result will be a sensibleapproximation to experimental reality .

1.3 A brief history of Monte Carlo modeling

The firs t publishe d exampl e o f the us e o f rando m numbers to solv e a problem i sprobably that of Buffon, who—i n his 1777 volume Essai d'Arithmetique Morale—described a n experiment i n which needles of equal length wer e thrown a t randomover a shee t marke d wit h paralle l lines . B y counting th e numbe r o f intersection sbetween lines and needles, Buffo n wa s able t o derive a value for TT . Subsequently,other mathematician s an d statistician s followe d Buffon' s lea d an d mad e us e o frandom number s a s a wa y o f testin g theorie s an d results . Becaus e man y o f th ephenomena of interest t o physicists in the early twentieth century , such as radioac-tive decay or the transmission o f cosmic rays through barriers, displaye d a n appar-ently random behavior, it was also an obvious step to try to use random numbers toinvestigate suc h problems. Th e procedure was to model, for example, a cosmic rayinteraction b y permitting th e "particle" to play a game o f chance, th e rules o f thegame being suc h that the actua l deterministi c an d random feature s of the physica lprocess wer e exactl y imitated , ste p b y step , b y th e gam e an d i n whic h rando mnumbers determine d th e "moves."

During the Manhattan Project, which led to the development o f the first atomicbomb, John von Neumann, Stanislav Ulam, and others made innovative use of bothrandom-number samplin g an d game-playing situation s involving random number sas a wa y o f studyin g physica l processe s a s divers e a s particl e diffusio n an d th eprobability of a missile striking a flying aircraft . It was during this period tha t thesetechniques wer e first dubbe d "Monte Carlo methods" (Metropoli s an d Ulam, 1949 ;McCracken, 1955) . Because the Monte Carlo metho d need s a large suppl y of ran-dom number s a s wel l a s muc h repetitiou s mathematica l computation , th e late rdevelopment of the technique was closely geare d to the development of "automaticcomputing machines. " A s firs t mechanica l an d the n electroni c machine s becam eavailable durin g the 1950s , the technique foun d increasin g applicatio n t o problem sranging i n scop e fro m diffusio n studie s i n nuclea r physic s t o th e modelin g o fpopulation growt h by th e Bureau of the Census . A valuable bibliograph y o f thes eearly paper s an d techniques ca n be found i n Meyer (1956) .

Although Monte Carlo methods had been applied to many other phenomena, itwas no t unti l th e wor k o f Hebbar d an d Wilson (1955 ) tha t th e metho d wa s sue -

Page 15: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

O MONT E CARL O MODELING

cessfully employe d for charged particles. Later work by Sidei et al. (1957) and Leisset al . (1957 ) le d t o a major paper b y Berge r (1963 ) tha t laid th e groundwor k forfuture developments . Simultaneously , in England , M . Green , a physic s graduat estudent in Cambridge working for V. E. Cosslett , wa s persuaded t o investigate th eapplication of von Neumann's Monte Carlo method, and the university's EDS AC IIcomputer, t o th e scatterin g o f electro n beams . Takin g experimenta l dat a o n th escattering of electrons in a 1000-A film as a starting point, Green (1963) and laterBishop (1965) wer e abl e t o derive the electron backscatterin g coefficient , an d thedepth dependenc e o f characteristi c x-ra y production , fro m a bul k sampl e an d t odemonstrate good agreemen t wit h measured values . However, whil e this approac hshowed th e validit y o f th e technique , i t wa s limite d i n it s applicatio n t o thos esituations where the suitably detailed initial experimental data were available. At the4th Internationa l Conferenc e on X-ray Optics an d Microanalysi s in Paris i n 1965 ,however, two independent papers (Bishop, 1966; Shimizu et al., 1966) demonstratedhow theoretically based electron scattering distributions could replace and so gener-alize experimental distributions; within a short time, groups in Europe, Japan , andthe United States had produced working programs based on this concept. One of themost important of these was the one produced by Curgenven and Duncumb (1971)working a t the Tube Investments Laboratory i n England. This program introduce dseveral ne w concepts , includin g th e so-calle d multipl e scatterin g approximatio ndiscussed i n Chapter 4 of this book, and was optimized to run on a relatively smal lscientific computer . Copies of the FORTRAN code were generously made availableto interested laboratorie s throughou t the worl d for thei r own use ; a s a result , thi sprogram came into widespread use and made a significant contribution to populariz-ing th e ide a tha t electron-soli d interaction s coul d b e modele d convenientl y an daccurately by computer .

By 1976 , th e use o f this technique was sufficientl y commo n fo r a conferenc eentitled "Us e o f Mont e Carl o Calculation s i n Electro n Prob e Microanalysi s an dScanning Electro n Microscopy " to b e hel d a t th e Nationa l Burea u o f Standard s(NBS) in Washington, D.C. The proceedings o f that meeting (Heinrich et al., 1976 )still for m on e o f th e basi c resource s fo r informatio n i n thi s field , an d programs ,algorithms, an d procedures develope d by the NBS group have formed the startingpoint fo r man y o f th e program s i n curren t use , includin g thos e describe d i n thi svolume.

Apart from th e very earliest examples , which were run by hand, using randomnumbers generated by spinning a "wheel o f chance" (Wilson, 1952) o r on mechani-cal desk calculators (e.g., Hay ward and Hubbell, 1954), Monte Carlo programs weredesigned t o be run on the main-frame computers the n becoming availabl e in mostgovernment an d industria l laboratories an d universities . Although suc h machine swere both large and expensive, their capabilities were very limited, and considerableingenuity was necessary to produce workable programs within the limits set by theavailable memory (often as little as 2000 words) and operating time between crashes

Page 16: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

INTRODUCTION T O MONT E CARL O METHOD S 7

of th e system . Nevertheles s Mont e Carl o program s wer e ofte n cite d a s a prim eexample of the new analytical power made available through electronic computing .With the advent of personal computers (PCs), this power is now available to anyonewho needs it. Monte Carlo programs are, in most cases, relatively short in length andcan readily be run on any modern PC without encountering any problems with thelack of memory. The programs are also computationally intensive, i n the sense thatonce th e progra m ha s obtaine d al l th e necessar y data , i t perform s calculation scontinuously unti l its task is finished. This is not the ideal situatio n for a programthat is run on a time-shared main-frame compute r because it means that the actualcomputing time will depend directly on the number of users working on the machineat any given time (unlike programs such as word processing, where the majority ofthe computer's time is spent in waiting for the operator to enter the next characterand multiple users produce little apparen t drop in response speed) . Consequently ,even o n relatively powerfu l time-shar e systems , the computationa l spee d experi -enced by a user when running a Monte Carlo program can seem very slow; thus tocalculate a sufficient numbe r of trajectories to produce an accurate result can cost alot o f both time and money. While PCs do not, in general , perform the individualcomputations a s rapidl y a s th e mai n frame , the y are dedicate d t o on e task ; a s aresult, their effective throughput can easily rival that of much larger machines. Also,since access to PCs is often free or at least very cheap, over-lunch or even overnightruns are no financial burden to the user. Finally, the interactive nature of PCs and theready acces s t o graphical presentation tha t they provide offers th e chance to makeprograms that are both more accessible an d more immediately useful .

1.4 About this book

This volume is not intended to replace standard textbooks on the general theory ofMonte Carlo sampling (such as those by Hammersley, 1964 , and Schreider, 1966) ,nor i s i t a substitute for a comprehensive guid e to electron beam microscopy an dmicroanalysis (suc h a s Goldstei n e t al. , 1992) . Rather , i t i s intende d t o provid eelectron microscopists , microanalysts, and anyone concerned wit h the behavior ofelectrons i n solid s wit h ready acces s t o the power of the Monte Carl o method . I ttherefore provide s workin g Monte Carl o simulatio n routines fo r th e modelin g o felectron trajectorie s i n a soli d an d discusse s procedure s t o dea l wit h associate dphenomena such as secondary electron and x-ray production. These procedures canthen be added to the basic simulatio n as required to produce a program customizedto tackle particular problems in image interpretation o r microanalysis. The goal is tomake availabl e simulations whos e accuracy is at least as good as that likely to beachieved in a comparable measuremen t or experiment on an electron microscope .The programs have been developed an d have been designe d to be run on personalcomputers rather than on scientific minicomputers or full size main-frame machines.Even given th e advanced PC designs now available , this has occasionally mad e it

Page 17: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

8 MONT E CARL O MODELIN G

necessary t o compromise betwee n th e completeness o f the model an d the spee d ofexecution. In most cases the choice has been for the version that is fast in operation,since a good approximatio n availabl e rapidl y i s muc h mor e usefu l tha n a n exac tresult that takes a day to compute. N o claim is made that these programs representthe bes t o r eve n th e onl y wa y t o d o th e job . Indeed , a larg e numbe r o f othe rapproaches ar e cited in the text. This book wil l have achieved it s purpose if you—the user—feel ready , willing , and abl e to use the printed program s give n here , o rthose availabl e on the accompanying disk, as the basis fo r your own experimenta -tion and development .

Page 18: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

2

CONSTRUCTING A SIMULATION

2.1 Introduction

In thi s chapter , w e wil l develo p a Mont e Carl o simulatio n o f a rando m wal k(sometimes called a "drunken walk, " afte r it s most popular mode o f experimentalinvestigation), Although this particular problem is only loosely related to the studiesof electron beam interactions that follow, the model that we will develop provides aconvenient wa y o f establishing a framewor k fo r thos e subsequen t simulations . I talso illustrate s th e general principles o f programming to b e followed in this bookand introduces some of the important practical detail s associated wit h constructingand running suc h models on a personal computer.

2.2 Describing the problem

The random walk problem can be stated as follows: "How far from the starting pointwould a walke r b e afte r takin g N step s o f equa l lengt h bu t i n randoml y chose ndirections?" In order to simulate this problem, we must break it down to a sequenceof instructions, or algorithms, that allow us to describe it mathematically. Figure 2.1shows the situation for one of the steps making up the walk. It commences from th ecoordinate (x, v) reached a t the conclusion o f the previous step and is made at somerandom angle A wit h the X-axis, so that:

where RND is a random number between 0 and 1 . The coordinates xn, yn of the endof th e ste p are then:

Equations (2.2 ) an d (2.3) ca n be cast in a more symmetrica l for m b y writing

9

Page 19: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

10 MONT E CARL O MODELIN G

Figure 2.1. Coordinat e syste m fo r the random wal k simulation .

so that

cos (A) and cos (B), the cosines o f the angle s between the vecto r representing th edirection of the step and the axes, are called the direction cosines an d will in futur ebe abbreviated t o CA and CB.

Although Eqs. (2.1) , (2.5), and (2.6) give an accurate mathematical descriptio nof on e ste p o f the random walk , the axe s o f the coordinate syste m are constantl ychanging as the walker moves from one step to the next. It would intuitively be moresatisfactory t o describe the progress o f the walker with respect t o a fixed referenc eframe o f axe s (suc h a s the wall s o f th e room) , because thi s makes i t possibl e t opredict when , for example , a collision migh t occur . Wit h thi s descriptio n then , a sshown in Fig. 2.2 :

where X, Y are the angles described b y the direction cosines CX, CY for the previousstep, and A, B ar e the angles fo r the new direction cosine s CA, CB. As befor e

Page 20: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CONSTRUCTING A SIMULATIO N 1 1

Figure 2.2. Modifie d coordinat e description usin g fixe d axe s for the random walk .

and fro m th e usua l trigonometric expansions we get

using the result that sin (X) = co s (Y) and sin (Y) = co s (X). Equations (2.7), (2.10),(2.11), (2.12) , an d (2.13 ) no w describ e ho w t o calculate th e en d poin t o f a step ,given its starting point. The next step can similarly be computed using the identicalequations bu t resetting th e coordinates s o that the old end point becomes the newstarting point and the exit direction cosine s becom e the entry direction cosines :

The recipe fo r simulating the random walk is therefore a s follows:

Given a starting point (x0, y0) an d a starting direction (CX, CY), the nRepeat the sequence

Find the deviation angle 6 [Eq . (2.7)]Calculate the new direction cosine s CA,CB [Eqs . (2.12) an d (2.13)]Calculate the new coordinates xn,yn [Eqs . (2.10 ) an d (2.11)]

Then reset the coordinates fo r the next stepx = xn, y = yn, CX = CA, CY = CB

until the required number of steps has been takenThen distance s from startin g point is s = V(* — x0)

2 + ( y - y0)2

Page 21: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

12 MONT E CARL O MODELIN G

2.3 Programming the simulation

To carry out the simulation on a computer, the recipe given above must be expresse din a for m tha t th e compute r ca n understand . Thi s require s tha t w e choos e on ecomputer language , fro m amon g th e man y no w available , i n whic h t o cod e ou rprogram. Unfortunately , any discussion of programming languages is liable to leadto acrimony , becaus e anyon e wh o regularl y use s a particula r languag e an d ha sbecome use d to its syntax and particular strengths and weaknesses ca n always fin dsufficient reason s t o prove that any other language is deficient in power or conve -nience. However , stripped o f the theological overtones so often accompanyin g thissort of debate, the truth is that any of the languages now in common use on personalcomputers coul d b e used t o code thi s an d the following, Monte Carl o simulation swithout a noticeable effec t o n th e qualit y of th e fina l product . But sinc e i t i s no tpractical t o provide equivalen t cod e fo r al l possible languages , i t i s necessar y t ochoose jus t one arbitrarily, for whateve r reasons see m appropriate , an d work withthat.

Even though it might not have been your firs t o r even your second choice, th edecision her e has been to use PASCAL. The reasons fo r this decision wer e princi -pally a s follows:

1. PASCA L is a good exampl e o f a modern language . I t allows for structured an dmodular programming ; i t has a powerful ye t simpl e syntax ; and—since i t i s acompiled language—i t i s fas t i n execution .

2. Th e styl e o f a PASCA L program , i n particula r th e us e o f indentin g an d th eavailability of long descriptive variabl e names , leads to code tha t is easy to readand understand .

3. Variant s of PASCAL are commerciall y availabl e fo r al l computers likel y t o b eencountered i n current use. Although there are slight differences between them ,the origina l definitio n o f the language wa s sufficientl y precis e that these varia -tions rarel y pos e a problem i f a program mus t be move d fro m on e versio n o fPASCAL to another .

4. Finally , i f yo u canno t tak e PASCA L a t an y price , then—sinc e othe r moder nlanguages such as QUICKBASIC, ADA, MODULA-2, o r C now share so manyof the features of PASCAL—conversion from PASCAL to any other language ofyour choice i s straightforward. In fact , softwar e is available tha t can effec t suc htransformations automaticall y in many cases .

The program s i n thi s boo k ar e writte n i n TURB O PASCAL ™ (versio n 5.0) ,which i s perhaps th e most widely used form o f PASCAL for MS-DOS computers .These programs wil l also compile and run, without any changes being necessary, in

Page 22: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CONSTRUCTING A SIMULATION 13

Microsoft QUICK PASCAL™ version 1.0 and higher. Other variants of PASCAL

and other types of computers may require some modifications to the code, especially

for the graphics commands. A disk (IBM/MS-DOS format) containing all of the

code discussed in this text, as both source code and as compiled and executable

code, is available from the author. Ordering details are given on the copyright page

of this book.

2.4 Reading a PASCAL program

The PASCAL program that implements the mathematical description derived above

for the random walk simulation is as follows:

Program Random—walk ;{this stimulates a simple random walk with equal-length steps}

uses CRT,DOS,GRAPH ; {resource s required }

varCA,CB,CX,CY:extended; {directio n cosines }x,xn,y,yn,theta,distance:extended; {ste p variables }step:extended; {displa y variables }hstart,vstart:integer; {scree n center }i,tries:integer; {counte r variables }GraphDriver:Integer; {whic h graphic s card? }GRAPHMODE:Integer; {whic h displa y mode? }ErrorCode:Integer; {i s ther e a problem? }Xasp,Yaspiword; {aspec t rati o o f screen }

constwopi = 6 .28318; {2TT constant}

Procedure set—up—screen;

{gets the required input data to run the simulation}

begin {ensures screen is clean}

ClrScr;

GoToXY(10,5) ;

writeln('Random Walk Simulation');

GoToXY(33, 5) ; {get number of steps}

write ('.............hhow many steps?');

readln(tries);

end;

Procedure initialize;

{identify which graphics card is in use and initialize it}

Page 23: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

14 MONTE CARLO MODELING

var

InGraphicsMode: Boolean ;

PathToDriver:String;

begin

DirectVideo: =False;

PathToDriver: = ' ' ;

GraphDriver: =detect;

InitGraph(GraphDriver,GRAPHMODE,PathToDriver);

SetViewPort (0, O.GetMaxX,GetMaxY,True) ; [clip viewport}

hstart: =trunc (GetMaxX/2) ; {horizontal midpoint of screen}

vstart: =trunc(GetMaxY/2); {vertical midpoint of screen}

step: = (GetMaxX/50) ; {a suitable increment}

GetAspectRatio(Xasp,Yasp); {find aspect ratio of this display}

end;

Procedure initialize—coordinates;

{set up the starting values of all the parameters}

begin

x:=0;

y:=0;

CX:=1.0;

CY : = 0 . 0 ;

randomize; {and reset the random-number generator}

end;

Procedure new_coord ;{computes the new coordinates xn,yn given x,y, CX,CY and theta}

var

VI,V2:extended ;

begin

VI :=cos( theta);V2: =s in( theta);

CA:=CX*V1 - CY*V2 ; {new direction cosines}

CB:=CY*V1 + CX*V2 ;

xn:= x + step*CA ;yn:= y + step*CB ; {ne w coordinates }

end;

Page 24: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CONSTRUCTING A SIMULATION 15

Procedure plot_xy(a,b,c,d:extended);

{plots the step on the screen. Since all screen coordinates

are integers, this conversion is made first. The real X,Y

coordinates are separated from the plotting coordinates,

which put X=Y=0 at the point hstart,vstart}

var

ih, iv, ihn, ivn: integer; {plotting variables}

begin

ih:=hstart + trun c (x*Yasp/Xasp) ; {correc t fo r aspect ratio}

iv:=vstart + t runc (y ) ;

ihn:=hstart + trun c (xn*Yasp/Xasp) ; {ditto }ivn:=vstart + trunc(yn ) ;

line (ih, iv, ihn, ivn) ; {and draw the line}

end;

Procedure reset—coordinates ;{shifts coordinat e reference X, Y to new coordinates XN,YN and

resets the direction cosines}

beginx:=xn;y:=yn;

CX:=CA;CY:=CB;

end;

Procedure how—far ;{computes the distance traveled in the walk}

label hang ;

vara,b:integer;

s:string;

begin

distance:=sqrt((x-hstart)*(x-hstart) + (y-vstart)*(y-vstart) ) ;distance:=distance/step;

{in step-lengt h units }

Page 25: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

16 MONTE CARLO MODELING

a: = t runc (Ge tMaxX*0 .2 ); {adjus t for your screen}

b:=trunc (GetMaxY*0 . 9) ; {ditto }

Str (distance: 3 : l , s) ; {conver t nutnber to text string}

s :=concat(s , 'step s fro m or ig in ' ) ;

OutTextXY(a,b,concat ( 'Th e walke r traveled ' s ) ) ;

hang: {label for goto Call}

if (no t keypressed) the n got o hang ; {keep display on screen}

closegraph; {tur n off graphics}

end;

****mainatahe*****

begin

set—up—screen;

initialize; {fin d graphics card and set it up}

initialize—coord

loop starts here

for i:= l t o trie s do

begin

theta: =twopi*RANDOM; {get deviation angle}

new_coord; {comput e new position}

plot^xy(x,y,xn,yn); {plot this step on screen}

reset—coordinates; {move origin to XN, YN position}

d e l a y ( l O O ) ; {t o slo w down display}

Page 26: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CONSTRUCTING A SIMULATION 17

end;

* loop ends here *

how—far; {find out distance traveled}

end.

All PASCAL programs have exactly the same layout, which aids in followingthe code even though the format itself seems , at first, rather unusual. To further hel pthe reade r t o follo w th e structur e an d logi c o f th e program , this boo k wil l als oemploy a consistent se t o f typeface conventions whe n listing th e program s in th etext. If you decide to type any of these programs into your computer to run them,then these bold and italic effects should , of course, be ignored. The program will beset i n Courier typeface ; quote s fro m th e progra m code , procedure , an dfunction names , etc., will also be se t i n the sam e typeface to identif y the m i n th etext.

The firs t lin e in the listing always identifies the program name, here RANDO MWALK. Th e keyword PROGRAM will be printed in bold type to identify it . Note thatthis statement , lik e al l PASCA L statements , end s i n a semicolo n (;) . This i s th e"delimiter" tha t separate s on e progra m statemen t fro m th e next . Th e PASCA Lcompiler ignore s spaces and line breaks, following the program logic only from thedelimiters. I f desired , furthe r detail s abou t th e progra m ca n the n b e adde d a s acomment. In PASCAL, this is done by enclosing the text within {. . .} brackets. Fo rclarity i n the printed listings, comments wil l be shown in italics.

Next, the resources require d b y the program are listed. The keyword uses,here printe d bold , i s followe d by a lis t o f the librarie s require d b y th e cod e tha tfollows. I n thi s cas e th e CRT , DOS, an d GRAP H librarie s ar e needed . O n othe rcomputers or in other variants of PASCAL, the list of resources may be different o rmissing altogether .

The keywor d var, whic h wil l b e i n bold , introduce s a listin g o f al l th evariables used in the program, groupe d b y their type . Every variabl e i n PASCALmust b e define d befor e i t i s use d an d b e o f a typ e (e.g. , integer , longinteger ,extended, real , Boolean , etc. ) recognized b y th e program . Onc e a variabl e i s"typed," its properties are fixed; s o if for some reason a particular number is neededin mor e tha n one for m (fo r example , a s both a real numbe r and a n integer) , tw ovariables must be defined an d the value converted fro m on e type to the other, usingone of the special functions provided fo r this by the language. Variables listed at thestart o f a program ar e GLOBAL variables ; that is , every part o f the progra m ca nread and write these quantities. Variables can also be defined within the procedures

Page 27: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

18 MONT E CARL O MODELIN G

and functions use d by the program (see below). In this case, the variables are local ,or private, to the particular procedure or function i n which they appear and are notavailable to other parts of the program. Note that PASCAL does not distinguish thecase o f letters , s o dummy , DUMMY, an d Dumm y woul d al l refe r t o th e sam equantity.

CONST identifie s a lis t o f parameter s tha t wil l b e o f constan t valu e i n th eprogram, suc h as the length of the step taken by the walke r and the coordinates ofthe center o f the display screen. Onc e defined here, these quantities are also globa lin their effect. Constant s appearing in the CONST list do not appear in the VAR list,and their type is determined by the format assigned to them when they first appear.Thus

CONST dumm y = 5 ;

will define a constant o f integer type , while the statemen t

CONST dumm y = 5 .0 ;

would defin e one wit h properties o f a real number . Once assigned , the value of aconstant canno t be changed; any attempt to do so will lead the compiler to producean error statement. Temporary constants—that is, ones whose values may be alteredif required—are obtained by a normal program lin e equating two variables :

new-dummy : = 5 .15 ;

Note that assigning the value on the left-hand side of a statement to value given onthe right-hand sid e requires a ":=." The simple "=" implies a logical operation , asin "i f A=B," not the ac t o f equating two values . Sinc e i t has been estimate d tha t95% of all errors in PASCAL come from omission of the ";" and confusion between" = " and ": = ," care in copying these jots and tittle will be repaid by a reduction inthe time i t takes to get a program running.

Following thes e definitions , th e listin g contain s cod e fo r FUNCTIO N an dPROCEDURE routines. These pieces o f code play the role assigned to subroutines insome other languages . A function ha s the specifi c job o f performing som e definedmathematical operation . I t therefor e return s t o th e progra m lin e tha t calle d i t a noutput o f some type , and this type must appear i n the definition . Thus

Function SUM: real;

tells us that this is a function whos e output is a real number—for example , the sumof tw o o r mor e othe r numbers . I f the functio n i s supplie d wit h data o n whic h t o

Page 28: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CONSTRUCTING A SIMULATIO N 1 9

work, then both th e typ e of th e dat a supplie d an d o f the outpu t returned mus t begiven, so

FUNCTION black—box(a,b:integer):real;

takes in data defined as integer but produces as output a real number. Many func -tions, such as sin or cosin or log, are already included in the language itself; but bywriting the necessary code, as many new and specialized function s a s required canbe added. A procedure, by comparison, can perform any legal set of operations andso has no "type" of it s own. In either case , th e procedures an d functions mus t bedefined befor e they ar e calle d b y the program , so all o f the cod e associate d withthese items appears before the main body of the program. As far as possible, al l ofthe detai l i n a program i s carried ou t by procedures an d function calls . Th e mainprogram then simply lists the order in which these ar e carried out . Thi s makes thelogic of the program easy to follow, particularly if descriptive names are used for thefunctions an d procedures. Sinc e PASCAL imposes no limitations o n the length ofnames, it is worth choosing ones whose meaning will still be evident 6 months aftera program is written (i.e., set_to_zero is descriptive and helpful, STZ is not). Layingout program s i n thi s wa y als o make s i t eas y t o subsequentl y construc t ne w pro-grams, since the components can be reused.

The main program runs between the key words BEGIN and END, set in boldtype. Fo r clarity , th e star t wil l als o usuall y b e identifie d b y a suitabl e lin e o fcomment. In reading a program for the first time, therefore, the main program codeshould be identified, remembering that it is always at the end of the listing; then theprocedures and functions should be studied as they are called by the program. Theprogram starts by calling th e procedure set_up_screen . which , as can be seenfrom the code for it, first clears the display screen, presents the program name readyfor th e simulatio n to begin, an d asks for the number of steps to be modeled .

Since the purpose of this program is to plot the random walk on the screen, thenext step is to set up the graphics display of the computer. This is complicated by thefact tha t MS-DO S machine s com e with a wide variety o f graphica l displa y hard-ware. Th e procedure initializ e (take n directl y fro m th e TURB O PASCALreference books supplie d by Borland Inc.) determines automaticall y which type ofgraphics display (i.e., CGA, EGA, VGA, Hercules, etc.) is present in the computerat the time the program is run. I t then selects a "graphics driver program" (file s onthe dis k wit h th e extensio n .BGI ) tha t wil l interfac e th e compute r cod e t o th ehardware in use. Provide d tha t our software is written carefully enough, the sam ecode will produce an acceptable output on any of the possible displays, even thoughthese wil l diffe r i n parameters suc h as their resolution an d the shape of the screen .

The starting point of the random walk is to be placed at the center of the screen,but the coordinates o f this point will vary from on e type of display to another . We

Page 29: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

20 MONT E CARLO MODELING

therefore ask the machine to tell us how many picture points ("pixels") it can plot inthe X (or horizontal) direction, using the call GetMaxX, an d how many in the Y (orvertical) direction, using GetMaxY. Th e center o f the screen i s then, quite gener-ally, a t the coordinate s (GetMaxX/2 , GetMaxY/2) . I n plottin g o n th e screen , th ecoordinates mus t be give n a s intege r number , s o th e procedur e convert s th e rea lnumbers (GetMaxX/2, GetMaxY/2 ) to integers (hstart , vstart) using the ' trunc 'function defined in PASCAL. Similarly, the step length is set to be one-fiftieth o f thewidth o f the screen i n the horizontal direction (i.e. , GetMaxX/50). A final touc h isto fin d th e "aspec t ratio " o f th e display—tha t is , th e rati o o f a uni t ste p i n th ehorizontal direction to a unit step in the vertical direction. This is obtained from th ecall GetAspectRatio ( ) , whic h gives us the ratio Xasp/Yasp for the display inuse. B y correcting for the aspect ratio of the screen, we can ensure that the displayson the screen will look simila r for all the graphics cards supported by the software.

The next procedure used , initialize_coordinates , set s th e positionvariables x,y and the direction cosines CX,CY t o the desired starting values. In somecomputer languages (e.g. , BASIC), all variables are automatically reset to zero eachtime the program is run; bu t in PASCAL, the value assigned to a variable when theprogram start s is quite arbitrary, so it is necessary to explicitly set each to the valuerequired. The procedure also resets the random number generator with the statement"randomize." The quality of a Monte Carlo simulation depends to a great extenton the quality of the random numbers with which it is supplied, since if these exhibitany patterns in their behavior or if a given number repeats within a limited numberof calls , the output data will be flawed. The random-number generators i n TURBOPASCAL (and QUICK PASCAL) , summone d by th e cal l RANDO M ar e quit e wel lbehaved provide d tha t th e generato r i s periodicall y rerandomize d usin g th e cal lRANDOMIZE. Althoug h it is not a documented feature, it can also be noted that ifthe initial RANDOMIZE statemen t i s omitted (o r placed within {. .} comment brack-ets), the n th e sam e strin g o f rando m number s wil l b e generate d ever y tim e th eprogram i s run. This can, in some cases, be usefu l fo r debugging a simulation andalso i n examining th e effec t o f changing a single paramete r i n a simulation .

The program now calls the procedure new_coord, which calculates the newcoordinates xn, yn give n the starting coordinates x, y; the initial directio n cosine sCX, CY; th e deflectio n angl e 0 ; an d th e ste p length , using the formula s derive dabove. Because all of these variables have been declared to be global by being listedat the start of the program, no variables need be passed to the procedure. The effec tof this step is then displayed on the screen, using the procedure plot_xy, whic hdraws the step on the screen. Note that since the graphics routines that place pixel son th e scree n nee d intege r number s a s input , the procedure mus t firs t conver t th eactual rea l numbe r coordinates x, y, xn, yn to loca l intege r variables ix, iy, ixn, iynusing the trunc function supplie d in TURB O PASCAL . Th e origin o f the simulation(x = 0 , y = 0) is plotted a t the center of the screen (hstart,vstart) and the coordinat esystem is such tha t a positive x valu e moves the point to the right and a positive y

Page 30: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CONSTRUCTING A SIMULATIO N 2 1

value moves the point downward. As discussed in the procedure Initialize, th edistance plotted in the x direction (horizontal ) is corrected fo r the aspect ratio of thedisplay screen in use, so that all screens will give roughly equivalent displays. Notethat if the line being drawn has coordinates tha t would place it off the screen (tha t isif ih or ihn does not lie between 0 and GetMaxX, or if iv or ivn does not lie between0 and GetMaxY), then the command SetViewPort, whic h appears in the proce-dure initialize, wil l automatically "clip" the plot at the edges of the CRT. Theprogram will continue to run, but plotting wil l not resume until the line again lies inthe visibl e regio n o f the screen . Th e plot-xy procedur e i s one o f the buildin gblocks tha t w e wil l be usin g again i n late r chapters . Next , the progra m call s th eprocedure reset^coordinates, whic h shifts the origin of the calculation fromx t o xn, and y t o yn, an d reset s th e directio n cosines . A standar d TURB O PASCA Lcommand Delay () i s then called. The purpose of this is simply to slow down theaction of the loop so that it can be watched more easily on the screen. The delay timeis approximately equal to the parameter passed to the function i n milliseconds, thusDelay (100) wil l hold u p the loop for about one-tenth o f a second . Th e loop isthen repeated unti l the desired numbe r of steps has been calculated .

The program then exit s fro m th e loop, and the distance between the star t andfinish coordinate s i s computed using the procedure how_f ar. Thi s uses Pythag-oras's theore m t o find th e distance of the walker from th e startin g point in units astep in length. Sinc e th e compute r i s now in graphics mode , thes e data canno t b esimply printed to the screen but must be drawn on the CRT as if it were a piece of agraph. First, the numerical value is converted to a string (i.e., a list of letters, digits ,or symbols ) usin g th e standard TURB O PASCA L command St r ( ) . Th e ":3:1"which follows the distance variable formats the result as three digits, one of which isafter the decimal point. The string is assigned to a variable s, which is declared at thestart o f th e procedure ; i t i s therefor e a loca l variabl e (existin g onl y withi n thi sprocedure). The string s is then concatenated (i.e. , added) to other strings of text toform th e messag e draw n o n th e scree n b y th e comman d OutTextX Y ( ) . Th emessage i s draw n startin g a t th e coordinate s a,b, whic h are , again, loca l t o thi sprocedure. Sinc e w e wis h one piece o f cod e t o serv e fo r al l types o f display, th evalues of a and b are chosen a s fractions of GetMaxX and GetMaxY. Since personalpreferences abou t th e appearanc e o f th e displa y ma y vary , however , th e actua lvalues can readily b e changed to place the text at any other desired position o n thescreen. In fact, changing the values of a and b and then recompiling and rerunningthe program t o se e the resul t is an excellent wa y for users without much practicalexperience wit h computer s t o gai n proficienc y i n modifyin g th e cod e an d s o t oovercome an y fear of the dire results of "interfering" with the program. Note that ifa and/o r b ar e chose n t o b e large r tha n GetMax X o r GetMaxY , th e tex t ma ydisappear becaus e th e comman d SetViewPort , i n the procedure initialize ,"clips" the displa y a t the edge s o f the screen . I n orde r t o hol d the displa y on thescreen so that it can be examined or printed out, this procedure finishes with a loop.

Page 31: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

22 MONT E CARL O MODELING

The command keypressed call s a standard function tha t checks whethe r o r notany key has been touched. The output o f the function i s a Boolean (i.e., it has thevalue true or false). In PASCAL, the code statemen t

if (function) then (operation)

will lea d t o th e operatio n bein g performe d i f the functio n evaluate s to a positiv enumber or produces a Boolean variabl e wit h the value "true" (i.e., +1) . If, on theother hand , the functio n evaluates t o zer o o r to a negative numbe r o r produces aBoolean variable with the value "false" (i.e. , 0) then the operation is not performed.Here, i f keypressed i s "false" (i.e. , no key was touched) the n the expression no tkeypressed has the value "true," so the program goes back to the label hang andcontinues t o cycle around until eventually some key on the keyboard is struck andthe procedure i s exited .

It may seem to be overelaborate to present a simple program in this structuredway, bu t adherenc e t o thi s forma t produce s cod e tha t i s eas y t o follow . As th eprograms in this book become longe r and more complex, the benefits of its use willbe mor e evident . Debuggin g th e progra m i s als o mad e easie r becaus e a whol eprocedure o r function ca n b e dropped out by simply placing {. . .} brackets aroundthe cal l to it, allowing the errant region o f the program to be quickly identified. Inaddition, by doing all of the real work in a program in the procedures and functions,a librar y o f progra m module s i s buil t up tha t makes i t possible t o put togethe r aspecial-purpose program wit h the minimum of effort. Onc e a procedure or functionhas been debugge d and tested i n one program, i t can safely b e moved into anothe rprogram wit h the certain knowledg e tha t it wil l work as expected .

Finally i t must be pointed ou t that the code, a s given here, does violate on e ofthe accepted principle s o f "good programming" i n that global variable s (i.e. , vari-ables declared at the beginning of the program and so visible to all of the proceduresand function ) ar e used . "Good" practice trie s t o avoid the possible sid e effect s o fglobal variables, suc h as the inadvertent corruption of a variable by a faulty proce -dure, by only passing copies o f the variables to the procedures as they are required.However, in the electron beam simulations that follow, as many as 15 or 20 differen tvariables may be required t o describe th e current statu s of the electron , an d al l ofthese may be needed b y any given procedure o r function. Writin g the code to passthis number of variables to a procedure is cumbersome and the resulting operation i salso slow, so the code given here respects the spiri t of the injunction against globa lvariables bu t use s them anywa y in th e interest s o f convenienc e an d speed . Fo r amore detailed discussion of this topic, for other questions related to programming inPASCAL, o r fo r informatio n o n compiling , editing , o r runnin g TURB O PASCA Lprograms, see the documentation supplied with the program or read one of the manybooks o n this language.

Page 32: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CONSTRUCTING A SIMULATIO N 2 3

2.5 Running the simulation

If the programs are available on disk, then this simulation ca n be run by booting thecomputer in the usual way from either a hard disk or a floppy disk and obtaining the">" prompt. I f the computer was booted fro m a floppy, then remove thi s syste mdisk and insert the disk with the Monte Carlo programs on and type Randomwalk. atthe ">" prompt. Be sure that the disk (i f it is a copy) has the .BGI graphics driverfiles o n i t or else the program wil l crash. I f the computer wa s booted fro m a harddisk, then put the program floppy in the first available drive (usually labeled A:) andtype A:Randomwalk. I f th e progra m ha s bee n type d int o th e compute r fro m th elisting, then sav e i t to dis k before compilin g an d running it , usin g the instructionprovided b y th e relevan t manua l for th e languag e chosen . I f yo u ar e planning t omake an y changes t o th e program, always work fro m a copy rather tha n fro m a noriginal.

When th e welcom e scree n appears , ente r th e numbe r o f step s required , hi treturn, an d the simulatio n wil l run. To generate another run , hit return (to get th e">" prompt onc e more) . I f your keyboard ha s function keys , then hitting Fl wil lredisplay th e origina l instructio n (i.e. , "A:Randomwalk") , an d hitting Retur n willcause th e progra m t o restart . Otherwis e repea t th e proces s a s describe d above .Figure 2.3 shows some typical results for 200-step simulations. Every run will givea different track , and each will give a different distanc e between the start and finishof the walk. As is evident fro m Fig . 2.4, whic h plots distances recorded for severa l

Figure 2.3. Si x random walks , each of 200 steps .

Page 33: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

24 MONT E CARL O MODELIN G

Figure 2.4. Summar y o f random wal k data .

successive run s a t a given numbe r o f steps , the radial distance travele d fro m th estarting poin t ca n var y ove r a wid e range . Thi s i s t o b e expected , becaus e th esimulation is, in effect, takin g samples of a random walk and there will therefore bea statistica l scatte r i n th e dat a points obtained . I f th e sample s ar e assume d t o b eindependent, which implies among other things that the random numbers used in thesimulation are really random and not in any way related, the n the relative precisio nof the result wil l be proportional t o the inverse of the squar e root of the number ofsamples taken. Thus a relative precision of 10% would be achieved o n 100 samples,while t o reac h a 1 % precision woul d requir e 10,00 0 samples . S o whil e a singl esimulation of a random walk of a given number of steps would produce little usefu linformation, a serie s o f suc h simulations , when averaged , woul d giv e u s a mea ndistance traveled and an estimate of the relative precision o f this mean value. Thusplotting (see Fig. 2.4) the average value of the distance traveled, determined fro m allthe simulations using the same number of steps, as a function o f the number of stepstaken gives a series of values that falls close to the predicted theoretica l resul t thatthe distanc e travele d i s equal t o the squar e roo t o f the number o f step s taken. A nessential requiremen t o f any Monte Carlo simulation , therefore , i s the necessity torepeat the simulatio n a sufficiently larg e number o f times to obtain a statisticallymeaningful result .

Page 34: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

3

THE SINGLE SCATTERING MODEL

3.1 Introduction

In thi s chapte r w e wil l develo p a Mont e Carl o mode l fo r th e interactio n o f a nelectron beam with a solid using the "single scattering " approximation . Within thelimits discussed below, this model is the most accurate representation of the electroninteraction that we can construct, and it is capable of giving excellent result s over awide range of conditions and materials. This program, together wit h the faster butless detailed "plura l scattering" mode l developed in the following chapter, will formthe framewor k aroun d whic h specifi c application s o f Mont e Carl o modelin g t oproblems in electron microscop y and microanalysis will be generated in subsequentchapters.

3.2 Assumptions of the single scattering model

The single scattering Monte Carlo simulation calculates the passage of the electronthrough the solid by tracking it from on e interaction to the next. In principle, theseinteractions coul d b e eithe r elasti c o r inelastic , s o th e resultan t change s i n th edirection of motion and the energy o f the electron would be computed o n the basisof the specific sequence of scattering event s that each electron suffered . Whil e thisis a feasible way of tackling the problem, it has the disadvantage that because not allscattering events are equally important—in terms of their effect o n the trajectory orenergy—or probable , th e amoun t o f computatio n require d become s excessivel ylarge. Th e procedure described her e makes two significant assumptions to providean accurate simulatio n while minimizing the amount of calculation required .

1. Only elastic scatterin g events are considered i n determining th e path takenby an y given electron. Elasti c scatterin g i s the net deviation that the incident elec -tron undergoe s a s a resul t o f th e coulombi c attractio n betwee n th e negativel ycharged electro n an d the positively charged atomi c nucleus and the correspondingrepulsion betwee n th e orbitin g electron s an d th e inciden t electron . Thi s process ,which is described mathematically by the screened Rutherford cross section, resultsin angular deflections of from typically 5° to 180° . (For an excellent concis e discus-sion on electron scatterin g phenomen a se e Egerton, 1987. ) Inelasti c scattering , onthe othe r hand , produces deflection s o f the orde r A£/ £ [i.e. , the rati o o f AE , th e

25

Page 35: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

26 MONT E CARL O MODELIN G

energy los t in the event , to E, the energy o f the electron (Egerton , 1987)] . Thus a10-keV electron whic h deposits 1 5 eV in an inelastic collision i s deflected throughan angl e o f abou t (15/10,000 ) radian s (i.e. , 1. 5 milliradians o r abou t 0.1°) . A nelectron that loses more energy in an inelastic event is, of course, deflected througha larger angle, but the probability o f these events is proportional t o about 1/AE , soonly a smal l fractio n o f inelasti c event s wil l produce significan t deviations of th etrajectory. Consequentl y elasti c scatterin g event s ar e th e one s tha t dominat e i ndetermining th e spatia l distributio n o f th e interaction ; ignorin g th e effect s o f th einelastic scatterin g produce s littl e error .

2. The electron i s assumed to lose energy continuously along its path at a ratedetermined b y the Bethe relationship rathe r tha n as the result o f discrete inelasti cevents. While some energy loss mechanisms are continuous, such as the productionof Bremsstrahlung ("brakin g radiation" ) b y the slowing down of the incident elec -tron a s a consequenc e o f electron-electro n interactions , mos t energ y losse s ar eassociated wit h a specific event such as the production of an inner shell ionization .However, th e averagin g o f al l suc h effect s alon g th e pat h taken b y th e electron sleads to a convenient simplification in which all possible types of inelastic event aretaken accoun t of by one simpl e expressio n involvin g only a singl e variable . Thi smodel of continuous energy loss i s therefore in almost universal use—although, asdiscussed later , significant modifications to its functional form ma y become neces -sary a t low beam energies .

3.3 The single scattering model

The basic geometry for the simulation (Fig. 3.1) assumes that the electron undergoesan elastic scattering even t at some point Pn, having traveled to Pn fro m a previousscattering event at Pn~l. The fundamental tas k of the simulation is to compute thecoordinates o f th e poin t Pn+l t o whic h th e electro n travel s a s a resul t o f th escattering event at Pn. The parameters that describe the instantaneous situation o fthe electron ar e its energy E and the direction cosine s o f the trajectory segmen t thatbrought it from Pn-1 to Pn. The direction cosine s ex, cy, cz are defined in the sameway as the direction cosines employed in the random walk simulation except that inthis three-dimensiona l situatio n ther e ar e no w thre e rathe r tha n tw o axe s t o b econsidered. Th e X, Y, and Z axes in all the simulations in this book are defined withthe conventio n tha t th e positiv e Z axi s i s norma l t o th e specime n surfac e an ddirected int o the specimen, the X axis is parallel t o the tilt axis, and the X-Y plane isthe surfac e plane o f th e untilte d sample . Whe n th e sampl e i s tilted , th e positiv edirection o f the Y axis i s down the surfac e o f the specimen .

To calculate th e position o f the new scattering poin t Fn+1, we first requir e toknow th e distance , o r "step," between Pn+l an d the preceding poin t Pn. As dis -cussed above , a n assumption of this particular model is that only elastic scatterin gevents are explicitly considered. Th e distance between successive scattering events

Page 36: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGL E SCATTERIN G MODE L 2 7

Figure 3.1. Definitio n o f coordinate system used in the Monte Carl o simulation progra m i nthis chapter .

is therefore related to the elastic mean free path—which, in turn, is a function o f theelastic cros s sectio n a£. The total screene d Rutherfor d elastic cros s sectio n cr £ isgiven by the relation (Newbur y an d Myklebust, 1981) :

where E is the electron energy in kilo-electron volts , Z is the atomic number of thetarget, an d a i s a "screenin g factor " tha t account s fo r th e fac t tha t th e inciden telectron does not see all of the charge on the nucleus because of the cloud of orbitingelectrons, a i s usually evaluate d usin g a n analytica l approximation , suc h a s thatgiven by Bishop (1976) :

Page 37: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

28 MONT E CARL O MODELIN G

The cros s sectio n crB define s a mean fre e pat h X , which i s give n b y th e formula :

where Na i s Avogadro's number , p is the density of the target in g/cm3, and A is theatomic weigh t o f th e targe t i n g/mole . X represents th e averag e distanc e tha t a nelectron wil l travel between successiv e elastic scatterin g events . Calculating X fromthe formulas above fo r a selection of elements show s (Table 3.1 ) that X is typicallyof the orde r o f a few hundred angstrom s a t 10 0 keV an d abou t one-tenth o f that at10 keV. Material s wit h higher atomi c number s caus e mor e elasti c scatterin g tha nelements o f lower atomi c number , therefore the y hav e a shorte r mea n fre e path .

The actual distance that an electron travels betwee n successive elastic scatter-ings will , of course , var y in a random fashion . Th e probabilit y p(s) o f an electro ntraveling a distance s when th e mea n fre e pat h i s X is

An estimat e fo r th e distanc e actuall y travele d ca n the n b e foun d b y choosin g arandom numbe r RND an d solving Eq . (1.1 ) i n the for m

which give s

Table 3.1 Elastic mean free paths

Element Z X at 100 keV X at 10 keV

Carbon 6 131 0 A 17 0 ASilicon 1 4 111 2 A 12 7 ACopper 2 9 29 7 A 3 5 AGold 7 9 8 9 A 1 0 A

Page 38: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGL E SCATTERIN G MODE L 2 9

Figure 3.2. Variatio n of step length, in units of the mean free path, with the random numbe rchosen.

and hence

(since RN D i s a random numbe r betwee n 0 an d 1, 1 — RND i s als o a randomnumber in the sam e rang e an d s o can be replaced b y ye t anothe r random numberRND). Figure 3.2 plots the variation of step length, in units of X , as a function of therandom number chosen, using the result of Eq. (3.7). Since the random numbers areuniformly distribute d betwee n 0 an d 1 , there is , fo r example , a 10 % chance o fdrawing a number such tha t RND s 0. 1 and so (from Fig . 3.2 ) of getting a steplength such that s ̂ 2.3 X. Equally there is a 10% chance of drawing a number suchthat RND 3: 0.9, in which case the step length s < 0.1 X. The step lengths thereforevary over a wide range of values, depending on the random number picked by thecomputer. However, as is readily shown from Eq. (3.7), the average value of the steplength s resulting from a large number of tries will be X, as would be expected fro mthe definitio n o f X as the average distance between successive scatterings .

In th e scatterin g even t a t Pn, which marks the star t o f th e step , the electro nis deflecte d through som e angl e (j > relativ e t o it s previou s direction o f trave l (se eFig. 3.1) . Th e wa y i n whic h thi s scatterin g occur s i s describe d b y o-' , th e angu -lar differentia l for m o f th e Rutherfor d cross sectio n (e.g. , Reime r an d Krefting ,1976):

Page 39: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

30 MONT E CARLO MODELING

where a i s the screenin g paramete r discusse d above . A n appropriat e functio n t oselect a scattering angle using a random number can then be obtained from a furtherapplication o f Eq. (1.1 ) in the form :

This integration, using the result for <JE given in Eq. (3.1), yields the relation for thescattering angl e (Newbur y and Myklebust , 1981) :

This equatio n generate s a uniqu e scatterin g angl e i n th e rang e 0 < 4 > < 180° ,producing a n angula r distributio n tha t matche s th e on e obtaine d experimentally .Although the full range of angles between 1 and 180° is available, th e great majorityof scattering event s are predicted b y Eq. (3.10) to be low-angle—that is, less thanabout 10° . Figure 3.3 plots the probability o f obtaining a scattering angle 4 > greate rthan some minimum value $ for the particular case of a silicon targe t irradiated at100 keV. Note tha t whil e there i s onl y a 1 in 10,00 0 chance o f a n electron bein gscattered by an angle in excess of 110°, more than 50% of all electrons are scatteredthrough at least 1.5° .

The electron ca n scatte r freely t o any point on the base o f the cone shown inFig. 3.1 . The azimutha l scattering angl e \\i i s then given as

Figure 3.3. Probabilit y o f elastic scattering angl e exceeding some specified minimu m value .

Page 40: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGL E SCATTERIN G MODE L 3 1

where RND i s an independent random number selected by the computer. Since <}> , i|<,and the step length are now determined, the relationship o f Fn+1 to Pn can now befound. Th e procedure i s simila r to that used in Chap. 2 , except that the motion isnow i n thre e rathe r tha n two dimensions . A s before , th e pat h i s describe d usin gdirection cosines, ca, cb, and now cc. The coordinates at the end of the step at Pn+1,xn, yn, and zn, are then related t o the coordinates x, y, z at Pn by the formula s

The direction cosines ca, cb, cc are, as previously, found from the direction cosine sex, cy, and cz with which the electron reache d Pn. The derivatio n of the requiredtransformation fro m ex, cy, and cz to ca, cb, and cc is similar in outline to that givenin Chap. 2 but is more complex because of the extra dimension. The result (modifiedfrom th e derivatio n of Myklebust et al., 1976 ) i s

where

and

Page 41: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

32 MONT E CARL O MODELIN G

Note tha t the su m of the square s o f the direction cosine s i s alway s equa l to unity,

As th e electro n travel s throug h th e specimen , i t lose s energ y continuousl ybecause o f th e dra g exerte d o n th e negativel y charge d electro n b y th e positivel ycharged nuclei surrounding it; it also loses energy during discrete inelastic scatteringevents such as the horizon or production of a plasmon. The most complete approachto accounting for these energy losses would be to incorporate them individually intothe simulation , but thi s is a relatively lengthy procedure becaus e o f the number ofdifferent possibilitie s available . Instead , we make the assumption that the effec t o fboth the electrostatic dra g on the electron an d the discrete energ y losse s occurrin gduring inelastic scattering events can be combined an d approximated by a model inwhich the inciden t electro n i s slowing dow n continuously as i t travels. The rate atwhich energy is lost by the incident electro n wa s shown by Bethe in a classic pape r(1930) t o be expressible i n the form :

where (dE/dS) i s sometimes referre d t o as the "stopping power " o f the target , E i sthe energ y o f electron (i n kilo-electron volts ) Z an d A are respectively th e atomi cnumber and atomic weigh t of the target , and S is the product of p the density of thetarget (in g/cm3) and the distance travele d alon g the trajectory s. J, which has unitsof kilo-electro n volts , i s calle d the mean ionization potential an d represent s th eeffective averag e energy los s per interaction between th e incident electron an d thesolid. This singl e parameter incorporate s int o its value all possible mechanisms fo renergy los s tha t th e electro n ca n encounter , thu s allowin g th e Beth e equatio n t oprovide a convenient and compact way of accounting for the variety of energy lossesexperienced.

/ ha s been measure d experimentally , usin g nuclea r physic s techniques , fo r awide range o f material s an d compounds (see fo r exampl e ICRU, 1983) . Table 3. 2gives value s for some common element s (i n solid form) , an d it can be seen that , ingeneral, there is a monotonic and almost linear increase of/ with the atomic numberof the element. Berge r an d Seltzer (1964 ) showed that this variation could be fitte dwith good accuracy by the relatio n

and a comparison o f this expression with the data in Table 3.2, for example, for silicon(Z = 14 ) and gold (Z = 79), shows that the fitted value and the experimental value are

Page 42: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGL E SCATTERIN G MODE L 3 3

Table 3.2 Measured values of mean ionization potential J

Element /(eV) Element J(eV) Element /(eV)

H 21. 8 C r 25 7 P d 47 0Li 40. 0 M n 27 2 A g 47 0Be 63. 7 F e 28 6 C d 46 9B 76. 0 C o 29 7 S n 48 8C 78. 0 N i 31 1 G d 59 1Na 14 9 C u 32 2 T a 71 8Al 16 6 Z n 33 0 W 72 4Si 17 3 G a 33 4 P t 79 0Ca 19 1 G e 35 0 A u 79 0Sc 21 6 Z r 39 3 P b 82 3Ti 23 3 N b 41 7 U 89 0V 24 5 M o 42 4

within a few electron volts of each other. For compounds, the appropriate value of/can again be found using Eq. (3.18), but replacing Z by Zav, the mean value of Z for thecompound. So, for example, if a material has the composition AB 2 (i.e., 33 atomic %of A an d 66% o f B), the n

where ZA an d ZB ar e th e atomi c weight s o f A an d B respectively . Thi s simpl eaverage in most cases produces a value for Zav, and thus for /, whic h is of accept -able accuracy. I n the case of complex materials, however, th e composition may notbe known. Table 3.3 therefore give s / values, again derived from th e ICRU (1983 )report, fo r som e compounds likel y t o be encountered i n electron microscopy . Al -though thi s lis t i s fa r fro m exhaustive , i t does giv e a usefu l guid e a s to probabl evalues fo r generi c type s of materials .

Table 3.3 Measured values of mean ionization potential J

Material JT(eV ) Material J(eV ) Material J(eV )

Nylon 63. 9 Aluminu m oxid e 14 5 Adipos e tissue 6 3Teflon 99. 1 Calciu mffluoride11111166 pbone 1107Paraffin wa x 48. 3 Lithiu mffluoride 94 4Muscle 75PMMA 74. 0 Silico n dioxid e 13 9 Ski n 7 4Polyethylene 57. 4 Sodiu m iodide 45 2 Ai r (1 atm.) 8 6Polystyrene 68. 7 "Pyrex " glass 13 4 Bloo d 7 5Plastic 64. 7 Photographi c 64. 7 Liqui d water 7 5

scintillator emulsio n

Page 43: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

34 MONT E CARL O MODELIN G

Figure 3.4. Stoppin g power for copper computed fro m Bethe expression.

Using eithe r th e measure d o r compute d valu e o f /, Eq . (3.17 ) ca n no w beevaluated fo r a give n electro n energ y E. Figur e 3. 4 attempt s t o plo t th e rat e o fenergy loss , (-dE/ds), o r p(dE/dS), fo r coppe r ( p = 7. 6 g/cm 3) ove r th e energ yrange 10 0 eV to 10 0 keV. The predicted energy-los s values show a steady increasefrom abou t 0.1 eV per angstro m a t 10 0 keV u p to almos t 1 0 eV per angstro m atbeam energies of a few kilo-electron volts. These values are typical of those foundin all materials. However at an energy of about 2 keV, the curve reaches a maximumvalue before starting to fall rapidly as the energy is further reduced. This behavior isobviously no t physicall y realistic bu t come s fro m th e chang e i n sig n o f th e log -arithmic term in Eq. (3.17) when £ < /. Therefore , while the Bethe stopping-powerformula is an excellent approximation for energies such that E > /, it cannot be usedat lowe r energie s withou t encountering problems . I n particular , sinc e / i s of theorder o f 0. 3 t o 0. 6 ke V fo r mos t materials , th e simulatio n o f th e trajector y o felectrons traveling with initial energies of 1 to 10 keV (i.e., typical energies encoun-tered in a scanning electron microscope ) wil l be difficult, sinc e a significant part ofthe trajector y wil l occu r i n th e energ y rang e wher e th e Beth e relatio n canno t b eapplied. This problem can be overcome wit h a method due to Rao-Sahib and Wittry(1974). This is a parabolic extrapolation fro m th e tangent to the Bethe curve at theenergy E = 6.4 J, where the curve has an inflection, down to E - 0 . Thus for E <6.4 /, Eq. (3.17) is replaced b y the expression :

Page 44: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGLE SCATTERING MODEL

Figure 3.5. Compariso n of stopping power for copper from Bethe expression, Rao-Sahib andWittry extrapolation , and Tung et al. calculation.

This expression provides a convenient extrapolation tha t is well behaved ove rthe lo w energy range , an d s o this approximatio n has bee n widel y used i n Mont eCarlo simulations . I t is not, however, either physically realistic o r accurate. Figure3.5 compares the rate o f energy loss , (-dE/ds), o r p(dE/dS), fo r copper ( p = 7. 6g/cm3) ove r the energy range 10 0 eV to 10 0 keV, obtained using the Bethe mode land the Rao-Sahib-Wittry extrapolation, wit h the results o f detailed computation sby Tun g e t al . (1979) . Th e agreemen t betwee n th e composit e Bethe-Rao-Sahib -Wittry profile and the Tung et al. data is satisfactory at energies down to a few kilo-electron volts . However , onc e the energ y fall s belo w 1 keV, neither th e originalBethe curve nor the Rao-Sahib-Wittry extrapolation is close to the Tung et al. value,the error being a factor of two to three times at an energy of a few hundred electronvolts. Th e sam e sor t o f resul t i s foun d fo r al l othe r elements , wit h th e error sbecoming wors e for high atomi c numbers , sinc e these hav e a larger / value [Eq .(3.18)]; consequently th e Bethe expression becomes unusable a t energies a s high asa 4 or 5 keV.

We ca n simultaneousl y escap e th e mathematica l singularit y o f th e origina lBethe expression , eliminat e th e nee d t o use th e Rao-Sahib-Wittry extrapolation ,and improve the accuracy of the stopping power as compared to the Tung et al. databy using a modified version of the Bethe equation suggested by Joy and Luo (1989).We write the stoppin g power as:

35

Page 45: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

36 MONT E CARL O MODELIN G

Figure 3.6. Compariso n o f stoppin g power fo r coppe r from modifie d Beth e law , wit h dat afrom Tun g e t al .

At high energies E> J, this expression converge s t o the original Beth e expressio nof Eq . (3.17 ) bu t th e additio n o f th e extr a ter m 0.8 5 / i n th e numerato r o f thelogarithmic term ensures that for all positive values of E the log term evaluates to apositive quantity. As shown in Fig. 3.6 , this modified expression is now a very goodfit to the Tung et al. data for all energies above 50 eV. It can be shown that this resultis equally applicable t o al l other element s an d compounds o f interest, producin g astopping powe r valu e whic h agree s wel l wit h mor e detaile d calculation s fo r al lenergies abov e a few tens of electron volts . This expression [Eq. (3.21)] is thereforeused in this book .

The sequence o f operations neede d t o simulate the electron trajector y throughthe specime n ca n no w b e writte n schematicall y i n a n algorithmi c form . Conven -tionally th e electro n i s allowe d t o penetrat e th e firs t ste p lengt h int o th e sampl ebefore bein g scattered . Thu s the procedure is :

Calculate initial entr y dept h int o sample [Eq . (3.7) ]then repeat

Get startin g energ y E o f the electro nDetermine initia l coordinates x, y, z for this stepFind th e directio n cosine s ex, cy, cz of its motion relative t o the axe s

Compute the mean free pat h \ for this material and energy E [Eq . (3.3) ]Calculate the ste p length [Eq . (3.7) ]Find th e scatterin g angle s 4> , fy from Eqs . (3.10 ) an d (3.11 )

Page 46: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGLE SCATTERING MODEL 37

Find finis h coordinate s xn, yn, zn for this step [Eqs . (3.12) to (3.15)]Compute final energ y for thi s step E' = E — step*p*(dE/ds)

Reset coordinates x = xn, y = yn, z = znReset directio n cosines ex — ca, cy = cb, cz = ccReset energy E *= £ "

until the electron leaves the sample or falls below some minimum energy

The PASCA L code tha t implement s this outlin e i s se t ou t below , usin g theconventions introduce d in the previous chapter . Note that, by design, the programeliminates pleasing but unessential features like the use of color, or windows, so asto keep the code as clear an d easy to follow a s possible.

3.4 The single scattering Monte Carlo code

Program SingleScatter;

{a single scattering Monte Carlo simulation which uses the

screened Rutherford cross section]

{$N+} {turn on numeric coprocessor]

{$E+} {turn on emulator package]

uses CRT,DOS,GRAPH; {resources required]

label exit;

const two_pi = 6.28318; {2ir}

e_min=0.5; {cutoff energy in keV in bulk case}

var

at_num,at_wht,density,inc_energy,mn_ion_pot:extended;

al_a,bk_sct,cp,er,ga,lam_a,sp,sg_a,:extended;

ca,cb,cc,ex,cy,cz,x,y,z,xn,yn,zn:extended;

del_E,m_step,m_t_step,s_en,step:extended;

hplot_scale,m_f_p,plot—scale,thick:extended;

count,k,num,traj—num:integer;

bottom,center,top:integer;

thin:Boolean;

GraphDriver:Integer;

GRAPHMODE:Integer;

ErrorCode:Integer;

Xasp,Yasp:word;

Function power(mantissa,exponent:real):real;

{because PASCAL does not have an exponentiation function}

Page 47: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

38 MONTE CARLO MODELING

begin

if mantissa< = 0 then power:=0

else

power :=exp(In(mantissa)*exponent) ;

end;

Function stop_pwr(energy:real):real;

{this computes the stopping power in keV/g/cnt2 using the

modified Bethe expression of Eg. (3.21)}

var temp:extended;

begin

if energy<0.05 then energy: =0 . 05 ; {just in case}

temp: =ln(l .166* (energy+ 0 . 85*mn_ion^>ot) /mn_ion_pot) ;

stop_pwr: =temp*78500*at_num/ (at_wht*energy) ;

end;

Function lambda(energy:real):real;

{computes elastic MFP for single scattering model}

var al,ak,sg:real;

begin

al: =al_a/energy;

ak:=al*(l.+al);

{giving sg cross-section in cm2 as]

sg:=sg_a/(energy*energy*ak);{and lambda in angstroms is}

lambda: =lam_a/sg;

end;

Function yes:Boolean;

{reads the keyboard for 'y' or 'Y'}

var ch.-char;

begin

read(ch);

if ch in ['Y', 'y'] then yes:=true

else

yes: =false;

end;

Procedure get—constants;

{computes some constants needed by the program}

begin

al_a:=power (at_num, 0.67) *3.43E-3;

{relativistically correct the beam energy for use up to 500 keV\

er: = (inc_energy+511.0) / ( inc_energy+1022.0) ;er:=er*er;

lam_a:=at_wht/ (density* 6 . OE23 ) ; {lambda in cm}

Page 48: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGLE SCATTERING MODEL 39

lam_a:=lam_a*1.0E8; {pu t into angstroms}sg_a:=at_num*at_num*12. 56*5.21E-21*er;

end;

Procedure set—up—screen;{gets the input data to run this program}

beginClrScr; {erases all previous data from screen}

GoToXY(22,1);

Writeln ('Single Scattering Monte Carlo Simulation');

{Having set up the screen, now get input data}

GoToXY(1,5);Write ('Input beam energy in keV ) ;

Readln(Inc_Energy);

GoToXY(1,7);Write('Target Atomic Number is');

Readln(at-num);

{Calculate J the mean ionization potential mn—ion—pot using the

Berger-Selzer analytical fit}

mn_ion_pot: = (9 .76*at_num + (58 . 5 /power (at_num, 0 .19 ) ) ) *0 . 001 ;

GoToXY(1,9);Write('Target Atomic Weight is');

Readln(At-wht);

GoToXY(1,11);

Write('Target density in g/cc is');Readln(Density);

GoToXY(40,5);

write('Is this a bulk specimen (Y/N)?');

if ye s the n {it' s thick}begin {s o estimate the beam range for graphics scale}

thick:=700 . 0*power(inc—energy,1.66)/density;if thick<1000. 0 the n thick : =1000.0;

thin: = false;;end

else {it' s thin }begin

G o T o X Y ( 4 0 , 7 ) ;

Page 49: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

40 MONTE CARLO MODELING

write('Foil thickness (A)') ;

readln(thick);

thin:=true;

end;

{get the number of trajectories to be run in this simulation}

GoToXY(40,9);

write('Number of trajectories required');

readln(traj_num);

end;

Procedure initialize;

{sets up the graphics drivers for version 5.0 TURBO PASCAL}

var

InGraphicsMode:Boolean;

PathToDriver:String;

begin

Directvideo: =False;

PathToDriver: = ' ';

GraphDriver: =detect;

InitGraph(GraphDriver,GRAPHMODE,PathToDriver);

SetViewPort(0,0,GetMaxX,GetMaxY,True); {clips display area}

center: =trunc (GetMaxX/2) ; {beam entry coordinate}

top: =trunc(GetMaxY*0.1); {beam entry coordinate}

end;

Procedure xyplot(a,b,c,d:real);

{this displays the trajectories on the pixel screen}

var iy,iz,iyn,izn:integer;

begin

iy:=center + trunc(a*hplot_scale); {plotting coordinate #1}

iz:=top + trunc (b*plot_scale) ; {plotting coordinate #2}

iyn:=qenter + trunc(c*hplot_scale) ; {plotting coordinate #3}

izn:=top + trunc(d*plot_scale); {plotting coordinate #4}

if d=99 then izn:=top-2; {BS plotting limit}

if d=999 then izn: -bottom+2; {transmitted plotting

limit}

{and now plot this vector on the screen}

line(iy,iz,iyn,izn);

end;

Page 50: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGLE SCATTERING MODEL 41

Procedure set_up_graphics ;{draws i n th e surface(s), beam location, and action thermometers}

vara,b:integer;

begina: =GetMaxX-20; {adjus t t o sui t you r screen }b:=20; {ditto }

Line (b, top, a, top) ; {plo t i n to p surface }{find positio n of bottom surface }

bottom:=top + trunc(thick*GetMaxY/1000) ;if bottom>GetMaxY-4 0 the n bottom : =GetmaxY-40 ;

plot_scale:=(bottom-top)/thick; {henc e ge t pixels/angstrom }GetAspectRatio(Xasp,Yasp);

hplot—scale : = (Yasp/Xasp) *plot_scale; {fo r .aspec t ratio }

if thi n the n {als o plo t i n exi t surface }Line(b,bot tom,a,bot tom); {plo t botto m surface }Line(center,1,center, top) ; {plo t incident beam}

if no t thi n the n {pu t u p micron markers }if thick>500 0 the nbegin

Line(b,bottom+10,trune(b+5000*plot_scale) ,bot tom+10);OutTex tXY(b ,bo t tom+20 , ' 0 .5 mic rons ' ) ;

endelse

beginLine(b,bottom+10,trune(b+500*plot_scale),bottom+10);OutTextXY(b,bottom+20 ' 5 0 0 A ' ) ;

end;

{put u p a thermomete r fo r th e trajectories completed}

OutTextXY(trunc(center-80) ,bottom+15'0%.........................50%,...................100%' );OutTextXY(trunc(center-78) ,bottom+28'Trajectoriescompleted');

end;

Procedure reset—coordinates;{resets coordinates at start of each trajectory}

begin

Page 51: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

42 MONTE CARLO MODELING

s_en:=inc_energy;x:=0;y :=0 ;

z : = 0 ;ex : = 0 ;

cy: = 0 ;cz :=l ;

end;

Procedure zero_counters;

{since PASCAL does not zero variables on start-up we must do this}

beginbk_sct:=0;

num:= 0;end;

Procedure s_scatter(energy:real);

{calculates scattering angle using screened Rutherford cross

section}

var Rl,al:real;

begin

al:=al_a/energy;

Rl: =random;

cp:=1.0-((2.0*al*Rq) /(1.0+al-Rl));

sp:=sqrt (1. 0-cp*cp) ;

{and get the azimuthal scattering angle}

ga: =two_pi*random;

end;

Procedure new_coord(step:real);

{gets xn,yn,zn from x,y,z and scattering angles}

var an_n,an_m,vl,v2,v3,v4:real;

begin

{find the transformation angles}

if cz=0 then cz:=0.000001;

an_m:=(-cx/cz);

an_n: = l. 0/sqrt (1+ (an_jn*an_m) ) ;

{save computation time by getting all the transcendentals first}

vl:=an_n*sp;

v2 : =an_m*an_n*sp;

v3 : =cos (ga) ;

v4 : =sin(ga) ;

{find the new direction cosines}

ca: = (cx*cp) + (vl*v3) + (cy*v2*v4);

Page 52: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGLE SCATTERING MODEL 43

cb: = (cy*cp) + (v4* (cz*vl - cx*v2));

cc: = (cz*cp) + (v2*v3) - (cy*vl*v4);

{and get the new coordinates]

xn:=x + step*ca;

yn:=y + step*cb;

zn:=z + step*cc;

end;

Procedure straight—through;

(handles case where initial entry exceeds thickness}

begin

num:=num+1;

xyplot (0,0,0,999) ;

end;

Procedure back—scatter;

{handles case of backscattered electrons}

begin

num:=num+l;

bk_sct: =bk_sct + l;

xyplot (y,z,yn,99);

end;

Procedure transmit—electron;

{handles case of transmitted electron}

var 11:extended;

begin

num:=num+l;

11: = ( th ick-z ) /cc; {lengt h o f pat h fro m z t o botto m face }yn:=y+ll*cb; {henc e th e exi t y-coordinate }x y p l o t ( y , z , y n , 9 9 9 ) ;

end;

Procedure reset—next—step;

{resets variables for next trajectory step}

begin

xyplot(y,z,yn,zn);

ex:=ca;

cy:=cb;

cz:=cc;

x:=xn;

y:=yn;

z:=zn;

{find the energy lost on this step}

del—E: =step*stop_pwr(s_en)*density*IE-8;

Page 53: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

44 MONTE CARLO MODELING

{so the current energy is}

s_en:=s_en — del_E;end;

Procedure show_traj_nuin;

{updates thermometer display for % of trajectories done}

var a,b:integer;

begin

a: =trunc(center-80); {adjust to suit your screen}

b:=bottom+23; {ditto}

line (a, b, a + trunc (165* (num/traj_num) ) , b) ;

end;

Procedure show_BS_coeff;

{displays BS coefficient on thermometer scale}

label hang;

var a,b:integer;

begin

a: =GetMaxX-180; {adjust to suit your

screen}

b: =bottom+23; {ditto}

OutTextXY(a,b-8, '0 . . . . 0.25 . . . 0.5 . . . 0.75');

OutTextXY(a+5,b+5, 'BS coefficient');

Line(a,b, trunc(a+ (bk_sct / trajjium) *220) ,b) ;

hang: {this loop freeze the display on the screen }

If (not keypressed) then goto hang;

CloseGraph; {shut down graphics driver}

end;

* this is the start of the main program *

begin

set—up—screen; {ge t inpu t data and find J value}

Page 54: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGLE SCATTERING MODEL 45

get—constants; {and parameters needed later}

{ reset the random number generator}

randomize;

{set up the graphics display for plotting}

Initialize;

set_up_graphics;

* the Monte Carlo Loop *

zero—counters ;

while num < traj_num do

begin

reset—coordinates ;

{allow initial entrance of electron}

step: =- lambda (s_en) * In (random) ;

zn:=step;

if zn>thick then {this one is transmitted}

begin

straight—through;

goto exit;

end

else {plot this position and reset coordinates}

begin

xyplot (0,0,0, zn) ,-

y:=0;

z:= zn;

end;

{now start the single scattering loop}

repeatstep: =-lambda (s_en) * In (random) ;

s_scatter(s_en);new_coord(step);

{problem-specific cod e will go here }

{decide what happens next }

Page 55: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

46 MONTE CARLO MODELING

if zn < = 0 the n {this one is backscattered}beginback—scatter;goto exit ;

end;

if zn> = thick then {this one is transmitted]

begin

t ransrni t_e 1 ec t ron ;

goto exit;

end;

{otherwise we go round again}reset_next_step;

until s_en < = e_min; {end of repeat loop — the energy drops below e—min}

num:=num+l; {incremen t counter }exit: {en d o f got o jumps}

* en d o f th e Mont e Carl o Loop *

show_t raj _num;

if num mod 100 = 0 then randomize; {reset generator}

end;

s how_B S_c o e f f;

end.

3.5 Notes on the procedures and functions usedin the program

The progra m start s wit h tw o specia l statements , {$Af+ } an d {$£+} , whic h ar eknown as pragmas or compiler directives. These tell the TURBO PASCAL compilerto choose certai n options whe n it runs the program. The firs t pragm a instructs thecompiler t o generate the cod e necessar y t o make use o f a numerical coprocesso rchip (fo r example, a n 8038 7 devic e i n a persona l compute r runnin g MS-DOS) .While computer s can rapidl y perfor m arithmeti c operation s o n integers , the y ar etypically slowe r b y a facto r o f fift y o r mor e time s whe n manipulatin g rea l o rfloating-point number s (i.e. , number s such a s 10.2 3 or 1.5*10~ 3). Floatingpoin t

Page 56: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGL E SCATTERIN G MODE L 4 7

coprocessor chips , suc h as the 80387, ar e optimized to perform arithmetical opera -tions on real numbers and greatly speed u p the computation. However , in order touse the chip, the compiler mus t be instructed to generate the necessary specia l code,hence the pragma {$Af+}. Unfortunately, code produced in this way would not thenrun o n another machine withou t the math coprocessor. Th e second pragma {$£+}tells to compiler t o test the compute r a t the star t of the program to determine i f amath coprocesso r i s present . I f i t is , the n th e chi p i s used ; i f n o coprocesso r i sdetected, then the compiler "emulates " the chip i n software , using the sam e cod einstructions an d performing the sam e operations a s the chip , although much moreslowly. Together, these two instructions allow the program to configure itself s o asto run without modification on any suitable machine. Since Monte Carlo programsdepend exclusivel y on floating-point calculations , a math coprocessor chi p is thecheapest an d most efficient wa y o f upgrading the performance o f the computer .

As in the simpler example given in Chap. 2, the program then continues with adeclaration o f the resources required. The n LABE L collects th e names of all of thelabels use d i n th e program . A labe l i s th e targe t o f a "GoTo" instruction , whichcauses the execution o f the program to jump to the specified location . Finally, wegive a definition o f an y constant s used . Her e th e constant s ar e two_p i (2ir) , ande_min th e minimum energy belo w whic h th e electron wil l no longe r b e tracked .Defining as constants quantities, which are often used, saves time when the programis runnin g because th e compute r doe s no t hav e t o initializ e eac h quantit y manytimes. Next comes the list of variables used. Those declared in this list are availableto al l parts of the program and so are called global variables, whil e those declaredinside a procedure o r function ar e private an d only available to that procedure .

The firs t functio n called , POWER , illustrate s ho w function s ca n b e use d t oextend the PASCAL language itself. Most versions of the language do not include anoperator t o fin d th e valu e o f th e quantit y xy; th e functio n o f POWE R therefor eprovides this ability. Note that the simple code supplie d here does not contain anytests to avoid possible problems , such as attempting to take the logarithm of a zeroor negative number . A version o f thi s functio n wit h proper erro r trappin g wouldtherefore be necessary if the function were to be used in a more general context. Thefunctions mn_ion_pot , stop_pwr , an d lambda calculat e th e quantities sug -gested by their names, using the equations discussed earlier i n this chapter. In eachcase th e functio n i s supplie d wit h a parameter, suc h as the atomi c number of thesample or the electron energy , in order to compute the appropriate value. The otherdata needed by the functions is taken from th e global variables declared at the startof the program. Th e fina l functio n YE S wait s for inpu t from th e keyboard . If thi sinput is a "y," or a "Y," then the answer to the question is assumed to be yes and aBoolean variable is set to true. If the input is any other letter or number, the variableis se t to false. In PASCAL, the code statement :

If (function) then (operation)

Page 57: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

48 MONT E CARL O MODELIN G

will lea d t o th e operatio n bein g performe d i f th e functio n evaluate s t o a positiv enumber or produces a Boolean variabl e with the value "true" (i.e., +1) . If, on theother hand , the functio n evaluate s t o zero o r t o a negative numbe r or produces aBoolean variable with the value "false" (i.e. , 0), then the operatiori is not performedand the program moves to the next statement. Thus when the program a t some laterpoint encounter s code suc h as:

If ye s the nelse

the functio n ye s i s called an d th e program wait s unti l inpu t from th e keyboard i sreceived, I f this inpu t is a "y" or "Y" then yes is set to true and the "if" statementwill be performed. Otherwise th e program wil l move on to the next line .

The first procedure get-constant s computes a variety of quantities neededfor othe r part s o f the program, includin g the relativisti c correction t o the incidentbeam energy, and preconstants in the elastic cross section . Next set_up_screenallows fo r th e entr y o f th e parameter s describin g th e specime n an d experimenta lconditions. Th e operator i s asked i f the sample is bulk (that is, one not sufficientl ythin to be electron-transparent) . I f the answer , as determined b y the YE S functio ndiscussed above , i s ye s the n thick , th e rang e o f th e electron s i n th e specime n i sestimated fro m a simple analytica l approximation :

and thi s i s late r use d t o se t u p th e scal e fo r plottin g th e trajectories . A Boolea nvariable thin is also se t to false. If, on the other hand, the operator say s that thespecimen is thin, then the Boolean variable is set to true, and thick is set equal to theactual thicknes s an d use d t o se t u p th e plottin g scale . Thi s i s als o th e thicknes sagainst whic h th e positio n o f th e inciden t electro n wil l b e teste d t o determin ewhether o r no t i t ha s bee n transmitte d throug h th e foil . Finally , th e numbe r o ftrajectories t o be run in the simulatio n is obtained .

The next procedure , initialize, i s identical to that used in the previouschapter. A s before , i t identifie s th e typ e o f graphic s displa y car d fitte d t o th ecomputer, initializes the card ready for use, determines the plotting size of the screen(GetMaxX, GetMaxY ) , an d sets itself u p to clip any image feature s lying offthe screen. A t the sam e time two variables—center the horizontal midpoin t o f thescreen and top the position at which to draw the entrance surface of the specimen—are defined. The procedure xyplot i s similar to that used in the previous chapter .Here w e use separate plottin g scale s plot_scale an d hplot_scale to set upthe aspect ratio. We also check for two special values of the last plotting paramete rpassed to the procedure. I f d — 99, then the electron ha s been backscattered an d the

Page 58: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGL E SCATTERIN G MODEL 4 9

plotting line is terminated 2 pixels above the entrance surface ; if d = 99 9 then theelectron has been transmitted through the specimen and the plotting line is finishe d2 pixels below th e exit surface . These step s help keep th e display lookin g tidy.

set_up_graphics is the procedure which draws the entrance surface of thespecimen an d mark s th e entranc e positio n o f th e electro n beam . I f th e Boolea nvariable thin is true, then an exit surface is also drawn at a spacing from th e topsurface which is proportional t o the foil thickness . If this exceeds 100 0 A , then thebottom surfac e i s draw n a t 4 0 pixel s fro m th e botto m edg e o f th e screen . Th eplotting scal e plot-scale in pixels/angstroms is then determined and the aspectratio of the screen is found to give a horizontal plottin g scal e hplot_scale suchthat equal distance s i n either directio n wil l plo t a s lines o f equal length . No scal emarker i s neede d fo r a thi n foil , sinc e th e specifie d thicknes s o f th e specime nprovides a built-in scale, but for bulk samples a micron marke r mus t be provided .The program tests the value of the estimated electro n rang e thick to decide whatlength the marker should be. Finally we draw in, using the OutTextXY procedure ,a "thermometer" scal e labeled fro m 0% to 100%, which will be used to monitor theprogress of the simulation. While this is in no way essential to the program, it doesadd a nice touch to the display. Note that in order to make the same code run equallywell on all types of graphics systems, we define all positions o n the screen in termsof the size (GetMaxX , GetMaxY ) o f the screen, using two local variables a andb. A s before, however, a and b may be varied, if desired, to customize the displayto individual taste.

Since PASCAL does not initialize variables when it starts running a program,the procedure zero_counter s does thi s for the quantities bk_sct an d num ,which count the number of backscattered electrons and the total number of electronsrespectively. Similarl y reset-coordinates ensure s that , a t th e star t o f eac hnew trajectory, al l of the conditions are properly initialized, and zero-countersresets eac h o f th e counter s use d t o chec k th e numbe r o f electron s ru n an d th enumber backscattered. The procedure s_scatter calculates the scattering angles ,using th e relationships give n in Eqs. (3.10 ) an d (3.11) . Thes e values , the startin gelectron coordinate s x, y, z, an d the step length are then used by new_coord todetermine th e fina l coordinate s xn ,yn ,z n a s wel l a s th e directio n cosine sca, cb, c c relativ e to the fixed axi s system. It is at this point in the program thatcode specific to the task of interest will usually be inserted, sinc e all of the informa-tion about the previous and present position and energy of the electron ar e available.Once thi s has been handled , then the program calls reset_next_step , whic hplots th e trajector y step , determine s th e amoun t o f energ y los t b y th e electro nas it traveled this step, and equates the now current coordinates, directio n cosines ,and energ y wit h th e startin g value s fo r th e nex t step . Th e fina l procedure sstraight_through, transmit_electron , back_scatter , andshow_BS_coef f handl e th e variou s way s i n whic h th e electro n ca n exi t fro mthe specimen , cal l th e plo t routin e wit h th e appropriat e parameters , an d coun t

Page 59: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

50 MONT E CARL O MODELIN G

the events . show_traj_nu m draw s a lin e i n th e thermomete r representin g th epercentage o f trajectorie s completed , an d the procedur e show_BS_coe f f use svery simila r cod e t o draw a thermometer representin g th e percentage o f electron sbackscattered. I n eac h cas e loca l variable s a an d b ca n be altere d t o adjus t th edisplay to personal preference .

Because o f al l the wor k handle d b y th e procedures an d functions , the actua lprogram section , startin g at begin and finishing at end, i s short and simple. Afte rthe initia l setup , th e Mont e Carl o loo p i s entere d an d th e electro n i s allowe d t openetrate int o the sampl e by som e distanc e equal to the ste p lengt h [generate d byapplying Eq. (3.7)]. If this distance is greater than the thickness o f the sample, thenthe even t i s plotte d an d counte d an d the loo p starte d agai n wit h a new electron .Otherwise th e position o f the electron i s plotted an d then, at the label repeat, asecond loo p i s starte d in which the electron i s scattered, it s new position i s calcu-lated, an d it s energ y los s compute d t o giv e it s ne w energy . Th e positio n o f th eelectron i s then tested to see whether i t has been either transmitted through the foi lor backscattered fro m it , i n whic h case th e progra m leave s th e loo p an d goe s t othe appropriat e procedur e t o handl e thi s even t befor e commencin g a new trajec -tory. Finally , th e instantaneou s energ y s_e n o f th e electro n i s checke d b y th erepeat . . . until s_en < = e_min statemen t t o see whether o r not theenergy i s abov e th e cutof f valu e e_min. I f i t i s not , the n the loop i s exited , th eelectron i s counted, and a new trajectory is started. Otherwise the loop is repeated .This sequenc e continue s unti l a tota l numbe r o f trajectories equa l t o traj_nu mhave been calculated. Whe n the ful l numbe r of trajectories has been completed, th eprogram displays the fractional yield of backscattered electron s and then terminates .

3.6 Running the program

The program can be run directl y fro m th e disk, if this is available, o r typed in andcompiled. I n additio n th e .BG I file s provide d b y Borland mus t be presen t fo r th egraphics routines to operate. If a printed copy of the screen display is required whenrunning MS-DOS 5.0 or higher, then at the ">" prompt type "graphics" and hit thereturn key. Anything appearing o n the screen can now be transferred to the printerby using the key combination "Contro l + PrintScr. " When the ">" prompt returns,type "SS_MC" and hit return. The computer then requests the parameters require dto run the simulation . Values of atomic numbers, atomic weights, an d densities fo rthe elements can be found, for example, in Goldstein e t al. (1992). For compounds,the usual procedure is to compute an effective atomi c number by using Eq. (3.19).The atomic weight is then approximated as being twice the effective atomic number,and the appropriate density value is entered when requested. (Ideally, the procedurewould b e t o us e a Mont e Carl o metho d t o decid e whic h o f th e atom s i n th ecompound was being scattered fro m eac h time. This method has been used (Murataet al. , 1971 ; Kyser , 1979) , bu t i t is not clear tha t the benefits are worth the added

Page 60: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGL E SCATTERIN G MODE L 5 1

complexity). Fo r some very complex materials and compounds, it may be impossi-ble to derive an effective valu e for Z, since the chemistry is not known. However, ifthe substanc e of interest appear s i n Table 3. 3 [o r is listed i n the ful l ICR U (1983 )tables], the n a n invers e procedur e ca n b e used . Fo r example , fo r photographi cemulsion, th e mean ionizatio n potentia l / i s given i n Table 3. 3 as 64.7 eV . / isapproximately 10.Z eff [Eq . (3.18)], where Zeff is the effective atomi c number of thematerial. Hence Zeff is taken as 6.5 and the effective atomi c weight as 13. While thisis clearly only an approximation, in practice i t produces sensible and useful results .

To illustrate the application o f this program, let us first conside r the case of ahigh-energy electro n bea m an d a specime n tha t i s thi n enoug h t o b e electron -transparent (i.e . th e situatio n foun d i n th e transmissio n o r scannin g transmissio nelectron microscope) . Figur e 3. 7 show s the trajectorie s calculated fo r a 100-ke Vbeam an d 1000- A thick foils o f carbon, copper , silver , and gold. In each case, 25 0trajectories were run, and in response to the question "Is th e sampl e bul k( y / n ) ?" th e answer wa s "n." As the atomic number an d the density o f the foi l

Figure 3.7. Mont e Carlo trajectory plot s for 100-ke V electrons incident on 1000-A films ofcarbon, copper, silver , and gold. Number of trajectories pe r plot: 250.

Page 61: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

52 MONT E CARL O MODELING

increase, the amount of lateral scattering in the beam can also be seen to increase. Inthe cas e o f the carbon sample , th e trajectorie s for m a smooth con e tha t i s closel yconfined around the incident beam axis, and it can be seen from inspection while theprogram is running that the average electron is only scattered zero or once during itspassage through the foil. In the case of the copper foil , however, the typical electronis scattered a t least onc e o r twice, and the beam profil e becomes bot h broader an dless well defined as the occasional electro n i s scattered throug h a large enough angleto travel almos t horizontally throug h th e foil . I n the gold foil , ther e ar e almos t n ounscattered electrons and , in fact, th e scattering i s now so high that a few electron sare actually seen to be backscattered fro m th e foil. Thus while 1000 A of carbon at100 keV represent s a specimen that is truly thin, the sam e thickness of gold a t thesame energ y i s beginnin g t o tak e o n th e characteristic s o f a bul k (non-electron -transparent) sample . These changes clearly have important implications for electronmicroscope technique s suc h as x-ray microanalysis, in which the spatia l resolutio ndepends on the magnitude of the beam scattering . I n a later chapter, thi s simulationwill be extended to give a quantitative model of the magnitude of these effect s a s afunction o f the experimenta l condition s used . Experimenting wit h the progra m bytrying the effect o f various choices of material, foil thickness, and beam energies i s agood wa y t o star t to build up a fee l fo r th e wa y in which electrons interac t wit h asolid.

When th e sampl e i s thi n an d th e bea m energ y i s high , a s i n th e situatio ndiscussed above, then each trajector y consists o f only a small number of scatterin gevents. Consequently th e program run s rapidly an d many trajectories ca n be com-puted in a relatively short time. On a 386-class MS-DOS machine fitted wit h a mathcoprocessor, i t shoul d b e possibl e t o comput e th e 25 0 trajectorie s fo r an y o f th ecases give n i n no more tha n 3 0 sec. However, i f in response t o the question "I sthe sampl e bul k ( y / n ) ?" w e choose the option "y , " then the situationbecomes very different. Eac h trajectory will now continue until the electron is eitherbackscattered o r fall s belo w th e minimu m energy e_min , whic h i n the progra mabove is 0.5 keV. Since the electro n i s typically losing energ y a t the rat e o f abou t1 eV per angstrom (see Fig. 3.4), and since the mean free pat h for elastic scatterin gevents is a few hundred angstroms (from Table 3.1), this suggests that even for a 20-or 30-keV incident electron, it will be necessary to compute several hundred scatter-ing events to complete one trajectory. This is indeed the case, and it may take as longas 1 min to compute a single trajectory under the wors t conditions .

Figure 3. 8 shows 250 trajectories plotte d fo r bulk samples o f carbon, copper ,silver, and gold wit h incident beam energie s o f 20 keV. On an IBM PS 2/70, eachplot took fro m 2 to 5 min to calculate. Th e shape of the interaction volume s in thesolids i s seen t o vary, with the choice o f material, from a "teardrop" hanging fro mthe surfac e for the carbo n t o a "squashed egg" shape presse d agains t th e incidentsurface fo r the gold. While the size of this volume will vary with the chosen bea menergy, the shap e stay s about the same , s o that the interaction volum e a t 2 keV i ssimply a scaled dow n version of the equivalent volume at 20 keV. Observations o f

Page 62: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGL E SCATTERIN G MODE L 5 3

Figure 3.8 . Trajectorie s i n bulk C , Cu, Ag, an d Au at 20 keV.

the trajectories whil e the program i s running sho w that a disproportionately larg efraction o f the time is devoted to computing the last portion of each trajectory. Thisis because, as the energy falls to just 1 or 2 keV, the mean free path becomes short,typically 50 A or less, and the step length [Eq. (3.7)] is only a few tens of angstroms.Although the rate of energy loss [Eq. (3.21)] is now higher than it was at the originalincident energy , i t ha s no t rise n a s quickly a s th e mea n fre e pat h ha s fallen , an dhence the average energ y los s per step i s only a few tens o f electron volts . Conse-quently, each successive trajectory ste p moves the electron by only a few angstromsand decreases its energy by a few electron volts, and a large number of computationsis needed to make a relatively insignificant addition to the overall trajectory. Sincethe perceived utility of a Monte Carlo model is at least somewhat dependent on howfast i t ca n produc e th e require d information , thi s leisurel y leve l o f performancemakes the single scattering model rather unsatisfactory in many cases. One possiblesolution i s t o choose a higher cutof f energ y e_min , s o a s t o eliminat e man y ofthese calculations . However—althoug h whe n th e inciden t energ y i s sufficientl yhigh (say 10 keV and above) e_jnin could be set to 1 keV or more with little loss ofaccuracy—when th e initia l energ y i s onl y 2 o r 3 keV, terminating th e trajector ycalculation at an energy only 50% below the incident value would represent a ratherdrastic oversimplificatio n an d a valu e o f 0. 1 ke V fo r e_mi n woul d see m mor eappropriate.

One practical solution to this dilemma is to use a model originally described by

Page 63: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

54 MONT E CARLO MODELING

Archard (1961) . I n this we allow an electron tha t has reached th e cutof f energ y t odiffuse fo r a total distance equal to its estimated range [obtained from Eq. (3.22)] atan energ y e_min . Thi s i s don e i n two stages . First , i t i s allowe d t o continu e t otravel in the same direction (a s defined by the direction cosine s ex, cy, cz) in which ithad bee n travelin g when it lef t th e Monte Carlo loo p for a distance equa l t o

40Distance = — ; : : — * estimated rang e (3.23 )7 * atomic number

Setting the step distance equal to this value, the new coordinates ca n now be foundas usual, using the procedure new_coord. Th e new z coordinate z n i s then testedto se e i f th e electro n ha s backscattered . I f i t has , then i t i s counte d an d a ne wtrajectory started . Otherwise we set reset the coordinates as usual and then allow theelectron t o scatte r throug h randomly chosen angle s <j > an d i|j , where

cp:=2.0*RND - 1.0 ; {cosin e of scattering angl e 4> }sp:-sqrt(l - cp*cp) ; {sin e of scattering angl e 4> }

ga:=two_pi*RND; {azimutha l angle if }

The distance traveled i n the final segmen t is then a fraction ( 1 - (40/7Z) ) ofthe original estimated range. Using this step length and the scattering angles givenabove, the new coordinates ar e then found , usin g new_coord, an d the electro nposition is again tested to see if it has backscattered. I f it has, then it is counted and anew trajectory i s started; i f not, then the trajectory i s terminated an d a new on e isbegun. This modification can be implemented by adding one function an d procedureto the program given above and then calling the procedure at the appropriate point:

Function archard_range:extended ;[estimates Archard diffusionon range at e_)minin microns}

beginarchard_range:=0.07*power(e_min, 1.66) /density;

end;

Procedure end_of—range;

{apply the Archard model for electrons with energies below e_min }

beginif s_en< = e_min then

begin [travel (40/7*at—num) *archard—range in same direction]

step: =Archard_range*40/(7*at_num) ;

new_coord(step) ;

if zn< = 0 then {this one is backscattered}

back—scatter;

Page 64: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE SINGLE SCATTERING MODEL 55

{now let it scatter isotropically and travel residual fraction of

range}

reset_next_step; {rese t variables and plot it}

cp: =2.0*RND-1.0;sp: =sqrt (l-cp*cp) ;

ga: = two_p i * RND ;s tep:=(1-(40.07(7 .0*at_num)))*archard_range. -

new—coord(step) ;if zn < = 0 the n {thi s one is backscattered)d)

back—scatter;reset_next_step; {t o plo t fina l segment }

end; {of the Archard diffusioionmodel stepp}

end;

The function computes the estimated range and the procedure then carries outthe sequence of steps discussed above. The procedure end_of_range is calledjust after the end of the loop repeat . . . until s_en<e_min, so that it isonly entered by electrons below this energy cut-off:

reset—next_step; {otherwise perform another trajectory step}

until s_en<=e_min; {end of the repeat until loop}

end—of_range; {optional Archard diffusion step added here}

num:=num+l; {then add one to the trajectory total}

etc. . . .

The effect of this addition to the program is not dramatic, but it does provide amore physically realistic model of the beam interaction in the important low beamenergy regime. For beam energies greater than a few kilo-electron volts, the diffu-sion model adds little to the result and can safely be dispensed with.

Page 65: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

4

THE PLURAL SCATTERING MODEL

4.1 Introduction

We will develop in this chapter a second Monte Carlo simulation of the interactionsof an electron wit h a solid. This new model is based on the same physical principlesas th e singl e scatterin g approac h discusse d abov e bu t make s certai n simplifyin gassumptions that greatly reduce th e computation tim e required. Thus , whereas thesingle scatterin g mode l discusse d i n Chap . 3 attempt s t o tak e int o accoun t ever yelastic scattering even t encountered by the incident electron , th e "plural scattering "model described her e trie s only to compute the net effec t produce d b y a number ofsuccessive scattering events. In addition, we average and precalculate other parame-ters o f th e trajector y wit h th e objec t o f minimizin g th e amoun t o f computatio nrequired during the simulation. Although these simplifications have some effec t o nthe resultan t accurac y of th e model , th e error s are , whe n th e mode l i s correctl yapplied, insignificant , whil e th e savin g o f tim e i s considerable . Thi s mode l is ,therefore, widely used, especially for problems where the incident beam is travelinginto a bulk (i.e. , not thin and so not electron-transparent ) specimen .

4.2 Assumptions of the plural scattering model

We sa w a t th e en d o f Chap . 3 tha t th e singl e scatterin g model , whil e certainl yappropriate t o the tas k o f modeling electro n interaction s i n a bulk solid , i s rathe rslow because a great number o f steps in the trajectory are required t o advance th eelectron a smal l distanc e a s it s energ y decreases . Consequently , i n application swhere th e majorit y o f electron s deposi t al l o f thei r energ y i n th e target , a singl escattering Monte Carlo simulation is, for many users, too slow to be either enjoyabl eor very useful. Th e procedure tha t we describe her e follows the outline of a methodthat was first described by Curgenven and Duncumb (1971), and which was specifi -cally designed t o produce good data in short computing times on small computers .

The first assumption that distinguishes this model from th e previous one is thatwe make every electron trave l exactly the sam e tota l path length withi n the speci -men befor e comin g t o rest . Thi s distanc e i s foun d b y numericall y evaluating th eintegral:

56

Page 66: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE PLURA L SCATTERIN G MODE L 5 7

which computes the total distance measured along the trajectory that is required foran electron startin g wit h energy £ t o give up all of its energy. Here (dE/ds) i s thestopping powe r give n b y th e modifie d Beth e equation [Eq . (3.21)] ; therefor e th etotal distance RB is often called , in the literature, th e Bethe range, or the csda-range(continuous slowin g dow n approximatio n range) . Becaus e scatterin g i s a statis -tically rando m process, i t i s clea r tha t thi s i s onl y a n average d valu e fo r a givenbeam energy and material, but RB is nevertheless a convenient parameter with whichto characteriz e the general scal e o f the electron interactio n wit h the specimen . Inpractice, i t is not possible to perform the integration from zero energy as required byEq. (4.1) because eve n the modified form o f the Bethe equation is not valid belo wabout 50 eV. The procedure stop_pwr tha t calculates (dE/dS) therefor e check s tosee whether o r not the energy is below thi s value. I f i t is, then the stopping powervalue calculated i s that for a 50 eV electron rather than the actual energy involved.This results in a small underestimation of the range (since, as shown in Chap. 3, thestopping powe r fall s fo r electron s o f ver y lo w energy) , but th e erro r fo r inciden tenergies above a few hundred volts is negligible. Th e integration is carried out bythe procedure range. Figur e 4.1 plots the variation of RB as a function o f incidentenergy fo r som e common materials , an d i t can be seen that at 1 0 keV, the range is

Figure 4.1. Variatio n of Bethe range with energy .

Page 67: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

58 MONT E CARL O MODELING

typically severa l micrometers an d varies by a factor o f 5 or so between th e a low-atomic-number low-densit y elemen t suc h as aluminu m and a high-atomic-numbe rhigh-density elemen t suc h as gold . A s th e bea m energ y falls , however , th e Beth eranges converg e i n valu e an d al l becom e essentiall y th e same , abou t 10 0 A, fo renergies belo w a few hundred electro n volts . This i s because, fo r the lowes t ener -gies, th e magnitud e of the stoppin g powe r i s almos t independen t o f the choic e o fmaterial.

The Bethe range is now divided into steps. In the code discussed here, 50 stepsof equa l lengt h wil l b e used . Thi s i s a compromis e betwee n th e improvemen t i naccuracy that results from a large (e.g., 100 ) number of steps (Bishop, 1974 ; Love etal., 1977) , an d the increase i n speed to be gained fro m a small (e.g., 20) number ofsteps. An alternativ e approac h is to limit the number of steps bu t vary their lengt hwith the energy of the electron (Myklebus t et al., 1976) , so that for high energies thestep length i s of the order o f the instantaneous elastic mean fre e pat h but for lowe renergies th e ste p lengt h i s relativel y large . Th e tota l lengt h o f al l th e step s is ,however, alway s kep t equa l t o th e Beth e range . I n eithe r cas e th e effec t o f thi sprocedure i s to place a fixed upper limit on the number of computations required t ocomplete the trajectory and avoid the problem, discussed in Chap. 3, of dealing withthe incident electron whe n its energy becomes so low that the mean free path is onlya few nanometers an d the distance traveled in any scattering interval i s an insignifi-cant fractio n o f the tota l range .

Computer time is also saved by precalculating th e energy E[n] o f the electron a tthe star t of each o f the n steps. Sinc e th e length of each ste p is known in advance ,E[n] ca n b e found by numericall y solvin g th e equatio n

where (dE/dS) i s again obtained fro m the modified Bethe equation [Eq. (3.21)]. £[1]is define d a s the inciden t electro n energ y E0, so a solutio n o f Eq. (4.2 ) wil l giv eE[2], which , in turn, can be used to find E[3] an d so on until, at the end of the 50thstep, we set £[51] = 0 . This calculation i s carried ou t by the procedure profile .

The electro n scatterin g i s onc e agai n describe d b y th e screene d Rutherfor dcross section , bu t it is formulated in a different way . Using the notation o f Chap. 3 ,as shown in Fig. 4.2, th e scatterin g angl e can be written as :

where p i s th e impac t paramete r (i.e. , th e projecte d neares t distanc e o f closes tapproach of the electron t o the scattering nucleus if no scattering was to occur) and b

Page 68: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE PLURA L SCATTERIN G MODE L 5 9

Figure 4.2. Definition o f parameters used in the plural scattering model.

is 0.0144 Z/E wit h b in angstroms when E is in kilo-electron volts . This expressio nis for a single scattering event and ignores the effect o f nuclear screening by orbitalelectrons (Curgenve n and Duncumb, 1971). However, since at every energy our steplength is now considerably greater tha n the mean free path , each electron could bescattered severa l time s durin g eac h step , producin g a ne t deviatio n tha t coul d beeither larger or smaller than any of the individual deflections. This random variationis accounted fo r b y writing

where RND is the usual pseudo-random number lying in the range 0 to 1 and p0 i snow the maximum impact parameter . Electrons ar e assumed to arrive at the nucleusplaced randomly within the circle of radius pa. The square-root function weights thedistribution i n such a way as to increase th e probability o f large p values .

The simplifications introduced into this plural scattering model, compared withthose o f the singl e scatterin g mode l of Chap. 3 , are clearly fairl y drastic in nature.However, th e cumulativ e erro r du e t o thes e approximation s ca n b e reduce d b ychoosing th e valu e o f p0 s o tha t th e Mont e Carl o calculatio n give s th e correc tbackscattering coefficient . This quantity is chosen because its value is readily avail-able fo r a wid e rang e o f material s an d experimenta l condition s (Bishop , 1966 ;Heinrich, 1981). Two different approache s to this have been successfully used. Loveet al . (1977) rewrite Eqs. (4.3 ) an d (4.4) i n the for m

Page 69: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

60 MONT E CARL O MODELIN G

where, a s before , E0 i s the inciden t bea m energy and

<])0 thu s represent s th e minimu m scatterin g angl e fo r th e inciden t electro n wit henergy E0. As ca n b e see n fro m th e for m o f th e Beth e equatio n [Eq . (3.21)] , th evariation o f (E/E0) i s substantially independent o f the atomi c number Z (the varia-tion comin g onl y fro m th e mea n ionizatio n potentia l / , whic h occur s insid e th elogarithmic term) and the random number RND will average to a mean value of 0.5when a large number of trials i s made. I t therefore follows that the backscatteringcoefficient T | mus t depen d onl y upo n co t ($0/2). Lov e e t al . (1977 ) sho w tha tcot (4>o/2 ) can b e writte n i n the for m

This metho d eliminate s th e nee d t o kno w p0 provide d tha t the valu e o f T | fo r th etarget materia l bein g modele d i s available . I n particular , a t low (<10 keV) bea menergies, wher e th e valu e o f T | ma y b e varyin g wit h energ y (see , fo r example ,Reimer and Tolkamp, 1980) , thi s approach has the benefit that realistic data may begenerated withou t the need t o use more accurat e scatterin g cros s sections .

The Lov e e t al . approac h ha s distinc t advantages an d wil l b e considere d i ndetail i n Chap . 6 . However , fo r thi s initia l stud y w e follo w th e suggestio n b yDuncumb (1977 ) an d writ e

This expression, whe n used in the Monte Carlo simulation , leads to a reason-able prediction o f the variation of backscattering coefficien t wit h atomic number forboth elements an d [using Eq. (3.19)] compounds. [ A similar expression i s given byMyklebust et al. (1976); but note, however, that their paper contains a typographicalerror and that E0 should appear in the numerator rather than the denominator of theirvariable F,.] While this approach essentially treat s pQ a s a fittable parameter to yieldthe correct backscatterin g coefficient , i t has the advantage that no prior knowledg eof th e valu e of f\ i s required .

Either of these two approaches enables the Monte Carlo simulatio n to back -scatter the correct fraction o f incident electrons . However, a closer inspection of thepredictions o f thes e calculation s (Myklebus t e t al. , 1976 ) show s tha t whil e th ebackscattering yiel d i s correct , th e energ y distributio n o f thes e electron s i s no t i n

Page 70: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE PLURA L SCATTERIN G MODE L 6 1

good agreemen t wit h experimental data . This i s becaus e th e origina l for m o f th escattering equation s [Eqs . (4,3 ) and (4.4)] i.e. ,

does no t allo w for a sufficien t amoun t o f small-angle scattering . Thu s the largestpossible valu e of cot(c|>/2 ) fro m Eq . (4.9 ) i s 2 p/b, which , for silico n a t 1 5 keV,corresponds to a minimum scattering angl e of about 3°. All electrons wil l be scat -tered by at least this angle, and 95% of all electrons wil l be scattered throug h 5° ormore. For materials with higher atomic numbers, the minimum angle will be greaterand th e averag e scatterin g angl e highe r still . I n orde r t o allo w fo r a t leas t som efraction o f the electrons to be scattered through very small angles, we can adopt thesuggestion of Myklebust et al . (1976) an d write

so that, as RND tends to unity, the scattering angle can fall to zero and a fraction ofthe scatterin g events will be of the order of a few degrees o r less .

As in the previous chapter, the scattered electron can travel to anywhere on thebase o f th e con e define d b y th e angl e 4> , s o w e mus t als o choos e a n azimutha lscattering angl e (jj » whic h wil l be give n by [Eq . (3.11) ] a s

The flo w o f th e progra m the n closel y follow s tha t fo r th e singl e scatterin gmodel, but with the difference that each trajectory is restricted to 50 steps or less:

for n ~ 1 to 50begin

Get th e startin g energy E[n] o f the electro nGet the starting coordinates x,y,2 for the n th stepGet the direction cosine s cx,cy,cz relativ e to the initia l axesFind th e scatterin g angle s 4>,v| j from Eqs . (4.10 ) an d (4.11 )Compute final coordinate s xn,yn,zn from Eqs . (3.12 ) t o (3.15 )

Check if the electron ha s been backscattere dif yes , exi t the loop an d add 1 to backscatter tota l

otherwiseReset coordinate s x = xn, y - yn, z ~ znReset directio n cosine s ex ~ ca, cy — cb, cz — cc

end

Page 71: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

62 MONT E CARLO MODELING

The PASCAL code that implements this sequence is set out below, again usingthe conventions established in Chap. 2.

4.3 The plural scattering Monte Carlo code

Program PluralScatter ;

{this programs performs a Monte Carlo trajectory simulation using

a screened Rutherford cross section and a plural scattering ap~

proxima t i on}

{$N+} {tur n on numeric coprocessor}

{$E+} {install emulator package}

uses CRT,DOS,GRAPH ; {resources required}

label exit ; {target address for goto jumps}

const two_p i = 6 . 28318 ; [2 constant}

varat_num,at_wht,density,inc_energy,mn_ion_pot:extended;

an, an_m, an_n,bk_sct, cp, c-^tilt, ga nu, tilt, sp, s_tilt:extended;

ca,cb,cc,ex,cy,cz,vl,v2,v3,v4,x,y,z,xn,yn,zn:extended;

h_scale,m_t_step,rf,step,v_scale:extended;

E:array [1 . .51] of real;

bottom,b_point,center,k,num,traj_num,top:integer;

GraphDriver:Integer;

GRAPHMODE:Integer;

ErrorCode:Integer;

Xasp,Yasp:word;

s :string;

Function power (mantissa, exponent:real) .-real;

[because PASCAL has no exponentiation function}

begin

power: =exp (In (mantissa) * exponent) ;

end;

Function stop_pwr(energy:real):extended;

{calculates the stopping power using the modified Bethe expression

of Eq. (3.21) in units of keV/g/cm2}

var temp:real;

begin

Page 72: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE PLURAL SCATTERING MODEL 63

if energy<0. 5 the n {t o avoid problems as energy approaches zero}

energy:=0.05;temp: = ln (l .166* (energy + 0. 85*mn_ion_pot) 7mn_ion-43Ot ) ;

stop_pwr: =temp*78500*at_num/ (at_wht*energy ) ;

end;

Procedure set—up—screen ;{gets initialization for random number generator and the input

data required to run the program}

beginClrScr; {Erases any data on screen display}

G o T o X Y ( 2 5 , l ) ;writeln('Plural scattering Monte Carlo simulation');

GoToXY(1,5);

Write('Input beam energy in keV);

Readln(Inc—Energy);

GoToXY(1,7);

Write('Target atomic number is');

Readln(at_num);

GoToXY(1,9);

Write('Target atomic weight is');

Readln(At_wht);

{compute the mean ionization potential J using the Berger-

Selzer analytic fit in units of keV}

mn_ion_pot: = (9.76*at_num + (58.5/power(at

_num'0.19)))*0.001;

GoToXY(1,11);

Write('Target density in g/cc is');

Readln(Density);

{get the beam tilt data}

GoToXY(40,5);

Write('Tilt angle in degrees');

readln(tilt);

s_tilt: =sin (tilt 757 . 4) ; {convert degrees to radians}

c_tilt:=cos(tilt757.4) ;

{get the number of trajectories to be run in this simulation}

Page 73: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

64 MONTE CARLO MODELING

GoToXY(40,7) ;

write('Number of trajectories required');

readln(traj_jium) ;

end;

Procedure Rutherford—Factor;

{computes the Rutherford scattering factor for this incident ener-gy}

var pO:extended;

begin

pO : =0 , 394*power (at_nuin' 0 . 4) Vine—energy; {Duncurrtb's function}

rf:=0.0072*at_num/(pO); {scattering constant b/2 in Eq. (4.3)}

end;

Procedure range;

{this calculates the range in microns assuming the modified Bethestopping power, Eg. (3.21)}

var energy,f,fs,Bethe—range:extended;

l,m:integer;

begin

fs:=0,; {initialize variable to be sure}

for m:=l to 21 do {a Simpson's rule integration}

begin

energy: = (m-1) *inc—energy/20; {20 equal steps}

f : =l/stop_pwr(energy);

1:=2;

if m mod 2 = 0 then 1:=4;

if m=l then 1:=1;

if m=21 then 1:=1;

fs:=fs+l*f;

end;

{now use this to find the range and step length for these con-ditons}

Page 74: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE PLURAL SCATTERING MODEL 65

Bathe—range: = f s*inc_energy/60 . 0; (i n g/cm2]ra_t_step: =Bethe_jrange / 5 0 .0 ;

Bethe—range:—Bethe—.range*10000.0/density; {a n microns}

{and displa y thi s fo r informationa l purposes }

GoToXY(40,11) ;writeln('........Rangeis 'Bethe_range:4:2, 'mi

crons ' ) ;

step: =Bethe—range 750.0;

end;

Procedure profile;{compute 50-ste p energy profil e fo r electro n beam}

var Al ,A2,A3,A4:extended ;m:integer;

beginE 11]:= inc_energy;

for Hi : =2 t o 5 1 d o

beginAl: =m_t^step*stop_pwr(E[m-l]);

A2 :=m_t~step*stop_pwr(Etm-1]-Al/2);

A3 :=m_t_step*stop_pwr(Etm-1]-A2/2);

A4:=nu-t^.step*stop_pwr (e [m- l] -A3) ;

E [ m ] : = E [ m - l ] - (A l +2*A 2 +2*A 3 + A 4 ) / 6 . ;

end;

E ( 5 1 ] : = ± : 0 . ; {ensur e electro n finishes with zero energy }

for m : = 2 t o 5 0 do { a little smoothing of the profile}begin

e[m] : - ( E [ m ] + E [m+1] ) /2 . ;end;

end;

Page 75: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

66 MONT E CARL O MODELING

Procedure initialize;

{sets u p the graphics drivers for 1/5. 0 TURBO PASCAL}

varInGraphicsMode:Boolean;

PathToDriver:String;

begin

DirectVideo: =False;

PathToDriver: = '';

GraphDriver: =detect;

InitGraph(GraphDriver,GRAPHMODE,PathToDriver);

SetViewPort(0,0,GetMaxX,GetMaxY,True); (clips the display}

center:=trunc(GetMaxX/2);

top: =trunc{GetMaxY*0.1) ; {adjust to suit your screen}

bottom: =trunc(GetMaxY*0.75) ; {ditto}

end;

Procedure set_up_graphics;

{sets up the plotting scales, surfaces, etc., for display usingthe size of the screen as found by the initialize routineto scale the display properly}

var a,b,c,d:integer;

begin

a: =GetMaxX-20; {adjust to suit your screen}b:=20; {ditto}

Line (b, top, a, top) ; {plot in top surface}

{now plot in the incident beam allowing for tilt}b_point:=center - trunc(38*s_tilt/c_tilt) ;

Line(b_point,1,center,top) ; {plot beam}

{find the aspect ratio of this display}GetAspectRatio(Xasp,Yasp);

{set up the plotting scale}

h_scale : =GetMaxX/(100.*step); [in pixels per micron}

v_scale:=h_scale*(Xasp/Yasp);

c : =GetMaxY-43 ; {adjust for your screen}

d:=10; {ditto}

{set up to draw the trajectories completed thermometer}OutTextXY(trunc (center-80) ,bottom+15, '0%............50%.........

. 100%');

Page 76: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE PLURAL SCATTERING MODEL 67

OutTextXY(trunc(center-78) ,bot tom+28, 'Trajectoriescompleted');

If h_scale < = 300. the n {dra w a bar 1 micron long}

beginLine{d, c, d+trunc(h_scale) , c) ; {micro n bar) ;

OutTextXY (d+trunc(h_scale/3) ,d+c, '1 (Jim' ) ; {label the bar]

endelse {draw a bar 0.1 microns long}

beginLine(d ,c ,d+trune(0. l*h_scale) , c) ;OutTextXY (d+trunc ( 0 .0 3 *h_scale) , d+c, ' 0 . lOjun' ) ;

end;

end;

Procedure xyplot(a,b,c,d:real) ;

{this displays the trajectories on graphics screen}

var iy,iz,iyn,izn:integer;

begin

iy: =center+trunc (a*h_scale) ; {plotting coordinate #1}

iz:=top + trunc(b*v_scale); {plotting coordinate #2}

iyn: =center + trunc(c*h_scale) ; {plotting coordinate #3}

izn:=top + trunc (d*v_scale) ; {plotting coordinate #4}

if d=99 then izn:=top-2; {BS plotting limit}

{now plot this vector on the screen}

line(iy,iz,iyn,izn);

end;

Procedure init_counters;

{initialize each counter since PASCAL does not do this}

begin

bk_sct: =0;

num: = 0 ;

end;

Procedure reset—coordinates ;

{reinitialize all the electron variables at start of each new tra-

jectory}

Page 77: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

68 MONTE CARLO MODELING

beginx: = 0 ;y :=0 ;z : = 0 ;cx:=0;

cy:=s_tilt;cz : =c_tilt;

end;

Procedure p_scatter;{calculates scattering angles using the plural scattering model

with the small angle correction as given in Eg. (4.10)}

begin

(first call the random number generator function}nu: = sqrt(RANDOM) ;

nu: = ( (1/nu) -1.0) ;

an:=nu*rf/E[k] ;

{and use this to find the scattering angles}

sp: = (an + an) / (1+ (an*an) ) ;

cp: = (1- (an*an) ) / (1+ (an*an) ) ;

{and the azimuthal scattering angle]ga:=two_pi*random;

end;

Procedure new_coord(step:real);{gets xn,yn,zn from x,y,z and scattering angles using figs. (3.12)

to 3.15)}

var an—n,an_m,vl,v2,v3,v4:extended;begin

{the coordinate rotation angles are}if cz-Q then cz : =0.000001; {avoid division by

zero}an_m: = (—cx/cz) ;

an_n: =1. 0/sqrt (1+ (an_m*an_in) ) ;

{save computation time by getting all the transcendentals first}vl: =an_n*sp;v2 : =an_m*an_n*sp;

v3 : —cos (ga) ;

v4: =sin(ga) ;

Page 78: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE PLURAL SCATTERING MODEL 69

{find the new direction cosines}

ca: = (cx*cp) + (vl*v3 ) + (cy*v2*v4) ;cb:=(cy*cp) + (v4*(cz*v l - cx*v2 ) ) ;

cc :=(cz*cp) + (v2*v3 ) - (cy*vl*v4) ;

{and get the new coordinates}

xn:=x + step*ca;

yn:=y + step*cb;

zn:=z + step*cc;

end;

Procedure reset_next_step;

{rests variables for next trajectory step}

beginxyplot(y,z,yn,zn); {plot s thi s step }

ex:=ca;cy:= cb;cz:=cc;x:=xn;

y:=yn;z :=zn;

end;

Procedure back—scatter;

{handles special case of a backscattered electron}

begin

bk_sct: =bk_sct + l; {add one to counter}

num: =nurn+l; {add one to total}

xyplot (y, z,yn, 99) ; {plot BS exit}

end;

Procedure show_traj_num;

{update the thermometer display}

var a,b:integer;

begin

a: =trunc (center-80) ; {to match position of thermometer}

b: =bottom+23; {ditto}

line (a,b,a+trunc (165* (num/traj_num) ) ,b) ; {draw it in}

end;

Procedure display_backscattering;

{draws a thermometer to display the backscattering coefficient}

Page 79: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

70 MONTE CARLO MODELING

label han g ;var a,b:integer ;

begina: =GetMaxX-180; {adjus t to suit your screen}

b: =bottom+23; {ditto }

O u t T e x t X Y ( a , b - 8 ' ' 0 . . . . 0 .2 5 . . . 0. 5 . . . 0 . 7 5 ' ) ;OutTextXY(a+18,b+5 'B S coef f i c i en t ' ) ;

L ine (a ,b , t runc (a+(bk_sc t / t r a j_num)*220) ,b ) ; {draw it }hang:

if (no t keypressed) the n got o hang ; {freezee displlay on

screen}

CloseGraph; {shut down the graphics unit}

end;

{

* this is the start of the main program *

}begin

set_up_screen; {get input data}

Rutherford—factor; {and screening factor}

{now get the range and step length in microns for these conditons}

range;

profile;

initialize; {initialize the graphics screen}

set_up_graphics; {an d draw on it}

randomize; {resee d random number generator}

* th e Mont e Carl o loop *

init_counters; {reset counters}

while nu m < traj_nu m d obegin

Page 80: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE PLURAL SCATTERING MODEL 71

reset—coordinates ;

for k := l t o 5 0 do

begin

p_scatter; {find the scattering angles]

new_coord(step); {find where electron goes}

{program specific code will go here]

{now test for the electro nposition in the sample}

if zn<=0, then {this one is backscattered}

begin

back—scatter;

gotoexit;

end

else {it is still in the target}

reset—next—step;

end; {of the 50-step loop}

num:=num+l; {add one to trajectory total}

'exit: {end of goto jumps}

show—traj—num {update the trajectory number display}

end; {of the Monte Carlo loop}

* end of the Monte Carlo loop *

display—backscattering; {show the computed BS coefficient}

end.

4.4 Notes on the procedures and functionsused in the program

The program starts, as in the case of the single scattering model , with the pragmas{$Af+} and {$£+}, which select th e use of the math coprocessor an d the emulatorpackage. The resources, labels , constants , an d variables follow. The firs t tw o func -tions in Plural Scatter, POWER , whic h provides an exponentiation capability

Page 81: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

72 MONT E CARL O MODELIN G

for PASCAL , an d gTOP_PWR , whic h calculate s th e electro n stoppin g power i nunits of keV/g/cm2 using Eq. (3.21), are identical to those in SingleScatter,since, wherever possible, i t is advantageous to reuse program code. Next , set ja p_screen, allow s for the input of the various pieces of data to describe the experi-mental conditions t o be modeled. I n addition t o the usual data about the specimen(atomic number, atomic weight, and density) and the beam energy, the option is givento change the angle of incidence o f the beam to the specimen. Th e variable Tilt,which describes this angle, is given in degrees, s o the procedure must first convert itto radians . Using the conventio n fo r the Cartesia n axe s described i n Chap . 3 , thethree direction cosines for the incident beam will then be CX = 0, CY = sin(Tilt),CZ = cos(Tilt) . The procedure calculates and stores these values.

The procedur e Rutherford-Facto r calculate s th e energy-independen tquantities tha t appea r i n th e scattering-angl e Eqs . (4.3) , (4.4) , an d (4.10) . Th evariable pO is Duncumb's suggested fitting function t o the backscatter data as givenin Eq. (4.8); rf the n represents the quantity (b/2pQ), wher e b is 0.0144 Z, which isused i n Eqs , (4.3) and (4.10) . Th e rang e o f th e electro n i s no w calculate d i n th eprocedure rang e usin g Eq . (4.1) . W e firs t divid e th e tota l energ y rang e o f th eelectron, fro m it s starting value inc_energy to zero, into 20 equal steps. At eachof thes e 2 1 energ y values , the quantit y l/(dE/dS) i s the n foun d fro m Eq . (3.21) ,calculated usin g the functio n stop_pwr . Finally , Simpson' s rul e (Pres s e t al. ,1986) is used to evaluate the integral, giving a result in units of mass per unit area(g/cm2). To obtain th e Beth e range, thi s quantit y is divide d by th e densit y o f thespecimen (g/cm 3) and the result is converted t o micrometers an d printed out on theinput displa y screen . Th e step-length i s then se t equal t o one-fiftiet h o f thi srange.

The variatio n o f energ y o f th e electro n ca n no w b e precalculate d usin g th eprocedure profile, whic h solves Eq. 4.2 using a Runge-Kutta method (Press etal., 1986) to obtain the electron energy at the end of each of the 50 steps into whichthe trajector y ha s bee n divided . Startin g fro m th e inciden t bea m energ y a t th ebeginning o f th e firs t step , th e procedur e obtain s fou r differen t estimate s fo r th eenergy lost in traveling one step length, Since the stopping power itself varie s withenergy, th e firs t estimat e get s th e energ y los s A£ t alon g th e step , assumin g thestopping power appropriate to the starting energy inc_energy. The next estimatesubtracts half of the calculated energy loss A£ t fro m th e starting energy and, usingthis energy value (i.e., inc_energy- AE t/2), finds the stopping power and hencea second estimate A£2 for the energy loss along the step. This value is, in turn, usedto fin d th e stopping powe r a t the energy (inc_energy- A£ 2/2) an d the energyloss A£3 along the step. Finally, the stopping power at the energy (inc_energy-AE3) is found and the energy loss A£4 is computed. The actual energy at the end ofthe first ste p is then the starting energy inc_energy minus the weighted averageof the various energy-loss estimates . This value is then used as the starting energ yfor th e next step, and the process i s repeated unti l the end of the 50th step , which

Page 82: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE PLURA L SCATTERIN G MODE L 7 3

Figure 4.3. Variatio n o f electron energy with step number for 20-keV incidence.

sets the energy equal to zero. Figure 4.3 plots E[n], the energy at the start of the nth

step, a s a function o f n for 20-keV electrons inciden t on carbon and gold. I t can beseen that, when plotted as a function o f the fraction o f the range traveled, electronsin both materials lose energy at about the same rate and that the rate of energy loss isquite nonlinear (i.e., the electrons travel about two-thirds of their range before losinghalf of their initial energy but lose the last 25% of their energy in the last 10% of thesteps).

The procedure initialize i s identical t o tha t used previousl y an d againdetermines the plotting size of the screen and the location of center, th e horizon-tal midpoint of the screen, and top, th e location at which the entrance surfac e ofthe specimen is to be drawn. The procedure set_up~graphic s uses these value sto plot in the top surface and the incident beam, allowing for this beam to be tiltedrelative to the surface normal. The horizontal plotting scale h_scale is set equal tothe width o f the scree n (GetMaxX ) divided b y twice the Beth e range (pixel s pe rmicron), and the corresponding plottin g scale v_scale in the vertical directio n i sfound b y multiplyin g h_scale b y th e aspec t rati o o f th e scree n t o ensur e acorrectly proportione d display . Finally, a micron marke r an d a "trajectories com -pleted" thermometer are constructed. As before, whil e the code provided wil l cor-rectly position these for any type of graphics screen that is used, their exact locatio ncan b e varie d t o sui t individua l preferenc e b y adjustin g th e value s o f th e loca lvariables c and d.

Procedure p_scatte r use s Eq . (4.10 ) t o calculat e tan(4>/2) , wher e 4 > i sthe scatterin g angl e define d i n Fig . 4.2. The value s o f sin(((> ) an d cos(4> ) a fe

then obtaine d b y standar d trigonometri c formula s fro m th e valu e o f tan(<j>/2) ,

Page 83: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

74 MONT E CARLO MODELING

Figure 4.4. Trajectorie s i n bulk carbo n an d copper a t 20 keV.

and th e azimutha l angl e \\i i s foun d fro m Eq . (3.11) . Thes e angle s ar e the npassed to the procedure new_coord , identica l to the version i n Chap. 3 , whichdetermines th e coordinate s o f th e en d poin t o f thi s step . Th e fina l procedure sreset_next_step, back_scatter , show_traj_num , an d display-backscattering handle the various bookkeeping details for each of the trajec-tories and update the screen display .

The main body of the program, starting at begin and finishing at end simpl ycalls th e procedure s a s the y ar e required , loopin g unti l th e require d numbe r o ftrajectories hav e been computed . In th e cente r o f thi s loo p i s th e place , afte r th enew positio n of the electron ha s been determined, where code to compute specificfeatures o f the electron interaction (suc h as x-rays or secondar y electrons ) ca n b eplaced. The electron is then be tested to see whether it has been backscattered and , ifso, the back_scatter procedur e is called; otherwise, the electron proceeds to thenext step . After completion , the program displays the fractiona l yiel d of backscat -tered electrons an d then terminates.

Page 84: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

THE PLURA L SCATTERIN G MODE L 7 5

Figure 4.4. (continued)

4.5 Running the program

The program can be ran directly fro m the disk if this is available by typing PCLMCat th e ">" prompt an d then hittin g return . Once th e required inpu t dat a (atomi cnumber, atomi c weight , density , and beam energ y a s before) have been provided ,the program wil l start running. A comparison o f the speed o f this program wit h theequivalent computatio n fo r a bulk specime n usin g SingleScatter wil l sho wthat PluralScatte r i s 1 0 to 2 0 times faster , becaus e a maximum of only 5 0steps i s calculated fo r each trajectory . Figure 4.4 show s computed trajector y plot sfor 20-ke V electrons i n carbon, copper, silver, and gold to correspond with those inFig. 3.7 . Despit e th e simplifyin g assumption s introduce d b y th e plura l scatterin gmodel, i t is evident that the basic details of the interaction ar e well accounted for . Inlater chapters, we examine in more detail some verifiable predictions of both modelsand find that , whe n used wit h prope r precautions , either ca n giv e result s o f goodaccuracy. It should be noted that one consequence o f the model used here is that theshape of the interaction volum e is independent o f the actual inciden t bea m energ yand depends only the material of the target. The form of the interaction volume does,however, depend on the angle of incidence o f the beam, as shown in Fig. 4.5, whichplots trajectorie s fo r 30 ° an d 60 ° angle s o f incidenc e i n copper . Not e tha t th e

Page 85: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

76 MONT E CARL O MODELIN G

Figure 4.5. Trajectorie s i n copper a t 20 keV fo r inciden t angle s o f 30 ° and 60° .

maximum extension of the interaction follows th e general direction of the incidentbeam, s o tha t th e volum e becomes elongate d i n th e directio n o f th e beam . Th elateral extent of the interaction is therefore quite different in the plane containing theincident beam an d in the direction norma l to this, and this will be evident in bothimaging and microanalysis performed under these conditions .

Page 86: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

5

THE PRACTICAL APPLICATION OF MONTECARLO MODELS

5.1 General considerations

The remainder of this book is devoted to the application of Monte Carlo models to avariety of problems in electron microscopy and microanalysis. The programs devel-oped in Chaps. 3 and 4 provide only the framework tha t models the basic details ofthe electro n interaction . W e will now develo p a variety o f algorithm s that , whenimplemented as PASCAL procedures and functions, can be used to transform thesegeneric Mont e Carlo model s int o programs customized t o solve a particular prob-lem. Befor e proceedin g t o thes e applications , however , ther e ar e a few practica lconsiderations that are worth discussing.

5.2 Which type of Monte Carlo model should be used?

We have developed two types of Monte Carlo model, the singl e scatterin g model ,which attempt s t o accoun t fo r ever y elasti c interactio n suffere d b y th e inciden telectron, and the plural scattering model, which considers only the resultant effect ofscattering events occurring within some specified segment of the electron trajectory.These mode l shar e much of the same physics, and so, when properly used, can beexpected to give comparable results. It is, however, necessary t o decide what consti-tutes proper usage. An important general property of these models is what we shallcall, by analog y with photographic film , their granularity. Thi s concept expresse sthe ide a tha t th e Mont e Carl o mode l i s takin g wha t i s i n realit y a continuou ssequence o f scatterin g event s an d modeling i t a s a discrete serie s o f independen tevents, just as a piece o f film takes a picture and breaks i t down into fragments th esize of the grains making u p the emulsion. The finer th e grain siz e of the film, th ehigher the resolution of the image; and the finer the granularity (i.e., the step size) ofthe Mont e Carlo simulation , th e better th e qualit y of the mode l generated . In thecase of the single scatterin g model , the step size is of the order o f the elastic meanfree pat h and thus (depending o n energy) i s between a few nanometer s and a fewtens of nanometers, whil e for the plural scattering model, the step size is a fractionof the Bethe range and varies from ten s of nanometers to fractions of a micrometer .

In modeling some effect , i t is therefore necessary to ensure that the granularity

77

Page 87: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

78 MONTE CARLO MODELING

of th e mode l i s sufficien t t o resolve th e kin d o f effec t tha t i s bein g studied . I t i sobvious that a plural scattering model, which at an energy of 10 0 keV would have astep lengt h o f clos e t o a micron , woul d no t b e suitabl e fo r studie s o f electro nscattering i n a thi n foi l onl y a fe w hundre d angstroms thick—the dat a would b eexcessively "grainy." But care mus t also be taken to se e that the granularity is nottoo small. For example, at low beam energies, the step length in the single scatteringmodel is only a few angstroms and so is approaching atomistic dimensions. Cautionmust be exercised in this condition, because a fundamental assumption of the MonteCarlo method is that the sample can be considered t o be a structureless continuum(sometimes called a "jellium"), an d this wil l only be true when the ste p lengt h i smuch greate r tha n eithe r atomi c o r crysta l lattice dimensions . Conclusion s draw nabout electro n behavio r unde r these extreme condition s may therefore b e in error ,and it would actually be better to use a more granular model. An appropriate test isto determin e th e critica l dimension s o f the phenomena o r experimen t t o be simu -lated an d ensur e tha t th e mode l chose n ha s sufficien t granularit y t o resolv e th eeffect. A t the same time we must also ensure that the scale is not so far below that ofthe problem that excessive time is wasted in computation. For example, the model-ing of backscattered signal s from bul k specimens can usually be done with a pluralscattering model, because the dimensions of the sample and its features or inclusionsare usuall y large compare d t o th e ste p size . Bu t i n modelin g secondar y electro nproduction fro m th e same specimen, it may be necessary to use a single scatterin gmodel, becaus e th e scal e o f th e secondar y emissio n (se t b y th e escap e dept h o fsecondary electrons ) is only a few nanometers. Using a single scatterin g mode l inthe first case would probably give the same result, but at the expense of much extracomputing time; while using a plural scattering model in the second case might givea result that is accurate on the scale of the step length (i.e., fractions of a micron) butinaccurate on the scal e o f a few ten s of angstroms .

5.3 Customizing the generic programs

The aim of the subsequent chapters of this book is to develop a library of proceduresand functions that , when coupled with one or other of the basic Monte Carlo models,will realisticall y an d accuratel y simulat e th e physica l proces s o f interest . Thes eprocedures ca n either be added to the basic programs by typing them in, or the codefragments o r complet e program s ca n b e take n fro m th e disk . I n mos t cases , th ecustomization requires only the addition of the procedure o f interest to the body ofthe program together with the declaration at the start of the program o f any addition-al globa l variables , th e additio n o f a call t o thi s procedur e (o r procedures ) a t theappropriate point within the Monte Carlo loop, and the addition o f any special tests(for example , determinin g th e position o f th e electro n relativ e t o som e featur e orsurface) that are require to model the specific event of interest. As a practical matter,it is usually most convenient t o modify program s in a three-step process . First, add

Page 88: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

PRACTICAL APPLICATIO N 7 9

the procedures an d their associated global variables to the program an d check that itstill compiles correctly . Next , add the cod e tha t performs an y specifi c test s mad eprior to the calling o f the procedure an d again check that the program compiles andruns. Finally, ad d the call(s) to the procedure itsel f and see that the program func -tions as expected. Breakin g the process into these steps greatly eases the problem ofdebugging the program in the event of an error, because onl y one change has beenmade to the program a t each iteration .

5.4 The "all purpose" program

An apparentl y irresistibl e temptatio n i n Monte Carl o modeling i s the urge to con-struct an all-purpose simulation that can answer any question about any effect fro ma specimen o f arbitrary geometr y and inhomogeneity. The problem wit h producingsuch an oracle is that the more general a program must become, the more convolutedmust be its logic, and the difficulty o f debugging a program rises exponentially withits complexity. It is not just that a general program is longer but that it has built intoit a multiplicity o f options (i.e. , i f ....... . .en...........elsee.........statementthat can (and , perversely, quit e ofte n do ) interac t wit h one anothe r i n unexpectedways. Thus, while a program may function quit e normally and correctly for one setof conditions , anothe r an d apparentl y equall y reasonabl e se t o f condition s ma ycause a malfunction or , worse, a subtle error i n the outpu t data.

The most reasonable advice is to construct a new simulation for each proble mthat is to be solved. For example, if we are interested i n the x-ray production fro mfeatures in the shape of either sphere s or cubes, it is best to write one program thattackles the case o f a spherical sampl e and another separat e program that consider sthe case of the cube. Since a high fraction of the code will be identical in both cases,the additional time taken in constructing a second program is small. But the elimina-tion o f complicate d an d messy test s relate d t o the specime n shap e wil l make th ecode easie r to writ e an d follow , muc h easier t o debug , an d (ver y likely) faste r i nexecution becaus e som e additiona l shortcuts , simplifications , an d optimization smay becom e possible . I n summary , a Mont e Carl o mode l i s mos t efficien t an deffective whe n it is constructed a s a special too l to solve a particular problem .

5.5 The applicability of Monte Carlo techniques

It ha s bee n sai d tha t "fo r a two-year-old chil d wit h a hammer, everythin g in th eworld is a nail." Monte Carlo users can occasionally b e guilty of the same restrictedvision. Whil e th e techniqu e i s o f ver y wid e an d genera l applicability , ther e ar eproblems tha t cannot be solved by this type of approach. Specifically , th e methodsdiscussed her e cannot be applied to problems tha t violate th e basic assumption s ofthe models ; fo r example , electro n channelin g an d mos t problem s associate d wit himaging i n th e transmissio n electro n microscop e canno t b e investigate d becaus e

Page 89: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

80 MONt E CARL O MODELIN G

they involv e the crystalline nature of a sample that the Mont e Carl o simulatio n i streating as structureless. Nor can Monte Carlo methods be applied to problems tha trely on effects, suc h as electron diffractio n o r the effect o f electron spin polarization,which ar e no t accounte d fo r i n th e physic s buil t int o th e programs . Finally , th eprograms ma y be of only limited value at very low (belo w say 0.5 keV) and veryhigh (abov e 50 0 keV) beam energies becaus e important physical effects—such a sthe consequences of relativistic or nuclear interactions—have been omitted from thephysics. Ther e ar e also occasions—suc h a s scannin g electro n microscop e (SEM )operation a t low magnifications, where the details o f the electron bea m interactionare less significant than purely geometrical effects—where a Monte Carlo approachis simpl y no t a s appropriat e a s a simple r an d faste r analytica l mode l migh t be .Within these boundaries, however, the scope for the use of Monte Carlo simulationtechniques i s wid e and , as demonstrated i n the subsequen t chapters, th e program sdeveloped her e ca n b e use d effectivel y t o answe r man y question s abou t t o solv emany commonl y encountere d problem s i n microscopy an d microanalysis .

Page 90: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

6

BACKSCATTERED ELECTRONS

6.1 Backscattered electrons

In this chapter, we will concentrate on simulations associated with various aspects ofbackscattered electrons . W e wil l defin e backscattere d electron s a s thos e inciden telectrons tha t are scattered ou t of the target after sufferin g deflection s through suchan angl e tha t the y leav e th e materia l o n the sid e by whic h the y entere d (i.e. , fo rnormal incidence , the minimum scattering angl e require d i s 90°) . In practice, i t isoften mor e useful t o define backscattered electron s a s those inciden t electrons thatare scattered i n the target i n such a way as to be collectible b y a suitable detecto rplaced on the incident beam side of the specimen. This , of course, implies tha t theapparent magnitude of the backscattering will be affected b y the size and position ofthe detector relative to the specimen and incident beam. To avoid confusion, we willseparate thes e case s b y callin g th e tota l numbe r o f backscattere d electron s pe rincident electron the backscattering yiel d T I and the number per incident electron a smeasured by some specifie d detecto r the backscattered signal .

Since every Mont e Carl o mode l track s eac h inciden t electro n i n it s passag ethrough the target, the determination of whether or not a given electron is backscat-tered is inherent in the simulation. At the same time, the backscattering yiel d TI is aconvenient macroscopi c measur e o f th e interactio n o f th e electro n bea m wit h thetarget an d form s a usefu l experimenta l tes t o f th e prediction s o f a Mont e Carl omodel. Before attempting to simulat e detail s o f backscattered imagin g fro m com -plex an d inhomogeneous samples , we must therefore demonstrat e tha t the modelsdeveloped i n th e previou s chapter s correctl y matc h experimenta l value s fo r th ebackscattering yiel d fro m plana r an d homogeneous materials .

6.2 Testing the Monte Carlo models of backscattering

The variatio n o f backscatterin g yiel d wit h atomi c numbe r wa s firs t establishe dnearly a century ag o (Starke, 1898 ; Campbell-Swinton , 1899) . Figur e 6. 1 shows acompilation of some modern backscattering yiel d data plotted agains t atomic num-ber for an incident beam energy of 1 0 keV using results taken from Bisho p (1966),Drescher e t al . (1970) , Hunge r an d Kuchle r (1979) , Neuber t an d Rogaschewsk i(1980), Reimer and Tolkamp (1980), and Heinrich (1981). T I is seen to vary consid -

81

Page 91: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

82 MONT E CARL O MODELIN G

Figure 6.1. Experimenta l BSE yield data at 1 0 keV and corresponding Monte Carlo values.

erably across the periodic table , increasing from abou t 0.06 fo r carbon to about 0.5for uranium . Th e variation wit h atomic number i s generally smooth, although—a spointed ou t by Bishop (1966)—th e slop e of th e curve changes discontinuousl y a tabout Z = 3 0 and again at about Z = 60 . These changes have been associated wit hthe binding energies o f the atomic electrons. However , while the general form of thevariation i s evident , i t i s clea r tha t ther e i s significan t scatte r betwee n differen tpieces of data. Although most of the cited authors claim measurement accuracies ofbetter than 5%, variations between comparable values are as much as 20% in somecases. These discrepancies probabl y aris e from th e variety of methods employed tomeasure t\ an d i n particula r fro m th e succes s wit h whic h the effec t o f secondar yelectrons ca n be removed fro m th e data. A complete se t of experimental backscat -tered dat a measurements i s available in Joy (1993) .

The backscatterin g coefficien t T\—computed usin g eithe r th e singl e o r th eplural scattering Monte Carlo models (1000 trajectories per point)—is seen to be ingood agreement wit h the experimental data , either valu e lying within the spread ofmeasured values . Th e singl e scatterin g values , especiall y fo r Z > 40 , tend t o beslightly on the high side of the best-fit trend line through the data, but the sense andmagnitude of the deviation i s not systematic . The excellent agreement fo r either ofthe model s is , o f course , gratifying , bu t i t i s no t unexpected , sinc e bot h model scontain a parameter that can be selected s o as to match the experimental backscatter -ing yields. In the case of the single scattering model, the screening paramete r a canbe adjusted t o ensure a good fi t to measured data. The expression fo r a a s given inEq. (3.2) and used in our model is that suggested by Bishop (1976). Similarly, in theplural scatterin g model , the minimum impact paramete r p0 [Eqs . (4.3 ) an d (4.4)] ,when use d in th e for m give n in Eq . (4.8) , agai n allow s the compute d backscatte rdata t o b e fitte d t o th e experimenta l values . In both models , th e paramete r t o b e

Page 92: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRON S 8 3

Figure 6.2. Variatio n o f BS yield fro m gold/coppe r solid solution an d corresponding Mont eCarlo simulated dat a usin g various models .

adjusted is a simple function of the atomic number Z; hence improving the fit to onechosen dat a value will usually worsen the fi t a t som e othe r value. The suggeste dvalues represent th e bes t overal l fi t t o the measured values a t 1 0 keV.

It is also necessary to consider i n somewhat more detail the variation of T| withcomposition whe n the targe t i s not a pure elemen t (Herma n an d Reimer, 1984. )Figure 6.2 plots the variation of the backscattering coefficient for a solid solution ofgold in copper (dat a taken fro m Bishop , 1966) . A s the atomic percentag e o f goldincreases fro m 0 % to 100% , the measured backscattering coefficien t increase s lin -early from the expected value for pure copper to the expected value for pure gold. Ifwe have a materia l wit h th e chemica l formul a S^jX, wher e th e Xt ar e element sof th e periodi c tabl e wit h corresponding atomi c weight s A,- , an d th e ai ar e thei rvalences in the chemical formula (e.g., in H2O, al - 2 , a2 = 1 , Xl = H, X2 = O,Al = 1 , A2 = 16) , then w e can defin e a mass concentration ci from th e formul aCj = (djAiltpjA^, wher e £,-c, - = 1 . The data shown in Fig. 6.2 represents a specia lcase o f a genera l resul t (Castaing , 1960 ; Heinrich , 1981) , whic h state s tha t th ebackscattering coefficien t T| mix for a mixture of elements i s given by the relation :

In simpl e situations , i t i s clearly possibl e t o fin d th e value of -n mix by finding th eindividual values of if y fo r the components, using the simulations already describedand the summing them using Eq. (6.1). As Fig. 6.2 shows, this provides a very closefit to the experimental data. This procedure is, however, rather tedious if the chemis-

Page 93: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

84 MONT E CARL O MODELIN G

try o f the targe t i s comple x (excep t fo r th e cas e o f th e HKLC S model , discusse dbelow); instead , we might try to obtain the correc t valu e of T) mix by making som eassumption abou t a n effectiv e o r averag e atomi c numbe r fo r th e compoun d o finterest. The simplest suggestio n (Miiller, 1954 ) is to use the mean value of atomicnumber Zmix fo r the compound—i.e. ,

The effective atomi c weight Amix is found i n a similar fashion , and the value of thedensity used is the measured value for the compound. Figure 6. 2 shows the resultsof employing this assumption and the plural scattering Monte Carlo model o f Chap.4 to model th e copper-gold system . The agreemen t betwee n th e experimenta l an dcomputed dat a i s adequat e t o goo d ove r th e ful l rang e fro m 0 % t o 100 % gold,indicating that the accuracy of this simple approximation is likely to be adequate formost purposes. Alternatively , because electron stoppin g powers computed from th eBethe equation are additive, Everhart (1960) suggested that a more physically exactexpression for Zmix woul d b e

However, a s show n in Fig. 6.2, application o f this rul e to the copper-gold syste mproduces a considerabl e deviatio n betwee n th e predicte d an d experimenta l data ,suggesting tha t Eq. (6.2) is a more usefu l expression . Simila r result s are foun d i nmore complex systems. Figure 6.3 plots the experimentally determined backscatter -ing coefficien t fo r th e ALpa^^As syste m a s a functio n o f th e mol e fractio n o faluminum (Sercel et al., 1989) . Superimposed o n this plot are the computed predic -tions fo r the backscattering, usin g Eqs. (6.2) and (6.3) . I n this example, fo r whichthe differences betwee n the atomic numbers are relatively small and the compositionrange i s limited, th e difference betwee n the two models i s not a s marked, but i t isclear tha t th e simple r expressio n o f Eq . (6.2 ) is stil l a t leas t a s goo d a s th e mor ecomplicated expressio n o f Eq . (6.3) . I n th e res t o f thi s volume , therefore , com-pounds wil l be computed eithe r assumin g the use of Eq. (6.2) or from th e HKLC Sprocedure, discusse d below.

The backscatterin g coefficien t T I i s not constan t wit h energy, a s is often state din introductory textbooks , bu t varie s in a manner tha t depends o n both th e energ y

Page 94: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRON S 8 5

Figure 6.3. Variatio n o f B S coefficien t fo r A l i n AlGaA s syste m (Serce l e t al. , 1989 ) andsimulated MC data using differen t models .

and the atomic number, Figure 6.4 plots data from Hunger and Kuchler (1979) for f]as a function o f Z at 4 and 40 keV. It can be seen that while the general for m o f thevariations at the two energies i s similar, the absolute values change significantly. Onmoving from 4 to 40 keV, the backscattering coefficient of the lightest elements fall sby a factor of up to two times, while that for the heavier elements rises by as muchas 25%. The plots fo r 4 and 40 keV actually cross a t about Z = 40 . The detaile dform of this variation is shown more clearly in Fig. 6.5 , which plots the variation of

Figure 6.4. Variatio n o f BS yield wit h energy ,

Page 95: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

86 MONT E CARL O MODELIN G

Figure 6.5. Variatio n o f BS yield with energy .

r\ for carbon, silicon, copper, silver , and gold as a function of beam energy. It is clearthat at the lowest beam energies (i.e. , <1 keV), the bulk backscattering coefficientsfor al l elements tend to converge to values between 0.2 and 0.4. For higher energie s(>50 keV ) th e backscatterin g coefficient s fo r ligh t element s ten d t o decreas e b yabout 10 % for eac h facto r o f 1 0 increase in bea m energy , while those fo r heavie relements remai n abou t constan t (Antola k an d Williamson , 1985) . Hunge r an dKiichler (1979) have derived an analytical expression that predicts, fairly accurately ,values of T I as a function o f both the atomic number Z and the incident energ y E (i nkilo-electron volts) :

where

Neither of the two Monte Carlo models discussed in the previous chapters canpredict thi s type of behavior . I n fact , a plot o f T\ versus energy usin g eithe r o f ou rmodels wil l show that, over the energy range 5 to 40 keV, the predicted backscatter -ing coefficient is , to within the expected statistical error, independent of energy. (Forlower energies , th e value s fro m th e singl e scatterin g mode l ma y vary , but thi s i sbecause the computation of trajectories i s terminated a t an arbitrary cut-off energy ,which i s a significan t fractio n o f th e inciden t bea m energy) . Ther e ar e severa l

Page 96: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRON S 8 7

reasons fo r this disagreemen t betwee n experimenta l an d computed data . First , theparameters in both models that adjust the backscattering values to match experimen-tal data a t some nominal energ y ar e designed t o hold th e value of r\ constan t withbeam energy , since , unti l quite recently , low-energy electro n interaction s wer e oflittle interest ; therefore , th e assumptio n tha t T | wa s constan t wit h energ y wa s areasonable simplification . Second, a s noted in discussing the data in Fig. 6.1 above,the quality of the experimental dat a on backscattering coefficient s i s rather mixed,and th e magnitude of the variation of -r\ with energy for most elements i s less thanthe sprea d betwee n differen t publishe d value s a t the sam e energy . Consequently ,many workers have preferred to take T| as constant until more accurate experimentalvalues were determined. Finally , an d of more fundamental significance, both mod-els use the screened Rutherfor d cross sectio n as the basis for the model of electronscattering. For a wide range of conditions—that is, for elements o f low and mediumatomic number, electron energies greater than 10 keV, and small scattering angles—the Rutherfor d cros s sectio n i s a goo d approximation ; bu t fo r heav y elements ,energies below 1 0 keV, and large scattering angles , the Rutherford cross section canbe significantl y in error . I t must , instead , b e replace d b y th e Mot t cros s section ,which takes into account spin-orbit coupling in the solution of the relativistic Diracequation (Reime r and Lodding, 1984) . I n general terms , th e Mot t cros s sectio n i sessential in applications wher e the interaction of interest consist s of a single elasticlarge-angle scattering event (e.g., in backscattering from thin foils or in calculationsof th e energ y spectru m o f backscattere d electrons ) an d i s desirabl e fo r al l low -energy applications . But for effect s cause d by electron diffusio n an d plural scatter -ing (e.g. , backscattering fro m bul k samples, x-ray production, an d secondary elec -tron generation) , th e Rutherfor d cros s sectio n give s rathe r goo d agreemen t wit hexperimental data except at low beam energies. The Mott cross section is consideredin more detail in the final chapte r of this book, but elsewhere the Rutherford mode lwill b e use d because , unlik e th e Mot t model , whic h require s th e generatio n o fextensive table s o f data , it can be expressed analytically .

With th e increase d interes t i n low-energ y scannin g microscop y an d micro -analysis, i t would , however, be desirabl e t o try and modif y th e models develope dearlier to correctly predict the variation of T| with energy so as to obtain some of thebenefits of the Mott cross section without the extra effort tha t is required. This is notreadily possibl e for the single scatterin g mode l because of the necessity, discussedin Chap . 3 , of terminating the electrons ' trajectorie s a t some predetermined cutof fenergy, usually 0.5 keV. At low energies , thi s cutoff i s a significant fraction o f theincident energ y an d henc e th e precisio n o f th e computatio n i s doubtful . Fo r th eplural scattering model, however, a variation of Z with E can readily be achieved. Asdiscussed in Chap. 4, the scattering angl e $ can be written in the form [usin g Eqs.(4.5) and (4.10)]:

Page 97: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

88 MONT E CARLO MODELING

Figure 6.6. BS yiel d vs , ta n (<f> 0/2).

Love et al. (1977) reasoned that since, from the form of the Bethe equation, thevariation o f (EQ/E) i s substantially independent of atomic number, the backscatter-ing coefficient T ) must depend only on the value of tan (cj> 0/2). As shown in Fig. 6.6 ,this assumption is correct. Using the code of Chap. 4, we find that the backscatteringcoefficient t ) depends o n the valu e of ta n (4>o/2 ) i n a monotonic fashio n bu t i s t owithin statistica l error independent o f the atomic number and density o f the targetand o f th e electro n energy . Fro m a curv e fi t o f th e dat a i n Fig . 6,6 , w e fin d th erelation:

These coefficients diffe r slightl y from thos e originally given by Love e t al . (1977)and quoted in Eq. (4.7) because of the effect o f the small angle-scattering correctionincluded in our program [Eq . (4.10)] . To obtain the necessary estimat e of TI , we cannow us e the Hunger-Kiichler relation [Eqs . (6.4 ) t o (6.6) ] discussed above . Give nthe atomic number of the target and the beam energy E, this gives us the value of TIand hence of tan (4>o/2). This value can now be used in place of the original estimate[Eqs. (4.6 ) an d (4.8)] , wit h the advantag e tha t the backscatterin g coefficien t pre -dicted by the Monte Carlo program will vary correctly with incident beam energy. Itshould be clear that this Hunger-Ktichler-Love-Cox-Scott (HKLCS) model is not aradical revisio n o f th e plura l scatterin g schem e bu t simpl y th e replacemen t o fDuncumb's one-parameter fi t to the minimum scattering angle [Eqs. (4.4), (4.8), and(4.9)] with a more comple x fit.

To incorporat e thi s modificatio n int o th e plura l scatterin g code , i t i s onl y

Page 98: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRON S 8 9

necessary to replace one procedure (hence the value of writing the code in a modularfashion). The revised procedure listed below replaces the original procedure of thesame name and implements Eqs. (6.4) , (6.5), (6.6), and (6.8). It is stored on the diskas HKLCS.PAS. To replace the old procedure wit h the new one using the TURBOPASCAL editor, g o into EDIT mode and load PSJVIC.PAS; then scroll through theprogram until the start of the procedure Rutherford—Factor . Type (Control K R) anda smal l window wil l appea r askin g for a file name . Typ e in HKLCS(return) . Thisblock of code will then be read in from the disk and be placed at the cursor position.Now delet e the old procedure an d recompile th e program.

Procedure Rutherford—Factor;

{computes the Rutherford scattering factor for this incident ener-

gy using the Love, Cox, Scott model and the Hunger-Kiichler back-

scatter equation}

var hkbs,hkc,hkl,hkm:extended;

begin{compute the Hunger-Kuchler backscattering coefficient}}}

htan:=0,1382-0.9211/sqrt(at_num) ;hkl: = ln(a t_num);hkc:=0.1904-0.22236*hkl+0.1292*hkl*hkl-0.01491*hkl*hkl*hkl;

hkbs : =hkc*power (inc_energy' hkm) ;

[now compute the Love, Cox, Scott parameter from Eg. (6.8)}

rf : =0.016697 + 0. 55108*hkbs-0.96777*hkbs*hkbs+l.8846*hkbs*hkbs*hkbs;r f : =rf*inc_energy;

end;

Figure 6. 7 plots the backscattering coefficient , computed using this version ofthe plural scatterin g program , fo r carbon, silver , and gold a s a function o f inciden tbeam energy . Th e variatio n o f T ] wit h energy i s clearly eviden t below 1 0 keV, theyield fo r carbon risin g a s the energy fall s whil e that for silve r remains essentiall yconstant and that for gold falls, ultimately to a value lower than that for silver. Thepredicted value s agre e wel l wit h the dat a plotte d i n Fig. 6.5 except a t the lowes tenergies, where the Hunger-Kiichler fit is probably inaccurate. Althoug h this revisedmodel i s not a substitute for the mor e accurat e Mot t scatterin g cros s section , i t isoften a sufficiently goo d approximatio n to make the use of the more complex Mottmodel unnecessary . A n additiona l advantag e o f thi s approac h i s that , sinc e a nestimate fo r th e backscatterin g coefficien t i s produced o n th e basi s o f th e atomi cnumber o f th e targe t fro m th e Hunger-Kiichle r model , w e coul d us e Eq . (6.1)

Page 99: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

90 MONT E CARL O MODELIN G

Figure 6.7. compute d variatio n o f BS yield wit h energy i n HKLCS model .

directly to treat the case of a multicomponent material. Without coding this examplein detail , the procedure would be a s follows :

Get the number n_comp of components in the compound

For i = 1 to n_comp

Get atomic number Z[i]

Get corresponding concentration c[i]

Calculate BS coefficient % from Egs. (6.4) through (6.6)

Next i

Calculate mean BS coefficient as S^iii

Find Rutherford factor from equation 6.8

6.3 Predictions of the Monte Carlo models

We can now investigate some of the predictions tha t the Monte Carlo models makeabout the properties o f backscattered electrons . Thes e ar e parameters o f the back -scattering tha t are not, in either a direct o r a hidden way , built into the models wehave developed .

6.3.1 Variation of ^ with angle of incidence

The plural scattering models allow us to input the angle of incidence of the electro nbeam relative to the surface normal of the specimen. We can therefore calculate howthe magnitude of the backscattering coefficient varie s with the specimen tilt . Figure6.8 show s som e dat a fo r iron compare d wit h an experimenta l measuremen t (My -klebust e t al. , 1976 ) for Fe—3.2% Si . In both cases th e backscattering coefficien tT](0) at some angle 0 is normalized by the corresponding backscattering coefficien tat normal incidence T|(0) , and the calculated and experimental data as obtained fo r

Page 100: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRON S 9 1

Figure 6.8. Experimental an d computed variatio n o f BS yield wit h tilt .

an incident energy of 30 keV. It can be seen that the amount of backscattering rise srapidly as the angle o f incidence i s increased, wit h both the experimenta l an d theMonte Carlo data showing an increase o f around 50% for a tilt angle of 45°, whilefor a tilt of 60°, the backscattering double s in magnitude. These number s will varysomewhat with both the incident beam energy and the atomic number of the target,although th e genera l for m o f th e Ti(0)/^(0 ) variatio n remain s fairl y clos e t o tha tillustrated i n Fig. 6. 8 except fo r the higher atomic numbers (Z > 50 ) and for lowenergies (E < 3 keV). The examination of such phenomena b y running a series ofsimulations is an excellent way of becoming familiar with the use of a Monte Carlomodel. Simila r calculations can, of course, be performed with the single scatterin gmodel, but the relative slownes s o f this model makes obtaining a sufficiently goo dstatistical accuracy a rather tedious affair. The actual data obtained ar e close to thoseof the plura l scatterin g approximation .

6.3.2 Energy distribution and mean energy of backscattered electrons

The energ y distributio n o f th e backscattere d electrons , o r a t leas t thei r averag eenergy fo r a given set of conditions, is an important parameter, becaus e the outputfrom a backscattered detecto r depend s o n both the numbe r o f backscattered elec -trons (i.e., the value of -n) and the energy of these electrons. Any measurement o f thebackscattered signa l is therefore a convolution o f the backscattering yiel d an d theenergy distribution from th e sample, and consequently there wil l not be, in general,a simple relationship betwee n thi s signa l an d the atomic number of the target. Theenergy distribution and mean energy can readily be found by modifying th e back-scatter and display_backscattering procedures in the plural scatteringmodel. W e simpl y not e o n whic h ste p ( 1 t o 50 ) o f th e trajector y th e electro n i s

Page 101: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

92 MONT E CARLO MODELING

traveling whe n i t i s backscattered an d ad d 1 to th e & th box o f a n array bs_e [ ] .Since the energy for all electrons on the k-th step is the same, i.e., E[k], the averagebackscattering energ y wil l be :

because the total number of electrons backscattered i s bk_sct. The modified proce-dures below implement these steps and plot the mean-energy value on a thermome -ter scal e a s a percentage o f the inciden t bea m energy .

Remember: ad d to the va r lis t at the top o f the program th e entry:bs_e:array[l . . 50] of integer ;

Procedure back—scatter ;{handles specia l case of a backscattered electron}

beginbk_sct: =bk_sct + l; {ad d one to counter}

num: =num+l; {ad d one to total}

bs_e[k] :=bs_e[k]+1; {electron backscattered at k-th step}

xyplot (y , z , yn, 99 ) ; {plot BS exit}

end;

Procedure display—backscattering;

{draws a thermometer to display the backscattering coefficient and

another to indicate the mean energy of the backscattered elec-

trons}

label hang;

var a,b,c,k:integer;

mean—energy:extended;

begin

a: =GetMaxX-180; {adjust to suit your screen}

b:=bottom+23; {ditto}

c:=20; {ditto}

OutTextXY(a,b-8,"0 . . . . 0.25 . . . 0.5 . . . 0.75");

QutTextXY(a+18,b+5,"BS coeff ic ient" ) ;Line (a ,b, trunc (a+(bk_se t / t ra j—num) *220 ) ,b) ; {dra w it }

{now compute the mean backscattering energy value}mean—energy: =0; {initializ e th e value}

Page 102: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRONS 93

for k:*=l to 5 0 d obegin {add up number at step k*energy at step k}

mean—energy: =mean_energy+E[k] *bs_e[k] ;end;

mean—energy : =mean_energy/bk—set; {averaged overtotal BS]

{draw a thermometer to plot up this data value }

OutTextXY(c,b-8, ' 0 %....................................50%..................................1000%) ;;OutTextXY(c+2,b+5,'% of incident energy');

line (c, b, c + trunc (165* (mean—energy/ inc

—energy) ) ,b) ;{{{{draw itn in }

hang:

if (not keypressed) then goto hang; {freeze dis-

play on screen}

CloseGraph; {shut down the graphics unit}

end;

Figure 6. 9 plot s th e valu e o f mean-energ y a s a functio n o f th e atomi cnumber for 1 5 keV incident electrons, showing that as Z increases, the value climbssteadily from carbon to gold. These values are seen to be in good agreement with theexperimental data measured by Bishop (1966). From a curve fit of the Monte Carlodata, we can express the value of mean-energy as :

mean-energy = £ 0[0.55612 + 3.163*1Q- 3*Z - 2.0666 * IQ-^Z2] (6.10 )

Figure 6.9. Variatio n o f mean BS energy wit h Z.

Page 103: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

94 MONTE CARL O MODELING

Figure 6.10. Compute d energy spectr a o f backscattered electrons .

This variation is significan t because backscattered detector s usuall y respond mor eefficiently t o electrons of higher energy; therefore, as we move through the periodictable, the output from the detector will increase both because of the higher backscat-tering coefficien t an d because o f the highe r average mean energy. The reason fo rthis variation in mean energy can be seen by plotting the histogram of the bs_e [k ]array, computed above , which measures the number of backscattered electron s a teach trajector y ste p k. As show n in Fig. 6.10 , whic h plots dat a for E0 = 1 5 keVbeam energy, for carbon this histogram is more or less symmetrical about the energy0.5£0; but for copper, the maximum in the curve has shifted upward in energy, whilefor gol d the curv e has no maximum but increases monotonicall y a s the backscat -tered energ y approache s th e bea m energy . Th e for m o f th e energ y distributio npredicted b y th e Mont e Carl o simulatio n i s i n generall y goo d agreemen t wit hexperimental dat a (Bishop, 1966 ; Mykelbus t et al., 1976 ) except fo r the top end ofthe distribution close to the incident beam energy, where the number of backscat -tered electrons is overestimated somewhat . These particular electrons ar e those thatare scattere d i n a singl e high-angl e even t clos e t o th e entranc e surface , an d th escattering o f suc h electrons i s accurately described onl y by the Mot t cross sectio nrather than by the screened Rutherfor d model use d here. However, sinc e these areonly a smal l fractio n o f th e tota l numbe r of backscattere d electrons , th e erro r i sinsignificant.

Although we will not pursue it here, this same code fragment ca n also be usedto estimate the information depth of the backscattered electrons—tha t is, the depth

Page 104: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRONS 95

beneath the surface reached by an electron before it is backscattered. If an electron isbackscattered o n the k-th step, then the maximum possible dept h to which it couldhave traveled beneath the surface is k*step, wher e step is the step length in thesimulation, whic h i s usuall y one-fiftiet h o f th e Beth e range . A n analysi s o f th ebs_e [k ] distributio n therefore provides an upper bound on the information depthin th e backscattere d image . Typicall y thi s i s abou t 0. 3 o f th e Beth e range . Th eprogram JustBS on the disk incoporates thi s and the other modifications discussedabove to give a detailed mode l of the backscattering effect , includin g an estimate ofthe surface area fro m whic h the electrons ar e emitted .

6.3.3 Variation of backscattering with density

In addition to comparing th e predictions o f our simulations with experimental data ,we ca n us e th e Mont e Carl o mode l t o predic t effect s tha t migh t no t b e easil yobservable although they might also be important. A n example o f such an applica -tion i s t o as k the question : "Ho w doe s th e backscattering coefficien t o f a sampl evary with density?" This question is of particular interest because of attempts to usethe backscattered signal as a means o f performing chemica l composition analysis.While suc h a method might wor k for a homogeneous material , i t seems natural toask whether changes i n the densit y o f the target , cause d perhaps b y differen t pro -cessing methods , might not lead to a systematic error. Running the plural scatterin gsimulation for coppe r a t 1 5 keV, leaving al l of the physical parameter s unchange dexcept for the density and using 5000 trajectories for each value, produces the datashown i n Fig. 6.11 . To within th e statistical error of the simulation, it can be seen

Figure 6.11. Compute d variation of BS yield with sampl e density.

Page 105: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

96 MONT E CARL O MOD

that changing the density over a wide range of values does not change the backscat-tering coefficien t fo r a n otherwis e homogeneou s material . W e also fin d tha t th emean energy o f the backscattered electrons , althoug h not plotted, is independent o fthe density . While a t first sigh t i t might seem tha t this result is counterintuitive, anexamination of the equations in Chaps. 3 and 4, which determine electron scattering ,shows that the density appear s onl y in the stopping power equation . Consequentl yvarying the density changes onl y the Bethe rang e o f the electrons , an d this wouldnot be expected t o have an y effec t o n t) . If , however, the materia l i s no t homoge -neous bu t contain s region s o f differen t density , change s migh t b e expected ; thi ssituation i s examined late r i n this chapter.

6.3.4 Variation of backscattering with thickness

A final demonstration of the models is to use them to compute how the backscatter -ing coefficient migh t vary with the thickness of the target. Clearly, if the specimen isvery thin , then the amount of backscattering i s small ; while for a sufficiently larg ethickness a t a given inciden t energy, the backscattering coefficient should be con -stant. Our interest her e i s to simulate the variation of i q betwee n these two limitingconditions and to compare thi s with experimental data. It is immediately clear that,in this case, we cannot use the plural scattering approximation because, as discussedin Chap . 5 , the granularit y o f thi s mode l i s prese t t o b e one-fiftiet h o f th e Beth erange. When the target is a thin foil, eac h step of the plural scattering mode l wouldbe a substantial fraction of the thickness of the foil and the quality of the approxima-tion would be very poor. Instead, w e must use the single scattering model, becausethe ste p lengt h her e i s o f th e orde r o f th e elasti c mea n fre e pat h (e.g. , a fe wnanometers at 10 keV), and is thus much smaller than the thickness being modeled .Figure 6.12 plots the predicted backscattering coefficien t o f films of carbon, copper ,and gold a s a function o f their thickness a t an incident bea m energy of 1 5 keV. Forconvenience i n comparison, the thicknesses i n each cas e have been expresse d a s afraction o f the appropriate Bethe range RB calculated from Eq. (4.1). The backscat-ter yield varies almost linearly with the specimen thicknes s (Niedrig, 1982 ) right upto the point where the backscattering yield reaches it s "bulk" value. The thickness atwhich thi s occurs , however , varies significantl y fro m on e materia l t o another , a swould be expected fro m a n examination o f the interaction volume s pictures shownin Fig. 4.4 . I n carbon, th e scattering o f the electrons is weak, giving a n interactio nvolume tha t hang s lik e a teardro p downwar d from th e entranc e surface . Conse -quently th e specime n ha s t o b e almos t 0. 5 RB thic k befor e th e backscatterin gsaturates. In the case of gold, the electrons ar e strongly scattered, givin g an interac-tion volume that is squashed up against the surface. As a result, the backscatterin gyield reaches it s bulk value a t only abou t 0.1 RB. Since th e Bethe range in gold i sonly a small fraction of that in carbon, thi s shows that the information depth o f the

Page 106: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRONS 97

BS Yield v s Thickness

Figure 6,12. Variatio n of BS yield wit h specime n thickness .

BS signal, (i.e., the extent of the volume sampled by the backscattered electrons) ismuch less in gold than in carbon.

6.4 Modeling inhomogeneous materials

So far every application o f Monte Carlo modeling w e have considered assume s thespecimen to be a infinite half-plane of uniform composition . I n practice, o f course,samples o f suc h a restricted natur e are o f little interest , sinc e i n the real worl d ofmicroscopy our specimens are finite in size; have edges, shape, and surface topogra-phy; and show wide variations of chemical compositio n fro m on e point to another.Fortunately, Mont e Carl o simulations , whic h track th e electron ste p by ste p a s i tmoves through the specimen , are ideally suite d to this type of situation, so we cannow start to develop the necessary tools to model such systems. In the simplest case,the sample might consist of a layer of material 1 on top of a substrate of materials 2.If the depth of the interface between these materials occur s at a depth boundary,we can then determine which material the electron i s in by testing the value of z .

Page 107: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

98 MONTE CARLO MODELING

{the sample consists of two materials i = l and i = 2}

i:=l; {reache s to player first}

if z>=boundar y the n i :=2 ;

The program below implements this example of a thin film on a substrate toillustrate how the original program of Chap. 4 is modified to deal with two mate-rials. In order to save space, functions and procedures that have been discussedalready, either in this chapter or earlier chapters, are not listed but simply identifiedas required. A further generalization to three or more materials, or to the situationwhere a single scattering model is required, is a simple matter; a program of thistype is given in the chapter on x-ray generation.

Program BINARY;

{this code performs a plural scattering Monte Carlo trajectory

simulation for the case where a layer of material A is placed on

top of a bulk substrate of some other material B. There is no

graphical display in this program}

{$N+} {turn on numeric coprocessor}

{$E+} {install emulator package}

uses CRT, DOS; {resources required}

label back—scatter,abort;

const two_pi = 6.28318; {2 constant}

var

inc_energy,boundary,tilt,s_tilt,c_tilt:extended;

nu, sp, cp, ga, an, an__m, an_n: extended;

x,y,z,xn,yn,zn,ca,cb,cc,ex,cy,cz,vl,v2,v3,v4:extended

E:array[l . . 2,1 . . 51] of extended;

at_num:array[1 . . 2] of extended;

at_wht:array[1 . . 2] of extended;

mn_ion_pot:array[1 . .2] of extended;

m_t_step:array[1 . .2] of extended;

density:array[1 . .2] of extended;

step:array[l . . 2] of extended;

rf:array [1 . .2] of extended;

bk_sct,num,traj_num,i,k:integer;

Function power(mantissa,exponent:real):extended;

Function stop_pwr(i:integer;energy:extended):extended;

{calculate stopping power for material i using Eg. (3.21)}

var temp:extended;

Page 108: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTER

begin

if energy<0.05 then (to avoid problems as energy goes to zero]

energy:=0.05;

temp:=ln((1.166*energy+0.85*mn_ion_pot[i])/mn_ion^>ot[i] ) ;

stop_pwr: =7.85E4*at_num[i]*temp/(at_wht[i]*energy) ;

end;

Procedure ranged: integer) ;

{calculates range assuming Bethe continuous energy loss}

var energy,f,fs,bethe—range:extended;:

1,m:integer;

begin

fs:=0.; {initialize variable to be sure}

for m:=l to 21 do {siinpsons rule integration}

begin

energy: = (m-1)*inc_energy720;

f : = 1/stop_pwr(i,energy);

1:=2;

if m mod 2 = 0 then 1:=4;

if m=l then 1:=1;

if m=21 then 1:=1;

fs:=fs+l*f;

end;

{now use this to find the range and step length for these condi-

tions}

bethe_range: = fs*inc_energy/60 . 0; {i n g/'cm2}

m_t_step[i] : =bethe_range/50.0;bethe_range: =bethe_range*10000.0/density[i] ; {i n mi -crons}

GoToXY(40*( i - l ) +1,13) ; {displa y 1 o n LHS, 2 on RHS of screen}

writelnl 'Range in ' i , 'i s bethe_range:4:2 ' 'microns ' ) ;

step[i] : =bethe_range/50 . 0 ; {uni t ste p o f simulation}

end;Procedure profile(i : integer) ;

{compute 50-ste p energy profile for electron beam}

var A l ,A2 ,A3 ,A4 ,em: rea l ;m:integer;

begin

9 9

Page 109: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

100 MONTE CARLO MODELING

E [ i, 1 ] : = inc_energy ;for m : = 2 t o 5 1 do

begin

Al: =m_t_step[i]*stop_pwr(i , E[i ,m-l] ) ;

A2 :=m_t_step[i] *stop_pwr (i , E [ i ,m-l] -A l /2) ;

A3 :=m_t_s t ep [ i ]*s top_pwr ( i ,E [ i ,m- l ] -A2 /2 );

A4:=m_t_s tep[ i ]*s top_pwr( i ,E[ i ,m- l ] -A3) ;

E [ i , m ] : = E [ i , m - l ] - (A l +2*A 2 +2*A 3 + A 4 J / 6 . ;

end;E [ i , 5 1 ] : = 0 ;

{now smooth thes e profiles out a little bit}

for m : = 2 t o 5 0 d obegin

E [ i , m ] : = ( E [ i , m ] + E [ i , m + l] } /2 . ;end;

end;

Procedure Rutherford—Factor(i:integer);

{find the screened Rutherford scattering parameter b using the

HKLCS method}

var hkbs,hkc,dum,hkm:extended;

begin

hkm: = (0.1382 - 0.9211/sqrt(at_num[i] ) ) ;

dum: = In (at_num [ i ] ) ;

hkc:=0.1904-0.2236*dum+0 .1292*dum*dum-0.01491*dum*dum*dum;

hkbs : =hkc*power (Inc_Energy,hkm) ;

{then the scattering factor for material i is}

rf [i] : =0.016697 +0.55108*hkbs-0.96777*hkbs*hkbs

+1.8846*hkbs*hkbs*hkbs;

end;

Procedure set—up—screen;

{gets necessary input data to run the program}

begin

ClrScr; {tidy up the display screen}

Page 110: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED

GoToXY (25,1) ;

Writeln('*A on B MC Simulation in Turbo Pascal*');{Having set up the screen now get input data}

GoToXY(1,5);

Write ('Input beam energy in keV ) ;Readln(Inc—Energy);

GoToXY(1,7);

Write('Boundary depth (microns)');Readln(boundary);

GoToXY(1,9);

Write('Tilt angle in degrees');readln(tilt);

s_tilt: =sin(tilt/57 .4) ,- {convert degrees to radians]c_tilt:=cos(tilt/57.4) ;

ClrScr; {again-to set up for two column input of data}

for i:=l to 2 do {get materials data}begin

if i = l then {surface layer}beginGoToXY(1,5);writeln('Surface Layer');

endelse {we are in the substrate}

begin

GoToXY (40,5);

writeln('Substrate');end;

[now get the materials information that is needed}

GoToXY(40* (i-1) +1,7) ,- {LHS of screen for 1 = 1, KHS for 1 = 2}

Write('.. .. ..Atomic Number ig');Readln(at—num[i]);

GoToXY(40* (i-1) +1,9) ;

Write('. . . . . Atomic Weight is');Readln(At_wht[i]);

GoToXY(40* (i-1) +1,11) ;

Write ( ' . . . . . density in g/cc is');

Readln(Density[i]);

{Calculate th e Berger-Selze r Mean ionization potential inn_ion_pot }

mn_ion_pot[ i ] :=(9 ,76*at_num[i] + (58.5/power(a t_ n u m [ i ] , 0 . 1 9 ) ) ) * 0 . 0 0 1 ;

101

Page 111: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

102 MONTE CARLO MODELING

{now get the Rutherford factor b using the HKLCS method}Ruther fo rd—fac to r ( i ) ;

[now get the range and step length in microns for these conditons}

range ( i) ;{and calculate a 50-step energy profile E[i,k] using this result]

p r o f i l e ( i ) ;

end; {of the input loop}

{get the number of trajectories to be run in this simula-

tion}

GoToXY(18 ,15) ;

write("Number of trajectories required");

readln(traj_num);

{and set up the display for output of data}

GoToXYfl,16);

GoToXY(1,17);

writeln('Number of trajectories');

GoToXY(40,17);

writeln('Backscattered fraction');

end;

Procedure init_counters;

Procedure reset-coordinates;

Procedure p_scatter(i:integer);

{calculates scattering angles using plural scattering model of

Chap. 4}

begin{call the random number generator function}

nu:=sqrt (RANDOM) ;nu: = ( ( l / n u ) - 1 . 0) ;an: =nu*rf [ i ]* inc_energy/E[ i ,k];

{and use this to find the scattering angles}sp: = (an+an) / (1 + (an*an ) ) ;cp := ( l - ( an*an) ) / (1 + (an*an ) ) ;

writeln

Page 112: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRONS 103

{and the azimuthal scattering angle}ga: =two_pi*RANDOM;

end;

Procedure new_coord(i:integer);

{calculates new coordiantes xn,yn,zn from x,y,z and scattering an-gles}

begin{the coordinate rotation angles are]

if cz = 0 then cz:=0.000001;

an_m:=-cx/cz;

an_n:=1.0/sqrt(1+(an_m*an_m) ) ;

{save computation time by getting all the transcendentals first]vl: =cos(an_m)*sp;

v2:= cos(an_n)*sp;

v3 : =cos (ga) ;

v4 : =sin (ga) ;

{find the new direction cosines}

ca =(cx*cp) + (vl*v3) + (cy*v2*v4);

cb =(cy*cp) + (v4*(cz*vl - cx*v2));

cc =(cz*cp) + (v2*v3) — (cy*vl*v4);

{and get the new coordinates—using the appropriate step}xn =x + step[i]*ca;yn =y + step[i]*cb;zn =z + step[i]*cc;

end;

Procedure**

s

set_up_screen;

init_counters;

randomize; {reseed random number

generator}{

*

this is the start of the main program

Page 113: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

104 MONTE CARLO MODELING

}

while num < traj_num dobegin

reset—coordinates;

for k:=l to 50 dobegin

{first find out where the electron is now i = l or 2. In thesimplest case this is done by checking whether or not theelectron z coordinate places it below the boundary layer}

if z>=boundary then i:=2else

i:=l;{in other situations a different test would be inserted here}

{now allow the electron to be scattered}p_scatter(i) ;new_coord(i);

{test for electron position within the sample}if zn< = 0 thenbeginbk_sct:=bk_sct+l;num:=num+l;goto back—scatter;

endelse

reset_jiext—step;

end; {of the 50-step loop}

num:=num+l; {add one to the trajectory total}back—scatter; {end of goto branch for BS}

{update the screen displays}GoToXY(25,17);writeln(num); {display trajectory total}GoToXY(65,17);writeln((bk_sct/num):4:3); {display BScoefficient}

{to escape from the program press any key}if keypressed then goto abort;

{

*

Page 114: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRON S 10 5

}end; {of the Monte Carlo loop}

abort: {escap e from the program}GoToXY(21 ,21 ) ;

wr i t e ln l ' . . . htat 's al l f o l k s ' ) ;readln; {freeze the display}

end.

6,5 Notes on the program

The program starts in the same way as for the previous examples b y setting up thepragmas that select the use of the math coprocessor o r the emulator package. Sinc ethis program does not generate any graphical display, the uses declaration include sonly th e call s fo r th e function s CR T and DOS, which ar e required . Th e variabl edeclaration sectio n resemble s tha t use d befor e bu t wit h a n importan t difference .Instead o f there being a single valu e of , for example, the atomic numbe r at_wt,there wil l now be one of two possible value s depending on where within the targetthe electron i s situated. Therefore the original singl e value of at_wt i s replaced byan arra y o f at_wt values . I n th e notation use d i n PASCAL, w e indicate thi s bywriting at_,wt [ i ] t o represent th e i-th value of at_wt. W e must thus modif ythe list of variables in the program to indicate that at_wt, den s i ty, o r any ofthe other specimen parameter s ca n take two (or more general example s ri) differentvalues. The VAR table would then contain entrie s suc h as:

at_wt:array [1 . .4] of extended;

at_num:array [1 . .4) of extended; {and so on for every variablethat changes}

where the [ . . .] brackets indicat e th e number of the firs t an d last members o f thearray and specify what type of variable it is f Not e that in PASCAL we must specifyan actual number of members of the array; this cannot be done in terms of anothe rvariable. Having now done this, we must also indicate to the various PROCEDURE Sand FUNCTIONS that use these variables which of the n values they are to use. Wedo this by passing a parameter to the procedure, which tells it which particular valueto use . In eac h case , wher e i n Chap . 4 w e ha d a single-value d variabl e (e.g. ,density), we now have one specific value taken from the array of possible valuesdensityD'[. The value of / to be used is passed to the procedure or function a t thetime that we call it; therefore, instea d o f calling profile t o calculate th e energyprofile E[k], w e cal l profile!)' ] t o tel l i t t o calculat e th e profil e fo r th e /-t hmaterial b y substituting the appropriate value s of stopping_pwr, m_t_ste petc. One assumption in this program is that E[l,k] * » E[2,k]', i n other words, that the

Page 115: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

106 MONT E CARL O MODELING

instantaneous energy of the electron depend s onl y on the number of the trajectorystep k and not on the actual material. This approximation is, in fact, closely correct ,because—from th e form o f the Bethe equation—the instantaneous energy depend sonly on the fraction of the Bethe range traveled and not significantly on the atomicnumber of the materia l itself.

The rest of the program then follows closely on the original version given inChap. 4 except that we now test at the top of the loop which of the two materials theelectron i s in , /=! o r i=2, befor e computin g th e scatterin g angle s an d findin gthe new coordinates . Becaus e w e are not trying to display these dat a visually , theprocedures fo r graphics setup and plotting are missing, and if you run this program,you will notice how much faster it performs than the earlier version . While picturesof th e trajectorie s ar e interestin g an d quit e ofte n helpful , the y ar e ver y time -consuming t o produce because of the large time overhea d required in calculatingplotting coordinate s an d drawin g th e scree n displays . Therefor e the y shoul d b eomitted i f not strictl y necessary.

Figure 6.13 shows an application of this program t o the case o f a thin carbo nfilm o n to p o f a gold substrat e a t 1 0 keV. Since w e ar e usin g a plural scatterin gmodel here , th e dat a wil l no t b e reliabl e fo r fil m thicknesse s les s tha n abou t athousand angstroms (i.e., three or four trajectory steps), but the trend is clear (Hohnet al. , 1976) . A t lo w fil m thicknesses , th e backscattering coefficient i s essentiallythat of gold; this then decreases wit h film thickness , eventuall y falling to the value

Figure 6.13. Variatio n of B S yield from thi n carbon fil m o n gold a t 1 0 keV.

Page 116: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRONS 107

appropriate fo r bul k carbon. Th e fil m thicknes s a t whic h thi s occur s i s abou t thesame as that for which an unsupported thin film of carbon attains its bulk scatteringvalue (see Fig. 6.12). This thickness i s an estimate for the "depth of information" inthe backscatter image at this beam energy (i.e., the maximum distance beneat h th esurface a t which we could deduce—fro m informatio n in th e B S image—that th esample was not soli d carbon) . Several othe r applications of this type of multilayerprogram are considered late r in this book—for example, in the chapters on electronbeam induced charge (EBIC ) and x-rays.

Depending on the problem, it is sometimes adequate to test the end point zn ofa trajectory step to see which part of the specimen it is in, but in other cases cases itmay b e better t o fin d th e midpoint of the step and test that instead :

z_mid: = ( z + z n ) /2 ;if z_mid>=dept h the n i :=2 ;

The firs t approac h i s quicker , bu t th e secon d makes mor e use o f the dat a in thesimulation an d i s les s likel y t o caus e problem s an d confusio n when complicate dgeometries are being considered. Car e must also be taken to properly error-trap thetest function; fo r example, if the electron i s backscattered zn<0 , then the resultantvalue of z_mid may be negative and lead to a problem. The safes t procedure is todeal wit h the specia l cases o f backscattering and transmission before othe r condi -tions ar e tested for. Finally, i n any case where the regions bein g considere d i n theproblem are small in size compared to the Bethe range, the single scattering mode lmust be used to avoid errors .

For complicated geometries, the problem of specifying the region of the samplei i n whic h th e electro n i s movin g als o become s mor e comple x becaus e i t wil linvolve all three o f the coordiantes rather tha n just the z axis. The obvious way totackle the problem is to apply a string of suitably structured i f . .. the n tests tomake the decision. Fo r example,

if x_mid<right_hand_edg e an d y_mid>back_sid ethen i := 2 els e

if z>botto m the n i := 3else i : =1;

etc. but this is cumbersome and slow, as these tests have to be made on every step ofevery trajectory . For a completely arbitrar y geometry, however , suc h as a randomsteps on a surface, this is the only available way. One alternative is to divide up theentire volume of interest into an array of cubes of a size comparable with or smallerthan the expected step length and then to apply the sor t o f test described abov e topreassign a value of i to each elemen t o f the arra y and store it, s o that, given thecoordinates o f the electron, the correct valu e of / can simply be looked up. This i s

Page 117: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

108 MONTE CARLO MODELING

fast and quite general but requires very large arrays of data in all except the simplestcases (Joy, 1989a).

In one special case, however, there is a simple and elegant solution to thisdifficulty. If each of the regions of interest in a material is a closed volume that canbe described by an equation of the form f(x, y, z) = 0, then we can immediatelydetermine whether any given point p, q, r is inside, on the surface of, or outside thevolume by evaluating/(p, q, r). lff(p, q, r) < 0, then the point is inside the volume;if/(p, q, r) = 0, then the point is on the surface; and i f f ( p , q, r) > 0, then the pointis outside. For example consider the case of a sphere, radius r and centered at thecoordinates (0, 0, Zc). We can find whether or not the point (x, y, z) is inside oroutside the sphere by a simple PASCAL function, which can be called simplyOutside.

Function outside(xv,yv,zv:extended):Boolean;

{tests whether or not the electron at xv,yv,zv is inside or out-

side the sphere of radius r centered at 0,0, Zc}

var dum:extended;;

begin

dum:=xv*xv + yv*yv + (zv-Zc)*(zv-zc) — r*r;

if dum< = 0 then outside : =false

else

outside:=true;

end;

The start of the Monte Carlo loop in the program above would then be modified toread

while num < traj_num do

begin

reset—coordinates ;

for k:=l to 50 do

begin

{first find out where the electron is now-i=2 inside sphere

or i = l outside the sphere}

if outside (x,y,z) then i:=l

else

i:=2;

etc.

remembering that an if .(test) . . then statement is carried out if the test istrue (or is a function that evaluates to a positive number).

Figure 6.14 shows some data obtained from this version of the program. The

Page 118: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRON S 109

Figure 6.14. B S yield across a 0.25-(xm copper spher e in carbon a t 1 5 keV.

matrix of material was carbon, containing a copper spher e 0.2 5 jji m in radius, andthe incident beam energy was 15 keV. The program was set to calculate the variationof r\ wit h th e position o f the bea m relativ e t o th e cente r o f the sphere—which ,because of the cylindrical symmetry of the problem, we need only do along a singleradius. An additional loop was therefore inserted into the program to move the valueof the starting y coordinate o f the beam from 0 to some maximum value y_jnax. i nsuitable steps . The data of Fig. 6.14 show how the apparent backscattering coeffi -cient varies with the position of the beam an d the depth of the sphere . W e see thatfor Zc > 1. 0 (Jim, or about one-third the Bethe range, the sphere is not visible, so the"depth of information" in this case is about 1 |j,m. As the sphere is brought closer tothe surface, it s visibility increases an d its apparent width changes, the full widt h athalf maximum of the profile being 0.25 (x m when the sphere is at a depth of 0.7 (x mbut 0.4 n,m wide when the sphere is at 0.35 (x m depth. These values for the apparentwidth of the image are interesting because they indicate the sort of spatial resolutionthat can be achieved in the backscattered image mode. On a simple basis, we mightexpect tha t the apparen t siz e would be o f the orde r o f the actua l diamete r o f th esphere plus a term to account fo r the beam interaction volume. However, as we see ,the measured size is always less than the actual size. This is because the mere factthat an electron reaches th e copper sphere does not guarantee that it will be back-scattered b y it , sinc e i n orde r t o escape , th e electro n mus t firs t trave l throug h asignificant amoun t of the carbon matrix. When the sphere is deep or on the periph-

Page 119: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

110 MONTE CARLO MODELING

ery of the interaction volume, the electrons reaching it are already low in energy andhave little chance of reaching the surface even if scattered directly toward it.

This method of testing the position of the beam relative to a closed surface iscertainly a special case, but it is not as restrictive as it might at first appear, becausea sphere can be generalized into an ellipse (i.e., the equation becomes of the formax2 + by2 + cz2 - d), which can then, by an appropriate choice of major and minoraxes, be turned into a disk or a plate in any chosen orientation. A search throughbooks on analytical geometry will also reveal a few other closed surfaces (oreffectively closed, as in the case of a hyperbola) that might also prove useful.

A case of some practical importance occurs when the surface encloses notanother material but a vacuum—i.e., when the material contains a void. As canreadily be confirmed, this situation cannot be taken care of by expedients—such asrepresenting the void as being a material of zero atomic number and density—because the stopping power and scattering expressions do not behave properly inthis limit. Instead, we assume that an electron entering the void will neither bescattered nor deposit significant energy but will simply move in a straight line acrossthe void until it once again leaves. Using the notation from the code given above, theprogram would be modified to read

while nu m < traj_nu m d obegin

reset—coordinates;for k:= l t o 5 0 do

begin{fir

or 1=1 outside in the matrix"

if ou t s ide (x ,y , z ) the n i:= lelse

begin {extrapolate previous trajectory step]

go_round_agin:{la£>el for next loop if needed}

xn: =x+step[ l) *cx;yn: =y+step [1] *cy ;

zn :=z+s t ep [ l )*cz ;if outsid e ( x n , y n , z n ) the n {its gone

through}go t o escape d {so leavethis loop}

else {extend the extrapolation}x: =xn;y: =yn; z : =zn; {reset

coordinates}go t o go—round—again ; {and do it

again}

end;

Page 120: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRONS 111

escaped: {label for exit from loop]i :=l ; {remember to reset this on exit]

etc.

While th e programming style will win no prize s because o f it s us e o f go-tostatements, thi s fragmen t o f cod e correctl y handle s th e void . Th e visibilit y an dapparent siz e o f void s behave s i n a n approximatel y simila r wa y t o tha t fo r th einclusions discussed above, except that the absence of a scattering material leads toa fall i n the backscattering coefficient rather than to a rise. For an interesting studyof contras t fro m void s i n th e scannin g electron microscop e (SEM ) usin g Mont eCarlo techniques of this type, see Gasper an d Greer (1974) .

6.6 Incorporating detector geometry and efficiency

A final topic that must be discussed concerns the difference between the computedbackscattering coefficien t and the actua l signal collected i n the SEM by a suitablebackscatter detector . I f the backscatter detecto r were perfect, that is, i f it collectedevery backscattered electron within the 2ir steradians above the sample surface andif ever y electron—regardless o f energy—produced th e sam e magnitude of outputpulse, the signal would be directly proportional to the backscattering coefficient. I ngeneral, this is not the case, and circumstances usually require that the properties ofthe detector be taken into account when a Monte Carlo simulation is being made. Asa rule, the position of the detector must be considered if the specimen to be modeledhas anything other than a flat (i.e., planar) surface and, since all practical backscatterdetectors have an output that varies directl y wit h the energy o f the electron s col-lected, modelin g th e efficienc y o f th e detecto r fo r electron s o f differen t energ y isalways likely t o be useful .

In orde r t o incorporat e th e geometrica l propertie s o f th e detecto r int o th eprogram, i t i s onl y necessar y t o chec k whethe r o r no t an y give n backscattere delectron i s traveling in the right direction to impinge on the detector. If the detectoris assume d t o b e annula r abou t the inciden t beam—i f th e oute r diameter o f th edetector i s R0 and the distance from the detector to the sample is D—then, with thecoordinate conventio n bein g used in this book, an electron wil l be collected i f it sdirection cosin e cc satisfie s the relation

note that the sign is negative because the positive z-direction is defined to be in thebeam direction. Th e code o f Chaps. 4 and 6 would then be modified to read:

if zn< = 0 then

if cc<=—critical—angle then

Page 121: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

112 MONT E CARLO MODELING

beginbk_set: =bk_sct + l;num:—num+1;goto back—scatter ;

end

where critical-angle is set equal to the quantity on the right hand side of Eq.(6.11). I n thi s wa y the characteristic s o f a specifi c backscattere d detecto r ca n b eadded to the simulation by feeding in the values for R0 and D a t a suitable point inthe program. If the detector i s annular but split into two halves or four quadrants, thevalues o f the othe r directio n cosin e component s mus t also be considered . Fo r ex -ample,

if zn< = 0 then

begin

if ( (cc< = — critical angle) and (cb> —0) ) then

detector—A—Signal: =detector_A—signal+1

else

detector—B_signal: =detector_B_signal + 1;

num:=num+l;

goto back—scatter;

end

where for this split detector w e keep separate track of the electrons collected on thetwo halves A and B (remembering firs t to declare and initialize these variables). Theextension o f this code to other mor e complex arrangement s is obvious.

All backscatte r detector s displa y som e energ y sensitivity . Typically, we fin dthat thei r i s som e minimu m energ y Emin belo w whic h the backscattered electro ncreates n o output signal , whil e above Emin a backscatter electro n o f energy E wil lproduce a n output signal tha t varies linearly a s (E—Emin). Th e code for our pluralscatter model s woul d now look somethin g like this :

if ((zn<=0) and (E[i,k]>E_min)) then

begin

if ( (cc< = -critical angle) and (cb> = 0) then

detector—A_signal: =detector_A—signal+ (E[i,k] -E_min)

else

detector_B_signal:=detector_£_signal+ ( E [ i , k ] -E-min) ;num:=num+l;goto back—scatter ;

end

so that the detected signal now depends on the actual energy of the electron collected.Note that the variables detector_A_signal an d detector_B_signal mus t

Page 122: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

BACKSCATTERED ELECTRON S 113

Figure 6.15. BS profile acros s sphere and corresponding detected signal .

now be declared as extended or real rather than integer and that the final resultwill no longer represent th e backscatter yield but instead a scaled representation o fthe actua l signal detected. Figure 6.15 shows the effec t tha t this kind of correctionhas. The datum is one of the traces from Fig . 6.14, but now corrected fo r a detectorthat has an Emin value of 5 keV. The two traces show the variation of the backscat-tered coefficien t an d the outpu t signa l from th e backscatte r detecto r respectively .While th e form s o f th e profile s ar e essentiall y identical , not e tha t th e effec t o fincluding the energy sensitivit y of the detector i s to increase the apparent visibilityof th e coppe r sphere , sinc e th e "peak-to-background " variatio n o f th e signa l i sincreased by about 20%. There is thus no longer a direct proportionality between thebackscatter coefficien t an d the detected backscatte r signal. This is of importance ifthe backscatte r signa l i s being use d fo r chemica l observations , sinc e i t cannot b eassumed tha t th e detecte d signa l and th e emitte d backscatterin g coefficient—an dhence th e mean atomic number of the target—are al l simply related together . Be -cause th e detecto r respond s a s much to change s i n th e energ y o f the electron s i treceives a s it does to their actual number, these two effects convolut e together andcannot simply be separated. Quantitative backscattered imagin g is therefore a diffi -cult activity unless care is taken to account for all of these factors (e.g., Sercel et al.,1989).

Page 123: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

7

CHARGE COLLECTION MICROSCOPYAND CATHODOLUMINESCENCE

7.1 Introduction

Charge collection imaging in the scanning electron microscope , ofte n known by theacronym EBIC (electron beam-induce d current) , has become a widely used tech -nique fo r th e characterizatio n o f semiconducto r material s an d device s (Leamy ,1982; Holt and Joy, 1990). While there is a substantial literature on the use of EBICmethods to measure semiconducto r parameters , suc h a s the minority carrie r diffu -sion length (Leamy , 1982) , the majority o f charge-collected image s are interprete din a purely qualitative manner. Cathodoluminescence (C/L) imaging of semiconduc-tor materials , whic h i s i n essenc e ver y simila r t o EBIC , ha s similarl y bee n use dmostly i n a picture-taking rather tha n a data-producing mode . Th e problem i s notthat there are no good models to explain the image formation but rather that, in orderto provide tractable analytical expressions for the calculation of contrast, it is invari-ably necessary to make significantly oversimplified assumptions about the interac -tion of the electron beam with the specimen. In this chapter, we demonstrate how theMonte Carlo models discussed earlie r can be used to overcome these problems andmake EBIC an d C/L mor e usefu l technique s fo r microcharacterization .

7.2 The principles of EBIC and C/L image formation

When an electron beam impinges on a semiconductor, som e of the energy deposite dby the beam is used to promote an electron fro m th e filled valence band , across theband gap , t o th e empt y o r partiall y fille d conductio n ban d (Fig . 7.1) . Sinc e th evalence band was initially full , th e removal o f an electron leave s behin d a "hole"that has all the physical properties o f an electron bu t carries a positive charge. Foreach electron promoted acros s the band gap, one hole is formed, so it is convenientto conside r th e tw o component s togethe r an d tal k o f a n electron-hol e pair . T ogenerate th e electron-hole pai r requires a n amount of energy esh. Typically, esh isabout three times the energy of the band gap (Table 7.1); so, for example, for silicon,eeh is 3.6 eV. If we assume that all of the energy deposited by the incident bea m ofenergy E0 is ultimately unavailable for the generation of electron-hole pairs , then thenumber o f carrier pair s formed n eh wil l be

114

Page 124: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENC E 11 5

Figure 7.1. Electron-hole pai r generation in a semiconductor .

That is , a 10-ke V bea m inciden t o n silico n coul d produc e 10,000/3. 6 « 280 0electron-hole pairs . Because the electron an d hole have opposite charges , they areelectrostatically attracted and will tend to drift together through the lattice, maintain-ing local electrical neutrality. After onl y a few femptoseconds (10~~15 s), the electronwill fall back across the band gap and recombine with the hole, giving up, as it doesso, some of the energy used to form th e original carrier pair. It is this effect tha t mayresult i n the productio n o f C/ L emission , sinc e th e exces s energ y can be carriedaway by an emitted photon. In any event, within a very short time after the passageof the incident electron , the system has returned to its original state .

Since, unlike a metal, a semiconducto r ha s significan t resistivity, a potentialdifference can be maintained across it, resulting in the generation of an electric fiel dimposed acros s the sample (Fig . 7.2A) . A n incident electron o f energy E0 will , asbefore, produce some number of carrier pairs neh, but now, because the electrons andholes carry opposite charges, the electrons will tend to move toward the positive endof the sample while the holes will drift towar d the negative end. One result of this is

Table 7.1 Electron-hole pair energies

Electron-holeMaterial pair energy (eV)

C (diamond) 13. 1CdS 7. 5CdTe 4. 8GaAs 4. 6GaP 7. 8Ge 3.9 5InP 2. 2PbS 2. 0Si 3. 6SiC 9. 0

Page 125: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

116 MONTE CARL O MODELING

(a)

(b)

(c)

Figure 7.2 . Thre e configurations for charge collection microscopy .

immediately apparent. Before the electron beam is turned on, the amount of currentflowing throug h th e semiconducto r i s ver y smal l o r zero , becaus e ther e ar e n oelectrons in the conduction band and hence there is no way to move charge. But withthe beam striking the specimen, each electron produces neh electron-hole pairs , andthe presence of these free carriers will permit charge to flow. Thus the electron beamhas induce d conductivit y in th e semiconductor . Thi s effec t i s know n a s electro n

Page 126: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENC E 11 7

beam-induced conductivit y (an d s o give s anothe r interpretatio n o f th e acrony mEBIC) or (3-conductivity (Holt and Joy, 1990) . I f the beam is scanned, the resultantconduction signa l can be used to form a n image.

In practice , a mor e interestin g procedur e i s t o generat e th e fiel d internall ywithin the semiconductor. Fo r example, if a semiconductor tha t has been chemicallydoped to make it a p-type material (i.e., one containing an excess of holes) is placedin contact with n-type material (i.e., one with an excess of electrons), then a regionis formed around the p-n junction where a potential and hence a field is present (Fig.7.2B). This field arises from the attempt of the electrons i n the n-type material to goto th e p-typ e region an d the hole s i n th e p~typ e materia l to flo w int o the n-typeregion. Within a short time, charge fro m uncovere d atomic nuclei produces a fiel djust sufficient t o prevent any further charge motion. In this region of field, there canbe no free charge carriers, so it is called a "depleted region," and it typically extendsfor a few micrometer s o n eithe r sid e o f the physica l location o f the p- n junction(Leamy, 1982) . Alternatively, if a thin metal film is put into atomic contact with thesurface o f a semiconductor (Fig . 7.2C) then this "Schottky barrier" again results inthe appearance o f a depleted regio n extende d downwar d from th e Schottk y layer.Without a n inciden t electro n beam , ther e exists , in eithe r case , a stati c potentia lbetween the p and n regions or between the metal and semiconductor; bu t if the p-and n-type regions, o r the Schottky barrier and the semiconductor, were connectedtogether by a wire, then no curren t would flow, becaus e the fiel d exist s only in aregion fro m whic h all of the availabl e charge carriers have already been removed .

Now let us place the incident electron beam onto the p-n specimen in either thep- or n-type region but away from th e depleted zone. As before, electron-hole pairswill be generated, but since the material in which they are produced is electricallyneutral and has no field across it, they will quickly recombine an d no external effec twill be observed. If, however, the beam is placed in the depleted region, the carriersproduced wil l see the depletio n fiel d an d the carrie r pair s wil l be separated . Thi smotion o f charge s withi n th e specime n wil l produce a flo w o f curren t 7 CC i n th eexternal circuit given by the relation

since each inciden t electro n ca n produce n eh carrie r parirs . This signal , which wewill call the charge-collected curren t 7CC, is seen to be substantially greater than theincident current /B. In the scanning electron microscope (SEM), the current flowingaround the external loop is measured and displayed as function of the beam positionto produce the charge-collected , o r EBIC, signal . Note that an important practica lconsideration i s tha t th e curren t w e wis h t o measur e i s actuall y a short-circui tcurrent. Hence external resistance loa d /?L must be of as low a value as possible orelse the ohmic voltage drop across it, which is in the opposite sens e to the potentialat the depletion layer , will affec t th e signa l collection process .

Page 127: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

118 MONT E CARL O MODELIN G

In the standard theory of Donolato (1978), two steps are necessary t o compute/cc: first , w e mus t mode l th e generatio n o f carrier s b y th e electro n beam , and ,second, we must model the transport and collection o f the beam-generated carriers .Typically the generation o f carrier pairs is described b y a function g(r), i n units ofcm~3s~1, modele d a s a three-dimensiona l Gaussia n Distributio n (Fittin g e t al. ,1977) or a sphere of uniform generatio n (Bresse , 1972) , neither of which is a veryrealistic representatio n o f the beam interaction wit h the solid . The transport o f theminority componen t o f th e electron-hol e pair s generate d i s a diffusio n proble mdescribed b y the equation:

where p(r) i s the density o f the beam-generated minority carriers an d D an d T are,respectively, the minority carrier diffusion coefficien t and lifetime. Given the neces-sary boundary conditions onp(r) a s defined by the geometry of the problem at hand,Eq. (7.3 ) ca n b e solve d t o give p(r) an d th e induce d curren t 7 CC ca n b e foun d b yintegrating the normal gradient ofpp over the collection plane. While this descriptionn of th e proble m i s rigorousl y correct , th e drawbac k i s tha t 7 CC canno t b e foun dwithout knowing p(r), which , in turn, requires a knowledge of g(r), and no realisticmodel o f g(r) yield s an equation tha t is analytically tractable .

However, if we use the Monte Carlo procedures we have developed to describethe incident bea m interactio n wit h the semiconductor , then , a t any instant alon g atrajectory, g(r) is effectively a point source whose strength is equal to the number ofelectron-hole pair s generate d i n tha t segmen t o f th e trajectory , whic h fo r th e £ th

trajectory step is equal (Akamatsu et al., 1981) to the energy given up (E[k] - E[k +1]) divide d b y th e energ y t o creat e on e electron-hol e pai r e eh. I f th e trajector ysegment is at a distance . s from the collecting junction, then the probability of i|/(s) ofthese carriers diffusin g t o the collecting junction and producing a charge collecte dcurrent is , (Wittry an d Kyser , 1964) , fo r a point source:

where L i s the minority carrie r diffusio n lengt h (i.e. , L = vDi).It woul d thu s see m tha t w e coul d comput e 7 CC i n a sequentia l manne r b y

summing up the charge-collection contributio n from each step of each of the trajec-tories tha t w e simulat e an d averagin g thi s t o fin d effectiv e charg e collecte d pe rincident electron (Joy , 1986). Although this looks, at first sight , to be quite differen tfrom actuall y solvin g th e diffusio n proble m o f eq . (7.4 ) an d the n computin g /cc,these two approaches are , in fact , functionally equivalent. As shown by Possin andKirkpatrick (1979) , w e can generalize th e quantity \\>(s) an d define a quantity ij;(r) ,which describe s th e probabilit y tha t a minorit y carrie r generate d b y a n electro n

Page 128: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENC E 11 9

beam a t r i s collecte d an d thus contribute s t o th e charge-collecte d curren t 7 CC.Donolato (1985,1988) showed that for the geometry of Fig. 7.2C, i|/(r) also satisfiesEq. (7.3) with the boundary condition i|;(r ) = 1 at the entrance surfac e (z = 0) . Inthis case, the solutio n o f Eq. (7.3 ) reduces to one dimension an d has th e for m

That is, it is identical with the result of Eq. (7.4), and the charge-collected curren t 7CC

is then the su m of the contribution o f the elementary sources :

where h(z) i s the depth distribution of the generation. Thu s we can quite generallycalculate the magnitude of 7CC for a given specimen geometry an d beam interactionby first stepping through the Monte Carlo simulatio n to produce h(z) an d then usingEqs. (7.4 ) o r (7.5) an d (7.6) to fin d 7

7.3 Monte Carlo modeling of charge-collection microscopy

7.3.7 The generation function

Either th e singl e o r plura l scatterin g model s coul d b e use d a s th e basi s fo r asimulation o f charge-collectio n microscopy , bu t sinc e th e sample s ar e invariabl ybulk, th e plura l scatterin g approac h wil l b e significantl y faste r an d s o wil l b eillustrated here. The first task is to compute eh, th e number of electron-hole pairsgenerated alon g each ste p of the trajectory . Working from th e code i n chap. 4 , wecan easily inser t thi s as shown below. Sinc e i t is interesting t o be able to view theactual spatial distribution o f g(r), we can associate eac h element o f carrier produc -tion with the coordinates o f the midpoint (xm, ym, zm) of the trajectory step . Sincefor norma l incidence th e distribution is going to be radially symmetrica l about thebeam axis, we can store this in an array g(r, zz) where r, the radius from the axis, andzz, th e depth , ar e bot h expresse d i n unit s o f one-fiftiet h o f th e Beth e rang e(i.e., th e ste p length) . D o no t forge t t o ad d t o th e variable s lis t th e extende dquantities xm,ym , zm, eh, th e integers r , z z , an d the array g [ 0 . . . 50 ,0 . . . 5 0 ] o f extended, an d remember t o initialize g [ r, z z ] befor e usin g it .

p_scatter; {fin d the scattering angles}new_coord(step); {find where electron goes }

{program-sped fie code will go here}{******** and here it is ******** }

Page 129: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

120 MONT E CARL O MODELIN G

{eh the number of carriers generated is}

eh:= ( E [ k ] -E[k+l] ) *1000 /3 .6; (E[] i s in keV\{assuming that the pair generation energy for silicon is 3.6 eV}

xm: = (x+xn) / 2 ; {x coordinate midpoint of step}ym: = ( y + y n ) /2 ; {y coordinate of midpoint}

z m : = ( z + z n ) / 2 ; [z coordinate o£ midpoint]

{get radius of midpoint from axis in units of range}r: =round(sqrt (xm*xm+ym*ym ) /s tep) ;

z z : = round(zm/s tep );{}

if zz > = 0 the n{put thi s carrier contribution into the array at r,zz}

g [ r , z z ] : = g [ r , z z ] + e h ;etc.

The array can be printed out at the end of the run to give the spatial distributiong [ r, z z ] . Becaus e th e dat a hav e bee n store d i n unit s o f a radial variable , th evolume represented b y successive values of r increases steadily , so, in order to makethe values directly comparable, i t is necessary t o divide g [ r , z z] b y ( 2 r+1) —i.e., th e area betwee n the rth an d ( r + l ) t h annuli . Figur e 7. 3 shows the carrie rdistribution calculated in this way for silicon, The profile has the familiar "teardrop"shape with a diameter of the order of the range, and with a maximum depth of about0.75 of the range. It is clear, however, that the distribution of carrier generation is farfrom uniform, with nearly a quarter of the carriers being produced within a volume

Figure 7.3. Isogeneration contours for electron-hole pairs in silicon.

Page 130: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENC E 12 1

that i s only abou t 0. 2 o f the range in diameter . Th e isogeneration contour s ar e ingood agreemen t wit h published experimenta l dat a (e.g. , Possi n an d Norton, 1975 )confirming tha t the physical basis for the model i s good .

7.3.2 The gain of a Schottky barrier

The specime n configuratio n most normally used for EBI C imaging i s that of Fig .7.2C, the Schottky barrier geometry; consequently, it is this system that we will usethe Monte Carlo method to analyze, although other arrangements such as that usinga p-n junction can as easily be studied by obvious modifications to the developmentbelow. The Schottk y barrie r consist s o f a thin layer, typically 10 0 to 30 0 A, o f ametal, suc h a s gol d fo r n-typ e silico n o r titaniu m fo r p-typ e silicon , i n intimat econtact with the surface of the semiconductor. Although this film is thin, it may havea significant effect o n the electron beam interaction with the solid, especially at lowbeam energies, and so must ultimately be included in the simulation. We assume thatthe Schottk y produce s a depletio n regio n o f dept h zd. T o a firs t approximatio n(Leamy, 1982 )

where fl i s the resistivity (ohm.cm) and Vb is the barrier height, (e.g., for Si Vb =0.7 V) plus any applied revers e bias . S o for 1 ohm.cm resistivit y silicon , wit h noexternal applied bias , zd i s about 0.5 (Jim .

The measurable parameter of a Schottky diode in charge-collection mod e is itsgain G, which can be defined as:

where 7 CC is the measured short-circui t current collected fo r a given incident beamenergy /b. From the discussion above , we can see that G is of the order of neh, thenumber of electron-hole pairs generated per incident electron; but it will invariably belower, because not all of these carriers will ultimately contribute to the signal. Let usconsider a single step of a trajectory and calculate the incremental contribution to 7CC.

As before, the number of electron-hole pair s e h produce d a t this ste p is

eh = (£[*] - E[k + l]/eeh

and these we take to be generated at the depth zm = ( z + z«)/2 , the midpoint of thetrajectory step . I f zm < zd, then al l of the carriers produce d ar e separated, s o theincremental charge collected c c i s increased b y eh. I f zm > zd, then the carriersmust diffuse bac k to the depleted region before they can be separated and collected.

Page 131: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

122 MONTE CARLO MODELING

The fraction of carriers collected coll_f rac is, from Eq. (7.5),

where L is the minority carrier diffusion length.In general, we want to know how the gain G depends on semiconductor

parameters such as the depletion depth zd and diffusion length L. Because thecollection of the carriers is totally independent of the generation process, we canconveniently do this by computing just a single set of trajectories but allowing zdand L to take a range of different values and calculating the gain in each case. If wedefine m values of the depletion depth zd[] and n values of the diffusion length L[],then we need a matrix m*n in size for the current values Icc[]. The code fragmentfrom above would then look like this:

p_scatter; {find the scattering angles}

new_coord(step); {find where electron goes}

{program-specific code will go here}{******** an d here it is ******** }

(eh the number of carriers generated is}

eh:= ( E [ k ] - E [ k + l ] * 1 0 0 0 / 3 . 6 ; {E[] is in keV}{assuming that the pair-generation energy for silicon is 3.6

eV}zm: = (z + z n ) / 2; [z coordiante of midpoint}

{compute the incremental current collected for each value of zd

and L}for i := l t o m do

beginfor j := 1 t o n d o

beginif zm < = zd[ i] the n {al l the carriers are

collected}I c e [ i , j ] : = I c c [ i , j ] + ehe

Ice [ i , j] : =Icc [i, j] +eh*exp (- (z-z d [ i ] ) / L [ j ] ) ;

end;end;

etc. . . .

Figure 7.4 shows the variation of the gain G computed in this way for silicon at30 keV, as the depletion depth varies from 0.5 to 5 (Jim and as L varies from 0.1 to5 (xm. When the depletion depth zd or the diffusion length L are small compared to

Page 132: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENCE 12 3

Figure 7.4 . Variatio n o f current gain in a silicon Schottk y diod e a t 30 keV .

the electro n rang e (i.e. , abou t 1 0 |xm) , the n th e gai n o f th e diod e i s a sensitiv efunction o f these parameters ; bu t whe n either o r both becom e comparabl e t o th erange, then the gain depends only on the beam energy. Note that the advantage ofusing the same set of trajectories to calculate the gain for each of the variables is notjust that of saving computational time. Using the same set of random numbers foreach piece o f data ensures that the difference s i n th e gain du e to a change in th ediffusion lengt h o r depletion depth are not masked because of the statistical varia-tions between one Monte Carlo run and the next. An interesting exercise is to try theeffect o n these calculations o f changing the angle of beam incidence (Jakubowicz,1982; Joy , 1986) . For a given depletion depth , diffusion length , and beam energythere is a range of angles over which the gain is constant. Since the angle of beamincidence can easily be varied—for example , by rocking the beam or mechanicallytilting the sample—this provides a rapid experimental metho d for determining thediffusion lengt h of a diode.

In general , w e canno t ignore th e effec t o n th e inciden t electro n bea m o f th eSchottky barrier metal film. As the electrons pass through this, they lose energy andare scattere d laterally . I n addition , th e effectiv e backscatterin g coefficien t o f th especimen i s changed . Whil e thes e effect s ar e smal l a t moderat e an d hig h bea menergies (1 5 ke V an d above) , the y ar e quit e significan t a t lowe r bea m energie sbecause th e meta l film , thoug h thin, i s the n a substantia l fraction o f th e electro n

Page 133: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

124 MONTE CARLO MODELING

range. This situation can be modeled by slightly modifying the program BINARYdiscussed in Chap. 6. The physics is exactly the same as that described above,except that we only consider electron-hole pair generation in the substrate material(i.e., the semiconductor) and the distance that these have to diffuse before collectionis measured to the bottom of the Schottky layer rather than to the surface. It is onlynecessary to add a few lines of code to BINARY to incorporate these calculations.That is, after the scattering calculation we write

{now allow the electron to be scattered]p_scatter(i);new_coord(i);

{test for electron position within the sample}if zn< = 0 thenbeginbk_sct: =bk_sct + l;num:=num+l;

goto back—scatter;endelse

{compute the gain of the Schottky diode—energy of electron-hole pair formation is e—eh—i.e., 3.6 eV for silicon etc.}

begine

formed}if i = l then eh:=0; {no carriers generated in metal film}

if zn<= zd then {all of these carriers are collected}i_cc:=i_cc + eh

else {they have to diffuse back to depletedregi on}

i_cc:=i_cc + eh*exp(-(zn-zd)/L);end;

reset_next_step; {and so on . . .}

The only point to be careful of is to remember that, because this is a pluralscattering simulation, the program cannot be expected to give accurate results abovethe energy for which the thickness of the barrier film becomes less than about one-tenth of the range (e.g., about 12 keV for a 300-A gold film. Figure 7.5 shows theeffect of including the Schottky barrier in attempting to compare experimental gainmeasurements with computed values, in this case for an indium phosphide (InP)diode. While the slope of the experimental data with energy is similar for both thecase with no surface barrier and for the barrier thicknesses of 200, 300, and 400 A, itis clear that the absolute gain values are quite different. The best match between theexperimental data and the computed figures is for a barrier layer of 300 A. If thegain can be measured over a sufficiently wide energy range (e.g., from a lower valuewhere the gain is effectively zero because the beam is not penetrating the barrier toan upper value where the gain is at a maximum), then an iterative comparison

Page 134: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENC E 125

Figure 7.5 . Experimenta l variatio n o f gain wit h beam energy in InP and computed variatio nincluding thicknes s o f Schottky layer .

between the Monte Carlo data and the experimental data allows both the parametersof the device (i.e., the diffusion lengt h and depletion depth) and the thickness of thebarrier t o be determined .

7.3.3 Contrast from crystallagraphic defects

Contrast fro m electricall y activ e defect s i n semiconductor s wa s firs t observe d i ncharge-collection image s by Lander e t al. (1963). Sinc e that time the technique hasbeen widel y used (Leamy , 1982) , no t only because i t allows defects to be imagedwithout the need to thin the material fo r transmission microscopy bu t also because,at th e ver y lo w dislocatio n densitie s tha t ar e typica l o f today' s semiconductors ,EBIC imaging offers a much better chance of actually finding the defects in the firs tplace. Contrast is seen fro m defects , because carrie r recombination ca n occur at thedefect, so reducing the number that contribute to the detected current . As shown byDonolato (1978 ) an d using the notation show n i n Fig. 7.6 , a point defec t at somedepth Dd beneath the surface of a Schottky diode causes a differential signal changein the collected signa l from a distribution o f point sources g(x, y, z) given by

Page 135: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

126 MONTE CARLO MODELING

Figure 7.6. Definition of parameters use d to model defect s in a semiconductor .

where k i s a measur e o f th e recombinatio n strengt h o f th e defect , rl an d r2 ar edefined a s show n in Fig. 7.6, L i s th e minorit y carrie r diffusio n length , an d th eintegral is over the whole excited volume. This derivation assumes that the Schottkybarrier ca n be represented a s a surface of infinite recombinatio n velocity (i.e. , anycarrier reachin g th e surface contributes to the measured current).

As before , the Mont e Carl o approac h allows us to replace thi s integra l b y asummation in which the distribution of point sources g(x, y, z) i s represented b y thecarrier generatio n calculate d fo r eac h ste p o f th e trajectory . For eac h ste p i n th etrajectory, the yield of carriers eh i s found from Eq. (7.8). In the absence of a defect,the incremental curren t contributed to the imaging signal would then be eh*coll_f rac, wher e coll_f rac i s given by Eq. (7.9) and depends on whether or notthe center point of the step z m lies in the depleted region. In the presence of a defect,the actua l collecte d signa l incremen t wil l b e eh*coll_frac*defect_term ,where defect-term i s from Eq . (7.10)

and represents th e carriers lost to the defect and thus not contributing to the signal.In general, line defects are of more interest than point defects in EBIC imaging.

A line defect can be treated as a linear array of point defects of equal strength, so inorder to model a dislocation i t would be necessary to integrate Eq. (7.10) along thelength of the defect, or in our discrete Monte Carlo model, to sum Eq. (7.11) alongthe dislocation line . If the dislocation i s horizontal (i.e., parallel to the surface) andcan be considered as infinite in length, then numerical integration (Joy, 1986) showsthat th e for m o f Eq . (7.11 ) remain s unchange d except tha t k , representin g th estrength of the point defect, is now replaced by a term representing the strength perunit length of the line defect. Thi s convenient simplification i s possible because the

Page 136: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENCE 12 7

1/r multiplying factors on each exponentia l in Eq. (7.11) greatly restrict the rangeover whic h th e expressio n i s significant . Fo r othe r defec t geometries—suc h a sinclined fault s o r loops—i t woul d b e necessar y t o evaluat e Eq . (7.11 ) fo r eac htrajectory ste p and for each point defining the defect line.

If the defect lies within the depleted region (i.e., Dd < zd), then the effect o f thecarrier drift , caused by the depletion field, on the image must also be considered. Asshown by Leamy (1982), this can be done by comparing the transit time of carriersacross the excited volume with the lifetime of carriers in the vicinity of the defect.The field at the defect ED due to the sum of the barrier voltage V b and the appliedbias V a i s

where the depletion depth zd is given by Eq. (7.7). The effective strengt h per unitlength of the defect is then reduced by a factor £0/(£D + ^o) > where E0 is the fieldassociated with the defec t itself, typically of the order of 5.103 V/cm (Mil'stein etal., 1984) .

As before, the basis of the simulation will be the BINARY program, and againonly a minor modification to the original code is needed to include the computationof th e effec t o f the defect :

{now allow the electron to be scattered}

p_scatter(i);

new_coord(i) ;

{program-specific code will go here—so]

{first test for electron position within the sample}

if i = 2 then {the electron is in the silicon substrate}

do—defect; {compute the current collected}

{now we can proceed as normal}

if zn< = 0 then {it's backscattered}

begin

bk_sct: =bk_sct + l;

num:=num+l;

goto back—scatter;

end

else

reset—next—step; {and so on. . .}

As usual , al l o f th e actua l calculatio n i s don e i n a procedure , her e calle ddo_def ect. This , in turn, relies on some data that we have set up ahead of time.First, w e must input at some convenient tim e the parameters tha t define the semi -conductor an d then calculate a few constants ; fo r example :

Page 137: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

128 MONTE CARLO MODELING

{input the semiconductors' physical parameters}write('Resistivity of sample in ohm.cm');

readln(resistivity) ;write('DC bias applied to Schottky (V)' ) ;

readln(bias);write ('depth of defect (pun)');readln(dd);

{now we can compute zd—the depletion depth of the material]{assume the material is silicon and use Eq. (7. 7)}

zd :=0 .53*sqr t ( res i s t iv i ty*(0 .5+bias ) );{we define the strength of the defect by giving it a "size" rO}

rO = 0 . 3; {nominal radius in microns}{n

if dd>z d the ned:=0 {defec t is in neutral material}

elsebegin

e d : = 2 * ( 0 . 5 + b i a s ) / t h i c k ; {thic k i s thickness of metal film}ed:=ed*lE4* (1-dd) /zd ;

end;{arid

r _ c r i t : = r O * s q r t ( 5 E 3 / ( 5 E 3 + e d ) ) ;{a

Remember to add these variables to the var list at the start of the program—although, if you do not, the compiler will find them and warn you of their absence.Note that the constant k in Eq. (7.11), which represents the recombination strengthof the dislocation, has the units of a length. So in the program, this has been calledthe "size" rO of the defect, and been assigned a value of 0.3 u-m. This value has beenfound to give contrast values that are in good agreement with those measuredexperimentally, and it is also consistent with the expected physical extent of theelectrostatic field around a defect in silicon. For other materials or special condi-tions, such as a decorated defect, the value of rO may have to be adjusted.

The presence or absence of the defect does not change the way in which theelectron beam interacts with the solid. We can therefore again save time, and alsoimprove our statistics, by simultaneously calculating the signal profile at manypoints across the dislocation for each trajectory step. If we place the dislocation sothat it is parallel to the x axis and at y = 0, then for each trajectory step we can loopthrough the current calculation shifting the effective position of the beam by a seriesof values pos [ j ] and calculating the corresponding current i_cc [ j ] . Becausethe profile is symmetrical about the center of the defect, typically five to ten valuesin the array pos [ j ] are enough to produce a smooth profile. The chosen values forpos [ j ] can either be input by the user or preset in the program code itself. That is,

Page 138: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CHA

pos[0] : =0;

pos[l] :—0.25; {all values are in micrometers from defect center}pos[2]:=0.5;

pos[3] :=1.0; {and so on}

A convenient rule of thumb is to set the maximum value of pos [ j ] to the sum ofthe electron range plus the diffusion length (i.e., typically in the range 5 to 15 ^m

for most materials and usable beam energies) and to choose intermediate values ofpos [ j ] with approximately a constant ratio between them (e.g., 0, 0.25, 0.5, 1, 2,4, 8, 16), so as to give the best definition to the central portion of the profile.

Procedure do—defect;

{this calculates the current gain of the Schottky including theeffect of the electrically active defect}varbegin [by computing number of e_h pairs generated}

eh: = (E[i,k]-E[i,k+l])*1000/e_eh;

zval: = (z + zn)/2; {midpoint of trajectory}yval: = (y+yn) 12 ; {midpoint of trajectory}

for j:=0 to 10 do {a loop Shifting the defect position bypos[j]}

begin {defect is at depth dd}rl: = (zval-dd)*(zval-dd) + (yval-pos[j])*(yval-pos[j]) ;{Fig. 7.6}r2:=rl + 4*dd; {by Pythagoras's theorem—see Fig. 7.6}

{now apply Eg. (7.11)}

d e l _ I : = ( e x p ( - r l / L ) / r l - e x p ( - r 2 / L ) / r 2 );del_I:=l-(r_crit*del_I);

if zval < = zd the n {al l o f the carriers arecollected}

i_cc[j] :=i_cc[j] +eh*del_Iel

i_cc [ j ] : =i_cc [ j ] +eh*exp(- (zval-zd) / L ) ;en

end; {o f this procedure}

Because computations for ten or so different effective beam positions are madefor each step of every trajectory, the program will run more slowly than normal.However, because the data from each of these points come from the same set ofrandom numbers, the precision of the computation is high, and good statistics can beachieved for as few as 400 to 500 electrons. A plot of i_cc [ j ] against pos [ j ] ,possibly reflected about the position pos [0] = 0 so as to give a symmetricalprofile, will now give the desired profile of the EBIC signal variation across the

Page 139: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

130 MONTE CARLO MODELIN G

Figure 7.7 . Compute d EBI C profiles acros s a line defect a t various depths i n silicon .

defect. Thi s can be done either by having the program output the actual i_cc [ j ]values an d plottin g thes e i n som e othe r progra m o r by writing th e necessary fe wlines of code to have the program plot its own output. In either case a great deal canbe learned abou t the behavior o f defect images i n EBIC by using this program an dtrying the effect s o f various set s o f semiconducto r an d defec t parameters .

Figure 7. 7 shows the predicted signa l profiles arross a line defect a t depths of0.5, 1,1.5 , 2, and 2.5 |xm in silicon. To avoid cluttering the figure, only half profilesare shown . With the physica l parameters assume d here, a resistivity of lOOOft.c mand zero applied bias, the depletion depth is [Eq. (7.7)] about 1 5 |o,m, which is largecompared t o bot h th e electro n rang e o f 3 (Ji m an d th e minorit y carrie r diffusio nlength of 1 (jum. For al l depths, the profile has the same general V-shaped form, butthe details of the profile vary from a narrow, high-contrast dip for a defect just 0.5|xm below the surface to a broad and rather shallow profile for a defect 2.5 |xm belowthe surface . These prediction s ar e in excellent agreemen t wit h experimental obser -vations. See , fo r example , figur e 3 3 in Leamy , 1982 . I t can als o be noted tha t thecontrast fro m a defec t effectivel y vanishe s i f th e dept h o f th e defec t exceed s th erange of the incident electrons. Thi s is because, as shown in Fig. 7.3, the majority ofcarriers ar e produce d clos e t o th e surface , an d i t i s eviden t fro m Eq . (7.11 ) tha tcarriers generate d fa r from th e defect will contribute little contrast because the twoexponential terms will be about equal and opposite. Fo r good contrast to be observ-able fro m a defect , th e carriers ' generatio n maximu m mus t be a t o r clos e t o th edefect. The depth at which a dislocation is situated can thus be estimated wit h good

Page 140: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENC E 131

accuracy by noting the beam energy at which it first becomes visibl e and equatingthe electron range to the depth (Leam y et al. , 1976 ; Jo y et al. , 1985) .

Figure 7. 8 show s the profile s predicted fo r th e case wher e the defec t i s a t aconstant depth , here 0. 5 jjun , but th e beam energ y i s varied. A t 5 keV, where thebeam range is also about 0.5 (Jim , the defect is just detectable, a s would be expectedfrom the discussion above. As the energy is raised, both AS, the signal change acrossthe defect, and S, the total signal collected, increase, so the contrast AS/S also risesand reaches a shallow maximum at about 1 0 keV, at which condition the electro nrange, 1. 5 (Jim , i s abou t three times th e defec t depth . A t stil l highe r energies , th esignal variatio n A S start s t o fal l whil e S slowl y increases , s o th e contras t falls .Simulations for a wide variety o f differen t defec t parameter s sho w that a contras tmaximum can always be expected durin g a sweep of the incident beam energy andindicate that this maximum occurs when the defect is at a depth of between 0.3 and0.4 times the beam range. The existence of such a contrast maximum with accelerat-ing voltage wa s firs t predicte d b y Donalato (1978) , wh o showe d that, for a poin tdefect an d a uniform, spherical , generation volume, the maximum would occur a tabout 0.5 of the beam range. The knowledge that a dislocation a t a given depth doesnot becom e visibl e unti l th e bea m rang e firs t reache s tha t depth , an d tha t wit hincreasing energ y th e contras t the n goe s throug h a maximum (at about twice theenergy at which the defect first becomes visible) and then decays away, provides the

Figure 7.8. Compute d EBI C profiles acros s a line defec t i n silicon a s a function o f bea menergy.

Page 141: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

132 MONtE CARL O MODELIN G

Figure 7.9. Compute d EBI C profiles across a line defect in silicon a s a function o f diffusio nlength.

basis of a method for determining the three dimensional distribution of dislocation sin a semiconductor (Jo y e t al. , 1985) .

It will also be expected that the minority carrier length L would have a signifi-cant effec t o n defec t imagin g in EBIC, since i t is this parameter, togethe r with thebeam range , tha t set s a physica l scal e fo r th e generatio n o f th e mobil e carriers .Figure 7. 9 show s ho w th e signa l profil e acros s a dislocation , i n thi s cas e 1 (x mbelow the surfac e o f 100 0 ft.c m silico n an d viewe d at 1 5 keV, is affecte d b y th evalue o f L. A s th e diffusio n lengt h increases , th e shap e o f th e profil e remain sessentially unchanged, but the apparen t size o f the feature increases. However , thefull width at half maximum contrast of the defect image increases only by a factor oftwo times as L goes from 0.5 to 50 (xm, and saturates if L is increased any further. Infact, measurement s fro m simulation s o f thi s typ e sho w clearl y tha t th e spatia lresolution o f th e EBI C imag e i s almos t independen t o f th e diffusio n length . Th ewidth of the defect image is determined by the beam energy (i.e. , the lateral extentof the generation volume ) and by the position o f the defec t relativ e to the surface .Consequently, even in materials with a long minority carrier diffusio n length , high-resolution EBI C imagin g is possible provide d tha t the beam energ y i s reduced t ominimize the interaction volume.

Although al l of the examples give n relate t o EBIC imaging , the extension t oC/L profiles is straightforward. All of the physics and program code associated withthe generation o f carriers and their interaction with defects remains unchanged, but

Page 142: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENC E 13 3

all of the physics concerned with the subsequent collection of carriers is eliminated,In addition , sinc e n o deplete d regio n i s required , ther e i s n o practica l reaso n t oconsider the presence of a Schottky barrier on the surface. Unless it is necessary toconsider absorptio n of the C/L radiation as it leaves the specimen, the computationcan be made straightforwardly by equating the resultant C/L signal with i_cc, th enumber of carrier pairs determined for each trajectory step. An example of the use ofMonte Carlo simulations for both EBIC and C/L imaging is given in Czyzewski andJoy (1989) .

The result s discussed abov e demonstrate th e power of the applicatio n o f th eMonte Carlo simulation methods to the analysis of a practical problem such as EBICimaging. By carrying out a sequence of simulations, i t is rapidly possible t o deter -mine what effect differen t experimenta l parameters wil l have on the observed pro-file. This , i n turn, makes it possible t o know how best to se t up the microscope t oachieve th e desire d resul t an d allow s a quantitativ e interpretation o f th e image sgenerated t o be made.

Page 143: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

8

SECONDARY ELECTRONS AND IMAGING

8.1 Introduction

Secondary electron s (SE) , discovered b y Austin and Starke in 1902 , ar e defined asbeing those electrons emitte d fro m th e specimen tha t have energies betwee n 0 and50 eV. Because o f thei r low energy , secondar y electron s ar e readily deflecte d an dcollected b y the application o f an electrostatic o r magnetic field ; a s a consequence ,the grea t majorit y o f al l scannin g electro n microscop e (SEM ) image s hav e bee ntaken using the SE signal. Secondaries can be generated throug h a variety of interac-tions in the specimen (Wolff , 1954 ; Seiler , 1984) , a typical event being a knock-o ncollision i n which the incident electron imparts some fraction o f its energy to a fre eelectron i n th e specimen . Thi s i s followe d b y a cascad e proces s i n whic h thes esecondaries diffus e throug h the solid, multiplying and losing energy as they travel,until they either sink back into the sea of conduction electrons or reach the surfac ewith sufficien t energ y to emerge a s true SE. For S E with energies o f a few ten s ofelectron volts , the inelastic mea n free pat h (MFP) is small, in the range 1 0 to 40 A,so each secondary typicall y travels only a short distance befor e sharing som e of itsenergy in an inelastic event. However, for most materials, the inelastic MFP reache sa minimum at about 20 to 30 eV; for energies below that value, it increases rapidly,because ther e ar e no larg e cross-sectio n inelasti c scatterin g event s throug h whe nenergy ca n b e transferred . Th e elasti c MF P als o fall s wit h energ y bu t become sapproximately constan t a t a few tens of angstroms for energies belo w abou t 30 eV.SE with energies belo w thi s value ar e therefore strongl y elastically scattere d eve nthough inelasti c scatterin g i s insignificant . Consequently , a s the cascad e develop sfrom som e point below the surface of the irradiated specimen , only a finite fractio nwill actually reach the surface and escape to be collected. We can thus see that thereis a region beneath the surface—the so-called S E escape depth, perhaps 50 to 150 Ain extent—beyond whic h no S E generated ca n reach th e surfac e and escape .

The measure o f secondary electro n productio n is the S E yield 8 , which is thetotal number of SE produced pe r incident electron . Fo r al l materials, 8 varies withincident electron energ y in the same manner as that shown in Fig. 8.1 for silver. Theyield is low at high beam energies becaus e most of the secondary production occurstoo dee p belo w th e surfac e t o escape , bu t i t rise s a s the bea m energ y i s reduced.Eventually a broad peak i s reached, correspondin g t o the conditon wher e the inci -

134

Page 144: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRONS AND IMAGING 135

Figure 8.1. Experimenta l S E yield dat a fo r silver .

dent electron range is comparable with the SE escape distance. Typically this occursfor a n energy of 1 to 3 keV. At still lower energies , the yield again falls because ofthe lower energy input from th e incident beam . Any satisfactor y simulation of SEproduction must be able to reproduce this yield curve for a given material and set ofexperimental conditions .

In general , there wil l be two occasions whe n S E generated b y the beam canescape from th e specimen surface : first a s the incident electrons pass down throughthe escape zone and second as backscattered electron s agai n pass through this zoneon thei r way back t o the surface . While th e S E produced i n these tw o event s areidentical i n nature, their utilit y for imaging is quite different , sinc e th e firs t grou pcome from th e beam impact point and are therefore capable o f high spatia l resolu -tion while the second emerge from an area of the order of the incident electron rangeand are thus of low spatial resolution. It is thus convenient to denote them separately(Drescher et al., 1970). Those secondaries produced by incident electrons are calledSE1, whil e thos e produced by the exitin g backscattere d electron s ar e called SE2 .The ratio between these two components is also an important quantity to be able tocalculate because it is a measure of the likely spatial resolution of the combined SEsignal.

In this chapter we discuss three levels o f approach to the problem o f doing aMonte Carlo simulatio n of secondary electron production :

1. A complete first-principles simulation of all inelastic events leading to secondaryproduction and including a model of the cascade multiplication of the SE and oftheir diffusio n t o the surface.

Page 145: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

136 MONT E CARL O MODELIN G

2. A simplifie d simulatio n i n whic h on e majo r mechanis m fo r S E productio n i sassumed to be dominant.

3. A parametric model of SE production an d escape that can be added to a standardMonte Carl o mode l fo r inciden t electron trajectories .

The choice of which model to apply is determined by the information required.A first-principle s simulatio n ca n provid e detaile d informatio n abou t an y o f th eparameters of SE production, e.g., energy, angle, and depth distribution of the SE inaddition to the computed secondary yield 8. However, a substantial computing effor tis require d becaus e o f th e comple x nature o f th e physica l model s involve d and ,realistically, the application o f this approach i s limited t o a very few elements an dthe most basic geometry. The simpler models typically calculate only SE yield, butthey can provide this information in a short time even for structures of an arbitrarycomposition, size , and shape. These types of simulations are thus well suited for thecomputation of S E images, studie s of charging , an d microanalytica l effects .

8.2 First principles—SE models

The secondary emission of SE has been the subject of a sustained body of theoreticalresearch ove r a large number of years since its discovery (Austin and Starke, 1902).Important pioneer studies were performed by Bethe (1941) and Salow (1940), leadingto the development of detailed phenomenological models by Baroody (1950), Jonker(1952), an d Dekker (1958) . Followin g Wolf f (1954) , wh o proposed the use o f theBoltzmann transport equation to describe the process of SE generation, many authors,such as Cailler and Ganachaud (1972), Schou (1980,1988) and Devooght et al. (1987)have use d thi s approach . Th e Mont e Carl o metho d ha s als o bee n widel y applie dfollowing the initial work of Koshikawa and Shimizu (1974). Construction of a MonteCarlo model for SE production involves three separate steps: determining the trajec-tory of the incident electron, computing the rate of SE generation along each portionof this trajectory, and finally calculating the fraction o f SE that escape from the solidafter th e serie s o f cascade processes.

The firs t par t of this procedure i s identical with what we have already consid -ered at length, so we will not discuss it again here. Generally, it is sufficient t o use asimple plura l scatterin g metho d t o mode l th e inciden t electro n trajectories . Th esecond ste p requires u s to take into accoun t all possible creatio n processe s for SEresulting from th e interaction o f primary electrons an d backscattered electrons withfree a s well as with bound (i.e. , core) electrons. I n addition, th e contribution to SEproduction fro m th e volum e plasmon deca y shoul d als o b e included . Fo r eac h ofthese processes, w e require an excitation cross section. The differential cross sectionfor th e productio n o f S E fro m valenc e an d d-shel l electron s i s (Lu o e t al. , J987 )

Page 146: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRON S AN D IMAGIN G 13 7

where E is the energy of the incident electron and £' is the energy transferred to thesecondary. The lowest allowed energy for an SE is chosen to be £F + 4 > (where EF isthe Fermi energy and <) > i s the work function), s o that the S E can cros s the surfac epotential barrier and enter the vacuum state. Gryzinski's function (Gryzinski, 1965 )is employed to describe the production of SE from the excitation o f core electrons :

where E-} i s the bindin g energy o f the cor e electron .For metals, the contribution to SE production b y the decay of plasmons must

also be considered. Usin g the expressions o f Chung and Everhart (1977) gives a nexpression for the probability per unit distance of creating SE in the form:

where

and D(E, /zco p, F v), which describes plasmo n deca y by one-electro n transitions , i s

where /zwp is the plasmon energy , E0 is the incident electron energy, a0 is the Bohrradius, an d We i s the g th Fourier coefficien t o f the lattic e pseudopotentia l fo r thereciprocal lattic e vecto r g .

It i s usual (Bruining, 1954 ) t o assume that the probability Pz o f a secondaryescaping fro m som e dept h z below th e inciden t surfac e o f th e soli d i s given by afunction o f the kin d

Page 147: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

138 MONT E CARLO MODELIN G

(where A i s a constant o f orde r unity ) whic h i s th e "straight-lin e approximation "(Dwyer and Matthew, 1985 ) and implies tha t the emerging secondarie s ar e unscat-tered and that any scattering of an SE produces absorption (i.e., only those SE that arenot scattered between their point of generation and the surface can escape). In fact ,these assumptions are not strictly valid (Chung and Everhart, 1977), but the error thatthey introduce is usually negligible. However , to accurately model the cascade, i t isnecessary t o generalize Eq . (8.7) . The probability o f an SE arriving at the surfac ewithout an y inelastic collisio n i s

because the average escape angl e will be at 45° to the surface. \(E) i s the inelasticmean free path for an SE of energy E, which for a metal i s given (Sean and Dench,1979) b y the formula :

where EF i s the Fermi energy of the metal, and a is the thickness of a monolayer ofthe meta l i n nanometers . Typicall y \(E) i s o f th e orde r o f a fe w nanometer s fo renergies i n the sub-10 0 eV range .

We can now set up the cascade process. From Eq. (8.8), the probability Pz of anSE traveling from z to z ' withou t any inelastic collision s i s

and similarl y the probability o f it traveling from z ' t o z' + Az ' i s

so the probability kP^ tha t the SE has interacted wit h another electron (i.e. , partici-pated in the cascade) i s

Some SE thus travel to the surface a t a rate governed by the exponential deca y lawwhile others take part in the cascade process and produce new SE of lower energies .It is convenient to make a distinction between secondaries o f different energ y rangesin th e cascade . Belo w 10 0 eV , the scatterin g o f th e S E ca n b e assume d t o b espherically symmetrica l (Koshikawa and Shimizu , 1974) . I f E' i s the energy o f anSE afte r scattering , the n

Page 148: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRON S AN D IMAGING 13 9

where E is the energy before scattering and RND is the usual equidistributed randomnumber. Thu s fo r eac h S E participatin g i n th e cascade , tw o S E appea r afte r acollision wit h energies E' an d E", where

Above 10 0 eV, the scatterin g o f the S E is given by the usua l Rutherford relations,and Eqs. (8.1 ) and (8.2) are used to calculate the rate at which new SE are generatedby core electron ionizations and from valence and d electrons. The calculation of thecascade proces s i s carrie d ou t u p t o a sufficientl y larg e dept h fro m th e inciden tsurface t o ensure that al l contributions ar e accounted for .

The final step in the analysis is to calculate what fraction of the SE reaching thesurface actually pass the energy barrier and reach the vacuum. The elastic scatteringof the SE can be assumed to be isotropic, because at low energies the elastic MFP isonly o f the order o f atomic dimensions (Samot o an d Shimizu, 1983) , s o al l direc -tions of motion are equally probable for the internal SE. In order for an SE of energyE to escape, E must be greater than Ep + 4> > where EF i s the Fermi energy and 4 > isthe work function. The maximum angle a a t which the SE can approach the surfaceis determined by taking the normal componen t o f momentum Pcos a equa l to thevalue

Thus the escape probabilit y p(E) fo r a n SE of energy E a t the surfac e i s

Putting al l o f the piece s describe d abov e togethe r no w give s u s a complet eMonte Carlo description of the generation, multiplication , diffusion, an d escape ofthe secondar y electrons fro m a solid. Th e actua l code wil l not be reproduced her ebecause, o f necessity , i t i s lengthy and complex . When applied t o the problem o fcomputing S E propertie s fro m selecte d metals—usuall y Al , Cu , Ag , an d Au —detailed agreemen t wit h experimental dat a i s obtained . Fo r example , as shown inFig. 8.2 , (adapte d fro m Lu o an d Joy , 1990) , th e computed normalize d secondar yenergy distribution N(E) i s in good agreement with the available experimental data .The agreemen t betwee n compute d an d measure d S E yield s i s als o quit e good ,although—as was the case for backscattered yiel d data—the spread between differ -ent sets of experimental results is often ver y large, making any quantitative assess -

Page 149: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

140 MONTE CARL O MODELIN G

Figure 8.2. Compariso n o f SE energy spectru m wit h data of Bind i e t al . (1980) .

ment of accuracy a difficult matte r (Joy, 1993). It is usual to assume that the angulardistribution of emitted secondaries follow s a cosine law (Jonker, 1952), a result thatfollows directl y fro m th e isotropic natur e of elastic scatterin g withi n the specime n(Luo and Joy, 1990). However, the detailed simulation shows that when the inelasticscattering that occurs within the cascade is taken into account, there are deviationsfrom th e cosine rule especially fo r the higher-energy SE. Figure 8.3 shows how thisdeviation appears . Although the effec t i s real , th e fractional number of suc h high-energy S E is small , an d so—fo r mos t practica l purposes—th e cosine rul e can betaken to apply. The model also calculates how the yield of SE varies as the thicknessof the target is increased. Th e SE1 component of the SE emission, that produced bythe forward-traveling incident electrons, typically reaches its maximum value for athickness of only a few nanometers. As the thickness is increased beyond that value,however, the number of backscattered electrons continues to rise, and so the yield ofSE2 secondaries increases an d the total yield 8 rises. Figure 8.4 shows experimentaldata fo r copper , illustratin g this effect .

Since

we can write

Page 150: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRON S AN D IMAGING 141

Figure 8.3. Compariso n o f computed angula r distribution with cosine law , Al a t 2 keV.

where i\ i s th e backscatterin g coefficien t fo r th e targe t an d p i s a facto r tha trepresent the relative efficiency o f backscattered electrons at generating SE. If SE1is constant , a s i s th e cas e fo r an y targe t thicker tha n a fe w nanometers , the n th evariation of 8 with thickness provides an experimental way to measure the value ofP, since we know that T| varies linearly with thickness (se e Chap. 6). This indirec tapproach mus t b e use d becaus e w e canno t physicall y distinguis h SE 1 an d SE 2electrons, sinc e thei r propertie s ar e identical . However , i n a calculation , i t i s asimple matte r to compute the SE1 and SE2 yield separately an d hence to obtain avalue for p. The computation shows that p is typically in the range 3 to 6, the valuebeing somewha t higher a t lo w energie s (== 1 keV ) an d fo r material s wit h higheratomic numbers. This sor t of value is in fai r agreemen t wit h the available experi -mental value s (e.g. , Bronstein an d Fraiman, 1961 ) an d indicates tha t i n a typicalmetal or semiconductor for which T\ = 0.3 , les s than 50% of the total SE signal i sbeing produced by the incident beam.

The use of this model with other than a few familiar metals is difficult, primari-ly becaus e man y of th e require d parameter s i n th e mode l ar e eithe r unknow n orknown onl y imperfectly . Fo r nonmetalli c element s suc h a s semiconductor s an ddielectrics, significan t modification s t o th e mode l woul d b e require d t o mak e i tphysically realistic. Work in this area is still proceeding. Thus , while this method isof theoretical importance in studies of the phenomena associated wit h SE emission,in the context of this book the model is of limited value because it cannot be appliedto th e real-worl d situatio n i n a n SEM . Fo r thi s kin d o f problem , simpler , les sdetailed, bu t more pliable, models must be used.

Page 151: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

142 MONTE CARL O MODELIN G

Figure 8.4. Variatio n o f SE yield wit h sampl e thickness.

8.3 The fast secondary model

We can simplif y th e complexit y o f the previou s metho d b y assumin g tha t only asingle mechanism for the production o f secondary electrons need be considered. Asoriginally suggeste d by Murata et al. (1981), a n appropriate assumptio n is that theSE are produced by a knock-on collision in which an incident electron interact s witha fre e electron . Th e required differentia l cros s section s fo r thi s type of interactio nare poorl y known ; however, thi s typ e o f interactio n ca n b e treate d classicall y b yconsidering i t as a coulomb interaction. In this case, the cross section per electron is(Evans, 1955 )

where E i s th e inciden t electro n energ y an d flE i s th e energ y o f th e secondar yproduced. Sinc e this interaction involves energy transfer s of [IE an d (1 - fl)E an dsince, i n the final state , the incident electro n wil l no longer be distinguishable, th etwo cross sections must be added. For convenience, w e can define the electron withthe highest energ y a s the primary; thus fl i s restricted, s o that 0 < fl < 0.5. Th einelastic scatterin g (Fig . 8.5 ) cause s a deflection a o f the primary electro n i n thelaboratory fram e o f reference give n as :

Page 152: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRON S AN D IMAGIN G 143

Figure 8.5. Geometr y of scattering event to produce a fast secondar y electron.

where t is the kinetic energy of the electron in units of its rest mass (511 keV). For asmall energy transfer, say 500 eV for a 20-keV primary, a i s about 1° ; which is thusof th e sam e genera l orde r o f magnitud e a s th e averag e elasti c scatterin g angle .However, the secondar y electron leave s th e impac t poin t a t an angl e - y give n by

so that the 500-eV S E leaves at an angle of about 80° to the initial direction of travelof the primary electron .

Other cros s section s fo r S E productio n b y knock-o n hav e bee n given , fo rexample by Mott (1930), Molle r (1931), and Gryzinski (1965). These models diffe rin the assumption s tha t they mak e an d i n thei r functiona l form , bu t th e predicte dvalues o f the cross section s under equivalent conditions diffe r relativel y littl e pro-vided tha t the energ y o f the S E is sufficientl y hig h for i t t o be considere d "free. "Since ther e ar e n o experimenta l dat a clearl y supportin g on e cros s sectio n ove ranother, we will use the Evans model [Eq . (8.18) and following], sinc e the valuespredicted b y this fall in the middle of the range of numerical values spanned by theother formulations.

8.3.1 Constructing a fast secondary Monte Carlo model

The fas t S E (FSE ) model tha t w e ar e developin g her e i s a doubl e Mont e Carl osimulation, since we track an incident electron , a s usual, but if a secondary electro nis generated , w e freez e th e positio n o f th e primary , trac k th e secondar y unti l i t

Page 153: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

144

leaves the specimen or loses it energy, and then resume tracking the incidentelectron again. The model that we will use is the single scattering model of Chap. 3because we have to investigate each electron interaction individually to see if it is anelastic or an inelastic event. We will use the program to plot the trajectories of eitherthe incident or the FSE and to calculate the yield of SE from the specimen. Below isthe key portion of the original listing of the single scattering program of Chap. 3, butnow modified to allow for FSE generation. The changes and additions to the originalcode are shown in boldface.

*

zero—counters;

while num < traj_num do

begin

reset—coordinates;

{allow initial entrance of electron}

step: =-lambda(s_en)*ln(random);

zn:=step;

if zn>thick then {this one is transmitted}

begin

straight—through;

goto exit;

end

else {plot this position and reset coordinates}

begin

xyplot(0,0,0,zn);

y:=0;

z:—zn;

end;

{now start the single scattering loop}

repeat

*

Test_f or_FSE: =RND;

if Test_for_FSE>PBL then {we have generated an FSE}

Page 154: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRON S AND IMAGING 14 5

begin

Track_the_FSE; {follow till it escapes or dies)

goto reentry; {then go back to main program}

end;

{otherwise scatter the primary electron in the normal way}

s—scatter(s_en);

reentry: {FSE program rejoins main loop}

step: =-lambda(s_en) *ln(random) ;

new_coord(step);

[problem-specific code will go here]

{decide what happens next}

etc.

It ca n b e see n that , a t leas t a t thi s leve l o f detail , th e change s involve d ar eminimal. The initia l entry of the electron proceed s a s before, but now—instead ofjust allowing th e electron to be scattered elastically—we test to see whether or notan inelastic scatterin g event, resulting in the production of a fast SE , has occurred .This is done by seeing if a random number Test_f or_FSE i s greater or less than avariable PEL , whic h is the ratio of the elastic cros s section t o the total scatterin gcross sectio n (i.e. , includin g the inelasti c effect) .

The elastic scattering undergone by the incident electron is represented as usualby th e Rutherfor d cross sectio n [Eq . (3.2)] . This cros s sectio n CT E define s a meanfree pat h X el given by th e formula

which represents the average distance tha t an electron wil l travel between succes-sive elasti c scatterin g events . Similarl y w e ca n defin e a n inelasti c MF P X in b yintegrating Eq . (8.18) . However , w e not e fro m Eq . (8.18 ) tha t th e cros s sectio nbecomes infinite at fl = 0 , so a lower limit flc must be chosen as a cutoff. Choosin ga finite value of flc no t only avoids the problem of an infinite cross section but alsohas th e effect o f removing from consideratio n very low energy secondarie s which ,because of their small MFP, require substantial computer time during the simulationwithout contributing much to the final result. I t is found (Murat a et al., 1981 ) thatthe choice of Oc does not sensitively affect the results produced, since lowering ft c

produces more secondaries but each of a lower average energy. So, for convenience,

Page 155: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

146 MONT E CARLO MODELIN G

Table 8.1 Values computed for 20-keVbeam incidence

Element X elastic A. inelastic

Carbon 33 8 A 92 7 AAluminum 28 9 A 102 0 ASilicon 24 0 A 87 1 ACopper 5 4 A 25 0 ASilver 3 6 A 19 8 A

a value of 0.01 wil l be used here. Equation (8.18 ) ca n then be integrated ove r th erange flc < d < 0. 5 to give the total inelastic cross sectio n cr in and hence

since the cross section is per electron. X in is the average distance between successiveinelastic scattering events. Whereas X el is of the order of 100 A for most materials at20 keV, X. in i s abou t 0.1 (x m a t the sam e energy, s o the probabilit y o f a n inelasti ccollision is small compared to that for an elastic event. Table 8.1 gives some typicalvalues for X el and X in. We can define a total scattering MFP—th e average distanc ebetween scatterin g events o f either type—fro m th e relation

PEL i s the ratio XTAei and represents the probability tha t a given scatterin gevent wil l be elastic. Sinc e A. in > X el, then PEL is close to unity an d only a smallfraction o f scatterin g event s wil l b e inelastic . Th e typ e o f even t tha t occur s i sdetermined b y choosin g a random numbe r Test_f or_FSE an d seein g i f thi s isgreater tha n PEL . I f i t i s not , then the scatterin g even t wa s elastic , n o FSE wa sgenerated, an d the program proceeds a s normal. If, however, Text_f or_FSE >PEL, the n an FSE has been produced and the routine Track_the_FSE is called totrack the FSE while the tracking o f the incident electron i s suspended. It is conve-nient to be able to turn FSE production on and off as required. This can be done inthe setu p of the program:

GoToXY(some suitable screen coordinates);

Write('Include FSE (y/n)?');

if yes then

FSE_on:=true

else

FSE_on: = false;

Page 156: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRONS AND IMAGING 147

This sets a Boolean variable FSE_on to true if FSE production is required, and tofalse if FSE are not needed. If FSE_on is true, then PEL is calculated as describedabove; but if FSE_on is set false, then PEL is set equal to unity, A.T = \el, and theprogram behaves in exactly the same way as the original single scattering model.

The calculation of PEL is carried out in the function lambda (s_en) , which,although it has the same name as before, is now modified to incorporate the inelasticscattering.

Function lambda(energy:real):real;

{this now computes both the elastic and inelastic MFP}

var al,ak,sg, mfpl,mfp2,mfp3:real;

begin {the function}

if energy<e_min then {don't allow anything below cutoff

energy}

energy:=e_min;

al:=al_a/energy;

ak:=al*(l.+al);

{this gives the elastic cross secton sg in cm2 as}

sg:=sg_a/(energy*energy*ak);{and hence the elastic mfp in A is}

rnfpl: =lam_a/sg;{from Eg. (8.18) the MFP for FSE in A is]

mfp2 : =at_wht*energy*energy*2.557(density*at_num);{so the total MFP from Eg. (8.22) is}

mfp3 : = (1 /mfp i) + (1 /mfp2) ;m f p 3 : = l / m f p 3 ;

{make

if FSE_o n the n {compute the ratio constant

elastic/total}

PEL: =mfp3/mfp lelse

beginPEL:=1; {n o FSEs will be produced}

mfp3 : =mf pi; {an d X T = X el}end;

{in eithe r cas e th e value returned is]lambda: =mfp3 ;

end;

The final part of the operation is to track the FSE that are produced. Thisinvolves several steps that can be displayed schematically as

Page 157: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

148 MONTE CARLO MODELING

Calculate the energy of the FSE

Store the coordinates of the incident electron at the point where

scattering occurred

Find the scattering angles of the FSE and its MFP

Find the end point of its first trajectory step

Follow FSE through standard single scattering Monte Carlo loop

until FSE leaves the specimen or falls below the energy cutoff

Calculate scattering angle of incident electron from inelastic

event

Find energy of incident electron after inelastic event

Return to main program

The procedur e Track_the_FS E an d a n associate d functio n FSEmf p carr y ou tthese tasks.

Function FSEmfp(Energy:real):real;

{computes elastic MFP of FSE during its subsequent scattering}

var QK,QL,QG:real;

begin

QL: =power(at_num,0.67)*3.4E-3/energy;

QK:=QL*(1+QL);

QG: = (at_num*at_num)*9842.II (energy*energy*QK);

FSEmfp:=(at_wht*lE8)/(density*QG);

end;

Procedure Track—the_FSE;

{generates an FSE and then tracks it. This procedure is a complete

single scattering MC loop. Note that all variables are local.}

label set_up_reentry,FSEloop;

var

FSEnergy,eps,sp,cp,ga,FSE_step:real;

SI,S2,S3,S4,S5,S6,S7:real;

vl,v2,v3,v4,an_m,=an_n:real;

deltaE,al,escape:real;

begin{increment the counter for FSE production}

FSE_count :=FSE_count +1 ;

{get the energy of the FSE that is produced}

eps:=l/ (1000-998*RND) ;

FSEnergy:=eps*s_en;

Page 158: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRONS AND IMAGING 149

{we now store the coordinates of the primary electron to reusethem later }Sl:=x;

S2;=y;S3:=z;

S4:=cx;S5:=cy;

S6:=cz;S7:=s_en-s_en*eps: {incident energy loss = FSE energy}

{see i f the FSE exceeds the minimum energy that we want toconsider}if FSEnergy<e_mi n the n {it s no t worth tracking}

beginescpae: =750*power (FSEnergy, 1 .66) /density;{estimaterange}se_yield: =se_yield+0.5*exp(-z/escape) ; {contributio n

to yield }if FSE_o n the n xyplo t (y ' z 'y + 1' z + 1) ; {plot a dot}

goto set_up_reentry ; {an d ou t of here}

end;

{otherwise ge t th e initial scattering angles for the FSE that are

produced}

s p : = 2 * ( 1 - e p s ) / ( 2 + eps*FSEnergy/511.0) ;cp:=sqrt(1-sp) ;

sp:=sgrt(sp) ;

FSEloop: {single scattering model loops round here}

{find the FSE step length}FSE_step:=-FSEmfp(FSEnergy)* In(END) ;

ga: =two_pi*RND;{find out where the FSB has gone using usual formula}

if cz = 0 then cz: =0.0001; {avoid division by zero}an_m:= (-cx/cz);an_n: =1.0/sqrt(1. + (an_m*an_m) ) ;

{save time by getting all the transcendentals first}vl:=an_n*sp;v2 :=an^n*an_m*sp;v3 : =cos (ga) ;v4:=sin(ga) ;

{find the new direction cosines}ca:=(cx*cp) + (vl*v3) + (cy*v2*v4);

cb: = (cy*cp) + (v4*(cz*vl - cx*v2));

cc:=(cz*cp) + (v2*v3) - (cy*vl*v4);

Page 159: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

150 MONTE CARLO MODELING

{get the new coordinates}

xn:=x + FSE_step*ca ;yn:=y + FSE_step*cb ;

z n : = z + FSE_step* c

if zn>thic k the n {thi s one is transmitted}

beginif FSE_o n the n xyplo t ( y , z , y n , 9 9 9 ) ;

goto set—up—reentry ; {get out of this

function}

end;if zn < = 0 the n {it s an emitted SB]

beginif FSE_o n the n xyplo t ( y , z , y n , 9 9 ) ;

se_yield:=se_yield+l;goto set—up—reentry ; {ge t out of this

function}

end;if FSE_o n the n xyplo t (y , z ,yn, zn) ; {plot the other case}

{find the energy loss of FSB on this step}

deltaE:=FSE_step*stop_pwr(FSEnergy)*density*IE-8;{so current FSE energy is}

FSEnergy:=FSEnergy-deltaE;if FSEnergy<=e_mi n the n {sto p tracking it}

begin {estimat e escap e probabilit y to surface}se_yield:=se_yield+0.5*exp(-(z + zn) / (2*se_escape) ) ;

goto set_up_reentry ;end

else {go round again}

X:=xn;y:=yn;

z : = z n ;ex:=ca;

cy : = cb;cz:=cc;

{scatter the FSE}al: =al_a/FSEnergy ;

c p : = l - ( ( 2 * a l * R N D ) / (1 + a l -RND)) ;sp: =sqrt(l-cp*cp);

goto FSEloop ; {roun d again}

set—up—reentry; {otherwise we exit the loop back to main program}

{reset all variables to their entry values}

x:=Sl;y:=S2

Page 160: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRONS AND IMAGING 151

z :=S3 ;ex:=S4;cy:=S5;

cz :=S6;s_en:=S7;

{get scattering angles fo r the primary electron as a result of

inelastic event}

sp: = (eps + eps) / (2 + (s_en/511) - (s_en*eps 7511) ) ;cp: =sqrt (1-sp) ;sp: =sqrt (sp) ;

ga: =two_pi*RND;

{and now we return back to the main program}

end;

The first job o f the procedure is the compute the energy of the FSE produced.This i s done by solvin g for fl [e.g. , se e Eq. (1.1) ] the equation

where (da/dCl) i s given by Eq. (8.18) and flc is the cutoff discussed above. Evaluat-ing thi s gives

which can be seen to yield properly weighted values of fl between 0.5 and 0.001 for0 < RND < 1.0 . Th e actual energy of the FSE produced is then

FSEnergy = fl*energ y o f incident electro n

The coordinate s describin g th e position , directio n o f motion , an d energ y o f th eincident electron ar e next store d in the local variables , SI , S 2 . . . S 7 . Thequantities S I throug h S 6 hol d x ,y , z , cx , cy , an d cz respectively . S 7 i s setequal t o the energy of the incident electro n afte r th e inelasti c collisio n tha t equals(1 - fl)* inciden t energy, since th total energy is conserved. In order to save time,we firs t chec k th e energ y o f th e FS E foun d i n Eq . (8.24) . I f thi s i s belo w a narbitrarily chosen cutof f energ y of 500 eV (not to be confused with the generatio ncutoff fl c), the n th e positio n wher e th e FS E wa s generate d i s plotted . Becaus e

Page 161: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

152 MONT E CARL O MODELIN G

secondaries o f this low an energy do not travel more than a few tens of angstroms inthe material, there is no point in tracking them. However, they might contribute tothe overal l yield , sinc e ther e i s a finit e probabilit y tha t the FS E coul d reac h th eentrance surface and escape to be collected a s a secondary electron. Th e chance ofthis occurrin g i s estimated b y findin g th e range escape fo r the electron a t theenergy FSEnergy

{estimate the FSE escape distance from range equation}escape : =750 . *power (e_jnin , 1. 66) /densi ty; {in A}

and the n applyin g Eq . (8.7 ) t o ge t th e probabilit y p(z) o f th e S E travelin g th edistance z back t o the surface:

The factor 0.5 accounts fo r the fact that the SE can travel in any direction, so onaverage onl y hal f th e secondarie s wil l trave l towar d th e entranc e surface . Th ese_yield counte r i s the n incremente d b y thi s fractiona l amoun t p(z) an d th efunction return s to th e mai n program . Thi s i s clearl y no t a rigorou s approac h t oaccounting for the behavior of the FSE below the cutoff energy , but it is a plausiblefirst approximation .

Otherwise, if the energy of the FSE is about 500 eV, then the angle sp a t whichthe FS E leave s it s generatio n poin t relativ e t o th e primary electron' s directio n o ftravel i s compute d fro m Eq . (8.20) , th e azimutha l directio n g a i s foun d fro m arandom numbe r call, an d the ste p length for thi s event i s found b y computing theelastic MF P fo r the FSE a t th e energy FSEnergy , usin g th e functio n FSEmf pfrom th e expression s develope d i n Chap . 3 . Not e tha t w e d o no t conside r th epossibility o f th e FS E i n it s tur n havin g a n inelasti c collisio n an d producin g atertiary electron, althoug h this could be done with little additiona l programming ifrequired.

The ne w coordinate s o f th e FS E ca n no w b e foun d again , usin g ou rusual formulas. It might, a t first sight , seem wastefu l t o include these equation s inthis Track_the_FS E procedur e rathe r tha n t o us e th e procedur e alread yincluded in the main program, which does the same job. Th e reason thi s is done isthat th e norma l procedur e employed , newcoords , use s globa l variable s(x, y, z, ex, cy, c z, sp , cp, ga etc. ) to do its calculations (for a definition ofglobal and local variables, see Chap. 2) . If we want to use this sam e procedure tohandle the FSE, then we would have to store the global variable s (since these refe rto the incident electron), substitut e the appropriate quantitie s for the FSE, perfor mthe calculation, an d then swop back the original parameters. I t is less confusing t ouse a purely local version of this and the other calculations required (e.g., the elasticMFP computatio n for th e FSE) , an d i t also removes a likely sourc e o f errors an dbugs in the program code .

Page 162: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY

The new coordinates o f the FSE are now tested. If the FSE has left the bottomsurface o f the specimen, then it has been transmitted, so the tracking is terminated,the coordinates of the incident electron are picked up from thei r temporary storage,and the functio n exit s bac k t o th e mai n program . I f the FS E ha s lef t throug h theentrance surface , then the counter se_yield is incremented b y 1 , since a detect -able secondary electron wil l have been produced, and the function then exits back tothe main program. If the FSE is still in the specimen, then the energy of the FSE iscorrected fo r the amount that it has lost along this step, using the normal stoppingpower relationship; th e coordinates ar e reset, and the FSE is scattered again , apply-ing the standard Rutherford scattering mode l of Chap. 3 . This procedure is contin-ued until either the FSE leaves the specimen o r falls below the minimum energy. Ifthe FSE i s found t o b e below th e minimum energy of interest , the n w e abor t th etracking an d again estimat e th e probability tha t the FSE could reach th e entranc esurface an d escap e t o b e collecte d a s a secondar y electron , usin g th e procedur edescribed above .

Figure 8.6A and B shows the program in operation for a 2500-A foil of silico nat 100 keV. In Fig. 8.6A the fast secondary generation is switched off and the displayshows, as usual, the incident electron trajectories . I n Fig. 8.6B , FSE generation hasbeen turned on and the display now shows the corresponding FSE trajectories. Th edistinctive features i n the FSE plot are the trajectories o f some of the high-energ ysecondaries tha t leave almos t norma l t o the origina l inciden t bea m directio n an dthen travel through the specimen. Only a few secondaries have sufficient energ y totravel a great distance, but it is worth noting that the spatial distribution of those thatdo is quite unlike the usual cone into which the incident electrons spread. An FSE isjust a s likel y t o b e forme d a t the entranc e surfac e o f th e foi l a s i t i s a t th e exi tsurface, s o th e FS E produc e a n approximatel y cylindrica l distributio n abou t th ebeam axis . This result is of some significance, as discussed below. The low-energyFSE produce d d o no t travel , s o thei r location s mar k ou t th e trajectorie s o f th eincident electrons. The use of the model is not restricted to thin foils, of course; but

Figure 8.6. Primar y ( A an d fas t secondar y (B ) electron trajectorie s i n silico n a t 10 0 keV.

Page 163: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

154 MONT E CARL O MODELIN G

because thi s i s tw o singl e scatterin g Mont e Carl o model s operatin g together , th ecomputation tim e fo r a bul k specime n ca n b e undesirabl y long . Wher e possible ,therefore, i t is desirable t o use a thin rather tha n a bulk sampl e a s the tes t object .Based on the calculations made in Chap. 6 , we can see that an acceptable compro -mise i s to choose a "thin" foil bu t make it s thickness o f the order of a third o f theelectron range . I n this case a substantia l fraction o f the inciden t electron s ar e stil ltransmitted, thu s saving computatio n time, bu t th e effectiv e backscatterin g coeffi -cient i s close t o that of the bulk material, s o the result is a good—though certainlynot perfect—estimate o f what would be expected fo r a bulk sample .

The program print s ou t the yield of secondary electron s tha t is generated. Th emagnitude of the value depends o n the element, the beam energy , and the assumedthickness o f th e target , bu t unde r al l condition s th e yiel d o f FS E i s quit e small ,typically i n th e rang e 0.00 1 t o 0.1 , compare d wit h norma l S E yields , whic h ar eusually between 0.1 and 1 . This is as would be expected, sinc e the high-energy FS Eare not "secondary electrons " In the usual definition of the term (i.e. , having ener -gies between 0 and 50 eV). This model is therefore only of limited value in predict-ing the sort of effects tha t "real" secondary electron s exhibi t in the SEM. Neverthe -less, som e usefu l studie s ca n b e made—fo r example , i n examinin g th e spatia ldistribution o f SE 1 electron s a t th e surface . I f w e tak e a sampl e s o thi n tha t n obackscattering occurs , the n th e FS E tha t ar e generate d ar e a mode l o f th e SE 1electrons. Usin g the procedure describe d above , we assume that thos e FSE that donot reac h th e surfac e by th e tim e thei r energ y ha s droppe d belo w 50 0 eV subse -quently diffuse , followin g the straight-line approximation [Eq . (8.7)] . The distribu-tion o f th e secondar y electro n flu x emitte d fro m th e surfac e aroun d th e inciden tbeam point can then be determined b y dividing the surface into concentric ring s ofradius rn. An FSE that is tracked t o some radial coordinat e r from th e beam poin tand is at a depth z beneath th e surface then contributes an SE yield proportional t oexp(-z/escape) t o th e annulu s n, wher e r n_1 < r < r n. Figur e 8. 7 show s th etrajectories o f the FSE in a 50-A foi l o f aluminum at 20 keV and the correspondin gSE surface yield profile. The SE1 signal can be seen to be localized with a full widthat hal f maximu m intensity o f about 3 nm, with the tai l o f the profil e fallin g awayrapidly outsid e that limit . The width of this distribution doe s depen d somewha t onthe material and the beam energy, since at low energies the incident electrons ca n beelastically scattered close enough to the surface to broaden the distribution, althoughthe lower probability of producing higher-energy FSE will also reduce the intensityof the tail (Joy, 1984) . I t is the width of this profile that sets an ultimate limit to theresolution o f the SE M in secondar y imagin g mode .

This mode l als o show s (Fig . 8.8 ) tha t th e SE 1 yiel d rise s rapidl y wit h th ethickness o f the target but then saturates at a thickness that is typically 50 to 60 A. Inthe example shown , the SE1 signa l reaches abou t half o f its maximum value for afoil thicknes s o f onl y abou t 1 0 to 1 5 A, an d fo r ver y thin films , th e SE 1 yiel d i sapproximately linearly proportional to the thickness. This rapid variation in SE yield

Page 164: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRON S AN D IMAGIN G 155

Figure 8.7 . Distributio n of SE1 electrons in Al a t 20 keV (a) and corresponding SE emissionprofile (b) .

is exploited in high-resolution SEM (Joy, 1991) . A continuous film of chromium orvanadium with an average thickness of about 10 A is deposited over the sample. Inregions where the surface is flat, the SE yield from the film wil l be that appropriateto the nominal 10- A thickness, but in areas where there is surface topography, theeffective thicknes s of the film is increased in the beam direction a s the film rises upover an edge and thus produces an increase i n the SE yield. This "mass-thickness"contrast i s an important technique in extending the performance o f the SEM.

As can be deduced from a n examination of Fig. 8.6, including the FSE contri-bution makes a very significant change in the way in which energy is deposited in amaterial. Fo r a thin foi l irradiate d b y high-energy electrons , then , i f th e FS E ar e

Page 165: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

156 MONTE CARL O MODELING

Figure 8.8. Variatio n of SE1 yield with specime n thickness .

ignored, the energy deposition is concentrated i n a tight cone around the beam axis.This would lead to the prediction that effects directl y related to energy deposition—such as x-ray generation, the exposure of a resist, or radiation damage—would havehigh spatial resolution under these conditions. But if the FSE are included, then thesituation is seen to be different. The FSE spread the energy deposition perpendicula rto th e bea m directio n int o a volum e tha t i s approximatel y cylindrica l an d thu sindependent o f the foi l thickness . Becaus e the FSE have, on average , significantl yless energy than the primary electrons, their stopping power is much higher and theydeposit mor e energ y into the target . Thus, althoug h the yiel d of FSE is small , theintegrated contribution o f the FSE to the energy deposition ma y represent 50 % ormore o f th e tota l (se e Joy , 1983 , fo r a detaile d discussion) . Figur e 8. 9 show scontours of equal energy deposition computed for the case of an unsupported thin-film resist irradiated at 10 0 keV. The change in both the absolute magnitude and thedistribution of the energy deposition when the FSE are included is very evident. It isthis effect whic h ultimately limits the spatial resoluton of electron beam lithographyand x-ray microanalysis at high beam energies, since the average sideways spread ofthe FSE wil l become greate r than the conventional conical broadening o f the inci-dent beam .

8.4 The parametric model

The fina l approac h t o computin g S E emissio n i s t o mak e a mode l tha t correctl ydescribes th e experimental behavior of SE without worrying about any of the actual

Page 166: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRON S AND IMAGING 157

Figure 8.9. Energ y contours in 1000- A PolyMethyl Methacrylate film expose d by 100-ke Vbeam. Dotted line s are corresponding contour s for elastic scattering only .

detail o f the generation o r cascade processes . A s before, w e have to consider bot hthe generation o f the secondaries and their subsequent transport to the surface of thespecimen. Salo w (1940) and Bethe (1941) independently suggested that the rate JVSE

at whic h SE wer e being produce d pe r uni t length o f th e trajector y a s a n electro ntraveled through the specimen wa s directly proportional to the stopping power of theelectron a t that point . Tha t is ,

where e i s a constan t for a given material . Thi s assertion , whic h i s equivalen t t osaying tha t a fixed amoun t of th e energ y dissipate d i n a solid i s availabl e fo r S Eproduction, is found experimentall y t o be a good approximation . Not e that i f inci-dent electron s ar e replace d b y inciden t ions , the n Eq . (8.26 ) i s stil l foun d t o b ecorrect—i.e., the S E yields unde r electro n an d ion bombardmen t ar e in the sam eratio a s the stopping power s of the electrons an d ions i n the target (Schou , 1988) .Since in any Monte Carlo simulation the stopping power is known for each portionof the trajectory, Eq. (8.26) immediately give s an expression fo r the instantaneousrate o f SE generation .

As before , i t wil l be assume d tha t th e "straight-lin e approximation " (Dwye rand Matthew, 1985) ca n be used as a description of the escape o f the SE from thei r

Page 167: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

158 MONT E CARLO MODELING

point of generation. I n this model, an isotropic sourc e of strength N a t some depth zbeneath th e surfac e would lead t o an emission /(-/, z) at the surface , where

where y i s the angle of emission relativ e to the surfac e normal. I f effects o f refrac-tion and reflection on the transmission of SE through the surface are ignored and theSE are assumed to be at zero concentration a t the surface, then the average escap eprobability p(z) fo r a secondar y electro n produce d a t dept h z wil l be (Wittr y an dKyser, 1965 )

where A is a constant of order 0.5 (since half of the SE will move toward the surfac eand half wil l move away) . The total secondar y electro n yiel d 8 is then

where the integral i s evaluated fro m th e surface (z = 0 ) to the end of the electro nrange ( z = R), assumin g tha t the inciden t electro n travel s norma l t o th e surface .Thus combining Eqs. (8.26 ) and (8.28) give s

If suitable analytical models are used for the electron range and the stopping power,then Eq . (8.30 ) can b e evaluated t o give a n expression fo r the secondar y yiel d i nterms o f th e parameter s E, -y , e (e.g. , Salow , 1940 ; Dekker , 1958) . Suc h a result ,although obviously an oversimplification, can provide usefu l insight s int o both thetheory o f S E generatio n (Kanay a an d Ono , 1984 ) an d th e detai l o f S E imagin g(Catto and Smith, 1973) . If , however, Eq . (8.30) is evaluated inside a Monte Carl osimulation where both the instantaneous stopping power and the depth of the inci-dent electron ar e known at all times, then the model is freed fro m the limitations ofthe analytical approximation s an d becomes bot h mor e accurate an d more flexible .

Either of the two basic models discussed in this book can be used, although—since SE effects ar e most usually of interest i n bulk specimens—the plural scatter-ing model is usually the most convenient. Incorporating Eq . (8.30) into the model issimple. Afte r th e usual computation of the coordinates o f the trajectory , end-poin t

Page 168: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRONS AND IMAGING 159

coordinates xn, yn, zn, then num_sec, or the number of SE produced along thatstep of the trajectory, can be found from Eq. (8.26) in the form

num_sec = <l/e). [E(k) - E(k + 1)]

hence the code fragment would be

{now calculate the secondary electron signal}num_sec:= (E[k] -E[k+1])*se_gen ;

where se_gen is the value of the quantity (1/e).The start and finish coordinates of the electron depth beneath the surface along

this step are z and zn respectively. If the rate of SE production is assumed to beconstant along the step, then, by integration of Eq. (8.28) along the step, the corre-sponding escape probability p(z, zn) is:

This integration is necessary because, in general, the step length and hence (zn - z)is much larger than X. The SE yield, which reaches the surface as a result of theproduction and escape along this step of the trajectory, is then the product of num_sec and p(z,zn). In the program, this calculation is carried out by the proceduresei_sig:

Procedure sei_sig ;{Computes the secondary electron yield along one step of

trajectory}

var Ic , Id:real ; {variables local to this procedure]

begin

Ic: =z/m_f_p;{m_f_p is \ for SE escape}

if lc>10. then lc:=10.; {error trap}

if lc<0. then lc:=0.; {error trap}

Id:=zn/m_f_p;

if ld>10. then Id:=10;

if ld<0. then ld:=0;

{now calculate the signal using generation rate and the integral

for p(z,zn) — se—yield is the running total of SE production at

surface}

Page 169: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

160 MONTE CARLO MODELING

if lc=l d the n{electron is traveling parallel to surface-don't need to integrate}se_yield: =se_yield+0 . 5* num_sec*exp(-Ic )

elsese_yield: =se_yield + 0 . 5 * n u m _ s e c * ( m _ f _ p / ( z n - z ) ) * ( e x p < - l c ) -

e x p ( - l d ) ) ;end;

If the incident electron is backscattered during a step, then the above procedureis not used. Instead, the escape probability is assigned to a random number RND toavoid the necessity of calculating the length of the exit portion of the trajectory thatlies within the sample. Since the number of BSE is small, the error produced by thisapproximation is negligible. Thus the program is modified to read

{test for electron position within the sample}

if zn< = 0 then {electron has been backscattered}

begin

bk_sct: =bk_sct + l. ; {count BS electrons}

{now estimate SE yield for exiting electron}

se_yield: =se_yield+num_sec* random;

num:=num+l;

goto back—scatter;

end

else

sei_sig; {procedure to get increment of SE yield}

reset—coordinates;

end;

The program SE_MC on the disk implements this code, including, in this case, aloop that changes the incident beam energy through a range of values, so that thevariation of SE with energy can be computed.

To run the program, it is necessary to know the values of the parameters e andX. In general, the most efficient way to obtain these numbers is to measure the total

electron yield (8 + T|) as a function of incident beam energy from a flat sample andthen attempt to fit these data points by supplying the simulation with trial values of eand X. If a good fit can be obtained, then the validity of the model is established andappropriate values of e and X have been established. (8 + TI) can readily be mea-sured in the SEM by using a calibrated specimen current amplifier and a Faradaycup. If the incident beam current, measured using the amplifier and Faraday cup, is/b, and if the measured specimen current with the beam on the sample is 7S, then by

current balance

Page 170: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRON S AN D IMAGING 16 1

In order to obtain good results , it is necessary to ensure that the specimen doe s notrecollect electron s scattere d from the chamber walls or pole piece (e.g. , Reimer andTolkamp, 1980) . Figur e 8.1 0 show s measure d ( 8 + T\) dat a fo r carbon , silicon ,copper, and silver (Joy, 1993) . Since the backscattering coefficient fo r each of thesematerials varies only slowly over the energy range, the variation in yield i s mostlydue to the change in the SE component. In each case the profil e ha s a generallysimilar form, in which the yield rises to a value of units or greater at around 1 keV. Aninitial guess for the value of X can be obtained by using the Salow (1940) result thatthe SE yield is a maximum when the electron range R = 2.3X , where R is evaluatedusing th e norma l Beth e expressio n (se e Chap . 4) . Estimatin g X in thi s wa y an dinitially setting e to 50 eV then allows a trial yield curve to be computed. The qualityof fit can then be iteratively improved by adjusting the two parameters. The effects ofthe choice of X and e on the yield profile are quite different, s o the determination ofthe bes t fi t values is unambiguous . Table 8. 2 gives X and e values for a variety ofcommonly encountered elements an d compounds.

It i s reasonabl e t o regar d e an d X as simpl y adjustabl e fittin g parameters .However, it is also usefu l t o consider the physical significanc e of these two quan-tities, e can be considered a s being related to the energy required the initiate the SEcascade. This energy will be relatively high, certainly some way above the energy atwhich the cross section of collisions betwee n an energetic electron and a conductionelectron i s a maximum—which, for a metal, is the plasmon energy. Thus the valuesof e deduced from th e fitting process , which are mostly 50 eV or higher and so twoto three times the typical plasmon energy, are of the right order o f magnitude (Joy,1987a). X was defined a s a characteristic attenuation length which, since an electroncannot be "absorbed," implies tha t i t represents th e averag e distance a SE travelsbefore undergoing a scattering event in which it gives up sufficient energ y to makeits subsequen t escap e impossible . X , which i s typicall y o f th e orde r o f 1 nm fo renergies o f a fe w hundre d electro n volts , fall s t o a minimu m value fo r energie saround 3 0 to 5 0 eV an d then rises agai n because ther e ar e no larg e cross-sectio ninelastic scattering processes availabl e (Powell, 1984) . Averaging the inelastic MFPover the energ y distributio n o f the secondar y cascade predict s value s of X that ar equite close t o those determined b y the fitting procedure . Thu s it can be concludedthat th e value s o f e an d X derived fro m a fi t t o experimenta l dat a ar e physicallyreasonable an d consistent wit h the cascade mode l fo r SE production.

8.4.1 Application of the model

With appropriate values of e and X substituted in the program SE_MC, it is possibleto model some important aspects of the behavior of SE. For example, it is instructiveto examin e ho w th e secondar y yiel d coefficien t 8 varies wit h the angl e o f bea minclination to the surface, since this is the basis for topographic imaging in the SEM.Figure 8.1 1 plot s th e compute d S E yiel d 8(6 ) a t th e specime n til t angl e 0 , nor -

Page 171: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

Figure 8.10. Experimenta l total electron (secondary and backscattered) yield s for C, Cu, Ag,and Au.

162

Page 172: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

Figure 8.10. (continued)

163

Page 173: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

164 MONT E CARL O MODELIN G

Table 8.2 X and € values for a variety of common elements and compounds

Material e(eV ) X(nm ) 8 m E m E 2

Carbon 12 5 5. 5 1. 8 1. 0 3. 0Aluminum 6 0 2. 5 1.6 7 0.4 0 1.9 5Silicon (xtal ) 7 0 3. 0 1.2 0 0.5 0 1.4 5

poly-Si 17 5 11. 0 1. 1 0. 9 2. 5Chromium 12 5 2. 5 1.1 6 0. 6 2. 5Copper 12 5 2. 5 1.1 8 0. 9 2. 8Molybdenum 10 0 2. 0 1.2 4 0.6 5 3. 7Silver 18 0 3. 5 1. 0 1. 2 4. 0Gold 7 5 1. 0 1. 1 0. 8 4. 6

SiO2 4 0 5. 0 2. 4 0. 7 3. 5GaAs 7 0 5. 0 1. 2 0. 8 3. 0Si3N4 11 0 4. 5 1.3 7 0. 8 1. 1PMMA 7 0 5. 0 1. 1 0. 4 0. 6SiC 6 0 3. 5 1. 6 0. 6 1. 6A12O3 5 0 3. 0 2. 6 0. 6 4. 0

malized to the yield at normal incidence, fo r silicon for a number of different bea menergies. A t accelerating voltage s above 5 kV, the yield variation with X is in closeagreement wit h the measured secant (6 ) behavior (Kanter , 1961). A s the energy i sreduced, however , th e variatio n o f yiel d become s les s pronounced , an d a t abou t0.75 keV a condition i s reached wher e the yield goes through a maximum and then

Figure 8.11. Compute d variation o f SE yield with tilt angl e an d beam energy .

Page 174: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRONS AND IMAGING 165

declines wit h a further increas e i n tilt. The decreasing sensitivit y o f the secondaryyield to the beam angle of incidence is readily observed in low-voltage SEM images(e.g., Joy 1989b ; Reimer, 1993 ) and means that the information in a SE image of asurface recorded a t low beam energies mus t be interpreted rather differently t o thatof the same area recorded at , say, 30 keV. The explanation for this effect i s seen tobe tha t at low energie s th e value s of X. , which determines th e escap e of the SE , i scomparable with the incident electro n range . Thus the majority o f SE generated inthe specimen wil l always escape regardles s o f the orientation o f the surfac e t o thebeam.

SE_MC ca n als o b e use d t o examin e th e chargin g o f a sampl e unde r th eelectron beam. If the incident beam current is 7b, then current balance at the surfac erequires that

where 7SC is the specime n curren t flowing to (o r from) ground . I f the sample i s aninsulator, then 7SC = 0 and so charging will occur (i.e. , current balance will not bepossible) unless (T| + 8 ) = 1 . In general, there may be two incident beam energies atwhich this condition may be satisfied, an energy El, which is typically of the orderof 5 0 to 15 0 eV, and a higher energy E2, whic h is usually in the range 500 eV to2 keV. If the value of E2 for a particular material is known, then operating the SEMat this energy will allow the sample to be examined without charging artifacts eventhough it is a nonconductor. E2 can readily be found fro m SEJVIC , since both thesecondary an d backscattered yield s ar e computed. Table 8. 1 shows the E2 valuescomputed in this way. These ar e in good agreement wit h experimenta l determina-tions (Joy , 1987b) .

It is also instructive to apply the model to the case of a specimen tilted throughsome angle 9 relative t o the inciden t beam. Both the S E and the BS yield ca n beexpected t o rise as 6 is raised, s o E2 will also be expected to increase. Figur e 8.12plots E2 as a function of 0 for a several different materials . In each case E2 rises, butthe effec t i s les s pronounced for material s wit h highe r atomi c numbers. To a firs tapproximation, we find that E2(6), the value of E2 computed for angle of incidenceof G , is given by th e relatio n

where E2(0 ) i s th e value o f E2 a t normal incidenc e (Sugiyam a et al. , 1986 ; Joy ,1987b; Reimer, 1993). While this result overestimates the variation of E2 for high-atomic-number materials , i t i s a usefu l guid e a s t o ho w E 2 varie s an d i s a goodexample o f a result tha t cannot b e produced by a genera l analytica l model o f th ebeam interaction .

Page 175: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

166 MONTE CARLO MODELIN G

Figure 8.12. Compute d variation of E2 with incident angle.

The p factor , whic h i s th e rati o o f th e efficienc y o f generatio n o f S E b ybackscattered (BS ) as compared with primary electrons [Eqs . (8.16) and (8.17)], canalso be determined from this model. The procedure is to compute SE and BS yieldsas a function o f specimen thickness for a given beam energy. As shown in Fig. 8.13 ,a plot of the SE yield against the corresponding BS yield gives a good straight line,

Figure 8.13. Compute d variation of SE yield vs. BS yield gives p value .

Page 176: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRON S AN D IMAGIN G 16 7

the extrapolated intercept of which is the SE1 yield and the slope of which is (3.SE1.(Note that, as discussed before, if the plural scattering mode l i s being used to carryout this computation, then the sample thickness must be at least 5% of the electronrange at the chosen beam energy, so that the simulation includes at least two to threesteps as a minimum.) (3 values are found to be typically in the range 2.5 to 4. This iin goo d agreemen t wit h th e value s measure d b y Shimiz u (1974 ) bu t somewha tlower than the values of 4 to 6 measured by Drescher e t al . (1970) .

The mos t importan t applicatio n o f thi s mode l i s a s a mean s t o answe r th egeneral question : Fo r a specimen o f a given chemistry an d geometr y form , wha twould b e th e for m o f the secondar y electron lin e profil e o r image tha t would beproduced i n a SE M under a specifie d se t o f operating conditions ? Th e abilit y t operform thi s job i s of importance in the fiel d o f SE M metrology (Poste k and Joy,1986) as well as being a tool for the detailed interpretation o f normal SEM images.The basic requirement is to be able to compute the SE (and usually the BSE) signalsat selected points on a surface of arbitrary shape and composition. The first problemis that of defining the geometry of the specimen itself. The mathematical descriptionof a completely genera l specimen topography is possible throug h the use of fracta lrepresentations, but fortunately this level of complexity is not normally required. Inthe case of the metrology application, where the specimen is a trench or an intercon-nect on a substrate, the specimen can be adequately define d as being bounded by anumber of straight-line segments that fix the geometry. Computing the BS signal inthis case is then relatively straightforward. First, we test whether or not the electronis, a t this time, inside or outside o f th e specime n surface . If i t i s outside , then it sdirection of travel relative to the z axis is checked. If the electron is traveling upward(antiparallel to the beam), then it is potentially collectible by a BSE detector and isthus counted as a BSE. If it is traveling downward, then it will eventually impact thespecimen agai n and be rescattered; such electrons ar e thus not counted .

Determining the SE yield requires a calculation of the escape probability of thesecondaries generate d within the specime n tha t takes into account the form o f thesurface geometry. The first step is to generalize Eq. (8.31) for the escape of a SE. If,as i n Fig . 8.14 , th e electro n i s travelin g i n a region bounde d b y mor e tha n on esurface—for example , when it is close to an edge o r in a raised region suc h as aninterconnect line—the SE escape probability p ca n be written to a first approxima-tion as

where

Page 177: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

168 MONTE CARL O MODELING

Figure 8.14. Geometr y fo r determination of SE yield.

and the % and si2 are , respectively , the perpendicular distance s fro m th e start andfinish o f th e trajector y step t o th e /t h surface . I t i s clea r tha t thi s approac h i s anoversimplification becaus e i t doe s no t tak e int o accoun t th e relativ e soli d angle ssubtended a t the SE generation poin t by each o f the exit surfaces . As a result, theescape probabilit y compute d fro m Eq . (8.35 ) i s a n overestimat e a s compare d t ovalues obtaine d b y direc t numerica l integratio n (Joy , 1989a ) i n region s tha t ar eclose t o edge s an d corners. However , becaus e th e exponentia l term s deca y i n adistance of order \, th e region tha t is, in error i s narrow (i.e. , a few nanometers) incomparison wit h the overal l exten t o f th e simulate d profil e o r imag e (typicall y amicron o r more) an d s o does no t usuall y present a problem. I f higher accurac y isrequired i n these regions , the n the value s of th e directl y compute d escape proba -bilities coul d be substituted.

The progra m SE-profil e o n th e dis k demonstrate s th e principle s o f a n S Esignal lin e profil e simulation , using the procedure s discusse d i n thi s section . Th eprogram is based on the plural scattering code originally developed in Chap. 4. Thisspeeds u p the computation, whic h i s desirable, sinc e i t i s necessary t o do a statis-tically vali d numbe r o f computation s (i.e. , 500 0 o r more ) a t eac h o f perhap s 2 0points to produce a useful profile. On the other hand, the inherent samplin g scale ofthe plural model limits the effective spatia l resolution of the simulation to about 2%of the electron range. The conversion t o a single scattering model is straightforwardand provides a worthwhile improvement in resolution, bu t a t the cos t o f a greatlyincreased computatio n time.

For simplicity , th e specime n (Fig . 8.15 ) i s assume d t o consis t o f a paral -lelipiped structur e with a base widt h of 1 (Ji m placed o n a fla t substrate , althoughboth th e siz e an d shap e ca n readil y b e change d b y obviou s modification s to th ecode. The materials of the structure and the substrate, the height of the structure, andthe angles made by the walls of the structure to the vertical can all be determined bythe user . The program compute s an d plots the secondar y an d backscattered signa lprofile a t 20 different pixe l points across the structure and substrate. Because of thesymmetrical geometry, al l of the pixels are placed in the positive half-space relativeto th e cente r o f th e structure . The compute d dat a ar e the n reflecte d through th eorigin of coordinates Y = 0 to yield a complete profile. To make the simulation morerealistic, th e incident electro n bea m i s assumed to be Gaussian in profile and of a

Page 178: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRONS AND IMAGING 169

Figure 8.15. Geometr y for computation of signa l profiles .

chosen finite diameter. The usual assignment at the start of each trajectory, which

places

x: = 0 ;

y:=0;

2 I ~~ " U f

is now modified to put

x: =x_val;y:= Y-pos[m ] + y_val ;

z:=z_val;

where the y_pos [m] are the nominal values of y as set up in the position array of20 elements and x_val y_val are Gaussian distributed random numbers with avariance proportional to the desired probe diameter. The routine GasDev performs

this computation.

Function GasDev:real;

{generates a Gaussian deviate of unit variance—gliset is a

global variance indicating if a deviate value is available

adapted from Press et al. , 1986}

var fac,r,vl,v2:real;

begin {the function}

if gliset = 0 then {we need a value}

begin

repeat

vl: =2 . 0"random-1.0; {pick a number}v2 : =2 . 0*random-l. 0; {pick another number}

r : = (vl*vl) + (v2*v2) ; {radiu s of unit circle}

Page 179: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

170 MONTE CARLO MODELING

until r<1.0 ; {point s mus t be in unit circle}

fac:=sqrt ( - 2 . 0 * L N ( r ) / r) ; {Box-Muller transform}glgset: =vl*fac; {sav e one normal deviate}

GasDev: =v2*fac; {retur n the other value }end

else {glise t = i s o w e have a spar e value }begin

GasDev: =glgset; {s o retur n it }gliset:=0; {rese t th e flag}

end;end;

z_val ca n no w b e determine d fro m a knowledge o f th e specime n geometry . Astructure defined by it s height and width can have two form s (Fig . 8.16)—on e owhich can be called "overcut" and the other "undercut." If the wall-angle is setto be negative, then the structure is undercut and a Boolean variable (i.e., a variablethat can have two values, true o r false) i s set to false .

{compute th e parameters necessary to describe the structure}

tn: =s in (wal l_ang le /57 .4 ) /cos (wal l_ang le /57 .4 ); {Pasca l ha s no

tangent}ch: =cos (wall_angle/57.4) ; {conver t al l angles to radians}

wh:=width/2.0;tw:=wh - height*tn ; {from geometry of Fig. 8.16}

{test for type of structure}

undercut: =false; {defaul t condition }if tn< 0 the n undercut : =true; {tes t to find actual

condition}

{set up some boundary conditions}

b_edge: =wh;if undercu t the n b_edge:=tw ;

Figure 8.16. Definitio n o f undercu t an d overcut feature s o f a wall.

Page 180: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRONS AND IMAGING 171

plateau: =tw;

if undercut then plateau:=wh;

The y coordinat e o f th e bea m i s se t t o on e o f 2 0 possibl e value s i n a n arra yy_pos [m] ; s o given this value, the geometry o f the structure z_val ca n now bedetermined.

y-val: =y_pos [m ] + (probe_size*GasDev ) ; {Gaussian beam profile]

ibegin

if y_val > = tw the n {it misses the top edge]

z_val :=0.0else

z_val: =-height;end

else {it is over cut]

begin

if y_val>=wh then z_val:=0

else

z_val: = (y—val-wh) / tn: {from geometry of Fig. 8.15}

if y_val < = tw the n z-val : =height ;end;

The rest o f the program i s straightforward and requires no detailed comment . Th elongest section is the application of Eq. (8.35) to compute the SE yield. The programproceeds by locating the position o f the electron i n one of four possible regions—inthe substrate not beneath the structure, in the substrate and underneath the structure ,in the walls of the structure, in the central region of the structure—and then comput-ing the possible exi t paths. One small refinement is to consider th e possibility o f thespecimen recollecting som e of its own emitted electrons. Ever y emerging BSE (e.g.,from the side walls of the feature) is checked to see if it has a component of velocitytowards the substrate . If it does, the n it is allowed to reenter th e specimen and theprogram continue s t o track i t until i t is again backscattere d o r comes t o rest .

Figure 8.1 7 shows SE and BS profiles for the case of an aluminum structure 1jjim wide and 1 urn high with walls at +5° t o the vertical (i.e. , an overcut structure)placed on a silicon substrat e and for beam energies of 2,10, and 30 keV. The profilesdemonstrate how the "image" of this simple object is affected by the choice of beamenergy. At 2 keV, both the SE and BSE line profiles reveal the edges of the structureclearly. I n the SE image, th e simulatio n show s that the lin e woul d appea r slightl ybright above background, with sharp white edges. Th e BS profile shows the alumi-num line and the silicon substrat e at about the same brightness, bu t the edges o f thefeature ar e marked by bright band s with a width of the order o f the incident bea mrange (i.e. , abou t 500 A). At 1 0 keV, the SE profile remains much the same, but the

Page 181: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

172 MONTE CARL O MODELING

Figure 8.17. Compute d SE and BSE signal profiles across an aluminum bar 1 fun wide and 1(Jim high, with 5° wall, on a silicon substrate at 2 , 10 , and 30-ke V bea m energy .

edge brightness i s now greater i n magnitude. The BS profile has changed substan -tially, however, because the interaction volume of the beam is of the same order ofmagnitude as the size of the feature. The beam range is now of the order of the widthof the feature, so the whole line is bright above background with no clearly definededges/ Note also tha t the background intensity from th e silicon substrat e dip s as itapproaches th e edg e o f th e featur e becaus e o f electro n penetratio n beneat h th estructure. Finally, at 30 keV, the SE and BSE images are similar to those at 1 0 keV,with the SE profile dominated by the edge bright lines and a low contrast in the BSEprofile because the thickness of the line is now a small fraction of the electron range.

Page 182: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

SECONDARY ELECTRONS AND IMAGING 173

A comparison o f the various line profiles with the real cross-sectional geome -try of the structure shows that determining th e position of the top and bottom edgesfrom any of the traces is difficult o r impossible. Hence, although it is easy to image amicron-scale device , "measuring " the profil e wit h an y accurac y usin g th e S E orBSE signal s i s a muc h mor e challengin g tas k becaus e o f th e constantl y shiftin grelationship betwee n th e real an d apparent edge positions. On e of the most usefu lapplications o f suc h simulation s a s these, therefore , i s to try an d devise rules thatwill allow experimental lin e profiles to be interpreted in such a way that the width,height, an d wall angle of the structure from whic h they came can be deduced (see ,e.g., Poste k an d Joy, 1986) .

A comparison of these computed profiles and corresponding experimenta l datashows that the qualitative agreement i s excellent, with the simulations predicting al lof th e feature s o f th e experimenta l profiles . However , th e leve l o f quantitativ eagreement is not always so encouraging, for a variety of reasons. A key reason is thebehavior an d efficiencie s o f th e S E an d BS E detector s use d i n th e experimenta lsystem. In the computation, it is assumed all secondaries ar e collected. In practice ,the detection efficienc y o f the SE detector wil l depend o n where it is relative to theirradiated area , on the bias applied t o it, and on the presence an d magnitude of anylocal charging . Thes e consideration s ca n drasticall y modif y th e detai l o f th e S Eprofile. Unfortunately , computing the efficiency o f the SE detector requires a deter-mination of the electrostatic field distribution s in the SEM specimen chamber , andthis is a lengthy task (Suga et al., 1990; Bradle y and Joy, 1991 , Czyzewski and Joy,1992). I n addition , i n complex structure s such as parallel array s of closely space dlines, there is a possibility that emerging BSE will be recollected b y some other partof the structure, generating SE at the point of entry and during the subsequent travel(Kotera et al. , 1990) . Detaile d calculations , therefore, require testin g for the possi -bility o f recollection by tracing th e path of the BSE a s they leave .

Expanding thes e line-profil e computation s t o th e simulatio n o f a complet eimage is , in principle, straightforward , although the time required t o obtained ade -quate statistic s migh t be dauntin g on any but the fastes t computers . Nevertheless ,with the growing interest in quantitative image interpretation (e.g. , for microdimen-sional metrology), and for the comparison of images between, say, the SEM and thescanning tunneling microscope (STM) , this is likely to be an important applicatio nand extension o f the techniques discusse d above .

Page 183: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

9

X-RAY PRODUCTION AND MICRO ANALYSIS

9.1 Introduction

The process of fluorescent x-ray generation in a sample by electron beam irradiationmakes i t possible t o perform a chemical microanalysis of small (micrometer siz e orless) region s o f a specimen . However , i n orde r t o obtai n quantitativ e data , i t i snecessary t o be abl e t o describ e i n considerabl e detai l th e distribution—bot h lat -erally and in depth—of the x-ray production. I t was this need that led to the initia lstudies of Monte Carlo modeling by Bishop (1966). Although, it many cases, simpleanalytical model s hav e subsequentl y bee n develope d tha t allo w man y o f th e re -quired result s t o b e obtaine d wit h adequat e accuracy , onl y Mont e Carl o method soffer a genera l approac h t o th e microanalysi s o f a n arbitrar y specimen . I n thi schapter w e examin e x-ra y production , bot h characteristi c an d continuu m (Brem-sstrahlung), i n thi n foil s an d i n bul k specimen s usin g th e Mont e Carl o model spreviously developed .

9.2 The generation of characteristic x-rays

The production of characteristic x-rays along a step of an electron trajectory can becalculated i f the cross sectio n fo r x-ray production i s known. Typically th e Beth ecross sectio n fo r inner-shel l ionizatio n i s used , in the form :

where « s i s th e numbe r o f electron s i n th e shel l o r subshell , Ec i s th e critica lionization energ y i n kilo electro n volts , U is th e overvoltage E/EC, bs and cs ar econstants, an d a the n ha s th e unit s o f ionization s pe r inciden t electron s pe ratom/cm2. Fo r example , fo r the K shell , bs and c s ar e 0.9 an d 0.6 5 respectivel y(Powell, 1976 ) for the overvoltage range 4 < U ̂ 25. For the L and M shells, theappropriate constant s an d range o f applicability are les s wel l established (Powell ,1976).

In some cases, for example, the production of x-rays in a thin foil, the energy of

174

Page 184: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTIO N AND MICROANALYSI S 17 5

the electrons ma y always be high enough to put U in the correct range ; bu t in thecase of bulk specimens, i t is clear that, since the energy of the electron decrease s asit travels through the specimen, ultimately the overvoltage will no longer satisfy th econdition U s 4 and the predicted cross section may become inaccurate. Alternativecross-section model s ar e available , fo r exampl e Casnat i e t al . (1982) , whic h ar evalid fo r lo w overvoltages , an d these shoul d b e considered fo r th e mos t accuratework; bu t th e familiarit y an d convenienc e o f th e Beth e expressio n ha s le d t o it snearly universa l use in al l types of conditions, whethe r warranted or not.

The numbe r o f x-ray s /s pe r inciden t electro n produce d alon g a ste p o f thetrajectory i s then

where NA i s Avogadro's number (6 X 1023 atoms/mole), A is the atomic weight, p isthe density, to is the fluorescent yield, and the step length is in centimeters. Sinc e A,NA, p an d 9 ar e constant , i t i s convenien t t o extrac t thes e quantities , an d th econstants ahead of the functional variables in Eq. (9.1), and evaluate /s in the for m

only restoring the numerical constants whe n an absolute yiel d valu e is required.

9.3 The generation of continuum x-rays

In addition to the characteristic x-ra y signal used for microanalysis, there is also acontinuum, or Bremsstrahlung, x-ray signal generate d by the slowing down of theelectrons in the coulomb field o f an atom. By analogy with Eq. (9.2) , we can writethe continuum yield per inciden t electron int o a unit steradian 7 CO as

where Q is the continuum cross section. The continuum radiation, unlike the charac-teristic line , i s anisotropicaly emitted, being peaked abou t the forward direction oftravel o f the electron . I n considering Bremsstrahlung production i n bulk samples ,this effect i s of little consequence because it is averaged out by the plural scatteringof the electrons; bu t in the case o f thin films, where the incident electron s ar e onlyscattered throug h smal l angles , th e polarizatio n an d directivit y o f th e continuummust be properly accounte d for.

A simple cross section for continuum production can be obtained by combining

Page 185: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

176 MONT E CARL O MODELIN G

experimental observatio n an d som e theoretica l result s (Fior i e t al. , 1982) . Th emaximum energy that can be given up by an incident electron is equal to its kineticenergy E0, numerically equa l to the beam voltag e V 0; thus the highest energy tha tcan appea r i n the continuum spectrum i s E0, the so-calle d high-energ y o r Duane-Hunt limit. Second , for thin specimens i t is found tha t the continuum energy in anenergy interval A£ is about constant (Compton and Allison, 1935 ) fro m zer o up tothe high-energy limit. Thus, the fraction of the total emitted continuum energy Er inthe energ y rang e E t o E + A E i s AE/E0. Th e efficienc y o f th e generatio n o fcontinuum productio n i s define d as the tota l continuum energy i n the range fro mnear zer o t o E0, generate d b y electron s tha t los e a n amoun t dV o f thei r energ ydivided b y th e energ y lost . Kirkpatric k an d Wiedman n (1945 ) showe d fro m th etheory of Sommerfeld (1931) that this efficiency wa s 2.8 X 10~9 Z V0, where V0 isthe bea m voltag e i n kilovolt s an d Z i s th e atomi c number . The tota l continuumenergy i s thu s

The fractio n o f thi s quantit y i n th e energ y interva l A E then give s th e numbe r o fphotons 7 CO of energ y E; i.e. , th e numbe r of photons i n th e energ y interva l A E isET.AE/(£ EO). S o

In the Monte Carlo simulation , dV is simply the energy loss occurring alon g agiven ste p o f th e trajectory , a quantit y that i s evaluate d eithe r directl y fro m th estopping power (in the single scattering model) or as the difference E[k] - E[k + 1]in th e plura l scatterin g model , s o Eq . (9.5 ) ca n b e use d t o giv e th e continuu mintensity a t some energy £ i n the energy interval A£ directly .

This simple expression produces quite useful result s in many cases of interest,but i t mus t b e realize d tha t i t i s a drasti c simplification , sinc e i t assume s bot hisotropic emission and uniformity in energy distribution. More accurate and detailedmodels are available, the most widely used of which is that of Sommerfeld (1931) asmodified b y Kirkpatric k an d Wiedman n (1945) . Sommerfeld' s mode l assume s apure Coulomb field abou t a point nucleus ignoring screening effect s an d representsthe scattered electrons a s plane waves. Stricly speaking, this theory is valid only forlow electro n energies , wher e relativisti c effect s ca n be neglected . Kirkpatric k andWiedmann (1945 ) gav e a n algebrai c fi t t o th e Sommerfel d theor y tha t correctl yaccounts fo r th e polarizatio n o f the Bremsstrahlung an d i s more easily compute dnumerically. The algebra is messy and will not be reproduced here , but a routine forthe evaluation of the Kirkpatrick an d Wiedmann expression base d on that given byStatham (1976) will be given later i n thi s chapter .

Page 186: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTIO N AN D MICROANALYSI S 17 7

9.4 X-ray production in thin films

9.4.1 Spatial resolution

The simples t case of interest is tha t o f determining the spatia l resolution of x-ra ymicroanalysis. Thi s proble m i s o f importanc e i n analytica l electro n microscop y(AEM), where x-ray analysis is used to determine the composition o f small precipi-tates or the composition profile at a boundary. In this kind of situation, the specimenis thin (typically 300 to 150 0 A ) and the incident beam energy i s high (100 to 200keV). As ca n b e see n b y running the SS_M C progra m (Chap . 3 ) for thi s type ofcondition, the majority of electrons pass through the sample unscattered because thespecimen thicknes s i s comparabl e t o an d smalle r tha n th e elasti c mea n fre e pat h(MFP) a t this energy. Since , i n addition , th e beam energy i s usually much greate rthan the excitation energ y of the x-ray line o f interest, the volume associated wit hx-ray generation i s identical with that associated wit h the electron scattering , sincethe ionizatio n cros s sectio n wil l b e essentiall y constant . Sinc e th e x-ra y spatia lresolution is commonly defined as the radius of the volume within which 90% of theemitted x-ray s are generated, in this approximatio n th e resolution ca n be taken asbeing th e radiu s withi n which 90 % o f the transmitte d electrons emerg e fro m th ebottom surface of the foil. Incorporation of this into the SSJVIC program is straight-forward. If an electron is determined as being transmitted (i.e., zn > thickness of thefoil) then the length of the exit vector is first found and the exit radius from the beamaxis (x = y = 0 ) i s computed. The bottom surfac e is divided int o an array of 100annular rings, radius [ 0 . . 99 ] , of constant width scale where scale isset to 10 A. The exit radius is converted to give the number of the annular ring (0 to100) through which the electron left, and one count is added to the total for that ring.

{after determining that this electron is leaving}

{find length of vector from x,y,z to bottom surface}

11: = (thick-z) /cc{hence the exit coordinates on the bottom surface are}

xn: =x+ll*ca;

yn: =y+ll*cb;

{and the exit radius about the beam axis is}

radial:=sqrt((xn*xn)+(yn*yn));

{convert this to an integer identifying the annular ring}

r_val:=trunc(radial/scale) ;{and use r—val to index the array and add one count}if r_val<100 then {will not overflow the array

bounds}

radius[r_val] : =radius[r_val] + 1;goto exit;

end;{otherwise

Page 187: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

178 MONTE CARLO MODELING

At the end of the desired number of trajectories, the beam is found by startingfrom the center annulus (r_val = 0) and counting out until 90% of the total numberof transmitted electrons have been included. The radius at which this occurs is thenthe beam broadening figure.

{now calculate the 90% beam broadening radius}

dum:=0 {dummy summing variable}

{total number of transmitted electrons is traj—num — bk—sct. Wehave to reach 90% of this number}

broad:=trunc(0.9*(traj _num-bk_sct) ) ;{compute the running sum as the radius is increased}

for k:=0 to 99 dobegindum:=dum + radius [k] ;

if dum>=broad then {we have reached 90% at this value of k}}goto test; {so stop counting}

end;test: {exit from summing loop}

{and display the computed beam broadening as a line of appropriatelength}

MoveTo(center-trunc(k*scale*plot_scale), bottom+15) ;LineTo(center-trunc(k*scale*plot_scale), bottom+15) ;

readln; {freeze the display}

Figure 9.1 shows how the beam broadening computed in this way compareswith the simple analytical estimate given by Goldstein et al. (1977) for the case of a100-keV beam incident on a foil of copper. It can be seen that the two modelspredict the same type of behavior with increasing thickness, even though they givesomewhat different values for the broadening. This is not surprising, because theanalytical model is estimating the average exit diameter on the assumption that eachelectron is scattered just once, at the midpoint of the foil, and this figure is notdirectly related to the 90% definition used in the Monte Carlo case. In addition, oncethe foil becomes thick enough for plural scattering to be significant, the valueestimated by the analytical model is no longer valid.

It is clear, in any case, that a single "beam broadening" number cannot faithful-ly represent the actual experimental situation. While it provides a guide as to theresolution to be expected, it cannot say what effect this resoluton might have on, forexample, a measured composition profile. For that kind of problem, it is necessaryto use the actual x-ray generation profile of the beam, again on the assumption thatthis is directly related to the distribution of trajectories of the incident electrons. Theprogram AEM_MC on the disk provides this ability. It is essentially the same singlescattering program, the only modification being that the incident electron beam is

Page 188: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTIO N AN D MICROANALYSI S 179

Figure 9.1. Bea m broadening in copper at 100 keV using Monte Carlo method and Goldsteinet al . (1977) equation.

assumed to be a Gaussian distribution o f som e given ful l widt h at half maximumheight (FWHM) . Basically, the firs t par t of the procedure i s identical t o that givenabove, so that the number of electrons travelin g through—and hence the number ofx-rays produced in a given annular ring—is determined as before. Imagine now thatthe beam i s placed a t a distance X from some tes t poin t in the sample. When X i svery large and negative, no x-rays will be produced at the test point, but the numberwill increase a s X i s reduced, reac h a maximum when X = 0 , and then fal l awayagain as X becomes large and positive. A plot of the integrated x-ra y generation inthe positive half space x > 0 as a function o f the incident beam position X give s aS-shaped profile (fig. 9.2), which rises from 0 % to 100 % of the total x-ray genera-tion. I n a manner analogou s t o tha t used fo r specifyin g the probe diamete r o f anelectron beam, the distance travelled in raising the x-ray signal from 10 % to 90% ofits maximum value can be called the x-ray spatial resolution. The program plots theprofile an d marks on the 10 % and 90% levels so that this number can be measured.Although this value is again a single number, the visual profile provides a guide asto wha t ca n b e expecte d t o happen . Whe n th e specime n i s thin , th e profil e i sdominated by the Gaussian shape of the probe, since electron scattering is small andthe profil e i s a standar d erro r functio n (o r "erf" ) curve . A s th e foi l thicknes sincreases, however , th e profil e change s shap e an d i s compose d o f tw o distinc tregions, (1) a central region that is still approximately the error function, surroundedby (2) broad tail s as a result o f electron scattering .

The effect o f this particular beam profile on an experimental measurement can

Page 189: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

180 MONTE CARL O MODELIN G

Figure 9.2. Variatio n of integrated x-ra y intensit y wit h position .

now b e observed . Th e progra m permit s tw o kind s o f situation s t o b e considere d(Fig. 9.3) : th e case in which two materials A and B are in contact at some interfac eand in which B is diffusing int o A, and the case of an interface region of some widthW o f material B surrounded by material A, again allowing for the diffusion o f B intoA. I t i s assumed i n either cas e tha t th e electro n scatterin g power s o f A and B ar esufficiently simila r tha t th e for m o f th e electro n bea m profil e i s no t significantl yaltered. C(B) X the concentration o f B in A at some distance x fro m th e interface , i sgiven th e form:

Figure 9.3. Interfac e geometrie s fo r thin-fil m x-ra y program .

Page 190: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTIO N AN D MICROANALYSI S 181

Figure 9.4. Compariso n o f compute d an d actua l profile s acros s a 10-A-wid e boundar y i ncopper, with L = 3 0 A.

where L is a characteristic diffusio n length . I f L is specified , the n the for m o f th ecomposition profile that would be experimentally measured acros s the chosen inter-face can be found by numerical convolution of the computed beam profile with the0'.en for m o f the interface . Becaus e the procedures for doing this are straightfor-ward, they are not given here, but they can be studied in the source code on the disk.Figure 9. 4 shows how the "real" composition profile an d the predicte d measure dprofile would compare for a 1000-A-thick copper film and a 25-A beam at 100 keVfor th e case where the interface region wa s 1 0 A wide (e.g., a grain boundary) andthe diffusion lengt h L is 30 A. If experimental data are available from a n analyticalelectron microscope , th e values of L and W can be obtained by iteratively fitting thecomputed an d measure d profiles . Th e mode l ca n readil y b e extende d t o othe rgeometrical situations .

9.4.2 The effect of fast secondary electrons

In the previous chapter, the generation of fast secondary electrons (FSE ) was incor-porated int o a Mont e Carl o program . I t wa s note d tha t thes e FSE , whic h hav eenergies u p to half that of the incident beam, tended to travel almost normal to theoriginal direction o f the inciden t beam. Clearly , i f these FS E can generate x-rays ,this coul d adversel y affec t th e spatia l resolution o f microanalysis . Equatio n (9.3 )shows tha t the yiel d o f x-rays by a n electron o f energy E i s proportiona l t o l/U,where U is the overvoltage E/Ek. Consider then the case of oxygen x-rays (Ek = 530eV) being fluoresced by incident 100-keV electrons, and by, say, 2-keV fast second -ary electrons . Th e efficienc y o f oxyge n x-ray ionization by th e FS E i s 5 0 timeshigher tha n th e efficienc y fo r th e primar y electron , s o eve n i f onl y on e primar y

Page 191: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

182 MONTE CARLO MODELING

electron in a hundred generated an FSE, 50% of the measured x-ray yield could becoming from secondaries rather than the incident beam. Since, as we saw, the spatialdistribution of the FSE is also quite different from that of the incident beam, it isclear that the effect of including fast secondary production could be significant.

To examine this effect, the Monte Carlo model must be modified to includex-ray generation using Eq. (9.3) for some arbitrary x-ray energy. The code for this isstraightforward:

Procedure generate_x-rays (energy:real;stepsize:real);

{computes the x-ray yield using Eq. (9.3) given the electron

energy and the critical excitation energy of the x-ray. Fixed

constants can be inserted later if required}

var

x_ray_yield:real;at_z, at_r:integer ;

beginx_ray_yield: =ln(energy/E_cri t) /(energy*E_cri t) ;x_ray—yield: =x_ray_yieId*stepsize;

{assign X-ray production to a box at given radius and depth}

at_z:=round( ( z + zn) / (2*step ) ) ; {depth }at_r: =round(sqrt ( (x+xn) * (x+xn) - (y+yn ) * (y+yn) ) / (2*step ) ) ; {radius }

if at_z < = 0 the n at_z : = 0; {t o protect array}

if ( (at_z< = 50) an d (at_r < = 50) ) the n {within bounds so put into

array}

x_ray_gen[at_z,at_r] : =x_ray_gen [at—z , at_r] +x_ray—yield;end;

In this example, the computed x-ray yield is deemed to have occurred at a pointdefined by the midpoints of the trajectory step (x + xri)/2,(y + yri)/2, and at a depth(z 4- zn)/2. The data are stored in an array x_ray_gen [0 . . 5 0 , 0 . . 5 0 ]formed of annuli whose width and depth are defined by the quantity step. Thebox size can be chosen to be any value, but a convenient choice is often to makestep equal to one-fiftieth of the estimated electron range. The variable stepsizepassed to the procedure is the length of the trajectory step. If, on this step, theelectron is either transmitted through or backscattered from the specimen, the step-size must be modified accordingly. This can be done exactly—e.g., the actualdistance 11 traveled within the specimen for an electron that is backscattered out ofthe specimen from some point z beneath the surface of the specimen is 11 = z/cc,where cc is the usual direction cosine. Otherwise the stepsize can be approximatedputting the stepsize equal to stepsize*RND.

The insertion of the procedure into the FSE_MC code is obvious and needs nodetailed comment. In either the primary loop, or in the FSE loop, the x-ray genera-

Page 192: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTION AND MICROANALYSIS 183

Table 9.1 Effect of FSE on X-ray resolution

Line Used Mode Resolution X-ray Yield

IronKa N o FSE 6 0 A —With FSE 6 4 A + 1%

Silicon Ka N o FSE 6 0 A —With FSE 6 5 A +3.1 %

Oxygen Ka N o FSE 6 0 A —With FSE 7 5 A +6.0 %

Carbon Ka N o FSE 6 0 A —With FSE 8 5 A +11.2 %

tion can be computed as soon as the new coordinates xn,yn,zn have been calculate dand th e subsequen t behavio r o f th e electro n ha s bee n determine d (i.e. , doe s th eelectron remai n i n the sampl e or is i t transmitted o r backscattered?). Thu s

zn :=z+ step*cc ;{get x-ray production now for electron remaining in sample}

if E>E_cri t the n {ionization can occur so}generate_x-rays(E,step);

The effec t o f including FSE production i s ofte n quit e significant. Table 9.1 showsdata computed for the effective resolutio n an d total x-ray yield for several differen telements i n a 500-A thick sampl e o f iron examined with a 100-ke V beam.

It ca n be see n tha t in the simpl e approximatio n wher e secondar y effect s ar eneglected, the spatial resolution is independent of the energy of the x-ray line that isbeing examined , because only the volume occupied by the trajectories o f the inci -dent electrons are considered. But when FSE are included, the resolution gets worsebecause of the lateral motio n of the secondaries. Th e lower the energy of the x-ray,the further a given secondary can travel before it no longer has sufficien t energ y toexcite th e chose n line , s o a s th e ionizatio n threshol d i s lowered , th e compute dresolution becomes worse. For iron Ka wher e £crit is around 7 keV, the change inresolution is negligible because relatively fe w FSE have high enough energies; bu tfor carbo n K a (£ crit = 0.2 8 keV), the relution i s degraded by some 40%. Sim-ilarly, including FSE production also changes the predicted yiel d of x-rays from a nelement. Th e exten t to whic h thi s occur s depends o n th e natur e o f th e matri x i nwhich the element t o be observed i s sitting. If the matrix is of low density and lowatomic number , then th e number o f FSE produced , an d the consequen t chang e inx-ray yield, will be small; but for a dense, high-atomic-number matrix, the numberof FSE produced is high and consequently extra fluorescence of the element occurs.This indicates that care must be used in performing quantitative microanalysis under

Page 193: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

184 MONTE CARLO MODELING

conditions where FSE production is significant. For example, at high beam energiesand thus generally high overvoltage-ratios, the majority of x-ray production may becoming vi a the FSE rather than from th e incident electron . I n this case the spatia lresolution will be significantly worse than predicted b y the simple theory—and, infact, wil l get worse rather than better as the beam energy is increased, bu t it will bemore o r less independen t o f the foi l thickness—and the intensity ratios o f variouselements wil l vary in a complex way with composition because changes i n chemis-try will cause changes in the number of FSE and hence in the amount of excitation.Microanalysis a t beam energies o f 200 keV or above is likely to demonstrate theseproblems.

9.4.3 Peak-to-background ratios

A commo n measur e o f th e qualit y o f performanc e o f a n AE M i s th e peak-to -background rati o tha t can b e achieve d fo r a given x-ra y line, typically chromium(Williams an d Steel , 1987) . Value s that hav e bee n publishe d i n th e literatur e fo rvarious microscopes var y by nearly a factor of 10 , and there has also been consider -able discussion about how the figure might be expected to change with the acceler -ating energ y o f th e microscope . Th e Mont e Carl o simulatio n can b e modifie d t oaddress som e o f these questions . The simples t approac h is to use a Kramer's la wmodel for the Bremsstrahlung contribution in the form given in Eqs. (9.4) and (9.5).Although this is only an approximation , in particular because it ignores th e aniso-tropy of the continuum, it provides a good startin g point for a more detailed analy-sis. In order to make use the routine for both electron transparent and bulk samples,it i s convenien t t o calculat e th e dept h distributio n o f th e continuu m signa l i n th echosen energy window, since this will be needed later on. By analogy with the cf>(pz )("phi_ro-z") depth distribution o f characteristic x-ra y production, this can be calledbkg_ro_z. The code woul d have the following form:

Procedure continuum (energy:real;stepsize:real);

{this computes the Bremsstrahlung flux per energy step using a

Kramer's law model. No account is taken of the anisotropy of radi-

ation. The continuum window is at an energy E—bkg}

constantwindow=0.01; {width of continuum energy window in keV}

var

bkg_yield:real;

del_E:real;

begin

position: =round(50*z/thick) ; {divide thickness into 50 steps}

{now compute the continuum signal}

if energy>E_bkg then {the continuum window can be excited}

begin

del_E: =stepsize*stop_pwr(energy)*density*lE-8; {energ y lost along

step}

Page 194: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTION AND MICROANALYSIS 185

bkg_yield:=2 .8E-9* (at_num/E_bkg) *del_E*window; {Kramer's law}

endelse

bkg_yield:= 0;if ( (position>0) an d (position < = 50) ) the n {we are within bounds of

array}bkg_ro_z [position] : =bkg_ro_z [position] +bkg_yield;

end;

The routine computes the Kramer's law contribution, assuming that the energywindow used for measuring the Bremsstrahlung is 10 eV (0.01 keV) wide. The rateof continuum production is proportional to the electron stopping power, so theenergy lost along this step of the trajectory must be determined. Note that this is theflux emitted into 4ir steradians. The angular distribution of the continuum is not,however, isotropic, but forward peaked about the beam direction through the thinfilm, so some account must be taken of this. The corresponding characteristicintensity can be computed by a slight modification of the routine given above, so asto give the depth distribution (phi_ro_z).

Procedure generate—x-rays(energy:real; stepsize: real) ;

{computes the x-ray yield using Eq. (9.3) given the electron ener-

gy and the critical excitation energy of the x-ray. Fixed con-

stants can be inserted later if required}

var

x_ray—yield:real

position:integer;

begin

if energy>E_crit then {x-rays will be produced}

begin

x_ray_.yield: = In (energy /E_cr it) / (energy*E_crit) ;

x_r ay—yield: =x_ray _yield* steps ize;

end

else

x_ray—yield: =0;{assign x-ray production to a given depth}

position: =round(50*z/ th ick) ; {depth counter}

if ( (positon> = 0) an d (position < = 50) ) the n {within bounds of

array}

phi_ro_z [position] : =x_ray_gen [position] +x_jray—yield ;end;

Again, this is the intensity produced into 4ir steradians. Since we want the peak-to-background intensity ratio at a given energy, E_Bkg for the continuum can be putequal to E_Crit for the characteristic line. Then adding the lines:

{this computes the characteristic and continuum signals}

generate—x-rays(s_en,step);

continuum(s_en,step);

Page 195: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

186 MONT E CARL O MODELIN G

to the program a t appropriate point s in the program (i.e. , whe n the coordinates ar ereset, or when the electron i s backscattered or transmitted) calls the two routines. Atthe end of the simulation, the depth distributions for the characteristic an d continu-um signal s mus t b e summe d u p ove r th e whol e thicknes s o f th e specimen . Sinc eboth signals are at the same energy, i t is a reasonable approximatio n to assume thatany x-ray absorption i n the specime n wil l be the same in both cases an d thus willdisappear i n th e ratio . Similarly , the soli d angl e subtende d b y th e detecto r i s th esame for both the continuum and characteristic signal s and also disappears from th eresult. Finally , th e missin g constant s (suc h a s Avogadro' s number , density , an datomic weight ) tha t appea r i n th e origina l equation s bu t no t i n th e cod e mus t bereinserted s o as to give the prope r numerica l values.

{sum the x-ray contributions}

for k : = 0 to 5 0 dobegin

the_peak_is:=the_peak_is + phi_ro_z[k] ;the_bkg_is : =the_bkg_is + bkg_ro_ z [ k ] ;

end;{put back the missing constants}

the_peak_is:=the_peak_is*6.5E-20*1.2*6E23* (density/at jrfht) *lE-8 ;the _bkg_is:=the_bkg_i s *1E4 ;

{so the computed peak-to-background ratio is}

p2b_ratio : =the_peak_is/the_bkg_is;

The program "P_to_B" on the disk implements all of this code. Choosing chromiu mas a specimen, the predictions of the program can be tested against published datavalues (William s an d Steel , 1987 ) fo r th e "Fiori " number—the rati o o f th e inte -grated intensit y i n the C r Ko t lin e t o the intensit y in a 10-eV-wid e window o f th econtinuum a t the sam e energy . A t 10 0 keV, the progra m predict s a value between1300 and 1200, falling slightly as the film thickness is increased fro m 250 A to 5000A. Figure 9. 5 plot s ho w thi s peak-to-background (P/B ) rati o varie s wit h inciden tbeam energy for a 1000-A-thick film of chromium. At 10 keV, the ratio is only about250, bu t thi s valu e rises rapidl y a s th e energ y i s increase d (an d plura l scatterin gbecomes les s pronounced in the sample). Note that the P/B ratio continues to rise forenergies abov e 10 0 keV, but only relatively slowly . These value s are in fairly goo dagreement with , although somewha t lower than , both published experimenta l dat aand othe r theoretica l estimate s (e.g. , Fior i e t al. , 1982) . Thi s leve l of agreement isonly a s goo d a s migh t b e expected , sinc e th e mode l i s no t accountin g fo r th eforward-directed anisotrop y of the continuum and so is probably overestimating it sintensity i n th e directio n o f th e detector . Th e simpl e Beth e cros s sectio n fo r th echaracteristic signa l i s also o f uncertain accurac y a t 10 0 keV an d above .

To obtai n a mor e accurat e result , i t i s necessar y t o us e a continuu m cros ssection, whic h i s no t onl y mor e accurat e bu t whic h explicitl y account s fo r th e

Page 196: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTION AND MICROANALYSIS 187

Figure 9.5. Predicte d P/B rati o using Kramer's law model.

anisotropy. The most convenient approach is to employ the numerical evaluationand fit of Sommerfeld's Bremsstrahlung cross-section data (1931) made by Kirkpat-rick and Wiedmann (1945). The procedure given below uses is a modification byBlackson (private communication) of the routine given by Statham (1976), with therelativistic corrections of Scheer and Zeitter (1955) and Zaluzec (1978). The origi-nal, rather cryptic notation of Kirkpatrick and Wiedmann has been retained so as tohelp in identifying the purpose of the various steps in the code.

Procedure continuum (energy:real;stepsize:real);

{calculates a relativistically corrected continuum intensity for a

10-eV window at E^bkff using the Kirkpatrick and Wiedmann evaluation

of Sommerfeld's cross section. The result is in continuum counts per

unit energy width per electron. This version adapted from an original

of J. Blackson}

var position:integer;

Joe,yl,y2,y3,h,j, m,a,b,c,d,ioverrreal;

la,Qr,Qs,EC,EO:real;

begin

position: =round (50*z/thick);

if energy>E_bkg then {the continuum window can be excited}

Ec:=E_bkg*1000; {convert from keV to eV}

Eo: =energy*1000; {ditto}

beta: =1+ (energy/511) ;

Page 197: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

188 MONT E CARL O MODELING

beta: =17 (beta*beta) ;joe: =Eo/(300*at_num*at_num) , - {K-W scaling factor}

{now evaluate the terms in the K-W numerical fit}

yl: = exp ( -2 6 . 9* joe) , -y l : = 0 . 2 2 * ( l - ( 0 . 3 9 * y l ) ) ;

y2 : 0 . 0 6 7 + ( 0 . 0 2 3 / ( j o e + 0 . 7 5 ) ) ;y3 := 0 . 0 0 2 5 9 + ( 0 . 0 0 7 7 6 / ( j o e + 0 . 1 1 6 ) ) ;

h : = ( ( = 0 . 2 1 4 * y l ) + (1.21*y2 ) -y3 ) / ( (1.43*yl) -( 2 . 4 3 * y 2 ) +y3) ;j : = ( ( l + ( 2 * h ) ) * y 2) - ( (2* (1+h) ) *ye) ;

m: = (1 + h) * (y3 + j) ;

b :=exp( -0 .0828* joe ) - e x p ( 8 4 . 9 * j o e ) ;a : = e x p ( - 0 . 2 2 3 * j o e ) — exp(-57*joe) ;c:= 1.47* b - 0 .507* a - 0 . 8 3 3 ;

d:= 1.7* b - 1.09* a - 0 . 6 2 7 ;lover:=Ec/Eo;

{get the components of the continuum in X and Y directions}Ix :=c*( iover-0 .135) ;Ia:=d* ( iover-0.135)*( iover-0.135);

I x : = ( 0 . 2 5 2 + I x ) - l a ;Ix: = (1 / joe) *Ix*1.51E-27 ; {X-component}

Iy:= lover + h ;Iy: = (1/joe) * (-j+ (m/Iy) ) *1.51E-27;

{Y-component]

{correct for the line of sight of detector to anisotropic

Bremsstrahlung}

den:=l - beta*cos (TOA) ;

den:=den*den*den*den;

Qz : =cos(TOA);

Qz:=Qz*Qz;

Qr:=l-Qz;

Qs:=Qz/den;

Qz: = (Ix * (Qr/den) ) + (ly* (1+Qs) ) ;{so the net contribution is}

bkg_yield:=stepsize*Qz;end {of the if statement}

elsebkg_yield:= 0;

{add this contribution to the histogram}

if ( (position> = 0) and(position< = 50) ) then {within

array bounds}

bkg_ro_z[position] : =bkg-ro_z[position] + bkg

—yield;

end;

Page 198: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTIO N AND MICROANALYSI S 189

In orde r t o properly account for the anisotrop y o f the continuum, th e takeoffangle of the detector must be known. In standard microanalysis nomenclature , th etakeoff angl e (TOA ) is the angle between the line joining the detector to the beampoint and the surface of the specimen. In order to match the Kirkpatrick-Wiedmannnotation, this angle mus t be referenced t o the incident bea m direction . Tha t is ,

{code to input and properly compute the takeoff angle}

GoToXY(40,9);

write('Detector take-off angle (deg)') ;

readln(TOA);

[for compatibility with W-K notation}

TOA: = (TOA + 90)757.4; {in radians}

Finally, a s before , th e continuu m an d characteristi c contribution s mus t b esummed, over depth, and the missing constants mus t be reinserted :

{sum over depth}

for k:=0 to 50 do

begin

the—peak—is :=the—peak—is + phi_ro_z[k];

the_bkg_is : =the_bkg_is + bkg_ro_z[k] ;

end;

{put in the missing constants for both terms}

the_peak_is : =100*the_peak_is*6 . 02E23*6 . 51E-20* (density/at

_wht)*lE-8;

the_bkg_is : =100*the_bkg_is*6 . 023E23*lE-8* (density/at

_wht)*10*4*3.14159;

Using condition s identica l wit h thos e trie d abov e an d choosin g a detecto rtakeoff angl e of 30°, this model predicts a Fiori number at 10 0 keV of about 2400 ,again falling by about 5% as the film thickness is varied over the range 250 to 5000A. This number is in excellent agreement with current experimental data. Figure 9.6show how the peak to local background for a 1000-A chromium film (Fiori number)varies with incident beam energy. The trend is the same that found with the previousmodel, a rapid rise with energy up to 10 0 keV and then a slow increase. Figur e 9.7show how the Fiori number at 100 keV is changed by the choice of detector takeof fangle. A s TO A i s varie d fro m 0 (i.e. , lookin g a t glancin g incidenc e acros s th especimen surface ) t o 60° , th e P/ B rati o increase s b y abou t 50 % becaus e o f th eforward peak of the continuum, confirming the usual preference fo r a high-takeoff -angle detector.

Further sophisticatio n i n both the continuum and characteristic cros s section scould b e use d t o ge t stil l bette r dat a (e.g. , Gra y e t al. , 1983) , i n particular a t th ehighest energies, where relativistic effect s ar e significant. However, for most typical

Page 199: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

Figure 9.6. Compute d P/ B rati o vs . energy, using Wiedman-Kirkpatrick model .

Figure 9.7. Compute d P/ B variatio n with detector takeoff angle .

190

Page 200: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTIO N AN D MICROANALYSI S 19 1

operating conditions , the models given here ar e accurate enough to provide a goodguide to what can be expected experimentally .

9.5 X-ray production in bulk samples

Extending the models discussed above to the case of a bulk specimen is straightfor-ward, since exactly the same code can be used. As usual, however, th e speed o f abulk simulatio n using a single scatterin g mode l ma y be unacceptably slow , so theplural scatterin g approac h ma y b e o f mor e practica l use . The foundatio n o f al lquantitative methods fo r bulk microanalysis i s the dept h dependenc e o f the x-rayproduction, a function usually called (|>(pz) , following Castaing (1960), who defined4>(pz) a s the x-ra y generation i n a slice 8(pz ) of the specimen , o f density p and a tsome depth z beneath the surface, normalized by the corresponding x-ray productionfrom a n identical freestandin g slice. When presented in this way , the 4>(pz ) curvesare found t o be, to a good approximation, of a simple generic an d analytical for mthat is sensibl y dependen t o n the atomic number of the elements involved .

The computatio n o f 4>(pz ) curve s wa s on e o f th e firs t task s t o whic h Mont eCarlo method s wer e applie d (Bishop , 1966) , an d muc h o f th e developmen t o fquantitation method s ha s relie d o n suc h computation s (e.g. , Curgenve n and Dun-cumb, 1971 ; Duncumb, 1992) . A calculation i n the form specifie d by the origina lCastaing definition is possible, bu t the majority of computations have instead nor-malized the data by the value of c|>(pz) at the surface of the specimen. There is than aconstant rati o between th e value that would be derived from Castaing' s definitio nand the computed (Kpz), this ratio being the quantity 4>(0), which is of the order of 1+ T I wher e T | i s th e backscatterin g coefficien t o f th e bul k sampl e (Merlet , 1992) .The progra m PhiRo Z compute s an d display s <|>(pz ) curv e usin g th e procedur eGenerate_x_rays discussed above and our usual plural scatterin g Monte Carlomodel. Since the Bethe range of the incident beam is already divided into 50 steps inthis model, these steps are used as the intervals for the 4>(pz ) histogram. A s before,x-ray generation i s assigned to the midpoint of the trajectory step. Once the energyof incident electrons has fallen below the critical excitation energ y Ecrit for the x-rayline of interest, the trajectory calculation can be aborted without error to save time.However, for illustrative purposes it is sometimes better to continue the computationbut to identify portion s of the trajectory that are above and below £crit—for exam -ple, b y color-codin g th e tw o portion s o f trajectory . I n thi s wa y th e relationshi pbetween th e x-ray generation volum e and the beam interaction volum e can readilybe seen. In the PHIROZ program on the disk, the approach used by Curgenven andDuncumb (1971) i n their pioneer wor k is followed. A random weighting algorithmvarying with the x-ray ionization cross section determine s whethe r or not a dot willbe plotted a t the midpoin t o f each trajectory ste p fo r which the electro n energ y i sabove Eciit. This builds up a display in which dot density i s proportional t o ioniza-tion probability. Figure 9.8 shows a typical output from the program for the genera-

Page 201: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

192 MONT E CARL O MODELIN G

Figure 9.8. Compute d ()>( p z ) curve fo r F e K a t 2 0 keV.

tion o f F e Ka x-ray s a t 2 0 keV. 4>(pz ) i s plotted a s a horizontal histogram on th esame scale a s the trajectories, s o that the relationship between them can readily beseen. As the depth beneath the surfac e i s increased, c|>(pz ) rises because the ioniza-tion cross section [Eq . (9.1)] continues to rise as E falls until E = = 2.5 X £crit. Figure9.9 shows some typical 4>(pz) curves computed from thi s program for the excitatio n

Figure 9.9. cj>( p z ) curves fo r F e a t various energies.

Page 202: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTIO N AN D MICR O ANALYSIS 19 3

Figure 9.10. Compute d curve s for F e a t 20 keV, S i a t 5 keV, givin g sam e overvoltage .

of iron Ka at 10 , 15, 20, 30, and 50 keV. The systematic change in the 4>(pz ) curvesis evident. As the accelerating voltage is increased the peak magnitude of the profilerises, and moves deeper into the sample but the general shape of the profile remainsthe same. This is further illustrate d in Fig. 9.10, which shows ()>(pz) profiles for ironKa a t 20 keV and silicon K at 5 keV, which in both cases represents an overvoltageU = E/Ecrit o f about 3. Note that the two curves are very similar in shape and size,even thoug h the energ y o f th e x-ray s an d th e respective electro n range s diffe r b ynearly a n order o f magnitude, demonstratin g the value o f the <Xpz ) approach a s away o f simplifying th e representation o f x-ray generation. A complete program forquantitative microanalysi s ca n b e constructe d fro m thi s Mont e Carl o approac h(Duncumb, 1992) .

Experimental 4>(pz ) profiles are generated b y monitoring th e x-ray productio nfrom a thi n fil m o f a "tracer " elemen t embedde d a t differen t depth s withi n th ematerial of interest (Castaing, 1960), since only in this way can be the specific depthdependence o f generation b e separated fro m th e total emission . However , becausethe x-ray line that is being studie d in the tracer is not excited at the same energy asthe desired line from th e material, the form of the cf>(pz ) profile will not be identica lwith tha t expecte d fro m th e elemen t itself . B y usin g th e PHIRO Z program , thi sproblem ca n also be studied . Figure 9.11 shows two c|>(pz ) profiles , one computedfor th e Ka lin e o f a Mn tracer i n iron an d the othe r fo r iron K a i n iron . Th e Mnprofile peaks slightly sooner an d slightly higher than the Fe curve, because the Mnline i s of lower energy . A similar simulatio n for a tracer o f higher energ y than the

Page 203: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

194 MONT E CARL O MODELIN G

Figure 9.11. Compute d cj>( p z ) curves fo r iro n a t 1 0 keV with M n an d F e tracers .

iron would show the opposite situation . Thus, while the tracer method gives a goodexperimental approximation to the tru e 4>(pz ) profile i t i s not exact .

By substitutin g one o f th e continuu m procedure s give n above , th e corre -sponding dept h variation o f the Bremsstrahlung generatio n ca n also be studied . Inthis case the energy of the continuum window to be modeled, previously set to Ecrit,can b e varie d t o se e ho w th e dept h dependenc e varie s wit h energy . Figur e 9.1 2

Figure 9.12. Dept h variation o f continuum productio n a t 1 , 5, 10 , 15 , and 1 9 keV.

Page 204: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTION AND MICROANALYSIS 195

shows a sequence of "<|>(PZ)" plots obtained i n this way for an iron sample at 20 keVand for continuum energies o f 1 , 5, 10 , 15, and 1 9 keV obtained fro m th e progra mBREMS on the disk , whic h implements thi s approach . Al l of the continuum win-dows are computed simultaneously from the same set of trajectories, since they areindependent events . Note that the shape of the 4>(pz) profile is different from that forcharacteristic radiation s because of the different functiona l for m of the cross section,and this is true even when the energy of the continuum window is the same as theenergy of the characteristic line . Thus methods that rely on the ratio of the peak (i.e.,characteristic line ) to the background (i.e., continuum) at the same energy to correctfor x-ra y absorption i n the sampl e (Statham and Pawley, 1978 ) will not generall yproduce a satisfactory result (Rez and Kanopka, 1984) unless corrected (Lu and Joy,1992) t o account fo r this discrepancy. Both Kramer's la w an d the Kirkpatrick andWiedmann model s fo r continuu m productio n yiel d ver y simila r result s fo r bul ksamples because the multiple scattering of the beam averages out the polarization ofthe continuum signal. Eithe r ca n thus be used as desired.

The mode l ca n b e furthe r develope d b y computin g th e shap e o f th e Brem-sstrahlung a s see n b y a n energ y dispersiv e spectromete r (EDS ) detecto r place doutside of the sample. This requires that the continuum be simulated for a number ofenergy windows between zero and the incident beam energy; here, 1 9 such regionsequally space d ar e used . Eac h o f thes e result s mus t the n b e correcte d fo r x-rayabsorption both in the specimen and in the EDS detector window. The absorption ofx-rafrom th e point o f production in the for m

/(*) = /(O) . expt-^p*] (9.7 )

where p is the density an d u , is the mass-absorption coefficient. | x depends both onthe material an d on the energy of the x-ray passing through it. Tables of values areavailable (e.g., Goldstein et al., 1992), but since numerical fits through the data havebeen made by Heinrich, a simple routin e can be used to compute the | x values thatare needed wit h good accuracy .

Procedure abs_corr(photon—energy:real):real;{calculates the mass absorption coefficient using Heinrich's

method—the photon energy is in keV and the result is in cm" 2/g}

var

A,B,C,D,F,dum,dum2,dum3:real;

beginif photon_energy<E_cri t the n [below K-absorption edge}

beginA:=1.0;

B:=-0.2544711;

Page 205: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

196 MONTE CARLO MODELING

C : = 4 . 7 6 9 2 4 5 ;D:=-10 .37878;

F : = 2 . 7 3end

else {w e ar e above the K-edge]

beginA:=1 .0 ;

B : = - 0 . 2 3 2 2 2 9 4 ;C : = 4 . 0 7 0 0 5 3 ;D : = - 6 . 2 2 0 7 4 6 ;

F: =exp ( -0 .0045522* ln (a t_num)* ln (a t_num) -0 .0068535*In (at_num)+1.070181) ;

end;{compute the value using appropriate constants]

dum: =B*ln) at_num) *ln (at_num) +C*ln (at_num) +D;dum2:=12.398/photon—energy;

dum3 : = p o w e r ( d u m 2 , F );abs_corr:=A*dum3*exp(dum) ;

end;

If the TOA of the EDS detector is specified, then for an x-ray generated atdepth z beneath the surface, the exit path length is z/sin (TOA). At the end of thesimulation, therefore, the continuum "4>(pz)" data is corrected in a stepwise fashionfor each of the 19 continuum windows:

for i:=l to 19 do

begin {by getting energy of the i-th continuum window}

photon—energy:=i*inc_energy 720;

{get the mass absorption coefficient at this energy}

factor: =abs_corr(photon—energy)/sin(TOA/57.4);

for j:=0 to 50 do {sum over all layers down from surface}

begin {compute exit path length X density X MAC}

factor2:=factor*density*j*step*lE-4;

factors:=exp(-factor2 ); {Beer's law}

{now compute what would be observed outside sample}

bremss[i] : =bremss[i] +phi_ro_z [j,i]* factor3 ;

end; {j'-loop}

end; {i-loop}

Finally, the effect of the detector on the spectrum must be accounted for. Overmost of the energy range, the dominant effect is absorption in the beryllium windowin front of the Si(Li) diode, so this can be found by using the same routine as before,but replacing the physical constants of the sample with those of the berylliumwindow:

Page 206: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

X-RAY PRODUCTION AND MICROANALYSIS 197

Function det_factor(wind_z,wind—thick,wind_density,energy:real}:real ;{comatomic number and density}

varfactor , factor2 , factors :real ;begin

at_num: =wind_z , - [for abs—corr routine}factor: =abs_corr(energy) ;

{density*path length through window*MAC}

factor2: =factor*wind_density*wind_thick*lE-4 ;factors : =exp(-factor2) ; [Beer's law}det_factor: =factor3;

end;

thus we have

for i:= l t o 1 9 d o {the 19 continuum windows}

beginphoton_energy: =i*inc_energy720.0;

{putting in constants for a Be window 6 jju n thick, Z = 4, p = 1.2}

det_eff ie [ i ] : =det_factor(4,6,1.2,photon_energy);{now correct data for this additional absorption}

bremss [i] :=brems s [i] *det_ef f ic [i] ;end;

The final step is then to interpolate data points linearly between the calculatedvalues so as to simulate the whole spectrum. Figure 9.13 shows the result of acalculation for the Bremsstrahlung spectrum of carbon at 20 keV. The dots show thecorresponding experimental data, scaled to match at the peak of the continuum. Ascan be seen, the agreement between the normalized and experimental spectra isexcellent, even though the model is simple; although the ratio of absolute predictedand measured intensities is less good. The Bremsstrahlung spectrum is not oftenconsidered as being worthy of examination and is usually removed mathematicallybefore any analysis of the characteristic peaks is made. However, with the aid of amodel such as we have developed here, the behavior of the continuum can conve-niently be studied, and we find that this component of the spectrum can providemuch useful information, especially because the Bremsstrahlung covers a widerange of energies. First, the area beneath the continuum after correction for x-rayabsorption varies linearly with, the atomic number of the target, so providing asimple check on any qualitative analysis that is performed. Second, the shape of thecontinuum depends on the absorption experienced by the photons as they travel tothe surface. Thus the shape depends on the general shape of the surface—i.e., itstopography. This is important in analyzing particles, samples containing edges, orsamples with a large degree of surface topography, since the form of the continuum

Page 207: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

198 MONT E CARL O MODELIN G

Figure 9.13. Compariso n o f experimenta l an d compute d Bremsstrahlung fo r coppe r a t 2 0keV, 8-|j,m B e window .

can be used both to understand what is happening in the sample an d then to correctfor this . For example, the position of the peak in the Bremsstrahlung depends on thelength of the aborption path to the surface. If the effective radius of curvature of thesurface around the beam entrance point is reduced from infinit y (i.e. , a flat surface )down to values of a few micrometers, then the peak shifts smoothly . Thus a measureof the surface conformation can be obtained from a n observation of the continuum.Similarly, the presence of charging fields in the specimen will systematically distor tthe for m o f the Bremsstrahlung profile.

The techniques discussed above can readily be extended to deal with any othergeometrical condition . For example, the important case of performing x-ray analysisof a thin film on a substrate can be modeled by using the procedures given in Chap.6 t o comput e th e 4>(P Z) profile s i n the tw o material s an d the n accountin g fo r th ex-ray absorptio n o f th e substrat e radiatio n i n th e fil m b y usin g the routin e give nearlier in this chapter. In general, it is sufficient t o employ a plural scattering routineto compute th e trajectories, bu t i n any case wher e a region o f interest i s less thanabout 5 % o f th e electro n range , i t woul d b e bette r t o us e th e alternativ e singl escattering model t o ensure better accuracy .

Page 208: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

10

WHAT NEXT IN MONTE CARLO SIMULATIONS?

10.1 Improving the Monte Carlo model

The state d ai m o f thi s boo k wa s t o develo p Mont e Carl o simulation s tha t wer eaccurate enough to be useful predictive tools but simple enough to be accessible tononspecialists. Th e previous chapter s o f the book hav e demonstrate d that , withinthese limits, a great deal can be done. However, in meeting these goals, approxima-tions an d simplification s hav e ha d t o b e made . Specifically , w e hav e mad e th eassumptions that only elasti c scattering , a s described b y the Rutherford cros s sec -tion, need be considered an d that energy loss can be treated a s a continuous ratherthan as a discrete process. Such assumptions are not essential to the construction of aMonte Carl o simulatio n o f electro n scattering , an d s o th e obviou s an d desirabl emove i s to remov e thes e approximation s fo r thos e case s wher e they represen t a nunacceptable restriction .

An important first ste p is to use the more accurate description of elastic scatter-ing provide d b y th e Mott , o r partia l wav e expansion , cros s section . A s note d i nChap. 3 , the Rutherfor d cross sectio n work s wel l for th e scatterin g o f medium tohigh-energy electrons by nuclei of low atomic number. However under some condi-tions, particularly at low beam energies (E < 2 0 keV) and for high-atomic-numberelements (Z > 30) , where the scattering angles are large, the Rutherford formula isonly an approximation. When the cross section is derived from the relativistic Diracequation, taking into accoun t spin-orbi t coupling , then the "Mott" scattering cros ssection whic h result s ca n diffe r significantl y fro m th e Rutherfor d values . Suc hdiscrepancies becom e important, and experimentally detectable, in cases where eachelectron i s scattered onl y a few times and where the angular distributions of trans-mitted o r scattere d electron s o f variou s energie s ar e require d t o b e know n accu-rately.

The reason wh y the Mot t cross section , despit e it s superiority , ha s no t bee nmore widel y use d fo r Mont e Carl o simulation s i s tha t i t i s no t a n analytica lfunction—i.e., on e that can be evaluated from a n equation—but an array of differ -ential cross-section value s representing th e scattering probability for electrons o f aparticular energ y i n a specifie d direction . Typicall y (Czyzewsk i e t al. , 1990 ) th eMott cross section must be evaluated at energy steps of 10 0 eV or so from 2 0 eV to20 keV and for angular increments o f 1 or 2° from 0 to 180° , giving a total of some

199

Page 209: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

200 MONT E CARL O MODELIN G

2500 sets of numbers for each element. Storing the data for the entire periodic tabletherefore require s severa l megabytes o f storag e spac e o n disk . Angula r scatteringprobabilities an d total cross section s must then be found b y numerical integrationsof these data arrays. Whil e these operation s ar e not intrinsicall y difficult , the y aremessy an d ten d t o mak e th e program s tha t emplo y the m loo k rathe r comple xcompared t o the normal ru n o f personal compute r software.

One approach that has been successfully implemente d to obtain the benefits ofthe Mott cross section without the complexity is to reduce it to an analytical form bya proces s o f parametrization. Brownin g (1992) showe d tha t the tota l elasti c Mot tcross sectio n CTM could be written as

where u = loglo(8.£'.Z-i-33)Equation (10.1) is a good description o f the overall trends of the cross section ,

although i t canno t follo w th e periodicit y o f th e Mot t cros s sections , whic h ar edirectly du e to periodic variations of the siz e of the atoms. Such effects hav e littlemacroscopic effec t o n the scattering of electrons by a solid, however. This parame-trized cross section can be substituted directly for the usual Rutherford cross sectionin th e singl e scatterin g program . Sinc e th e Mot t cros s sectio n i s typically smalle rthan the corresponding Rutherfor d value, the elastic mea n free path s that are com-puted will be larger and the number of scattering events that must be computed willtherefore generall y b e smaller , leading to a useful improvemen t in program speed .

It i s als o necessar y fo r th e compute d angular scatterin g distributio n t o b emodified t o match the results of the Mott cross section . As shown in Fig. 10.1, thecumulative angular scattering distributio n for the Mott model is rather more squar ein for m tha n th e Rutherfor d distribution . Thi s behavio r ca n b e approximate d b ymodifying th e form o f the Rutherford equation, e.g. , Equation (3.10):

to be

cParametrized models are a useful ste p up from th e simplest Rutherford models

and should , wit h furthe r work , b e capabl e o f givin g good-qualit y data . I t must ,however, be realized tha t such an approach is only an approximation and that under

Page 210: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

WHAT NEX T I N MONT E CARL O SIMULATIONS ? 201

Figure 10.1. Compariso n o f cumulative scattering probabilities in Mott and screened Ruther-ford models .

extreme conditions—suc h a s ver y low voltage s (< 1 keV ) an d a t high scatteringangles—the approximatio n wil l no t b e accurate . Whe n suc h condition s mus t beexplored, i t i s therefore necessar y t o g o t o a ful l Mot t model , usin g numericallytabulated differential cross-sectio n data . Many such programs have been described(e.g., Reimer and Stelter, 1987 ; Kotera et al., 1990 ; Czyzewsk i and Joy, 1989), andtabulated sets of Mott cross sections have been published by several groups (Reimerand Lodding , 1984 ; Czyzewsk i e t al. , 1990) . Suc h program s hav e bee n demon -strated to give excellent results for both macroscopic events , such as the variation ofbackscattering with incident energy, and microscopic data , such as the angular andenergy distribution s o f scattere d an d transmitte d electron s (Reime r an d Krefting ,1976). With the continued increase i n the memory capacity of personal computers ,Mott model s wil l certainl y becom e mor e commonl y applie d becaus e o f th e un -doubted improvements that they can provide in some circumstances. However, caremust be take n tha t al l aspect s o f the Mont e Carl o progra m tha t i s develope d ar eequally advanced. Some published programs that have gone to great lengths to usethe Mott cross section have compromised th e quality of their results by using poorelectron stopping-powe r formulations or by terminating the simulation at relativelyhigh energies an d relying on diffusion model s to account fo r the rest of the trajec -tory.

A second important area of research activity has been to construct Monte Carlosimulations in which all types of scattering, elastic and inelastic, are considered andin whic h energy losses ar e treated a s discrete rather than continuous events (e.g. ,

Page 211: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

202 MONT E CARL O MODELIN G

Shimizu an d Ichimura , 1981) . Suc h model s considerabl y exten d th e boundarie swithin whic h Mont e Carl o modelin g ca n b e considere d useful , althoug h a t th eexpense of increased complexit y and computation time. The procedure followed is ageneralization o f tha t discusse d i n Chap . 7 fo r th e modelin g o f fas t secondar yelectrons. I n addition t o the usual elastic mea n free pat h A E, a total inelasti c mea nfree pat h A } is defined , wher e

and th e A J ( y = 1 , 2, etc. ) ar e th e mea n fre e path s for eac h o f th e inelasti c event sconsidered (Fittin g an d Reinhart , 1985) . Th e tota l mean fre e pat h i s A- p wher e

and fo r eac h scatterin g even t a rando m numbe r RND i s compare d wit h th e rati oAT/AE to determine i f the event is elastic or inelastic; then a second random numberis drawn to decid e wha t type o f inelastic even t is occurring . Th e usual Bethe la wexpression giving the electron stoppin g power is replaced by the sum of the energylost in the inelastic events 2 (A£j) encountered . Sinc e the mixture of events alongeach trajectory will be different , th e energy losses wil l correspondingly vary, lead-ing to range straggling-—the phenomenon o f a statistical variation in electron rang efor a fixed inciden t energy—jus t a s is observed experimentally . A program o f thistype is needed i f information about the energy an d angular distribution of electronsis sought , fo r example , to mode l Auge r or energy los s spectr a (Shimiz u and Ichi -mura, 1981) .

10.2 Faster Monte Carlo modeling

For many people th e problem wit h Monte Carlo simulations has been an d remainsthat it is a sequential procedure. Once the model has been constructed, it must be runa large numbe r of times one after another in order to achieve the desired statistica laccuracy befor e th e dat a ca n b e extracted . Althoug h th e spee d o f al l computer scontinues t o increase , th e necessity o f running 500 0 o r more trajectorie s pe r dat apoint can still represent a major investment in time when perhaps 50 or more pointsmust be modeled o r when a large number of different set s of experimental parame -ters mus t be compared. Simpl y increasin g compute r speeds stil l furthe r i s a brute-force approach that can offer only a limited degree of improvement, especially sinc ethe ver y fastes t machine s ten d t o b e multiuse r computer s tha t allocat e t o eac hprogram only some fraction of the available processor time . For example, whe n thetime required for data input and output on a typical time-sharing system is included,

Page 212: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

WHAT NEX T I N MONT E CARLO SIMULATIONS ? 20 3

a Cray supercompute r i s less than twice as fast i n running the sam e code a s a 33-Mhz 486-typ e MS-DO S compute r equippe d wit h a mat h coprocesso r chip . On esolution to this dilemma is to run more than one trajectory at a time—that is, to useparallel computin g techniques . Mont e Carl o method s ar e wel l suite d t o thi s ap -proach because the code is relatively compact and each trajectory is independent ofevery other . I t i s therefor e straightforwar d to achiev e a larg e gai n i n throughputsimply by running one copy of the program on each of the processors i n a paralle lmachine. Severa l example s of this have been reported (e.g. , Michaels e t al. , 1993 )on machines employin g u p to 12 8 processors. Impressiv e results , combining bothgood statistics an d many data points, have been demonstrated for situations such asthe modeling o f x-ray generation across a complex interface an d for the productionof S E imag e simulations . Th e actua l improvemen t i n speed , whil e dramatic , i susually somewha t les s tha n th e numbe r o f CPU s use d i n parallel , becaus e th enumber of computations required for each trajectory is not a constant. One processormay therefore finish al l of its allotted simulations while another is still working, andunless th e compute r ca n reorganize it s workloa d t o reoccup y al l o f the availabl eprocessors, the speed advantage gradually decreases a s more and more CPUs finishtheir task s an d fal l idle . Nevertheless , with computer s tha t hav e mor e an d mor eparallel architecture becoming available, this will be an important avenue of progressin this field .

10.3 Alternatives to sequential Monte Carlo modeling

A typica l us e o f th e kin d o f Mont e Carl o model s develope d i n thi s boo k i s t oinvestigate the effect of varying one or more parameters in some experimental setup;for example , seein g ho w changin g th e position of a detector affect s th e for m o f abackscattered electro n signa l profil e o r how alterin g th e morpholog y o f a surfacemight vary the x-ray yield. In such cases , even though almost al l of the condition sremain th e same , i t i s stil l necessar y t o reru n the entire simulatio n ove r agai n inorder t o get the new data , whic h is a wasteful an d time-consuming procedure . A ninteresting alternativ e procedure has been described (Desai and Reimer, 1990 ; Wangand Joy , 1991 ; Czyzewsk i an d Joy , 1992) , whic h is a mixture o f a conventionalMonte Carl o mode l an d a n alternative physica l representation calle d a "diffusio nmatrix."

Consider th e proble m o f computin g the backseatterin g coefficien t o f a flat ,semi-infinite target. Suppose this specimen to be divided up into a larger number ofcubes, each of which has the property of emitting electrons at a certain rate and withsome know n angula r distribution . Th e measure d yiel d o f backscattere d electron swill resul t fro m th e emissions comin g fro m thos e cubes wit h one face on the to psurface of the specimen. If the topography, for example, i s now changed—perhapsby placing a groove across the surface—then some additional cubes will have facesat the surfac e an d the number o f emitted electron s wil l change .

Page 213: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

204 MONT E CARL O MODELIN G

Figure 10.2. Layou t o f matrix . Th e Mont e Carl o simulatio n find s ho w man y BS E wit h aspecified exi t angle pass through a strip of width AS at angle fl to the horizontal i n each cell .

The strength of each elemental cuboid emitter of electrons is found by runninga Monte Carlo simulation for the chosen experimental conditions. However, unlike aconventional simulation , th e inciden t bea m i s considere d t o be emergin g fro m apoint insid e th e specime n (Fig . 10.2 ) rathe r tha n impingin g a t a surface . Ever ytrajectory i s followe d unti l th e electro n completel y dissipate s it s energy , becaus ethere i s now no surfac e fro m whic h to be backscattered. Th e interaction volume isagain divide d int o cubes , bot h abov e an d belo w th e bea m point , an d th e Mont eCarlo is configured so that for the cube X, Y, Z relative to the beam at coordinates (0 ,0, 0), the number and energy of electrons crossin g the face s o f the cube a t variousangles relative to the axes is determined. The resultant multidimensional array thencompletely specifie s th e matri x o f cubes . (Th e nam e diffusion matrix refers t o ananalogous model i n which a point diffusio n source—suc h a s a source o f heat—isreplaced b y an array of emitters that gives the same resultant properties). Typicallythe interaction volume is divided into 64 X 64 X 32 cubes, the angular variation into20 steps, and the energy into 10 steps. As usual, the Monte Carlo simulation must becontinued for a sufficient number of trajectories so that each element of the array hasadequately good statistics . The array can be further extende d by including compo -nents representin g th e correspondin g fluxe s o f S E or x-rays , and som e initia l re -search has demonstrated the feasibility of considering eve n multicomponent speci-mens.

Page 214: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

WHAT NEX T I N MONT E CARL O SIMULATIONS ? 20 5

Once this has been done, the yield of electrons for any arbitrary surface geome-try o r for any specified detecto r position relative to the specimen ca n be found b ysimply summing the relevant contributions fro m al l the surface cubes. This makes itpossible t o almos t instantaneousl y compute , fo r example , th e effec t o f tilt o n th ebackscattered yiel d o r th e S E profil e fro m a surfac e o f give n geometry . I n a nimplementation o n a Macintosh Ilc i machine , th e time t o recomput e a 256-pixe lsurface profile for a specified surface geometry was less than 1 sec, so this techniqueis wel l suite d fo r studie s i n whic h th e compute d profil e i s t o b e interactivel ymatched to an experimental profile. For many applications, thi s method has a greatdeal of promise, since it offers a good balance between speed and accuracy even onsmall computers. The diffusion matri x method is, of course, an approximation ratherthan an exact solution, since it assumes that each cubical element has properties thatare fixed and independent o f its surroundings and position relative to a surface. Themethod also cannot take account of effects suc h as the recollection, or scattering, ofemitted electron s fro m th e sampl e itself , which ma y b e significan t i n congeste dgeometries. However , i t i s a valuable extension o f the standar d Monte Carl o ap -proach and can produce a lot of additional information for little extra computation .

10.4 Conclusions

Simulations will become an increasingly important an d effective too l fo r proble msolving i n electro n microscop y an d microanalysis . Wit h furthe r improvement s i nboth computers and the software that is run on them, it is not too fanciful t o envisagea "virtual reality" approac h t o electron microscopy i n which fast, interactive , sim -ulations ca n b e use d t o tes t alternativ e experimenta l methods , t o investigat e th eeffect o f differen t experimenta l parameters , t o optimiz e conditions , an d even pro-duce "images " an d "spectra " withou t th e nee d t o us e expensiv e tim e o n a rea lmicroscope. Eve n a t a less exalte d level , th e simulation s discusse d i n thi s boo kprovide a convenient, flexible , and accurate way of interpreting data and images, auseful resourc e fo r planning experiments , and a satisfying teachin g tool .

Page 215: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

This page intentionally left blank

Page 216: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

REFERENCES

Akamatsu B., Henoc J. , an d Henoc P. (1981), J. Appl. Phys., 52:724 5Antolak A. J. and Williamson W. (1985), /. Appl. Phys., 58:525-31Archard G. D. (1961), /. Appl. Phys., 32:1505-9Austin L. and Starke H . (1902) , Ann. Phys.Baroody E. M. (1950), Phys. Rev., 78:78 0Berger M. J. (1963), in Methods in Computational Physics, vol. 1 (Eds. B. Adler, S. Fernbach,

and M . Rotenberg), (Academi c Press : Ne w York) , p. 135Berger M. J. and Seltzer S . M. (1964), Studies in Penetration of Charged Particles in Matter,

Nuclear Scienc e Serie s Repor t #39 , NAS-NR C Publication 113 3 (Natl . Acad . Sci :Washington, D.C.) , p . 205

Bethe H. A. (1930) , Ann. Phys., 5:32 5Bethe H. A. (1941), Phys. Rev., 59:940Bishop, H . E. (1966) , "Measurement s an d Calculations o f Electron Backscattering. " Ph.D .

thesis, Universit y of Cambridg eBishop H. E. (1965) , Proc. Phys. Soc., 85:85 5Bishop H. E. (1974), /. Phys. D: Appl. Phys., 7:2009.Bishop H. E . (1976) , i n Use of Monte Carlo Calculations in Electron Probe Microanalysis

and Scanning Electron Microscopy (Eds . K.F.J . Heinrich , D . E . Newbury , an d H .Yakowitz (U.S. Dept. of Commerce/National Burea u of Standards), NBS Special Pub-lication #460 , p. 5

Bradley G. F. and Joy D. C. (1991), Proc. 49th Ann. Meeting EMSA (San Jose), (Ed . G. W.Bailey), (San Francisco Press : Sa n Francisco), p . 534

Bresse J . F. (1972), Proc . 5t h Ann. SEM Symposium (Ed. O. Johari and I. Corvin), (Illinoi sInstitute of Technology Research Institute : Chicago) , 10 5

Bronstein I . M. and Fraiman B. S . (1961), Sov. Phys. Solid State, 3:1188Browning R. (1992), Appl. Phys. Lett., 58:284 5Bruining H . (1954) , Physics and Applications of Secondary Electron Emission, (Pergamo n

Press: London )Cailler M. and Ganachaud J . P. (1972), J. Physique, 33:90 3Campbell-Swinton A. A. (1899), Proc. Roy. Soc., 64:377Casnati E. , Tartar! A., and Baraldi C. (1982), /. Phys. B, 15:15 5Castaing R. (1960), "Electro n prob e microanalysis," in Advances in Electronics and Electron

Physics, 13:31 7Catto CJ.D. and Smith K.C.A. (1973) , J. Microsc., 98:41 7Chung M. and Everhart T. E. (1977) , Phys. Rev. B, 15:469 9Compton A . H. and Allison S . K. (1935), X-rays in Theory and Equipment, (Van Nostrand:

New York)Curgenven L. and Duncumb P. (1971), Tube Investments Ltd., Research Report #30 3

207

Page 217: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

208 REFERENCE S

Czyzewski Z. and Joy D. C. (1989), J. Microsc., 156:28 5Czyzewski Z. and Joy D. C. (1991) , Scanning, 13:22 7Czyzewski Z. and Joy D. C. (1992), in Proc. 50th Ann . EMS A Meeting, Bosto n (Ed . G. W.

Bailey, J. Bentley, an d J. A. Small) , (Sa n Francisc o Press: San Francisco), 954Czyzewski Z., MacCallum D. O., Romig A. D., and Joy D. C. (1990), J. Appl. Phys., 68:3066Darlington E. H. (1975), / . Phys. D, 8:8 5Dekker A. J. (1958), Solid State Phys., 6:25 1Desai V . and Reimer L . (1990) , Scanning, 12: 1Devooght J. , Dubus A. , and Dehaes J. C. (1987), Phys. Rev. B, 36:509 3Donolato C . (1978), Optik, 52:1 9Donolato C . (1985), Appl. Phys. Lett., 46:270Donolato C . (1988) , Proc . Bur. Congr . on EM, Inst. Phys. Conf. Ser., 93, 2:5 3Drescher H. , Reimer L. , and Seidel H . (1970) , Z. Angew. Phys., 29:331-36Duncumb P. (1977), persona l communication cited on page 1 2 of Lov e e t al . (1977)Duncumb P. (1992), Proc. 50th Ann. Meeting EMSA (Boston), (Ed. G. W. Bailey, J. Bentley,

and J . A . Small) , vol . 2 , p. 167 4Duntemann J . (1987) , Complete Turbo Pascal, (Scot t Foresman an d Co.: Sa n Francisco )Dwyer V. M. an d Matthew J.A.D. (1985) , Surface Sci., 152:88 4Egerton R. F. (1986), Electron Energy Loss Spectrometry in the Electron Microscope (Plenum

Press: New York)Evans R. D. (1955) , The Atomic Nucleus (McGra w Hill : New York) , p. 576Everhart T. E. (1960), /. Appl. Phys., 31:1483-90Fiori C . E. , Swy t C . R. , an d Elli s J . R . (1982) , i n Microbeam Analysis 1982 (Ed . K.F.J .

Heinrich), (Sa n Francisco Press : San Francisco), p . 57Fitting H . J., Glaefeke H. , an d Wild W. (1977), Phys. Stat. Sol. (a), 32:18 5Fitting H. J. and Reinhardt J . (1985) , Phys. Stat. Sol. (a), 88:245Gasper J . K. and Greer R. T. (1974), in Scanning Electron Microscopy 1974 (ed. O. Johari),

p. 24 4Goldstein J . I., Costley, J . L., Lorimer G. W., and Reed S.J.B . (1977), Proc. 10t h Ann. SEM

Symposium (Ed . O . Johari), (SE M Inc. : Chicago) , vol . 1 , p. 31 5Goldstein J . L, Newbury D. E. , Echlin P. , et al . (1992) , Scanning Electron Microscopy and

X-ray Microanalysis (Ne w York : Plenum)Gray C . C., Chapman J . N. , Nicholson W.A.P., et al . (1983), X-ray Spectrometry, 12:16 3Green M . (1963) , Proc. Phys. Soc., 82:20 4Gryzinski M. (1965), Phys. Rev. A, 138:33 6Hammersley J . M. (1964) , Monte Carlo Methods (Ne w York: Wiley)Hasegawa S. , lida Y. , and Hidaka T. (1987), /. Vac. Sci. technol., B5:142Hayward E. and Hubbell J. (1954) , Phys. Rev., 93:95 5Hebbard D. F . and Wilson P . R. (1955) , Austral. J. Phys., 8:9 0Heinrich K.F.J . (1981) , Electron Beam X-ray Microanalysis (Van Nostrand: New York)Heinrich K.F.J., Newbury D. E., Yakowitz H., eds., (1976), Use of Monte Carlo Calculations

in Electron Probe Microanalysis and Scanning Electron Microscopy (U.S . Dept . o fCommerce/National Burea u of Standards) , NBS Special Publicatio n #460 , p. 5

Herrmann R . and Reimer L . (1984) , Scanning, 6:2 0Hohn F. J., Kindt M., Niedrig H., an d Stum B. (1976) , Optik, 46:49 1Holt D. B. and Joy D. C. (1989), "SEM Microcharacterizatio n of Semiconductors" (Academi c

Press: London )Hunger H.-J . an d Kuchler L. (1979), Phys. Stat. Sol. (a), 56:K45ICRU (1983) , Stopping Powers of Electrons and Positrons, Repor t #3 7 t o Internationa l

Committee o n Radiation Units (ICRU : Bethesda, Md.)Jakubowicz A. (1982) , Solid State Electronics, 25:65 1

Page 218: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

REFERENCES 209

Jonker J.L.H . (1952) , Philips Res. Rep., 7:1Joy D . C . (1983), Microelectr. Eng., 1:10 3Joy D . C. (1984) , J. Microsc., 136:24 1Joy D . C. (1986) , J. Microsc., 143:23 3Joy D. C. (1987a), /. Microsc., 147:5 5Joy D. C. (1987b), in Microbeam Analysis—1987 (ed . R. H. Geiss), (San Francisco Press : San

Francisco), p . 117Joy D. C. (1989a), in Computer Simulation of EM Diffraction and Images (ed. W. Krakow and

M. O'Keefe) , (Minerals , Metals and Materials Society : Warrendale , Pa.), 209Joy D . C. (1989b) , Hitachi Instrument News, 16: 3Joy D . C. (1991) , Ultra-microscopy, 37:21 6Joy D. C. (1993), Microbeam. Analysis, 2:S17. Copies of this database of experimental data on

electron-solid interaction s ar e available o n request fro m th e author .Joy D . C. and Luo S . (1989) , Scanning, 11:17 6Joy D . C. , Mahe r D . M. , an d Farro w R . C . (1985) , Mat . Res . Soc . Symposi a (Material s

Research Society : Warrendale , Pa.), vol. 69 , p. 171Kahn H . (1950) , Nucleonics, Ma y 27Kanaya K. and Ono S. (1984), i n Electron Beam Interaction with Solids (Eds. D. Kyser, D. E.

Newbury, H. Niedrig, an d R. Shimizu) , (SEM Inc. : AMP O'Hare, III), p. 69Kanter H. (1961) , Phys. Rev., 121:68 1Kirkpatrick P . and Wiedmann L. (1945) , Phys. Rev., 67:32 1Koshikawa T. and Shimizu R. (1974), /. Phys. D: Appl. Phys., 7:130 3Kotera M. , Kishida T., and Sug a H. (1990), Scanning Microsc. Suppl. , 4:111Kyser D . (1979) , i n Introduction to Analytical Electron Microscopy (Ed . J . J . Hren , J . I .

Goldstein, an d D. C. Joy), (Plenum Press : Ne w York) , p. 19 9Lander J . J., Schreiber H. , Buck T. M., and Matthews J. R. (1963), Appl. Phys. Lett., 3:20 6Leamy H . J. (1982) , J. Appl. Phys., 53:R5 1Leamy H. J., Kimerling, L. C., and Ferris S . D. (1976), Proc . 9t h SE M Symposium (Ed. O.

Johari), (SEM Inc. : Chicago) , p . 529Leiss J . E. , Penner S. , and Robinson C . S. (1957), Phys. Rev., 107:154 4Love G. , Co x M.G.C. , an d Scot t V . D. (1977) , J. Phys. D: Appl. Phys., 10: 7Lu Y. and Joy D. C. (1992), Proc . 50th . Ann . Meeting EMSA (Boston) , (Ed . G. W. Bailey),

(San Francisco Press : Sa n Francisco), vol . 2 , p. 167 8Luo S . and Joy D . C. (1990) , Scanning Microscopy Suppl., 4:12 5Luo S. , Zhang Y. , an d Wu Z. (1987) , J. Microsc., 148:28 9McCracken D . D. (1955), Sci. Am., 192:90Merlet C . (1992) , X-ray Spectrometry, 21:22 9Metropolis N . and Ulam S . (1949), /. Am. Statis. Assoc., 44:335Meyer H . A., ed. (1956) , Symposium on Monte Carlo Methods (Wiley : New York)Michael J . R., Plimpton S . J., an d Romig A. D . (1993) . Ultramicroscopy, 51:16 0Mil'stein S. , Joy D. C., Ferris S . D., and Kimerling L. C. (1984), Phys. Stat. Sol. (a), 84:36 3Moller C . (1931) , Z . Phys., 70:786Mott N . F. (1930), Proc. Roy. Soc. London A, 126:25 9Miiller R. H. (1954) , Phys. Rev., 93:891Murata K. , Kyser D. F., and Ting C. H. (1981), /. Appl. Phys., 52:4396Murata K. , Matsukawa T., an d Shimizu R. (1971) , Jpn. J. Appl. Phys., 10:67 8Myklebust R. L., Newbury D. E., and Yakowitz H. (1976) , i n Use of Monte Carlo Calcula-

tions in Electron Probe Microanalysis and Scanning Electron Microscopy (Ed . K.F.J .Heinrich, D. E. Newbury, and H. Yakowitz), (U.S. Dept. of Commerce/National Bureauof Standards) , NBS Specia l Publicatio n #460 , p. 105

Neubert G. and Rogaschewski S . (1980), Phys. Stat. Sol. (a), 59:3 5

Page 219: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

210 REFERENCE S

Newbury D . E . an d Myklebust R . L . (1981) , i n Analytical Electron Microscopy 1981 (Ed .R. H . Geiss) , (Sa n Francisco Press : Sa n Francisco), p . 91

Neidrig H. (1982) , J. Appl. Phys., 53:R1 5Possin G. E. and Kirkpatrick C. G. (1979), Proc . 12t h Ann. SEM Symposium (Ed. O. Johari),

(SEM Inc : Chicago), 1:24 5Possin G. E. and Norton J. F. (1975), Proc. 9th Ann. SEM Symposium (Ed. O. Johari), (IITRI:

Chicago), p . 457Postek M . T. and Joy D . C . (1986) , Solic State Technol., 12:7 7Powell C . J. (1976) , Rev. Mod. Phys., 48:3 3Powell C . J . (1984) , i n Scanning Electron Microscopy 1984 (Ed . O . Johari) , (SE M Inc. :

Chicago), vol . 4 , p. 164 9Press, W. H., Flannery B. P., Teukolsky S. A., and Vetterling W. T. (1986), Numerical Recipes

(Cambridge Universit y Press: New York).Rao-Sahib T . S. and Wittry D. B. (1974), /. Appl. Phys., 45:5060Reimer L. (1993), "Image formation in Low Voltage SEM" (SPJE Optical Engineering Press :

Bellingham WA)Reimer L. and Krefting E . R. (1976) , i n Use of Monte Carlo Calculations in Electron Probe

Microanalysis and Scanning Electron Microscopy (Ed. K.F.J. Heinrich, D. E. Newbury,and H . Yakowitz) , (U.S . Dept . o f Commerce/Nationa l Burea u o f Standards) , NB SSpecial Publicatio n #460 , p. 45

Reimer L . and Lodding B . (1984) , Scanning, 6:12 8Reimer L . and Stelte r D . (1987), Scanning, 8:26 5Reimer L . an d Tolkamp C . (1980) , Scanning, 3:3 5Rez P . and Kanopk a J . (1984) , X-ray Spectrom., 13:3 3Salow H. (1940), Phys. 2., 41:434Samoto N. and Shimiziu R . (1983), /. Appl. Phys., 54:3855Schou J . (1980), Phys. Rev. B., 22:214 1Schou J . (1988) , Scanning Microscopy, 2:60 7Scheer M . and Zeitter E . (1955) , Z. Phys., 140:64 2Seah M . P . and Denc h W . A. (1979) , Surf. Interface Anal., 1:2Seller H. (1984), /. Appl. Phys., 54:R 1Sercel P. C., Lebens J . A., and Vahal a K. J. (1989) , Rev. Sci. Instrum., 60:377 5Shreider Y u A. (1966) , The Monte Carlo Method (Pergamo n Press : Ne w York)Shimizu R . (1974) , J. Appl. Phys., 45:210 7Shimizu R . an d Ichimur a S . (1981) , Quantitative Analysis by Auger Electron Spectroscopy

(Toyota Foundation: Tokyo , Japan)Shimizu R., Murata, K., and Shinoda G . (1966), i n X-ray Optics and Microanalysis (Eds . R .

Castaing, P. Descamps, and J . Philbert) , (Paris : Hermann) , p . 12 7Sidei T. , Higasimura T., Kinosita K . (1957), Mem. Fac. Engng. Kyoto Univ., 19:22 0Sommerfeld A . (1931) , Ann. Physik., 11:25 7Starke H . (1898), Ann. Phys., 66:49Statham P. J. (1976) , X-ray Spectrometry, 5:15 4Statham P. J. and Pawley J. B. (1978), i n Scanning Electron Microscopy—1978 (Ed . O. Johari

and I . Corvin) , vol . 1 , p. 46 9Suga H., Fujiwara T., Kanai N., and Kotera M. (1990), i n Proc. Xllth Int. Congr. on EM (Eds.

L. D. Peachey and D. B. Williams), (San Francisco Press : Sa n Francisco), vol . 1 , p. 410Sugiyama N. , Ikeda S. , an d Uchikava Y. (1986), J. Electr. Microsc., 35: 9Tung C . J., Ashley J. C., an d Ritchie R. H. (1979) , Surface Science, 81:42 7Wang X. and Joy D. C. (1991), /. Vac. Sci. Techn., B9:3753Williams D . B. and Steel E . B. (1987) , i n analytical Electron Microscopy—1987 (Ed . D. C.

Joy), (Sa n Francisco Press : San Francisco), p . 228

Page 220: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

REFERENCES 21 1

Wilson P . R. (1952) , Phys. Rev., 86:26 1Wittry D. B. and Kyser D . F. (1964), J. Appl. Phys., 35:243 9Wittry D. B. and Kyser D. F. (1965), J. Appl. Phys., 36:1387Wolff P . A. (1954) , Phys. Rev., 95:56Zaluzec N . (1978), Ph.D. thesis , University of Illinoi s

Page 221: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

This page intentionally left blank

Page 222: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

INDEX

all purpose program , 7 9angular differentia l Rutherfor d cros s sec-

tion, 29-3 0annular detector , 11 2Archard model , 54-5 5Auger electron , 3 , 202automatic computin g machines , 5Avogadro's number , 28axis convention , 10 , 26, 72

backscatter yields , 81-86, 203discontinuities in , 82variation with density, 95-96variation wit h energy, 85-8 6variation wit h thickness, 96-9 7variation wit h tilt , 90-91

backscattered electrons , 4 , 81energy distributio n of , 91-94, 112-1 3information depth , 95 , 10 9line profiles , 171-7 3mean energy of , 93-94

beam broadening , 178-7 9Beer's law, 195Berger, M. , 6beryllium window, 196Bethe equation , 26 , 32

modified, 35-36 , 58Bethe range , 57 , 96, 11 9

steps of , 5 8BGI files , 2 3Bishop, H. , 6bkg_ro_z, 185Boltzmann transpor t theory , 13 6Bremsstrahlung, 26, 175-7 7Buffon, A. , 5bulk specimen , 56 , 75, 96

calculators, mechanical , 6carrier pairs , 118-1 9

cascade process , 134 , 138-39cathodoluminescence, 114 , 132-33charge collectio n microscopy , 11 4compiler directives , 46-47 , 71 , 105compounds

atomic number of , 50-51backscatter yiel d of , 83-84, 106

computer languag eADA, 1 2C, 1 2MODULA-2, 1 2PASCAL, 12 , 22, 10 5QUICK PASCAL , 1 3QUICKBASIC, 1 2TURBO PASCAL, 12 , 89

computersMacintosh Ilci , 205main-frame, 6 , 7parallel processor , 20 3personal, 7 , 203, 205

conductivity, induced, 116-1 7coordinate system , 10 , 26coprocessor chips , 46-48coprocessor, floating-point , 46-47Cosslet, V . E., 6Courier typeface , 1 7csda range , 57current balance , 16 5cutoff energy , 34-35, 52-53, 145-46,

151-52

debugging, 2 2defects

crystallographic, 125-27EBIC profiles of , 129-32electrically active , 12 5size of, 12 8

depletion region , 117 , 121-2 2detector efficiency , 111-12 , 173 , 196-97

213

Page 223: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

214 INDEX

detector geometry , 111-12 , 173diffusion length , 118, 122-24 , 125-28,

132diffusion matrix , 203-5Dirac equation , 19 9direction cosines , 10 , 26, 31-32, 72,

111-12drunken walk , 9-12Duane-Hunt limit , 17 6Duncumb, P., 6

EBIC, 11 4EDSAC I I computer , 6electron lithography , 156-5 7electrons

Auger, 3 , 20 2backscattered. See backscattered elec -

tronsenergy loss , 2 6energy los s spectra , 20 2secondary. See secondar y electron sstopping power, 26 , 32 , 84tertiary, 15 2transmitted, 4valence, 3

electron-hole pair , 114-15 , 121energy los s

continuous model , 26 , 32-36parabolic model , 34-3 5

energy profile , 58 , 73error (erf ) function , 17 9E2 energy, 164-6 5Evans model , 142

fast secondar y electrons , 142-4 7energy of , 15 1energy depositio n of , 155-5 6production o f x-rays, 181-8 3spatial distributio n of , 153-5 5yield of , 15 4

Fiori number , 186-87, 18 9FORTRAN, 6function

generation, 118-2 1Gryzinski's, 13 7

functions, 19 , 10 5abs_corr,195Archard_range,54-55delay, 21

GasDev, 169GetAspectRatio, 20GetMaxX, 20 , 48, 73GetMaxY, 20 , 48keypressed, 22lambda, 38 , 47outside, 108POWER, 37 , 47 , 62 , 71 , 9 8stop_pwr, 38 , 47, 62, 71xyplot, 40, 48YES, 38 , 47-48

Gaussian distribution , 169granularity, 77-78graphics drive r routines, 19 , 23

h_scale, 73holes, 114-1 5hplot_scale, 41

ICRU tables, 33impact parameter , 58 , 82-83inelastic cross section , 14 6information, dept h of , 107 , 10 9inhomogeneous materials, 97-10 5interaction volumes , 52-53, 74-75, 96,

120-21teardrop shap e of, 96 , 12 0

ionization, 3energy, critical , 174mean potentia l of , 32-33, 10 1

/ (mean ionization potential), 32-33 ,101

jellium, 78

Kahn, H. , 4keywords, 1 7

begin, 19const, 18end, 19function, 18-19label, 47procedure,18-19program, 17uses, 17var, 1 7

knock-on collision , 134 , 142-4 3Kramer's law , 184

Page 224: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

INDEX 215

Manhattan Project , 5mass-thickness contrast, 155matrix, diffusion , 204- 5mean fre e pat h

elastic, 27-29, 202inelastic, 146 , 20 2total, 146 , 202

mean ionization potential, 32-33, 51 , 60,101

metrology, 167 , 17 3Metropolis, N. , 5micron markers , 4 9minicomputers, 7minority carrie r length . See diffusio n

lengthMonte Carl o method

definition of , 4- 5history of , 5- 7

Monte Carl o simulation , 5applicability of , 79-80double, 143-4 4precision of , 23-24

Mott cros s section , 87 , 199-201

nuclear interactions , 8 0nuclear screening , 27 , 59numerical integration , 126, 168, 20 0

overcut structure , 170overvoltage, 174-75 , 18 1

PC. See computer , persona lpeak-to-background ratios , 184-91 , 195photographic emulsion , 51plasmon decay , 137-3 8plot—scale, 41plotting scales , 48-4 9plural scatterin g model, 56 , 75, 77-78,

124polymethyl methacrylate (PMMA), 157pragmas, 46-47, 71 , 105printing, 50procedures, 19 , 105back_scatter, 43, 49, 69, 71, 74, 92continuum, 184, 187-8 8display-backscattering, 69,

71, 79, 92do_defect, 127FSEmfp,148-49

generate_x-rays, 182 , 185 , 19 1get—constants,38, 48init_counters, 67 , 70, 102, 10 3initialize, 14 , 19, 21, 40, 49, 66,

70,73new-coord, 14 , 20, 68, 71, 73, 103p_scatter, 68 , 71, 73, 102plot_xy, 15 , 20prof ile, 58, 65, 72, 99, 105randomize, 20, 70range, 57 , 64, 70, 99reset—coordinates, 15 , 21, 41,

67, 71 , 10 2reset-next-step, 69, 71, 103Rutherf ord_Factor, 64, 70, 72,

89, 10 0s_scatter, 42, 49sei_sig,159set_up_graphics, 41-49 , 66, 70,

73set-up-screen, 39, 48, 72, 63, 70,

100, 10 3SetViewPort, 21show_BS_coeff, 44 , 49show_traj_num, 44 , 50, 69, 71, 74stop_pwr, 57, 105straight-through, 43, 49Test_for_FSE, 146Track_the_FSE, 148, 15 2transmit—electron, 43, 49xyplot, 40, 67

pseudopotential, lattice, 137

quadrant detector , 11 2

random number generators, 5-6, 20random numbers , 4 , 20random sampling , 4, 24random walk, 9-12, 23-24range equation, 48, 15 2Runge-Kutta method, 72Rutherford cros s section. See screened

Rutherford cros s section

samples, geometry of, 107-9scattering

elastic, 3 , 25inelastic, 3 , 25small-angle, 61 , 88

Page 225: Monte Carlo Modeling for Electron Microscopy and Microanalysis Oxford Series in Optical and Imaging Sciences

216 INDEX

scattering angle , 30 , 59-60, 200- 1azimuthal, 30 , 61minimum, 59-6 0

Schottky barrier, 117 , 121, 124gain of , 121-24

screen dump , 50screened Rutherfor d cross section , 25, 27 ,

87, 19 9angular differential , 29-3 0total, 27 , 58-59, 14 5

screening parameter , 27-2 8secondary electrons , 3 , 134 , 142-47

analytical yiel d model, 15 8angular distribution , 135 , 140-41attenuation length , 158-6 1beta factor , 140-42 , 166-6 7energy distribution , 135, 139-40escape depth , 13 4escape probability , 152 , 167-6 8fast. See fas t secondar y electron sgeneration energy , e, 158-6 1line profile , 171-7 3plasmon-generated, 135-3 6production, 7 8production b y BSE, 135, 166-67production b y valence excitations , 135 -

36recollection, 17 1variation wit h thickness, 142 , 154variation wit h tilt , 161yield coefficient , 134-35, 158, 161

SE1, 135 , 140-42, 154SE2, 135 , 140-42Simpson's rule , 72single-scattering model , 25 , 75, 77-78spin-orbit coupling , 19 9statistical scatter , 2 4stepsize, 182stopping power , 26 , 32-36, 157 , 202straggling, range , 20 2straight-line approximation , 138 , 154 ,

157-58supercomputer, 20 3

takeoff angl e (TOA) , 189 , 196thermometer scale , 4 9thin film , 97-98, 154tilt, effect s of , 72, 75, 123-24topography, 203- 4total electro n yields , 161-6 3tracer elements , 193-9 4

Ulam, S. , 5undercut structure , 170

v_scale, 73variables, 1 7

Boolean, 17 , 22, 47-48, 147extended, 1 7global, 17 , 15 2integer, 1 7local, 17 , 15 2longinteger, 1 7private, 47real, 1 7

virtual reality , 205voids, 110-1 1von Neumann , J., 5

window absorption , 196-9 7

x-raysBethe ionization cros s section , 17 4Casnati cross section , 17 5characteristic, 3 , 17 4continuum, 175-7 7continuum depth variation , 194-9 5continuum, effec t o f curvature , 19 8continuum, integrate d valu e of, 19 7continuum polarization , 176 , 187detector windo w effect s on , 196-9 7effect o f FSE on , 181-8 3peak-to-background ratio s for , 184-86,

190PhiRoZ program fo r computing, 191 -

94spatial resolutio n of , 177-79 , 18 3