Monte Carl o Modelin g fo r Electro n Microscopy an d Microanalysis
OXFORD SERIE S IN OPTICA L AND IMAGING SCIENCE S ...
19 downloads
543 Views
23MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
Monte Carl o Modelin g fo r Electro n Microscopy an d Microanalysis
OXFORD SERIE S IN OPTICA L AND IMAGING SCIENCE S EDITORS
MARSHALL LAP P JUN-ICHI NISHIZAWA BENJAMIN B . SNAVELY HENRY STAR K ANDREW C . TA M TONY 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
Monte Carlo Modelin g for Electro n Microscop y and Microanalysis DAVID C . JO Y
New York
Oxford
OXFORD UNIVERSIT Y PRES S 1995
Oxford Universit y Pres s Oxford Ne w Yor k Athens Aucklan d Bangko k Bomba y Calcutta Cap e Tow n Da r e s Salaa m Delh i Florence Hon g Kon g Istanbu l Karach i Kuala Lumpu r Madra s Madri d Melbourn e Mexico City Nairob i Pari s Singapor e Taipei Toky o Toront o and associate d companie s i n Berlin Ibada n
Copyright © 199 5 b y Oxfor d Universit y Press , Inc . Published b y Oxfor d University Press, Inc. , 200 Madiso n Avenue , New York , New Yor k 1001 6 Oxford i s a registered trademar k o f Oxfor d Universit y Press All right s reserved. N o par t o f thi s publication ma y b e reproduced , stored i n a retrieval system , or transmitted , in an y for m o r b y any means , electronic, mechanical , photocopying, recording , o r otherwise , without th e prio r permissio n o f Oxfor d University Press. Library o f Congres s Cataloging-in-Publicatio n Dat a Joy, Davi d C, 1943 — Monte Carl o modelin g for electro n microscop y an d 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- 3 1. 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 th e sourc e cod e i n this boo k i s availabl e 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 mone y order .
135798642 Printed i n th e Unite d State s o f Americ a on acid-fre e pape r
PREFACE Electron microscop y an d electron bea m microanalysi s are techniques tha t are now in dail y 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 generat e comes fro m highl y localize d regions of the specimen, the data produced are unique in scope, an d the images and spectra 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 how a bea m o f electron s interact s wit h a soli d specimen—an d suc h a descriptio n i s difficult t o provide because of the very varied and complex nature of the interactions between energeti c electron s an d solids . The purpose of this book i s to demonstrat e ho w thi s interactio n ca n be accu rately simulate d and studie d on a personal computer , b y applyin g simpl e physica l principles an d th e mathematica l techniqu e o f Mont e Carl o (o r random-number ) sampling. Th e ai m is t o provide a practical rathe r tha n a theoretical guid e t o this technique, and the emphasis is therefore on how to program and subsequently use a Monte Carl o model . Th e bibliography list s other books that cover the mathematics of Monte Carlo sampling an d the physical theory of electron scatterin g i n detail. To make the programs develope d her e a s accessible a s possible, a disk—for us e with MS-DOS-compatible computers—ha s bee n mad e available ; i t contain s al l o f th e source code described in this book together with executable (i.e., runnable) versions. To order se e facin g copyrigh t page. This book woul d not have been possibl e withou t the generou s cooperatio n o f many othe r people . I a m especiall y gratefu l t o Dr . Dale Newbur y of N.I.S.T. , fo r first introducin g me to Monte Carlo models, an d 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 background information. Dr . Peter Duncumb , of the University of Cambridge an d Tube Investments Ltd., whose pioneering wor k on Monte Carlo modeling usin g minicomputers ultimately made thi s book possible , len t me copies o f his earl y reports an d paper s and has bee n 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 i n thi s volum e hav e bee n refine d an d improved through the efforts o f many colleagues wh o have used them over the past few years . Vita l improvements i n science , substance , an d style have been mad e by
Vi PREFAC
E
Drs. John Armstrong (California Institute of Technology), Ed Cole (Sandia), Zibigniew 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 Carolin a Stat e University), an d Oliver Well s (IBM) . T o them, to my student s Suichu Luo, Xinle i Wang, 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 d expertise, I am deeply grateful. An y errors and problems tha t remain ar e strictly my own responsibility. Finally, I dedicat e thi s boo k t o m y wif e Carolyn , withou t whos e lov e an d encouragement thi s manuscrip t woul d hav e remaine d jus t anothe r pil e o f flopp y discs. Knoxville D August 1994
. J.
CONTENTS 1. An Introduction to Monte Carlo Methods
3
1.1. Electro n Bea m Interaction—The Problem 3 1.2. Th e Monte Carl o Method 4 1.3. Brie f Histor y o f Monte Carl o Modelin g 5 1.4. Abou t This Boo k 7
2. Constructing a Simulation 2.1. Introductio n 9 2.2. Describin g th e Problem 9 2.3. Programmin g th e Simulatio n 1 2.4. Readin g a PASCAL Program 1 2.5. Runnin g the Simulatio n 2 3
3. The Single Scattering Model
9
2 3
25
3.1. Introductio n 2 5 3.2. Assumption s o f the Singl e Scatterin g Mode l 2 5 3.3. Th e Single Scattering Mode l 2 6 3.4. Th e Singl e Scatterin g Mont e Carl o Cod e 3 7 3.5. Note s on the Procedures an d Functions Use d in the Program 4 3.6. Runnin g the Program 5 0
4. The Plural Scattering Model
6
56
4.1. Introductio n 5 6 4.2. Assumption s o f the Plural Scatterin g Mode l 5 6 4.3. Th e Plural Scatterin g Mont e Carl o Cod e 6 2 4.4. Note s on the Procedures an d Functions Use d in the Progra m 7 4.5. Runnin g the Program 7 5
5. The Practical Application of Monte Carlo Models 5.1. Genera l Consideration s 7 7 5.2. Whic h Type of Monte Carl o Model Shoul d Be Used? 7
1
77 7
viii CONTENT
S
5.3. Customizin g the Generi c Programs 7 8 5.4. Th e "All Purpose" Progra m 7 9 5.5. Th e Applicabilit y of Mont e Carl o Technique s 7 6. Backscattered Electrons
9
81
6.1. Backscattere d Electron s 8 1 6.2. Testin g th e Mont e Carl o Models o f Backscattering 8 6.3. Prediction s o f the Mont e Carl o Model s 9 0 6.4. Modelin g Inhomogeneou s Material s 9 7 6.5. Note s o n the Progra m 10 5 6.6. Incorporatin g Detector Geometr y an d Efficienc y 11
1
1
7. Charge Collection Microscopy and Cathodoluminescence 114 7.1. Introductio n 11 4 7.2. Th e Principles o f EBIC and C/ L Imag e Formation 11 4 7.3. Mont e Carl o Modelin g o f Charge Collectio n Microscop y 11 8. Secondary Electrons and Imaging 8.1. Introductio n 13 4 8.2. Firs t Principles—S E Model s 13 8.3. Th e Fast Secondar y Mode l 14 8.4. Th e Parametri c Mode l 15 6
2
134
6
9. X-ray Production and Microanalysis
174
9.1. Introductio n 17 4 9.2. Th e Generatio n o f Characteristi c X-ray s 17 4 9.3. Th e Generatio n o f Continuum X-rays 17 5 9.4. X-ra y Production i n Thin Film s 17 7 9.5. X-ra y Production i n Bul k Sample s 19 1 10. What Next in Monte Carlo Simulations?
199
10.1. Improvin g the Mont e Carl o Mode l 19 9 10.2. Faste r Mont e Carl o Modelin g 20 2 10.3. Alternative s t o Sequentia l Mont e Carl o Modelin g 20 10.4. Conclusion s 20 5 References 20 Index 21
3
7
3
9
Monte Carl o Modelin g fo r Electro n Microscopy an d Microanalysi s
This page intentionally left blank
1 AN INTRODUCTION TO MONTE CARLO METHODS 1.1 Electron beam interaction—the problem The interaction o f an electron bea m with a solid i s complex. Within a distance o f a few ten s t o a fe w hundred s o f angstrom s o f enterin g th e target , th e electro n wil l interact wit h th e sampl e i n som e way . The interactio n coul d b e th e resul t o f th e attraction between the negatively charged electron and the positively charged atomic nucleus (and equally the repulsion between the negatively charged atomic electrons and negativ e charg e o n th e inciden t electron) , i n whic h cas e th e electro n wil l b e deflected throug h som e angl e relativ e t o it s previou s directio n o f travel , bu t it s energy 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 removing a n inner-shell electro n fro m it s orbit, s o producing a characteristic x-ra y or an ejected Auger electron; it could have a collision wit h a valence electron to produce a secondary electron ; it could interac t wit h the crystal lattice of the solid to generat e phonons; or , i n on e o f severa l othe r possibl e ways , i t coul d giv e u p som e o f it s energy t o the solid. These type s of interactions i n which the electron changes both its 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 electro n wil l then agai n b e scattered , eithe r elastically o r inelastically a s before, and this process wil l continu e until either the electron gives up all of its energy to the solid and comes to thermal equilibrium with it o r until it manages to escap e fro m th e soli d i n som e way. While at a sufficiently atomisti c leve l this train of scattering events is presumably quit e deterministic—give n sufficien t informatio n abou t th e electro n an d th e parameters describin g it—t o a n observe r abl e t o watc h th e electro n a s i t travel s through th e solid , th e sequenc e o f events makin g up th e trajector y fo r an y give n electron woul d appear t o b e entirel y random . Ever y electro n woul d experience a different se t of scattering event s and every trajectory woul d be unique. Since, i n a typical electron microscope, ther e are actually about 1010 electrons impinging on the sample each second, it is clear that there is not likely to be any simple or compact way t o describ e th e spatia l distributio n o f th e innumerabl e interaction s tha t ca n occur or the various radiations resulting from these events. At best it will be possible to assig n probabilitie s t o specifi c events , suc h a s the chanc e o f a n electro n bein g 3
4 MONT
E CARL O MODELING
backscattered (i.e. , bein g scattere d throug h more tha n 90°) o r of being transmitte d through the target; but any more detailed analysis of the interaction will be impossible. The Monte Carlo method described here uses such probabilities, together with the idea of sampling by using random numbers, to compute one possible set of scattering events 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 o n "Monte Carlo" methods (Kahn , 1950 ) provides a n excellent statement of the basis o f the method—"By applyin g random sampling techniques t o the problem [o f interest] deductions about the behavior o f a large numbe r o f [electrons ] ar e mad e fro m th e stud y o f comparativel y few . Th e technique is quit e analogous t o public opinion polling of a small sample t o obtain information concernin g th e populatio n o f th e entir e country. " Th e us e o f rando m sampling to solve a mathematical problem can be characterized a s follows. A game of chance is played in which the probability of success P is a number whose value is desired. If the game i s played N time s 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 physical problem to be solved. To play the game of chance on a computer, the roulette wheel or dice are replaced b y random numbers. The implication of a "random" number is that any number within a specified range (usually 0 to 1 ) has an equal probability of being 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, conside r a n electron tha t ca n b e scattere d elasticall y o r inelastically , th e probabilit y o f eithe r occurrence being determined by its total cross section. If the probability that a given scattering 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 g eventoandityaoiueabet a two alternatives by picking a random number RND (0 < RN D < 1 ) and specifying that i f RN D ^ pe, the n a n elasti c even t occurs , otherwis e a n inelasti c even t i s assumed to have occurred. I f this selectio n procedur e i s applie d a large number of times, then the predicted rati o of elastic t o inelastic event s will match the expecte d probability derive d fro m th e give n probabilitie s p e an d p ;, sinc e a fractio n pe of th e rando m number s will be ^pe. Rando m number s can als o b e use d t o mak e other decisions . For example , i f the probability p(%) o f the electron bein g scattere d through som e angl e 6 i s known , eithe r experimentally o r fro m som e theoretica l model, then a specific scattering angl e a ca n be obtained o r picking another random number an d solving fo r a th e equation:
INTRODUCTION T O MONT E CARL O METHOD S 5
which equate s RN D t o th e probabilit y o f reachin g th e angl e a give n th e know n distribution o f p(Q). B y repeatin g thes e random-numbe r samplin g processe s eac h time a decision must be made, a Monte Carlo simulatio n of one particular electro n trajectory throug h the soli d ca n be produced. Th e result o f suc h a procedure i s not necessarily o r eve n probabl y a trajectory representin g on e tha t could b e observe d experimentally unde r equivalent conditions . However , b y simulatin g a sufficientl y large numbe r of suc h trajectories , a statisticall y significan t mixture of al l possible scattering event s will have been sample d an d the composite result will be a sensibl e approximation t o experimenta l reality .
1.3 A brief history of Monte Carlo modeling The firs t publishe d exampl e o f th e us e o f rando m number s t o solv e a problem i s probably that of Buffon, who—i n his 177 7 volume Essai d'Arithmetique Morale— described a n experiment i n which needles of equa l length wer e throw n a t random over a shee t marke d wit h paralle l lines . B y countin g th e numbe r o f intersection s between lines an d needles, Buffo n wa s abl e t o deriv e 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 f random number s a s a wa y o f testin g theorie s an d results . Becaus e man y o f th e phenomena o f interest t o physicists in the early twentieth century , such a s radioactive decay or the transmission o f cosmic rays through barriers, displaye d a n apparently random behavior, it was also an obvious step to try to use random number s to investigate suc h problems. Th e procedure wa s to model, fo r example, a cosmic ray interaction b y permittin g th e "particle " to play a game o f chance, th e rule s o f the game being suc h tha t the actua l deterministi c an d random feature s of the physica l process wer e exactl y imitated , ste p b y step , b y th e gam e an d i n whic h rando m numbers determine d th e "moves." During the Manhattan Project, which led to the development o f the first atomic bomb, John von Neumann, Stanislav Ulam, and others made innovative use of both random-number samplin g an d game-playing situation s involvin g rando m number s as a wa y o f studyin g physica l processe s a s divers e a s particl e diffusio n an d th e probability of a missile strikin g a flying aircraft . It was during this period tha t these techniques wer e first dubbe d "Monte Carlo methods " (Metropoli s an d Ulam, 1949 ; McCracken, 1955) . Because th e Mont e Carlo metho d need s a large suppl y o f random number s a s wel l a s muc h repetitiou s mathematica l computation , th e late r development of the technique was closely geare d t o the development of "automatic computing machines. " A s firs t mechanica l an d the n electroni c machine s becam e available durin g the 1950s , the technique foun d increasin g applicatio n t o problem s ranging i n scop e fro m diffusio n studie s i n nuclea r physic s t o th e modelin g o f population growt h by th e Burea u of the Census . A valuable bibliograph y o f thes e early paper s an d techniques ca n be found i n Meye r (1956) . Although Monte Carl o methods ha d been applied to many other phenomena, it was no t unti l th e wor k o f Hebbar d an d Wilso n (1955 ) tha t th e metho d wa s sue -
O MONT
E CARL O MODELIN G
cessfully employe d for charged particles. Later work by Sidei et al. (1957) and Leiss et al . (1957 ) le d t o a majo r paper b y Berge r (1963 ) tha t lai d th e groundwor k for future developments . Simultaneously , in England , M . Green , a physic s graduat e student in Cambridge workin g for V . E. Cosslett , wa s persuaded t o investigate th e application of von Neumann's Monte Carlo method, and the university's EDS AC II computer, t o th e scatterin g o f electro n beams . Takin g experimenta l dat a o n th e scattering of electrons in a 1000- A film as a starting point, Green (1963) and later Bishop (1965 ) wer e abl e t o deriv e th e electro n backscatterin g coefficient , an d th e depth dependenc e o f characteristi c x-ra y production , fro m a bul k sampl e an d t o demonstrate good agreemen t wit h measured values . However, whil e this approac h showed th e validit y o f th e technique , i t wa s limite d i n it s applicatio n t o thos e situations where the suitably detailed initial experimental data were available. At the 4th Internationa l Conferenc e on X-ray Optics an d Microanalysi s i n Paris i n 1965 , however, two independent papers (Bishop, 1966; Shimizu et al., 1966) demonstrated how theoretically based electron scattering distributions could replace and so generalize experimental distributions; within a short time, groups in Europe, Japan , and the United States had produced working programs based on this concept. One of the most important of these was the one produced by Curgenven and Duncumb (1971) working a t the Tube Investments Laboratory i n England. Thi s progra m introduce d several ne w concepts , includin g th e so-calle d multipl e scatterin g approximatio n discussed i n Chapter 4 of this book, and was optimized t o run on a relatively smal l scientific computer . Copies of the FORTRAN code were generously made available to intereste d laboratorie s throughou t the worl d for thei r own use ; a s a result , thi s program came into widespread use and made a significant contribution to popularizing th e ide a tha t electron-soli d interaction s coul d b e modele d convenientl y an d accurately b y computer . By 1976 , th e us e o f this technique wa s sufficientl y commo n fo r a conferenc e entitled "Us e o f Mont e Carl o Calculation s i n Electro n Prob e Microanalysi s an d Scanning Electro n Microscopy " t o 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 b y th e NBS grou p have formed the startin g point fo r man y o f th e program s i n curren t use , includin g thos e describe d i n thi s volume. Apart from th e very earliest examples , which were run by hand, using random numbers generated b y spinning a "wheel o f chance" (Wilson, 1952) o r on mechanical desk calculators (e.g., Hay ward and Hubbell, 1954), Monte Carlo programs were designed t o be run o n the main-frame computers the n becoming availabl e in most government an d industria l laboratories an d universities . Althoug h suc h machine s were both large and expensive, their capabilities were very limited, and considerable ingenuity was necessary to produce workable programs within the limits set by the available memory (often as little as 2000 words) and operating time between crashes
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 e example of the new analytical power made available throug h electronic computing . With the advent of personal computers (PCs), this power is now available to anyone who needs it. Monte Carlo programs are, in most cases, relatively short in length and can readily be run on any modern P C without encountering any problems with the lack o f memory. The programs are also computationally intensive, i n the sens e that once th e progra m ha s obtaine d al l th e necessar y data , i t perform s calculation s continuously until its task i s finished. This is not the ideal situatio n for a program that is run on a time-shared main-fram e compute r because it means that the actual computing time will depend directly on the number of users working on the machine at any given time (unlike programs such as word processing, where the majority of the computer's tim e is spent in waiting for the operator t o enter the next character and multipl e users produce littl e apparen t drop i n response speed) . Consequently , even o n relativel y powerfu l time-shar e systems , the computationa l spee d experi enced by a user when running a Monte Carlo program ca n seem very slow ; thus to calculate a sufficient numbe r of trajectories to produce an accurate result can cost a lot o f both time an d money. While PCs d o not, in general , perfor m the individual computations a s rapidl y a s th e mai n frame , the y are dedicate d t o on e task ; a s a result, their effective throughpu t can easily rival that of much larger machines. Also, since access to PCs is often fre e or at least very cheap, over-lunch or even overnight runs are no financial burden to the user. Finally, the interactive nature of PCs and the ready acces s t o graphical presentation tha t they provide offer s th e chance to make programs that ar e both mor e accessibl e an d more immediatel y useful .
1.4 About this book This volume is not intended t o replace standard textbooks on the general theory of Monte Carlo samplin g (such as those by Hammersley, 1964 , and Schreider, 1966) , nor i s it a substitut e for a comprehensive guid e to electro n beam microscopy an d microanalysis (suc h a s Goldstei n e t al. , 1992) . Rather , i t i s intende d t o provid e electron microscopists , microanalysts, and anyon e concerned wit h the behavior of electrons i n solid s wit h ready acces s t o the power o f th e Mont e Carl o method . I t therefore provide s workin g Mont e Carl o simulatio n routines fo r th e modelin g o f electron trajectorie s i n a soli d an d discusse s procedure s t o dea l wit h associate d phenomena suc h as secondary electron and x-ray production. These procedures can then be added to the basic simulatio n as required to produce a program customized to tackle particular problems in image interpretation o r microanalysis. The goal is to make availabl e simulation s whos e accuracy is at least a s good a s that likely t o be achieved in a comparable measuremen t or experiment o n a n electron microscope . The programs have been develope d an d have been designe d to be run on persona l computers rather than on scientific minicomputers or full siz e main-frame machines. Even given th e advanced PC designs no w available , thi s has occasionally mad e it
8 MONT
E CARL O MODELIN G
necessary t o compromise betwee n th e completenes s o f the model an d the spee d of execution. In most cases the choice has been for the version tha t is fast in operation, since a goo d approximatio n availabl e rapidl y i s muc h mor e usefu l tha n a n exac t result that takes a day to compute. N o claim is made that these programs represent the 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 r approaches 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 t o use th e printed program s give n here , o r those availabl e on the accompanyin g disk, as the basis fo r your own experimenta tion an d development .
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 calle d a "drunken walk, " afte r it s most popular mode o f experimental investigation), Although this particular problem is only loosely related to the studies of electron beam interactions that follow, the model that we will develop provides a convenient wa y o f establishin g a framewor k fo r thos e subsequen t simulations . I t also illustrate s th e genera l principle s o f programming to b e followe d in thi s boo k and introduces some of the important practical detail s associated wit h constructing and 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 point would 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 n directions?" In order to simulate this problem, we must break it down to a sequence of instructions, or algorithms, that allow us to describe it mathematically. Figure 2.1 shows the situation for one of the steps making up the walk. It commences fro m th e coordinate (x, v) reached a t the conclusion o f the previous step and is made at some random angl e A wit h the X-axis, so that:
where RND is a random number between 0 and 1 . The coordinates xn, yn of the end of 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
10 MONT
E CARL O MODELIN G
Figure 2.1. Coordinat e syste m fo r th e random wal k simulation .
so that
cos (A) and cos (B), the cosine s o f the angle s between the vecto r representin g th e direction of the step and the axes, are called the direction cosine s an d will in futur e be abbreviate d t o CA an d CB . Although Eqs. (2.1) , (2.5), and (2.6) give an accurate mathematical descriptio n of on e ste p o f th e random walk , the axe s o f th e coordinat e syste m ar e constantl y changing as the walker moves from one step to the next. It would intuitively be more satisfactory t o describe th e progress o f the walker with respect t o a fixed referenc e frame o f axe s (suc h a s th e wall s o f th e room) , because thi s make s i t possibl e t o predict when , fo r example , a collision migh t occur . Wit h thi s descriptio n then , a s shown in Fig. 2.2 :
where X, Y are the angles described b y the direction cosines CX, CY for the previous step, an d A, B ar e the angles fo r the new direction cosine s CA, CB. As befor e
CONSTRUCTING A SIMULATIO N 1
1
Figure 2.2. Modifie d coordinat e description usin g fixe d axe s for th e random walk .
and fro m th e usua l trigonometri c expansion s 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 calculat e th e en d poin t o f a step , given its starting point. The next step can similarly be computed using the identical equations bu t resetting th e coordinate s s o that the ol d end point becomes the new starting point and the exit direction cosine s becom e the entry direction cosines :
The recipe fo r simulatin g the random walk is therefore a s follows: Given a starting point (x0, y0) an d a starting direction (CX, CY), the n Repeat the sequence Find th e deviation angl e 6 [Eq . (2.7)] Calculate the new directio n 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 coordinate s fo r the next step x = xn, y = yn, CX = CA, CY = CB until the required number of steps has been taken Then distanc e s from startin g point is s = V(* — x0)2 + ( y - y0)2
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 d in a for m tha t th e compute r ca n understand . Thi s require s tha t w e choos e on e computer language , fro m amon g th e man y no w available , i n whic h t o cod e ou r program. Unfortunately , any discussion of programming language s is liable t o lead to acrimony , becaus e anyon e wh o regularl y use s a particula r languag e an d ha s become use d to its syntax an d particular strengths an d weaknesses ca n always fin d sufficient reason s t o prove that any other languag e is deficient i n power o r conve nience. However , stripped o f the theological overtone s s o often accompanyin g this sort of debate, the truth is that any of the languages now in common use on persona l computers coul d b e used t o cod e thi s an d the following , Monte Carl o simulation s without a noticeabl e effec t o n th e qualit y of th e fina l product . But sinc e i t i s no t practical t o provid e equivalen t cod e fo r al l possibl e languages , i t i s necessar y t o choose jus t one arbitrarily, fo r whateve r reasons see m appropriate , an d wor k with that. Even though it might not have been your firs t o r even your second choice, th e decision her e ha s been t o 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 allow s for structure d an d modular programming ; i t has a powerful ye t simpl e syntax ; and—since i t i s a compiled 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 e availability of long descriptiv e variabl e names , leads to code tha t is easy to read and understand . 3. Variant s of PASCA L ar e commerciall y availabl e fo r al l computer s likel y t o b e encountered i n current use. Although there ar e slight difference s betwee n them , the origina l definitio n o f the languag e wa s sufficientl y precis e that these varia tions rarel y pos e a proble m i f a progra m mus t b e move d fro m on e versio n o f PASCAL 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 n languages such as QUICKBASIC, ADA, MODULA-2, o r C now share s o many of the features of PASCAL—conversion from PASCAL to any other language of your choice i s straightforward. I n fact, softwar e is available tha t can effec t suc h transformations 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 widel y use d form o f PASCAL for MS-DOS computers . These programs wil l also compile an d run, without any changes being necessary, in
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 }
var CA,CB,CX,CY:extended; {directio n cosines } x , x n , y , y n , t h e t a , d i s t a n c e : e x t e n d e d ; {ste p variables } step:extended; {displa y variables } hstart,vstart:integer; {scree n center } i , t r i e s : i n t e g e r ; {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 } cons twopi = 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}
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) ; vstart: =trunc(GetMaxY/2); step: = (GetMaxX/50) ;
{horizontal midpoint of screen} {vertical midpoint of screen} {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, var
VI,V2:extended ; begin VI : =c o s ( t h e t a ); V2: =s i n ( t h e t a ); CA:=CX*V1 - CY*V2 ; CB:=CY*V1 + CX*V2 ; xn:= x + step*CA ; yn:= y + step*CB ; {ne
end;
{new direction cosines}
w coordinates }
CX,CY and theta}
CONSTRUCTING A SIMULATION 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 iv:=vstart + t r u n c ( y ) ;
t fo r aspect ratio}
ihn:=hstart + trun c (xn*Yasp/Xasp) ; {ditto ivn:=vstart + t r u n c ( y n ) ;
}
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} begin x:=xn; y:=yn; CX:=CA; CY:=CB; end;
Procedure how—far ; {computes the distance traveled in the walk} label hang ;
var a,b:integer; s:string; begin distance:=sqrt((x-hstart)*(x-hstart) + distance:=distance/step;
(y-vstart)*(y-vstart) ) ;
{in step-lengt h units }
15
16
MONTE CARLO MODELING
a: =t r u n c ( G e t M a x X * 0 . 2 ); {adjus b:=trunc (GetMaxY*0 . 9) ; {ditto Str (distance : 3 : l , s) ; {conver
t for your screen} }
t nutnber to text string}
s : = c o n c a t ( s , 'step s fro m o r i g i n ' ) ; OutTextXY(a,b,concat ( ' T h e walke r traveled ' s ) ) ; hang:
{label for goto Call}
if (no t keypressed) the n got o hang ; closegraph; {tur
{keep display on screen} 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 d o begin theta: =twopi*RANDOM;
{get deviation angle}
new_coord; {comput
e new position}
plot^xy(x,y,xn,yn);
{plot
reset—coordinates;
{move origin to XN, YN position}
d e l a y ( l O O ) ; {t
this step on screen}
o slo w down
display}
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 following the code even though the format itself seems , at first, rather unusual. To further hel p the reade r t o follo w th e structur e an d logi c o f th e program , thi s boo k wil l als o employ a consistent se t o f typeface conventions whe n listing th e program s in th e text. If you decide t o type any of these programs int o your computer t o run them , then these bold and italic effects should , of course, be ignored. The program will be set i n Courie r typeface ; quote s fro m th e progra m code , procedure , an d function names , etc., will also b e se t i n the sam e typeface to identif y the m i n th e text. The firs t lin e in the listing alway s identifies the program name, here RANDO M WALK. Th e keyword PROGRAM will be printed in bold type to identify it . Note that this 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 L compiler ignore s spaces and line breaks, following the program logic only from th e delimiters. I f desired , furthe r detail s abou t th e progra m ca n the n b e adde d a s a comment. In PASCAL, this is done by enclosing the text within {. . .} brackets. Fo r clarity i n the printed listings, comments wil l be shown in italics. Next, the resources require d b y the program ar e listed. Th e keyword uses, here printe d bold , i s followe d b y a lis t o f th e librarie s require d b y th e cod e tha t follows. I n thi s cas e th e CRT , DOS, an d GRAP H librarie s ar e needed . O n othe r computers or in other variants of PASCAL, the list of resources may be different o r missing altogether . The keywor d var , whic h wil l b e i n bold , introduce s a listin g o f al l th e variables use d in th e program, groupe d b y their type . Every variabl e i n PASCA L must 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 numbe r is needed in mor e tha n one for m (fo r example , a s both a real numbe r and a n integer) , tw o variables must be defined an d the value converted fro m on e type to the other, using one of the special functions provided fo r this by the language. Variables listed at the start o f a program ar e GLOBA L variables ; that is , ever y part o f the progra m ca n read and write these quantities. Variables can also be defined within the procedures
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 an d are not available to other parts of the program. Note that PASCAL does not distinguish the case o f letters , s o dummy , DUMMY , an d Dumm y woul d al l refe r t o th e sam e quantity. 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 e program, suc h as the length o f the ste p taken by the walke r and the coordinates o f the center o f the display screen. Onc e defined here, thes e quantities are also globa l in 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 defin e 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 . Onc e assigned , th e valu e of a constant canno t be changed; any attempt to do so will lead the compiler t o produce an error statement. Temporary constants—that is, ones whose values may be altered if required—are obtaine d b y a normal progra m lin e equatin g tw o variables : new-dummy : =5 .15 ; Note that assigning the value on the left-hand side of a statement t o value given on the right-hand sid e requires a ":=." The simple "=" implies a logical operation , a s in "i f A= B, " not th e ac t o f equatin g tw o values . Sinc e i t has bee n estimate d tha t 95% of all errors in PASCAL come from omissio n of the ";" and confusion betwee n " =" and ": =," care in copying these jots and tittle will be repaid by a reduction in the tim e it takes t o ge t a program running . Following thes e definitions , th e listin g contain s cod e fo r FUNCTIO N an d PROCEDURE routines. These pieces o f code play the role assigned to subroutines in some other languages . A function ha s the specifi c job o f performing som e defined mathematical operation . I t therefor e return s t o th e progra m lin e tha t calle d i t a n output o f som e type , an d this typ e mus t appear i n the definition . Thu s Function SUM: real; tells us that this is a function whos e output is a real number—fo r example , the sum of tw o o r mor e othe r numbers . I f th e functio n i s supplie d wit h dat a o n whic h t o
CONSTRUCTING A SIMULATIO N 1
9
work, the n bot h th e typ e of th e dat a supplie d an d o f th e outpu t returned mus t be given, so FUNCTION
black—box(a,b:integer):real;
takes i n data defined as integer but produce s as output a real number. Many func tions, such as sin or cosin or log, are already included in the language itself; but by writing the necessary code, as many new and specialized function s a s required can be added. A procedure, by comparison, can perform any legal set of operations and so has n o "type" of it s own. In either case , th e procedures an d function s mus t b e defined befor e they ar e calle d b y th e program , s o all o f th e cod e associate d with these items appears before the main body of the program. As far as possible, al l of the detai l i n a program i s carried ou t by procedure s an d functio n calls . Th e main program then simpl y lists the order i n which these ar e carried out . Thi s makes the logic of the program easy to follow, particularly if descriptive names are used for the functions an d procedures. Sinc e PASCA L imposes n o limitations o n the lengt h of names, it is worth choosing ones whose meaning will still be evident 6 months after a program is written (i.e., set_to_zero is descriptive and helpful, ST Z is not). Laying out program s i n thi s wa y als o make s i t eas y t o subsequentl y construc t ne w programs, sinc e th e components can be reused. The main program runs between the key words BEGIN and END, set in bold type. 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 f comment. In reading a program for the first time , therefore, the main program code should be identified, remembering that it is always at the end of the listing; then the procedures and functions should be studied as they are called b y the program. The program starts by calling th e procedure set_up_screen . which , as can be see n from the code for it, first clears the display screen, presents the program name ready for th e simulatio n to begin, an d asks for th e number of step s to be modeled . Since the purpose of this program is to plot the random walk on the screen, the next step is to set up the graphics display of the computer. This is complicated by the fact tha t MS-DO S machine s com e with a wid e variety o f graphica l displa y hardware. Th e procedure initializ e (take n directl y fro m th e TURB O PASCA L reference book s supplie d by Borland Inc.) determines automaticall y whic h type of graphics display (i.e., CGA, EGA, VGA, Hercules, etc.) is present in the computer at the time the program is run. I t then selects a "graphics driver program" (file s o n the dis k wit h th e extensio n .BGI ) tha t wil l interfac e th e compute r cod e t o th e hardware i n use. Provide d tha t our softwar e is written carefully enough, the sam e code will produce an acceptable output on any of the possible displays, even though these wil l differ 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 th e coordinates o f this point will var y from on e type of display to another . We
20 MONT
E CARL O MODELING
therefore ask the machine to tell us how many picture points ("pixels") it can plot in the X (or horizontal) direction, using the call GetMaxX, an d how many in the Y (or vertical) direction, using GetMaxY. Th e center o f the scree n i s then, quite generally, a t th e coordinate s (GetMaxX/2 , GetMaxY/2) . I n plottin g o n th e screen , th e coordinates mus t b e give n a s intege r number , s o th e procedur e convert s th e rea l numbers (GetMaxX/2, GetMaxY/2 ) to integers (hstart, vstart) using the ' trunc ' function define d in PASCAL. Similarly, the step length is set to be one-fiftieth o f the width o f the screen i n the horizontal direction (i.e., GetMaxX/50). A final touc h is to 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 e horizontal direction to a unit step in the vertical direction. This is obtained from th e call GetAspectRatio ( ) , whic h gives us the ratio Xasp/Yasp for the display in use. B y correcting for the aspect ratio of the screen, w e can ensure that the displays on the screen will look simila r for all the graphics card s supported by the software. The next procedur e used , initialize_coordinates , set s th e position variables x,y and the direction cosines CX,CY t o the desired startin g values. In some computer languages (e.g. , BASIC), all variables are automatically reset to zero each time the program i s run; bu t in PASCAL, the value assigned to a variable when the program start s is quite arbitrary, so it is necessary to explicitly set each to the value required. The procedure also resets the random number generator with the statement "randomize." The quality of a Monte Carlo simulation depends to a great extent on the quality of the random numbers with which it is supplied, since if these exhibit any patterns in their behavior or if a given number repeats within a limited number of calls, the output data will be flawed. The random-number generators i n TURBO PASCAL (and QUICK PASCAL) , summone d b y th e cal l RANDO M ar e quit e wel l behaved provide d tha t th e generato r i s periodicall y rerandomize d usin g th e cal l RANDOMIZE. Althoug h it is not a documented feature, it can also be noted that if the initial RANDOMIZE statemen t i s omitted (o r placed withi n {. .} comment brackets), 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 e program i s run. This can, in some cases, b e usefu l fo r debuggin g a simulation and also i n examining th e effec t o f changing a singl e paramete r i n a simulation . The program now calls the procedure new_coord, which calculates the new coordinates xn, yn give n the startin g coordinate s x, y; the initial directio n cosine s CX, CY; th e deflectio n angl e 0 ; an d th e ste p length , using th e formula s derive d above. Because all of these variables have been declared to be global by being listed at the start of the program, no variables need be passed t o the procedure. Th e effec t of this step is then displaye d on the screen, usin g the procedure plot_xy, whic h draws the step on the screen. Note that since the graphics routines that place pixel s on th e scree n nee d intege r number s a s input , the procedure mus t first conver t th e actual rea l numbe r coordinates x, y, xn, yn t o loca l intege r variables ix, iy, ixn, iyn using the trunc function supplie d in TURBO PASCAL . Th e origin o f the simulation (x = 0 , y = 0) is plotted at the center of the screen (hstart,vstart) and the coordinat e system is suc h tha t a positive x valu e moves the point t o the right an d a positive y
CONSTRUCTING A SIMULATIO N 2
1
value moves the point downward. As discussed in the procedure Initialize , th e distance plotted in the x direction (horizontal ) is corrected fo r the aspect ratio of the display screen i n use, so that all screens will give roughly equivalent displays. Note that if the line being drawn has coordinates tha t would place it off the screen (tha t is if ih or ihn does not lie between 0 and GetMaxX, or if iv or ivn does not lie between 0 and GetMaxY), then the command SetViewPort, whic h appears in the procedure initialize, wil l automatically "clip" the plot at the edges of the CRT. The program will continue to run, but plotting wil l not resume until the line again lies in the visibl e regio n o f th e screen . Th e plot-xy procedur e i s on e o f the buildin g blocks tha t w e wil l b e usin g agai n i n late r chapters . Next , th e progra m call s th e procedure reset^coordinates, whic h shifts th e origin of the calculation fro m x t o xn, and y t o yn, an d reset s th e directio n cosines . A standar d TURB O PASCA L command Delay () i s then called. The purpose of this is simply to slow down the action of the loop so that it can be watched more easily on the screen. The delay time is approximately equal to the parameter passed to the function i n milliseconds, thus Delay (100) wil l hold u p the loop for about one-tenth o f a second . Th e loop i s then repeated unti l th e desired numbe r o f step s has bee n calculated . The program the n exits fro m th e loop, an d the distance between th e start and finish coordinate s i s computed using the procedure how_ f ar. Thi s use s Pythagoras's theore m t o find th e distanc e o f the walke r from th e startin g point in units a step i n length. Sinc e th e compute r i s now i n graphics mode , thes e dat a canno t b e simply printed to the screen bu t must be drawn on the CRT as if it were a piece of a graph. First, the numerical valu e is converted to a string (i.e., a list of letters, digits , or symbols ) usin g th e standar d 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 is after the decimal point. The string is assigned to a variable s, which is declared at the start o f th e procedure ; i t i s therefor e a loca l variabl e (existin g onl y withi n thi s procedure). Th e string s is then concatenated (i.e. , added ) to other string s of text to form th e messag e draw n o n th e scree n b y th e comman d OutTextX Y ( ). Th e message i s draw n startin g a t th e coordinate s a,b, whic h are , again, loca l t o thi s procedure. Sinc e w e wis h on e piec e o f cod e t o serv e fo r al l types o f display , th e values of a and b are chosen a s fractions of GetMaxX and GetMaxY. Since personal preferences abou t th e appearanc e o f th e displa y ma y vary , however , th e actua l values can readily b e changed to place the text at any other desired position o n the screen. In fact, changing the values of a and b and then recompiling an d rerunning the program t o se e the result is a n excellent wa y for users withou t much practical experience wit h computer s t o gai n proficienc y i n modifyin g th e cod e an d s o t o overcome an y fear of the dire results of "interfering" with the program. Note that if a 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 y disappear becaus e th e comman d SetViewPort , i n th e procedur e initialize , "clips" the displa y a t th e edge s o f the screen . I n orde r t o hol d th e displa y o n th e screen so that it can be examined or printed out, this procedure finishes with a loop.
22 MONT
E CARL O MODELING
The command keypressed call s a standard function tha t checks whethe r o r not any key has been touched. The output o f the function i s a Boolean (i.e., it has the value tru e 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 th e functio n evaluate s to a positiv e number or produces a Boolean variabl e wit h the value "true" (i.e., +1) . If, on the other hand , th e functio n evaluates t o zer o o r to a negative numbe r o r produces a Boolean variable with the value "false" (i.e. , 0) then the operation is not performed. Here, i f keypressed i s "false" (i.e. , n o key wa s touched) the n th e expression no t keypressed has the value "true," so the program goes back to the label hang and continues t o cycle around until eventually some key on the keyboard is struc k and the procedure i s exited . It may seem to be overelaborate t o present a simple program in this structured way, bu t adherenc e t o thi s forma t produce s cod e tha t i s eas y t o follow . A s th e programs in this book become longe r and more complex, the benefits of its use will be mor e evident . Debuggin g th e progra m i s als o mad e easie r becaus e a whol e procedure o r function ca n b e dropped out by simply placing {. . .} brackets around the call t o it, allowing th e errant region o f the program to be quickly identified. In addition, by doing all of the real work in a program in the procedures an d functions, a librar y o f progra m module s i s buil t u p tha t make s i t possibl e t o pu t togethe r a special-purpose program wit h the minimum of effort. Onc e a procedure or function has been debugge d and tested i n one program, i t can safel y b e moved into anothe r program wit h the certai n knowledg e tha t it will wor k as expected . Finally i t must be pointed ou t that the code, a s given here, doe s violate on e of the accepte d principle s o f "good programming" i n that global variable s (i.e. , variables declared at the beginning of the program and so visible to all of the procedures and function ) ar e used . "Good " practice trie s t o avoi d th e possibl e sid e effect s o f global 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 a s they are required. However, in the electron bea m simulations that follow, as many as 15 or 20 differen t variables ma y be required t o describ e th e current statu s of the electron , an d al l of these may be needed b y an y given procedure o r function. Writin g the code t o pass this number of variables t o a procedure is cumbersome and the resulting operation i s also slow, so the code give n here respects th e spirit of the injunction against globa l variables bu t use s them anywa y in th e interest s o f convenienc e an d speed . Fo r a more detailed discussion o f this topic, for other questions related to programming in PASCAL, o r fo r informatio n o n compiling , editing , o r runnin g TURB O PASCA L programs, see the documentation supplied with the program or read one of the many books o n this language.
CONSTRUCTING A SIMULATIO N 2
3
2.5 Running the simulation If the programs ar e available on disk, then this simulation ca n be run by booting the computer in the usual way from either a hard disk or a floppy disk and obtaining the ">" prompt. I f th e computer wa s booted fro m a floppy, then remove thi s syste m disk and insert the disk with the Monte Carlo programs on and type Randomwalk. at the ">" prompt. Be sure that the disk (if it is a copy) has the .BGI graphics driver files o n it or else th e progra m wil l crash. I f the compute r wa s booted fro m a hard disk, then put the program floppy in the first available drive (usually labeled A:) and type A:Randomwalk. I f th e progra m ha s bee n type d int o th e compute r fro m th e listing, the n sav e i t t o dis k before compilin g an d running it , usin g the instructio n provided b y th e relevan t manua l for th e languag e chosen . I f yo u ar e plannin g t o make an y changes t o th e program, always wor k fro m a copy rathe r tha n fro m a n original. When th e welcom e scree n appears , ente r th e numbe r o f step s required , hi t return, an d the simulatio n wil l run. To generate anothe r run , hit retur n (t o get th e ">" prompt onc e more) . I f your keyboard ha s function keys , then hittin g F l wil l redisplay th e origina l instructio n (i.e. , "A:Randomwalk") , an d hitting Retur n will cause 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 give a different track , and each will give a different distanc e between the start and finish of 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 o f 200 steps .
24 MONT
E CARL O MODELIN G
Figure 2.4. Summar y o f random wal k data .
successive run s a t a give n numbe r o f steps , the radia l distanc e travele d fro m th e starting poin t ca n var y ove r a wid e range . Thi s i s t o b e expected , becaus e th e simulation is, in effect, takin g samples of a random walk and there will therefore be a statistica l scatte r i n th e dat a point s obtained . I f th e sample s ar e assume d t o b e independent, whic h implies among other things that the random numbers used in the simulation are really random and not in any way related, the n the relative precisio n of the result will be proportional t o the inverse of the squar e root of the number of samples 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 e simulation of a random walk of a given number of steps would produce little usefu l information, a serie s o f suc h simulations , whe n averaged , woul d giv e u s a mea n distance traveled an d an estimate of the relative precision o f this mean value. Thus plotting (see Fig. 2.4) the average value of the distance traveled, determined fro m all the simulations using the same number of steps, as a function o f the number of steps taken give s a series o f values that falls clos e to the predicted theoretica l resul t that the distanc e travele d i s equa l t o th e squar e roo t o f the numbe r o f step s taken. A n essential requiremen t o f any Mont e Carl o simulation , therefore , i s the necessit y t o repeat the simulatio n a sufficientl y larg e numbe r o f times to obtain a statisticall y meaningful result .
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 n electron beam with a solid using the "single scattering " approximation . Withi n the limits discussed below, this model is the most accurate representation of the electro n interaction that we can construct, an d it is capable of giving excellent result s over a wide range of conditions and materials. Thi s program , together wit h the faster but less detailed "plura l scattering" mode l developed in the following chapter, will form the framewor k aroun d whic h specifi c application s o f Mont e Carl o modelin g t o problems in electron microscop y an d microanalysis will be generated i n subsequent chapters.
3.2 Assumptions of the single scattering model The single scatterin g Monte Carl o simulation calculates the passage of the electron through the solid by tracking it from on e interaction to the next. In principle, these interactions coul d b e eithe r elasti c o r inelastic , s o th e resultan t change s i n th e direction of motion and the energy o f the electron would be computed o n the basis of the specific sequenc e o f scattering event s that each electron suffered . Whil e this is a feasible way of tackling the problem, it has the disadvantage that because not all scattering events are equally important—in terms of their effect o n the trajectory or energy—or probable , th e amoun t o f computatio n require d become s excessivel y large. Th e procedure described her e makes two significant assumptions to provid e an accurat e simulatio n while minimizing the amoun t of calculation required . 1. Only elastic scatterin g events ar e considered i n determining th e path taken by 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 y charged electro n an d the positively charge d atomi c nucleus and the correspondin g repulsion betwee n th e orbitin g electron s an d th e inciden t electron . Thi s process , which is described mathematicall y by the screened Rutherford cross section, results in angular deflections of from typicall y 5° to 180° . (For an excellent concis e discussion o n electron scatterin g phenomen a se e Egerton, 1987. ) Inelasti c scattering , on the othe r hand , produces deflection s o f the orde r A£/ £ [i.e. , the rati o o f AE , th e 25
26 MONT
E CARL O MODELIN G
energy los t i n the event , to E, th e energy o f the electro n (Egerton , 1987)] . Thus a 10-keV electron whic h deposits 1 5 eV in an inelastic collisio n i s deflected throug h an angl e o f abou t (15/10,000 ) radian s (i.e. , 1. 5 milliradian s o r abou t 0.1°) . A n electron that loses more energy in an inelastic event is, of course, deflected through a larger angle, but the probability o f these events is proportional t o about 1/AE , so only a smal l fractio n o f inelasti c event s wil l produce significan t deviations of th e trajectory. Consequentl y elasti c scatterin g event s ar e th e one s tha t dominat e i n determining th e spatia l distributio n o f th e interaction ; ignorin g th e effect s o f th e inelastic scatterin g produce s littl e error . 2. The electron i s assumed to lose energy continuously along its path at a rate determined b y th e Beth e relationshi p rathe r tha n a s th e result o f discret e inelasti c events. While some energy loss mechanisms are continuous, such as the production of Bremsstrahlung ("brakin g radiation" ) b y the slowin g down of the incident elec tron a s a consequenc e o f electron-electro n interactions , mos t energ y losse s ar e associated 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 take n b y th e electron s leads to a convenient simplificatio n in which all possible types of inelastic event are taken accoun t of b y on e simpl e expressio n involvin g onl y a singl e variable . Thi s model of continuous energy loss i s therefore in almost universal use—although, as discussed later , significan t modifications to its functional form ma y become neces sary a t lo w bea m energies .
3.3 The single scattering model The basic geometry for the simulation (Fig. 3.1) assumes that the electron undergoes an elastic scatterin g even t at some point Pn, having traveled t o Pn fro m a previous scattering even t at Pn~l. The fundamental tas k of the simulation is to compute th e coordinates 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 e scattering event at Pn. The parameters that describ e the instantaneous situatio n o f the electron ar e its energy E and the direction cosine s o f the trajectory segmen t that brought it from Pn-1 to Pn. The direction cosine s ex, cy, cz are defined in the same way as the direction cosine s employed in the random walk simulation except that in this three-dimensiona l situatio n ther e ar e no w thre e rathe r tha n tw o axe s t o b e considered. Th e X, Y, and Z axes in all the simulations in this book are defined with the conventio n tha t th e positiv e Z axi s i s norma l t o th e specime n surfac e an d directed int o the specimen, the X axis is parallel t o the tilt axis, and the X-Y plane is the surfac e plane o f th e untilte d sample . Whe n th e sampl e i s tilted , th e positiv e direction o f the Y axis i s down the surfac e o f the specimen . To calculate th e position o f the new scatterin g poin t Fn+1, we first requir e t o know th e distance , o r "step, " betwee n Pn+l an d the precedin g poin t Pn. A s dis cussed above , a n assumption of this particular model is that only elastic scatterin g events are explicitly considered. Th e distance between successiv e scattering events
THE SINGL E SCATTERIN G MODE L 2
7
Figure 3.1. Definitio n o f coordinate system use d i n the Monte Carl o simulation progra m i n this chapter .
is therefore related to the elastic mea n free path—which, in turn, is a function o f the elastic cros s sectio n a £. The total screene d Rutherfor d elasti c cros s sectio n cr £ is given by the relation (Newbur y an d Myklebust, 1981) :
where E is the electron energy i n kilo-electron volts , Z is the atomic number of the target, an d a i s a "screenin g factor " tha t account s fo r th e fac t tha t th e inciden t electron does not see all of the charge on the nucleus because of the cloud of orbiting electrons, a i s usuall y evaluate d usin g a n analytica l approximation , suc h a s that given by Bisho p (1976) :
28 MONT
E CARL O MODELIN G
The cros s sectio n crB define s a mea n 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 i n g/cm3, and A is the atomic weigh t o f th e targe t i n g/mole . X represents th e averag e distanc e tha t a n electron wil l travel between successiv e elastic scatterin g events . Calculating X from the formulas above fo r a selection of elements show s (Tabl e 3.1 ) that X is typically of the orde r o f a few hundre d angstrom s a t 10 0 keV an d abou t one-tenth o f that at 10 keV. Material s wit h highe r atomi c number s caus e mor e elasti c scatterin g tha n elements o f lower atomi c number , therefor e the y hav e a shorte r mea n fre e path . The actual distance that a n electron travels betwee n successive elastic scatterings will , of course , var y in a random fashion . Th e probabilit y p(s) o f a n electro n traveling a distance s whe n 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 a random numbe r RN D an d solving Eq . (1.1 ) i n the for m
which give s
Table 3.1 Elastic mean free paths Element
Z
Carbon 6 Silicon 1 Copper 2 Gold 7
131 4 111 9 29 98
X at 100 keV 0 A 17 2 A 12 7A 3 9A 1
X at 10 keV 0A 7A 5A 0A
THE SINGL E SCATTERIN G MODE L 2
9
Figure 3.2. Variatio n o f step length, in units of the mean fre e path, wit h the random numbe r chosen.
and hence
(since RN D i s a rando m numbe r betwee n 0 an d 1, 1 — RND i s als o a rando m number i n the sam e rang e an d s o can be replaced b y ye t anothe r random number RND). Figure 3.2 plots the variation of step length, in units of X , as a function o f the random number chosen, using the result of Eq. (3.7). Since the random numbers are uniformly distribute d betwee n 0 an d 1 , there is , fo r example , a 10 % chanc e o f drawing a number suc h tha t RND s 0. 1 and so (from Fig . 3.2 ) o f getting a step length such that s ^ 2. 3 X. Equally there is a 10% chance of drawing a number such that RND 3: 0.9, in which case the step length s < 0.1 X. The step lengths therefor e vary ove r a wide range o f values, depending o n the random number picked by th e computer. However, as is readily shown from Eq. (3.7), the average value of the step length s resulting from a large number of tries will be X, as would be expected fro m the definitio n o f X as th e average distance betwee n successiv e scatterings . In th e scatterin g even t a t Pn, which marks th e star t o f th e step , th e electro n is deflecte d throug h som e angl e (j > relativ e t o it s previou s direction o f trave l (se e Fig. 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):
30 MONT
E CARLO MODELING
where a i s the screenin g paramete r discusse d above . A n appropriat e functio n t o select a scattering angl e using a random number can then be obtained from a further application o f Eq. (1.1 ) in the form :
This integration, using the result for <JE given in Eq. (3.1), yields the relation for the scattering angl e (Newbur y an d 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 majority of scatterin g event s are predicted b y Eq. (3.10) to be low-angle—that is, less than about 10° . Figure 3.3 plots the probability o f obtaining a scattering angle 4 > greate r than some minimum value $ for the particular case of a silicon targe t irradiated at 100 keV. Note tha t whil e there i s onl y a 1 in 10,00 0 chance o f a n electro n bein g scattered by an angle in excess of 110°, more than 50% of all electrons are scattered through at least 1.5° . The electron ca n scatte r freel y t o any point on the base o f the cone show n in Fig. 3.1 . The azimutha l scattering angl e \\i i s then given a s
Figure 3.3. Probabilit y o f elastic scattering angl e exceeding some specified minimu m value .
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 be found. Th e procedur e i s simila r t o that used i n Chap. 2 , except that the motion is now i n thre e rathe r tha n tw o dimensions . A s before , th e pat h i s describe d usin g direction cosines, ca, cb, and now cc. The coordinates at the end of the step at Pn+1, xn, yn, an d zn, are then related t o the coordinates x, y, z at Pn b y the formula s
The direction cosines ca, cb, cc are, as previously, found from the direction cosine s ex, cy, and c z with which the electro n reache d Pn. The derivatio n o f the require d transformation fro m ex, cy, and cz to ca, cb, and cc is similar in outline to that given in Chap. 2 but is more complex because of the extra dimension. The result (modified from th e derivatio n of Myklebust et al., 1976 ) i s
where
and
32 MONT
E CARL O MODELIN G
Note tha t the su m of the square s o f the directio n 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 y because o f th e dra g exerte d o n th e negativel y charge d electro n b y th e positivel y charged nuclei surrounding it; it also loses energy during discrete inelastic scatterin g events such as the horizon or production of a plasmon. The most complete approac h to accounting for these energy losses would be to incorporate the m individually into the simulation , bu t thi s is a relatively lengthy procedure becaus e o f the number of different possibilitie s available . Instead , w e make th e assumptio n that the effec t o f both th e electrostatic dra g o n the electron an d the discrete energ y losse s occurrin g during inelastic scatterin g event s can be combined an d approximated by a model in which the inciden t electro n i s slowin g dow n continuously as it travels. Th e rate at which energy is lost by the incident electro n wa s shown by Bethe in a classic pape r (1930) t o be expressibl e i n the form :
where (dE/dS) i s sometimes referre d t o a s the "stoppin g power " o f the target , E i s the energ y o f electro n (i n kilo-electron volts ) Z an d A are respectively th e atomi c number and atomic weigh t of the target, and S is the product of p the density of the target (i n g/cm3) and the distance travele d alon g the trajectory s. J, whic h has units of kilo-electro n volts , i s calle d the mean ionization potential an d represent s th e effective averag e energy los s per interactio n betwee n th e incident electron an d th e solid. Thi s singl e parameter incorporate s int o its value all possible mechanism s fo r energy los s tha t th e electro n ca n encounter , thu s allowin g th e Beth e equatio n t o provide a convenient and compact way of accounting for the variety of energy losses experienced. / ha s been measure d experimentally , usin g nuclea r physic s techniques , fo r a wide rang e o f material s an d compound s (see fo r exampl e ICRU , 1983) . Table 3. 2 gives value s for some common element s (i n solid form) , an d it can be see n that , in general, there is a monotonic and almost linear increase of/ wit h the atomic number of the element. Berge r an d Seltzer (1964 ) showed that this variation could be fitte d with good accurac y by th e relatio n
and a comparison o f this expression wit h 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
THE SINGL E SCATTERIN G MODE L 3
3
Table 3.2 Measured values of mean ionization potential J Element
/(eV)
H 21. Li 40. Be 63. B 76. C 78. Na 14 Al 16 Si 17 Ca 19 Sc 21 Ti 23 V 24
8C 0M 7F 0C 0N 9C 6Z 3G 1G 6Z 3N 5M
Element r 25 n 27 e 28 o 29 i 31 u 32 n 33 a 33 e 35 r 39 b 41 o 42
J(eV) 7P 2A 6C 7S 1G 2T 0W 4P 0A 3P 7U 4
Element d 47 g 47 d 46 n 48 d 59 a 71 72 t 79 u 79 b 82 89
/(eV) 0 0 9 8 1 8 4 0 0 3 0
within a few electron volts of each other. For compounds, th e appropriate value of/ can again be found usin g Eq. (3.18), but replacing Z by Zav, the mean value of Z for the compound. 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 e average in most cases produces a value for Zav, and thus for /, whic h is of accept able accuracy. I n the case o f complex materials, however, th e composition ma y not be known. Table 3. 3 therefore give s /values, again derived fro m th e ICRU (1983 ) report, fo r som e compound s likel y t o b e encountere d i n electro n microscopy . Al though thi s lis t i s fa r fro m exhaustive , i t doe s giv e a usefu l guid e a s t o probabl e values fo r generi c type s o f materials . Table 3.3 Measured values of mean ionization potential J Material JT(eV Nylon 63. Teflon 99. Paraffin wa x 48. PMMA 74. Polyethylene 57. Polystyrene 68. Plastic 64. scintillator emulsio
)
Material J(eV
)
Material J(eV
9 Aluminu m oxid e 14 5 Adipos e tissue 6 1 Calciu mffluoride11111166 pbone 1107 3 Lithiu mffluoride 94 4Muscle 75 0 Silico n dioxid e 13 9 Ski n7 4 Sodiu m iodide 45 2 Ai r ( 1 atm.) 8 7 "Pyrex " glass 13 4 Bloo d7 7 Photographi c 64. 7 Liqui d water 7 n
) 3 4 6 5 5
34 MONT
E CARL O MODELIN G
Figure 3.4. Stoppin g powe r fo r copper compute d fro m Beth e expression.
Using eithe r th e measure d o r compute d valu e o f /, Eq . (3.17 ) ca n no w be evaluated 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 f energy loss , (-dE/ds), o r p(dE/dS), fo r coppe r ( p = 7. 6 g/cm 3) ove r th e energ y range 10 0 eV to 10 0 keV. The predicted energy-los s values show a steady increas e from abou t 0.1 eV pe r angstro m a t 10 0 keV u p t o almos t 1 0 eV pe r angstro m a t beam energies of a few kilo-electron volts. These values ar e typical of those found in all materials. However at an energy of about 2 keV, the curve reaches a maximum value before starting to fall rapidly as the energy is further reduced. This behavior is obviously 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-power formula is an excellent approximation for energies such that E > /, it cannot be used at lowe r energie s withou t encounterin g problems . I n particular , sinc e / i s o f the order 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 f electrons traveling with initial energies of 1 to 1 0 keV (i.e., typical energies encoun tered in a scanning electron microscope ) will be difficult, sinc e a significant part of the 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 e applied. 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 the energy 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 :
THE SINGLE SCATTERING MODEL
35
Figure 3.5. Compariso n of stopping power for copper from Bethe expression, Rao-Sahib and Wittry extrapolation , and Tung e t al. calculation.
This expression provides a convenient extrapolation tha t is well behaved ove r the lo w energ y range , an d s o this approximatio n has bee n widel y used i n Mont e Carlo simulations . I t is not, however, either physically realistic o r accurate. Figure 3.5 compares the rate o f energy loss , (-dE/ds), o r p(dE/dS), fo r copper ( p = 7. 6 g/cm3) ove r the energy range 10 0 eV to 10 0 keV, obtained using the Bethe mode l and the Rao-Sahib-Wittry extrapolation, wit h the results o f detailed computation s by 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 kiloelectron volts . However , onc e th e energ y fall s belo w 1 keV, neithe r th e original Bethe 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 electron volts. 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 s becoming wors e for high atomi c numbers , sinc e thes e hav e a larger / value [Eq . (3.18)]; consequently th e Bethe expression becomes unusable a t energies a s high as a 4 or 5 keV. We ca n simultaneousl y escap e th e mathematica l singularit y o f th e origina l Bethe expression , eliminat e th e nee d t o us e th e Rao-Sahib-Wittr y extrapolation , and improve the accuracy of the stopping power as compared to the Tung et al. data by using a modified version of the Bethe equation suggested by Joy and Luo (1989). We write the stoppin g power as:
36 MONT
E CARL O MODELIN G
Figure 3.6. Compariso n o f stoppin g power fo r coppe r fro m modifie d Beth e law , wit h dat a from Tun g e t al .
At high energies E> J, this expression converge s t o the original Beth e expressio n of 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 the logarithmic term ensures that for all positive values of E the log term evaluates to a positive quantity. As shown in Fig. 3.6 , this modified expression is now a very good fit to the Tung et al. data for all energies above 50 eV. It can be shown that this result is equally applicabl e t o al l other element s an d compounds o f interest, producin g a stopping powe r valu e whic h agree s wel l wit h mor e detaile d calculation s fo r al l energies abov e a few tens of electron volts . This expression [Eq . (3.21)] is therefore used i n this book . The sequence o f operations neede d t o simulate the electron trajector y through the 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 e before bein g scattered . Thu s the procedure is : Calculate initial entr y dept h int o sampl e [Eq . (3.7) ] then repeat Get startin g energ y E o f the electro n Determine initia l coordinates x, y, z for this ste p Find th e directio n cosine s ex, cy, cz of its motio n relative t o th e axe s Compute the mean free pat h \ fo r this material and energy E [Eq . (3.3) ] Calculate th e ste p lengt h [Eq . (3.7) ] Find th e scatterin g angle s 4> , fy from Eqs . (3.10 ) an d (3.11 )
THE SINGLE SCATTERING MODEL
37
Find finis h coordinate s xn, yn, zn for this ste p [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 = zn Reset directio n cosines ex — ca, cy = cb, cz = cc Reset 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 the conventions introduce d in the previous chapter. Note that, by design, the program eliminates pleasing but unessential features like the use of color, or windows, so as to keep the cod e a s clear an d easy to follo w 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+} {$E+}
{turn on numeric coprocessor] {turn on emulator package]
uses CRT,DOS,GRAPH;
{resources required]
label
exit;
const
two_pi = 6.28318; e_min=0.5;
{2ir} {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}
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) / ( i n c _ e n e r g y + 1 0 2 2 . 0 ) ; er:=er*er; lam_a:=at_wht/ (density* 6 . OE23 ) ; {lambda in cm}
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} begin ClrScr; {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 t h i c k : = 7 0 0 . 0*power(inc—energy,1.66)/density; if thick<1000. 0 the n thick : =1 0 0 0 . 0; thin: = false;; end else {it' s thin } begin GoToXY(40,7);
scale}
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); iz:=top + trunc (b*plot_scale) ; iyn:=qenter + trunc(c*hplot_scale) ; izn:=top + trunc(d*plot_scale); if d=99 then izn:=top-2; if d=999 then izn: -bottom+2; {and now plot this vector on the screen} line(iy,iz,iyn,izn); end;
{plotting coordinate #1} {plotting coordinate #2} {plotting coordinate #3} {plotting coordinate #4} {BS plotting limit} {transmitted plotting limit}
THE SINGLE SCATTERING MODEL
Procedure set_up_graphics ; {draws i n th e surface(s), var
41
beam location, and action thermometers}
a,b:integer;
begin
a: =GetMaxX-20; {adjus b : = 2 0 ; {ditto
t t o sui t you r screen } }
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,bottom,a,bottom); {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 n begin Line(b,bottom+10,trune(b+5000*plot_scale),bottom+10); OutTextXY(b,bottom+20,'0.5 microns') ; end else begin Line(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'Trajectories completed'); end; Procedure reset—coordinates; {resets coordinates at start of each trajectory} begin
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} begin
end;
bk_sct:=0; num:= 0;
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);
THE SINGLE SCATTERING MODEL
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: = ( t h i c k - z ) / c c; {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 } xyplot(y,z,yn,999); 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;
43
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); b:=bottom+23;
{adjust to suit your screen} {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; screen} b: =bottom+23;
{adjust to suit your {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}
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} repeat step: =-lambda (s_en) * In (random) ; s_scatter(s_en); new_coord(step); {problem-specific cod e will go here } {decide what happens next }
46
MONTE CARLO MODELING
if zn < =0 the n {this one is begin back—scatter; goto exit ; end;
backscattered}
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}
exit: {en
* en
num:=num+l; {incremen t counter } d o f got o jumps}
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 used in the program The progra m start s wit h tw o specia l statements , {$Af+ } an d {$£+} , whic h ar e known as pragmas or compiler directives. These tell the TURBO PASCAL compiler to choose certai n options whe n it runs the program. The firs t pragm a instructs th e compiler t o generat e th e cod e necessar y t o mak e us e o f a numerical coprocesso r chip (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 e typically slowe r b y a facto r o f fift y o r mor e time s whe n manipulatin g rea l o r floating-point number s (i.e. , number s suc h a s 10.2 3 or 1.5*10~ 3). Floatingpoin t
THE SINGL E SCATTERIN G MODE L 4
7
coprocessor chips , suc h as the 80387, ar e optimized to perform arithmetical opera tions o n real numbers an d greatly spee d u p the computation. However , in order t o use 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 then run o n another machin e withou t the math coprocessor. Th e secon d pragm a {$£+} tells to compiler t o test the compute r a t the star t o f the program t o determine i f a math 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 s detected, then the compile r "emulates " the chi p i n software , using the sam e cod e instructions an d performing the sam e operations a s the chip , althoug h much more slowly. Together, these two instructions allo w the program to configure itself s o as to run without modification on any suitable machine . Sinc e Mont e Carlo programs depend exclusivel y o n floating-point calculations , a mat h coprocesso r chi p i s th e cheapest an d most efficient wa y o f upgrading th e performanc e o f the computer . As in the simpler example given in Chap. 2, the program then continues with a declaration o f the resources required. The n LABE L collects th e names of all of the labels use d i n th e program . A labe l i s th e targe t o f a "GoTo " instruction , which causes the execution o f the program to jump to the specifie d location . Finally, we give a definitio n o f an y constant s used . Her e th e constant s ar e two_p i (2ir) , an d e_min th e minimu m energy belo w whic h th e electro n wil l n o longe r b e tracked . Defining as constants quantities, which are often used, saves time when the program is runnin g because th e compute r doe s no t hav e t o initializ e eac h quantit y many times. Next comes the list of variables used. Those declared in this list are available to all parts of the program and so are called global variables, whil e those declare d inside a procedure o r function ar e private an d only available t o that procedure . The firs t functio n called , POWER , illustrate s ho w function s ca n b e use d t o extend the PASCAL language itself. Most versions of the language do not include an operator t o fin d th e valu e o f th e quantit y xy; th e functio n o f POWE R therefor e provides this ability. Note that the simpl e code supplie d here does not contain any tests to avoid possible problems , such as attempting to take the logarithm of a zero or negativ e number . A versio n o f thi s functio n wit h proper erro r trappin g would therefore be necessary if the function wer e to be used in a more general context. The functions mn_ion_pot , stop_pwr , an d lambd a calculat e th e quantitie s sug gested by their names, using the equations discussed earlier i n this chapter. In each case th e functio n i s supplie d wit h a parameter, suc h as the atomi c numbe r of th e sample or the electron energy , in order to compute the appropriate value. The other data needed by the functions is taken from th e global variables declared at the start of th e program. Th e fina l functio n YE S wait s for inpu t from th e keyboard . If thi s input is a "y," or a "Y," then the answer to the question is assumed to be yes and a Boolean variable is set to true. If the input is any other letter or number, the variable is se t to false. In PASCAL, the code statement : If (function) then (operation)
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 e number or produces a Boolean variabl e with the value "true" (i.e., +1) . If, o n the other hand , th e functio n evaluate s t o zero o r t o a negative numbe r or produces a Boolean variable with the value "false" (i.e., 0), then the operatiori is not performed and the program moves to the next statement. Thus when the program a t some later point encounter s code suc h as: If ye s the n else
the functio n ye s i s called an d th e progra m wait s until inpu t from th e keyboar d i s received, I f this inpu t is a "y" or "Y" then yes is set to true and the "if" statement will b e performed. Otherwis e th e program wil l move on to the next line . The first procedure get-constant s computes a variety of quantities needed for othe r part s o f th e program , includin g the relativisti c correction t o the incident beam energy, and preconstants in the elastic cross section . Next set_up_screen allows fo r th e entr y o f th e parameter s describin g th e specime n an d experimenta l conditions. Th e operator i s asked if the sample is bulk (that is, one not sufficientl y thin to be electron-transparent). I f the answer , as determined b y the YE S functio n discussed 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 s estimated fro m a simple analytical 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 n variable thin is also se t to false. If, on the other hand, the operator say s that the specimen is thin, then the Boolean variable is set to true, and thick is set equal to the actual 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 s against whic h th e positio n o f th e inciden t electro n wil l b e teste d t o determin e whether o r no t i t ha s bee n transmitte d throug h th e foil . Finally , th e numbe r o f trajectories t o be run i n the simulatio n is obtained . The next procedure, initialize , i s identical to that used in the previous chapter. A s before , i t identifie s th e typ e o f graphic s displa y car d fitte d t o th e computer, 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 off the screen. A t the sam e time tw o variables—center the horizontal midpoin t o f the screen 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 t o set up the aspect ratio. We also check for two special values of the last plotting paramete r passed to the procedure. If d — 99, then the electron ha s been backscattered an d the
THE SINGL E SCATTERIN G MODEL 4
9
plotting line is terminated 2 pixels abov e the entrance surface ; if d = 99 9 then the electron has been transmitted through th e specimen and the plotting line is finishe d 2 pixels belo w th e exit surface . These step s help keep th e displa y lookin g tidy. set_up_graphics is the procedure which draws the entrance surface of the specimen an d mark s th e entranc e positio n o f th e electro n beam . I f th e Boolea n variable thin is true, then an exit surface is also draw n at a spacing fro m th e top surface whic h is proportional t o the foil thickness. If this exceeds 100 0 A , then the bottom 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 e plotting scal e plot-scale in pixels/angstroms is then determined an d the aspect ratio of the screen is found t o give a horizontal plottin g scal e hplot_scale such that equa l distance s i n either directio n wil l plo t a s lines o f equal length . N o scal e marker i s neede d fo r a thi n foil , sinc e th e specifie d thicknes s o f th e specime n provides a built-in scale, but fo r 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 what length 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 the progress o f the simulation. Whil e this is in no way essential to the program, it does add a nice touch to the display. Note that in order to make the same code run equally well on all types of graphics systems, we define all positions o n the screen i n terms of the size (GetMaxX , GetMaxY ) o f the screen, using two local variables a and b. A s before, however, a and b may be varied, if desired, to customize the display to 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 electrons respectively. Similarl y reset-coordinate s ensure s that , a t th e star t o f eac h new trajectory, all of the conditions ar e properly initialized, an d zero-counters resets 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 e number backscattered. Th e procedure s_scatter calculate s the scattering angles , using th e relationship s give n i n Eqs. (3.10 ) an d (3.11) . Thes e values , the startin g electron coordinate s x, y, z, an d the step length are then used by new_coord to determine th e fina l coordinate s x n , y n , z n a s wel l a s th e directio n cosine s ca, cb, c c relativ e to the fixed axi s system. It is at this point in the program that code specific to the task of interest will usually be inserted, sinc e all of the information about the previous and present position and energy of the electron ar e available. Once thi s has been handled , the n the program calls reset_next_step , whic h plots th e trajector y step , determine s th e amoun t o f energ y los t b y th e electro n as it traveled this step, and equates th e 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 s straight_through, transmit_electron , back_scatter , and show_BS_coef f handl e th e variou s way s i n whic h th e electro n ca n exi t fro m the specimen , cal l th e plo t routin e wit h th e appropriat e parameters , an d coun t
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 e percentage o f trajectorie s completed , an d th e procedur e show_BS_coe f f use s very simila r cod e t o dra w a thermometer representin g th e percentag e o f electron s backscattered. I n eac h cas e loca l variable s a an d b ca n b e altere d t o adjus t th e display to personal preference . Because o f al l th e wor k handle d b y th e procedure s an d functions , the actua l program section , startin g at begin and finishing at end, i s short and simple. Afte r the 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 o penetrate int o the sampl e b y som e distanc e equa l t o the ste p lengt h [generate d by applying Eq. (3.7)]. If this distance is greater tha n the thickness o f the sample, then the even t i s plotte d an d counte d an d th e loo p starte d agai n wit h a ne w electron . Otherwise th e position o f the electron i s plotted an d then, at the label repeat, a second loo p i s starte d i n whic h the electron i s scattered , it s ne w 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 e electron i s then tested t o see whether it has been eithe r transmitte d throug h the foi l or backscattere d fro m it , i n whic h cas e th e progra m leave s th e loo p an d goe s t o the appropriat e procedur e t o handl e thi s even t befor e commencin g a ne w 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 e repeat . . . until s_en < = e_min statemen t t o see whether o r not the energy i s abov e th e cutof f valu e e_min . I f i t i s not, the n th e loo p i s exited , th e electron i s counted, and a new trajectory is started. Otherwise the loop i s repeated . This sequenc e continue s unti l a tota l numbe r o f trajectorie s equa l t o traj_nu m have been calculated. Whe n the full numbe r of trajectories has been completed, th e program displays the fractional yield of backscattered electron s and then terminates .
3.6 Running the program The program ca n be run directl y fro m th e disk, if this is available, o r typed in and compiled. I n additio n th e .BG I file s provide d b y Borlan d mus t be presen t fo r th e graphics routines to operate. If a printed copy of the screen displa y is required when running MS-DOS 5.0 or higher, then at the ">" prompt type "graphics" and hit the return key. Anything appearing o n the scree n can now be transferred to the printer by using the key combination "Contro l + PrintScr. " When the ">" prompt returns, type "SS_MC" and hit return. The computer then requests th e parameters require d to run the simulation . Value s of atomic numbers, atomi c weights, an d densities fo r the elements ca n be found, fo r example, i n 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 atomi c number, and the appropriate density value is entered when requested. (Ideally, the procedure would 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 e compound was being scattere d fro m eac h time . This method has been use d (Murata et al. , 1971 ; Kyser , 1979) , bu t i t is no t clea r tha t the benefits are wort h the added
THE SINGL E SCATTERIN G MODE L 5
1
complexity). Fo r some very complex materials and compounds, it may be impossible to derive an effective valu e for Z, since the chemistry is not known. However, if the 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 c emulsion, th e mean ionizatio n potentia l / i s given i n Table 3. 3 as 64.7 eV . /is approximately 10.Z eff [Eq . (3.18)], where Zeff is the effective atomi c number of the material. Hence Zeff is taken as 6.5 and the effective atomi c weight as 13. While this is clearly onl y an approximation, in practice i t produces sensible and useful results . To illustrate the applicatio n o f this program, let us first conside r th e case o f a high-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 n electron microscope) . Figur e 3. 7 show s th e trajectorie s calculated fo r a 100-ke V beam an d 1000- A thick foils o f carbon, copper , silver, an d gold. I n each case, 25 0 trajectories wer e run, and in response to the question "I s th e sampl e bul k ( y / n ) ?" th e answe r wa s "n." A s the atomi c numbe r an d the densit y o f the foi l
Figure 3.7. Mont e Carlo trajectory plot s for 100-ke V electrons incident on 1000- A films of carbon, copper, silver, and gold. Number of trajectories pe r plot: 250.
52 MONT
E CARL O MODELING
increase, the amount of lateral scatterin g in the beam can also be seen to increase. In the cas e o f th e carbo n sample , th e trajectorie s for m a smoot h con e tha t i s closel y confined around the incident beam axis, and it can be seen from inspection while the program is running that the average electron is only scattered zero or once during its passage through the foil. In the case of the copper foil , however, the typical electron is scattere d a t least onc e o r twice, and the beam profil e becomes bot h broader an d less well defined as the occasional electro n i s scattered throug h a large enough angle to travel almos t horizontall y throug h th e foil . I n the gol d foil , ther e ar e almos t n o unscattered electrons and , i n fact, th e scattering i s now s o high that a few electron s are actually seen t o be backscattered fro m th e foil. Thus while 1000 A of carbon at 100 keV represent s a specimen that is truly thin, the sam e thickness of gold a t the same 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 electro n microscope technique s suc h as x-ray microanalysis, in which the spatia l resolutio n depends on the magnitude of the beam scattering . I n a later chapter, thi s simulation will be extended to give a quantitative model of the magnitude of these effect s a s a function o f the experimenta l condition s used . Experimenting wit h the progra m b y trying the effect o f various choices of material, foil thickness, and beam energies i s a good wa y t o star t t o build up a fee l fo r th e wa y i n which electrons interac t wit h a solid. 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 n discussed above, then eac h trajector y consists o f only a small number of scatterin g events. Consequentl y th e program run s rapidly an d many trajectories ca n be computed in a relatively short time. On a 386-class MS-DOS machine fitted wit h a math coprocessor, 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 e cases give n i n no more tha n 3 0 sec. However, i f in response t o the question "I s the sampl e bul k ( y / n ) ?" w e choose th e option "y , " then th e situation becomes ver y different. Eac h trajectory will now continue until the electron is either backscattered o r fall s belo w th e minimu m energy e_min , whic h i n th e progra m above is 0.5 keV. Since th e electro n i s typicall y losing energ y a t the rat e o f abou t 1 eV per angstrom (see Fig. 3.4), and since the mean free pat h for elastic scatterin g events is a few hundred angstroms (from Table 3.1), this suggests that even for a 20or 30-keV incident electron, it will be necessary to compute several hundred scattering events to complete one trajectory. This is indeed the case, and it may take as long as 1 min t o compute a singl e trajectory under the wors t conditions . Figure 3. 8 show s 250 trajectorie s plotte d fo r bul k sample s o f carbon, copper , silver, an d gold wit h incident beam energie s o f 20 keV. On an IBM P S 2/70, each plot took fro m 2 to 5 min to calculate. Th e shap e of the interaction volume s in the solids i s seen t o vary, with the choice o f material, fro m a "teardrop" hanging fro m the surfac e for th e carbo n t o a "squashed egg" shape presse d agains t th e inciden t surface fo r the gold. While the siz e of this volume will vary with the chosen bea m energy, the shap e stay s about the same , s o that the interactio n volum e a t 2 keV i s simply a scaled dow n version of the equivalen t volume at 20 keV. Observations o f
THE SINGL E SCATTERIN G MODE L 5
3
Figure 3.8 . Trajectorie s i n bulk C , Cu, Ag, an d Au a t 2 0 keV.
the trajectorie s whil e th e progra m i s running sho w that a disproportionatel y larg e fraction o f the time is devoted to computing the last portion of each trajectory. This is 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 original incident 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 d hence the averag e energ y los s per ste p i s only a few tens o f electron volts . Consequently, each successive trajectory ste p moves the electron by only a few angstroms and decreases its energy by a few electron volts, and a large number of computations is needed t o make a relatively insignificant addition to the overall trajectory. Since the perceived utility of a Monte Carlo model is at least somewhat dependent on how fast i t ca n produc e th e require d information , thi s leisurel y leve l o f performanc e makes the single scattering model rather unsatisfactory in many cases. One possible solution i s t o choos e a higher cutof f energ y e_min , s o a s t o eliminat e man y of these calculations . However—althoug h whe n th e inciden t energ y i s sufficientl y high (say 10 keV and above) e_jnin could be set to 1 keV or more with little loss of accuracy—when th e initia l energ y i s onl y 2 o r 3 keV , terminating th e trajector y calculation at an energy only 50% below the incident value would represent a rather drastic oversimplificatio n an d a valu e o f 0. 1 ke V fo r e_mi n woul d see m mor e appropriate. One practical solution to this dilemma is to use a model originally described by
54 MONT
E CARLO MODELING
Archard (1961) . I n this w e allow an electron tha t has reached th e cutof f energ y t o diffuse fo r a total distance equal to its estimated range [obtained from Eq. (3.22)] at an energ y e_min . Thi s i s don e i n tw o stages . First , i t i s allowe d t o continu e t o travel in the same direction (a s defined by the direction cosine s ex, cy, cz) in which it had bee n travelin g whe n it lef t th e Mont e Carl o loo p for a distance equa l t o 40 Distance = — ; : : — * estimated rang e (3.23 7 * atomic numbe r
)
Setting the step distance equal to this value, the new coordinates ca n now be foun d as usual, using the procedure new_coord. Th e new z coordinate z n i s then tested to 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 w trajectory started . Otherwise we set reset the coordinates as usual and then allow the electron t o scatte r throug h randomly chosen angle s <j > an d i|j , wher e 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) ) of the original estimated range . Using this step length and the scatterin g angle s give n above, th e ne w coordinates ar e then found , usin g new_coord, an d the electro n position is again tested to see if it has backscattered. I f it has, then it is counted and a new trajector y i s started ; i f not, then the trajector y i s terminated an d a new on e i s begun. This modification can be implemented by adding one function an d procedure to the program give n above an d then calling the procedure a t the appropriate point: Function archard_range:extended ; [estimates Archard diffusionon range at e_)minin microns} begin archard_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 } begin if 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;
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 * R N D - 1 . 0; sp: =sqrt (l-cp*cp) ; ga: = two_p i * RND ; step:=(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 out the sequence of steps discussed above. The procedure end_of_range is called just after the end of the loop repeat . . . until s_en<e_min, so that it is only 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 a more physically realistic model of the beam interaction in the important low beam energy regime. For beam energies greater than a few kilo-electron volts, the diffusion model adds little to the result and can safely be dispensed with.
4
THE PLURAL SCATTERING MODEL
4.1 Introduction We will develop i n this chapter a second Monte Carlo simulation of the interaction s of an electron wit h a solid. This new model is based on the same physical principles as th e singl e scatterin g approac h discusse d abov e bu t make s certai n simplifyin g assumptions tha t greatl y reduce th e computation tim e required. Thus , wherea s th e single scatterin g mode l discusse d i n Chap . 3 attempt s t o tak e int o accoun t ever y elastic scatterin g even t encountered by the incident electron , th e "plural scattering " model described her e trie s onl y to compute the net effec t produce d b y a number of successive scattering events. In addition, we average and precalculate other parameters o f th e trajector y wit h th e objec t o f minimizin g th e amoun t o f computatio n required during the simulation. Although these simplification s have some effec t o n the resultan t accurac y o f th e model , th e error s are , whe n th e mode l i s correctl y applied, 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 traveling into a bulk (i.e. , not thin an d s o 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 y appropriate t o th e tas k o f modelin g electro n interaction s i n a bul k solid , i s rathe r slow becaus e a great numbe r o f step s i n the trajectory are required t o advance th e electron a smal l distanc e a s it s energ y decreases . Consequently , i n application s where 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 e scattering Mont e Carlo simulation is, for many users, too slow to be either enjoyabl e or very useful. Th e procedure tha t we describe her e follow s the outline of a method that was first described b y Curgenven and Duncumb (1971), an d which was specifi cally designe d t o produce good data in short computing times on small computers . The first assumptio n that distinguishes this model from th e previous one is that we make ever y electron trave l exactl y th e sam e tota l path lengt h 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 e integral: 56
THE PLURA L SCATTERIN G MODE L 5
7
which computes the total distance measured along the trajectory that is required for an electron startin g wit h energy £ t o give up all of its energy. Here (dE/ds) i s the stopping powe r give n b y th e modifie d Beth e equatio n [Eq . (3.21)] ; therefor e th e total 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 given beam energy and material, but RB is nevertheless a convenient parameter with which to characteriz e th e genera l scal e o f th e electro n interactio n wit h th e specimen . In practice, it is not possible to perform the integration from zero energy as required by Eq. (4.1 ) because eve n the modified form o f the Bethe equation is not valid belo w about 50 eV. The procedure stop_pw r tha t calculates (dE/dS) therefor e check s to see whether o r not the energy is below thi s value. If it is, then the stopping power value 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, the stopping powe r fall s fo r electron s o f ver y lo w energy) , but th e erro r fo r inciden t energies above a few hundred volts is negligible. Th e integration is carried ou t by the procedure range. Figur e 4.1 plots the variation of RB as a function o f incident energy fo r som e common materials , an d it can be see n that at 1 0 keV, the range is
Figure 4.1. Variatio n o f Bethe range with energy .
58 MONT
E CARL O MODELING
typically severa l micrometers an d varies by a factor o f 5 or s o between th e a lowatomic-number low-densit y elemen t suc h a s aluminu m and a high-atomic-numbe r high-density elemen t suc h as gold . A s th e bea m energ y falls , however , th e Beth e ranges converg e i n valu e an d al l becom e essentiall y th e same , abou t 10 0 A, fo r energies belo w a few hundred electro n volts . This i s because, fo r the lowes t ener gies, th e magnitud e of th e stoppin g powe r i s almos t independen t o f th e choic e o f material. The Bethe range is now divided into steps. In the code discusse d here, 50 steps of equa l lengt h wil l b e used . Thi s i s a compromis e betwee n th e improvemen t i n accuracy that results from a large (e.g., 100 ) number of steps (Bishop, 1974 ; Love et al., 1977) , an d the increase i n speed to be gained fro m a small (e.g., 20) number of steps. An alternativ e approac h is to limit the number of step s bu t vary their lengt h with the energy of the electron (Myklebus t et al., 1976) , s o that for high energies th e step length i s of the order o f the instantaneous elastic mea n fre e pat h but for lowe r energies 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 s procedure i s to place a fixed uppe r limit on the number of computations required t o complete th e trajectory and avoid the problem, discussed in Chap. 3, of dealing with the incident electron whe n its energy becomes s o low that the mean free path is only a few nanometers an d the distance traveled in any scattering interval is an insignificant 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 t the star t of each o f the n steps. Sinc e th e length o f each ste p is known i n 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, s o a solutio n o f Eq. (4.2 ) wil l giv e E[2], which , in turn, can be used to find E[3] an d so on until, at the end of the 50t h step, we set £[51] = 0 . This calculation i s carried ou t by the procedure p r o f i l e . The electro n scatterin g i s onc e agai n describe d b y th e screene d Rutherfor d cross section , bu t it is formulated in a different way . Using the notation o f Chap. 3 , as show n in Fig. 4.2, th e scatterin g angl e ca n be writte n as :
where p i s th e impac t paramete r (i.e. , th e projecte d neares t distanc e o f closes t approach of the electron t o the scattering nucleus if no scattering was to occur) and b
THE PLURA L SCATTERIN G MODE L 5
9
Figure 4.2. Definition o f parameters used i n the plural scatterin g model.
is 0.0144 Z/E wit h b in angstroms when E is in kilo-electron volts . This expressio n is for a single scattering event and ignores th e effect o f nuclear screenin g by orbital electrons (Curgenve n and Duncumb, 1971). However, since at every energy our step length is now considerably greater tha n the mean free path , each electro n could be scattered severa l time s durin g eac h step , producin g a ne t deviatio n tha t coul d b e either larger or smaller than any of the individual deflections. This random variation is accounte d fo r b y writin g
where RND is the usual pseudo-random number lying in the range 0 to 1 and p0 i s now the maximum impact parameter . Electrons ar e assumed to arrive at the nucleus placed randomly within the circle of radius pa. The square-root function weights the distribution i n such a way a s to increase th e probability o f large p values . The simplifications introduced into this plural scattering model, compared with those o f the singl e scatterin g mode l of Chap. 3 , are clearly fairl y drastic i n nature. However, th e cumulativ e erro r du e t o thes e approximation s ca n b e reduce d b y choosing th e valu e o f p0 s o tha t th e Mont e Carl o calculatio n give s th e correc t backscattering coefficient. This quantity is chosen because its value is readily available 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. Love et al . (1977 ) rewrite Eqs. (4.3 ) an d (4.4) i n the for m
60 MONT
E CARL O MODELIN G
where, a s before , E0 i s the inciden t bea m energy an d
<])0 thu s represent s th e minimu m scatterin g angl e fo r th e inciden t electro n wit h energy 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 e variation o f (E/E 0) i s substantially independent o f the atomi c number Z (th e varia tion comin g onl y fro m th e mea n ionizatio n potentia l / , whic h occur s insid e th e logarithmic term) and the random number RND will average to a mean value of 0.5 when a large numbe r of trials i s made. I t therefore follows that the backscattering coefficient T | mus t depen d onl y upo n co t ($0/2). Lov e e t al . (1977 ) sho w tha t cot (4>o/2 ) ca n 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 th e valu e o f T | fo r th e target materia l bein g modele d i s available . I n particular , a t lo w (<1 0 keV ) bea m energies, wher e th e valu e o f T | ma y b e varyin g wit h energ y (see , fo r example , Reimer an d Tolkamp, 1980) , thi s approach has the benefit that realistic data may be generated withou t th e need t o use mor e accurat e scatterin g cros s sections . The Lov e e t al . approac h ha s distinc t advantage s an d wil l b e considere d i n detail i n Chap . 6 . However , fo r thi s initia l stud y w e follo w th e suggestio n b y Duncumb (1977 ) an d writ e
This expression, whe n used in the Monte Carlo simulation , lead s t o a reasonable prediction o f the variation of backscattering coefficien t wit h atomic number for both elements an d [using Eq. (3.19)] compounds. [ A similar expressio n i s given by Myklebust et al. (1976); but note, however, that their paper contain s a typographical error and that E0 should appear in the numerator rather than the denominator o f their variable F,.] While this approach essentially treat s pQ a s a fittable parameter t o yield the correct backscatterin g coefficient , i t has the advantage that no prior knowledg e of th e valu e of f\ i s required . Either of these two approaches enable s the Monte Carl o simulatio n to back scatter the correct fraction o f incident electrons . However, a closer inspection of the predictions o f thes e calculation s (Myklebus t e t al. , 1976 ) show s tha t whil e th e backscattering yiel d i s correct , th e energ y distributio n o f thes e electron s i s no t i n
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 e scattering equation s [Eqs . (4,3 ) and (4.4)] i.e. ,
does no t allo w fo r a sufficien t amoun t o f small-angl e scattering . Thu s th e largest possible 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 t o a minimum scattering angl e of about 3°. All electron s wil l be scat tered by at least this angle, an d 95% of all electrons will be scattered throug h 5° or more. For materials with higher atomic numbers, the minimum angle will be greater and 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 e fraction o f the electrons to be scattered through very small angles, we can adopt the suggestion o f Myklebust et al . (1976 ) an d writ e
so that, as RND tends to unity, the scattering angle can fall to zero and a fraction of the scatterin g events will be o f th e orde r o f a few degree s o r less . As in the previous chapter, the scattered electron can travel to anywhere on the base 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 l scattering angl e (jj » whic h wil l be give n b y [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 g model, but with the difference that each trajectory is restricted to 50 steps or less:
for n ~ 1 to 50 begin Get th e startin g energy E[n] o f th e electro n Get the startin g coordinates x,y,2 for the n th step Get the direction cosine s cx,cy,cz relativ e to the initia l axe s Find 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 bee n backscattere d if yes , exi t the loop an d ad d 1 to backscatter tota l otherwise Reset coordinate s x = xn, y - yn, z ~ zn Reset directio n cosine s ex ~ ca, cy — cb, cz — cc end
62 MONT
E CARLO MODELING
The PASCAL code that implements this sequence is set out below, again using the 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 ; label exit const two_p
;
{resources required}
{target address for goto jumps} i = 6 . 28318 ;
[2 constant}
var at_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
THE PLURAL SCATTERING MODEL
63
if energy<0. 5 the n {t o avoid problems as energy approaches zero} energy:=0.05; temp: =l n (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} begin ClrScr;
{Erases any data on screen display}
GoToXY(25,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 BergerSelzer 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}
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 energy} 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 Bethe stopping power, Eg. (3.21)} var energy,f,fs,Bethe—range:extended; l,m:integer; begin
fs:=0,; for m:=l to 21 do
{initialize variable to be sure} {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 conditons}
THE PLURAL SCATTERING MODEL
65
Bathe—range: = f s*inc_energy/60 . 0; (i ra_t_step: =Bethe_jrange / 5 0 .0 ;
n g/cm2]
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; begin E 11]:= inc_energy; for Hi : =2 t o 5 1 d o
begin
Al: =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 d o { a little smoothing of the profile} begin e[m] : - ( E [ m ] + E [m+1] ) /2 . ; end;
end;
66 MONT
E CARL O MODELING
Procedure initialize;
{sets u p the graphics drivers for 1/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 the display} center:=trunc(GetMaxX/2); top: =trunc{GetMaxY*0.1) ; bottom: =trunc(GetMaxY*0.75) ;
{adjust to suit your screen} {ditto}
end;
Procedure set_up_graphics; {sets up the plotting scales, surfaces, etc., for display using the size of the screen as found by the initialize routine to scale the display properly} var
a,b,c,d:integer;
begin
a: =GetMaxX-20; b:=20;
{adjust to suit your screen} {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 ; d:=10;
{adjust for your screen} {ditto}
{set up to draw the trajectories completed thermometer} OutTextXY(trunc (center-80) ,bottom+15, '0%............50%......... . 100%');
THE PLURAL SCATTERING MODEL
67
OutTextXY(trunc(center-78),bottom+28,'Trajectories completed'); If h_scale < = 3 0 0. the n {dra w a bar 1 micron long} begin Line{d, c, d+trunc(h_scale) , c) ; {micro n b a r ) ; OutTextXY ( d + t r u n c ( h _ s c a l e / 3) , d + c, '1 (Jim' ) ; {label the bar] end else {draw a bar 0.1 microns long} begin L i n e ( d , c , d + t r u n e ( 0 . l * h _ s c a l e ) , 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 trajectory}
68
MONTE CARLO MODELING
begin x: = 0 ;
y:=0; z:=0; cx:=0; cy:=s_tilt; cz : =c _ t i l t;
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) ;
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)) ; c c : = ( c z * c p ) + (v2*v3 ) - ( c y * v l * v 4 ) ; {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} begin x y p l o t ( y , z , y n , z n ) ; {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) ; b: =bottom+23;
{to match position of thermometer} {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}
70
MONTE CARLO MODELING
label han g; var a , b : i n t e g e r
;
begin a: =GetMaxX-180; {adjus b: =bottom+23; {ditto
t to suit your screen} }
O u t T e x t X Y ( a , b - 8 ' ' 0 . . . . 0 . 2 5 .. . 0. 5 . . . OutTextXY(a+18,b+5 'B S c o e f f i c i e n t ' ) ;
0.75');
L i n e ( a , b , t r u n c ( a + ( b k _ s c t / t r a j _ n u m ) * 2 2 0 ) ,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
* th
d random number generator}
e Mont e Carl o loo p *
init_counters; {reset while nu m < traj_nu m d o begin
counters}
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;
end;
*
{add one to trajectory total}
'exit:
{end of goto jumps}
show—traj—num
{update the trajectory number display}
{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 functions used 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 o f the math coprocessor an d the emulato r package. The resources, labels, constants, an d variables follow . The first tw o func tions in Plural Scatter, POWER , whic h provides an exponentiation capability
72 MONT
E CARL O MODELIN G
for PASCAL , an d gTOP_PWR , whic h calculate s th e electro n stoppin g powe r i n units of keV/g/cm2 using Eq. (3.21), are identical to those in SingleScatter, since, wherever possible, it 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 experimental conditions t o be modeled. I n addition t o the usual data about the specime n (atomic number, atomic weight, and density) and the beam energy, the option is given to change the angle of incidence o f the beam to the specimen. Th e variable T i l t, which describes this angle, is given in degrees, s o the procedure must first convert it to radians . Usin g th e conventio n fo r th e Cartesia n axe s describe d i n Chap . 3 , th e three direction cosines for the incident beam will then be CX = 0, CY = sin(Tilt), CZ = cos(Tilt) . The procedure calculate s an d stores thes e values. The procedur e Rutherford-Facto r calculate s th e energy-independen t quantities tha t appea r i n th e scattering-angl e Eqs . (4.3) , (4.4) , an d (4.10) . Th e variable pO is Duncumb's suggested fitting functio n t o the backscatter data as given in Eq. (4.8); rf the n represents the quantity (b/2pQ), wher e b is 0.0144 Z, which is used 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 e procedure rang e usin g Eq . (4.1) . W e firs t divid e th e tota l energ y rang e o f th e electron, fro m it s starting value inc_energy to zero, into 20 equal steps. At each of 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 th e 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). T o obtain th e Beth e range , thi s quantit y is divide d b y th e densit y o f th e specimen (g/cm 3) and the result is converted t o micrometers an d printed out on the input displa y screen . Th e step-length i s the n se t equal t o one-fiftiet h o f thi s range. The variatio n o f energ y o f th e electro n ca n no w b e precalculate d usin g th e procedure profile, whic h solve s Eq . 4.2 using a Runge-Kutta method (Pres s et al., 1986 ) to obtain the electron energ y at the end of each of the 50 steps into which the trajector y ha s bee n divided . Startin g fro m th e inciden t bea m energ y a t th e beginning o f th e firs t step , th e procedur e obtain s fou r differen t estimate s fo r th e energy lost in traveling on e step length, Sinc e the stopping power itself varie s with energy, th e firs t estimat e get s th e energ y los s A£ t alon g th e step , assumin g th e stopping power appropriate to the starting energy inc_energy. Th e next estimate subtracts half of the calculated energ y loss A£ t fro m th e starting energy and, using this energy value (i.e., inc_energy- AE t/2), finds the stopping power and hence a second estimate A£ 2 for the energy loss along the step. This value is, in turn, used to fin d th e stoppin g powe r a t th e energy (inc_energy - A£ 2/2) an d the energ y loss A£ 3 along the step. Finally, the stopping power at the energy (inc_energyAE3) is found and the energy loss A£4 is computed. The actual energy at the end of the first ste p is then the starting energy inc_energy minu s the weighted average of th e various energy-loss estimates . This valu e is then used as the startin g energ y for th e next step, and the proces s i s repeated unti l the en d o f the 50t h step , which
THE PLURA L SCATTERIN G MODE L 7
3
Figure 4.3. Variatio n o f electron energy wit h step number for 20-ke V 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 o n carbon and gold. It can be seen that, when plotted as a function o f the fraction o f the range traveled, electrons in both materials lose energy at about the same rate and that the rate of energy loss is quite nonlinear (i.e., the electrons travel about two-thirds of their range before losing half of their initial energy but lose the last 25% of their energy in the last 10% of the steps). The procedure initializ e i s identica l t o tha t used previousl y an d again determines the plotting siz e of the screen and the location of center, th e horizontal midpoint of the screen, and top, th e location at which the entrance surfac e of the specimen is to be drawn. The procedure set_up~graphic s uses these value s to plot in the top surface an d the incident beam, allowing for this beam to be tilted relative to the surface normal. The horizontal plotting scale h_scale is set equal to the widt h o f th e scree n (GetMaxX ) divided b y twic e th e Beth e rang e (pixel s pe r micron), and the corresponding plottin g scale v_scale in the vertical directio n i s found b y multiplyin g h_scal e b y th e aspec t rati o o f th e scree n t o ensur e a correctly proportione d display . Finally, a micron marke r an d a "trajectorie s com pleted" thermometer ar e constructed. As before, whil e the code provide d wil l correctly position these for any type of graphics screen that is used, their exact locatio n can 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 l variables c an d d. Procedure p_scatte r use s Eq . (4.10 ) t o calculat e tan(4>/2) , wher e 4 > i s the 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) ,
74 MONT
E CARLO MODELING
Figure 4.4. Trajectorie s i n bulk carbo n an d copper at 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 n passed t o th e procedure new_coord , identica l to the versio n i n Chap. 3 , which determines th e coordinate s o f th e en d poin t o f thi s step . Th e fina l procedure s reset_next_step, back_scatter , show_traj_num , an d display -backscattering handle the various bookkeeping details for each of the trajectories an d update the screen display . The main body of the program, starting at begin and finishing at end simpl y calls th e procedure s a s the y ar e required , loopin g unti l th e require d numbe r o f trajectories hav e been computed . In th e cente r o f thi s loo p i s th e place , afte r th e new positio n of the electron ha s been determined, where code to compute specific features o f th e electro n interaction (suc h as x-ray s or secondar y electrons ) ca n b e placed. The electron is then be tested to see whether it has been backscattered and , if so, the back_scatter procedur e is called; otherwise, the electron proceeds to the next step . After completion , th e program display s the fractional yiel d of backscat tered electron s an d then terminates.
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 th e disk if this is available by typing PCLMC at th e ">" prompt an d the n hittin g return . Onc e th e require d inpu t dat a (atomi c number, atomi c weight , density , and bea m energ y a s before) hav e bee n provided , the program wil l start running. A comparison o f the speed o f this program wit h the equivalent computatio n fo r a bul k specime n usin g SingleScatte r wil l sho w that PluralScatte r i s 1 0 to 2 0 times faster , becaus e a maximu m of onl y 5 0 steps i s calculated fo r eac h trajectory . Figure 4. 4 show s computed trajector y plot s for 20-ke V electron s i n carbon, copper, silver, and gold to correspond wit h those in Fig. 3.7 . Despit e th e simplifyin g assumption s introduce d b y th e plura l scatterin g model, it is evident that the basic details of the interaction ar e well accounted for . In later chapters, we examine in more detail some verifiable predictions of both models and fin d that , whe n use d wit h prope r precautions , eithe r ca n giv e result s o f goo d accuracy. It should be noted that one consequence o f the model used here is that the shape o f the interactio n volum e is independent o f the actua l inciden t bea m energ y and 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, which plots trajectorie s fo r 30 ° an d 60 ° angle s o f incidenc e i n copper . Not e tha t th e
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 o f the interaction follows th e general directio n o f the incident beam, s o tha t th e volum e becomes elongate d i n th e directio n o f th e beam . Th e lateral extent of the interaction is therefore quite different i n the plane containing the incident bea m an d in the directio n norma l to this, and this will be eviden t in both imaging an d microanalysis performed under these conditions .
5
THE PRACTICAL APPLICATION OF MONTE CARLO MODELS 5.1 General considerations The remainder of this book is devoted to the application of Monte Carlo models to a variety of problems in electron microscopy an d microanalysis. The programs developed in Chaps. 3 and 4 provide only the framework tha t models the basic details of the electro n interaction . W e will now develo p a variety o f algorithm s that , whe n implemented a s PASCAL procedures and functions, can be used to transform these generic Mont e Carlo model s int o programs customized t o solv e a particular prob lem. Befor e proceedin g t o thes e applications , however , ther e ar e a fe w practica l considerations tha t are wort h 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 t electron, an d the plural scattering model, which considers only the resultant effect of scattering events occurring within some specified segment of the electron trajectory . These mode l shar e much of the same physics, and so, whe n properly used, can be expected to give comparable results. It is, however, necessary t o decide what constitutes proper usage . An important general property of these models is what we shall call, by analog y wit h photographic film , their granularity. Thi s concep t expresse s the 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 s sequence o f scatterin g event s an d modeling i t a s a discret e serie s o f independen t events, just as a piece o f film take s a picture an d breaks it down into fragments th e size of the grains making u p the emulsion. The finer th e grain siz e of the film, th e higher the resolution of the image; and the finer the granularity (i.e., the step size) of the Mont e Carlo simulation , th e better th e qualit y of the mode l generated . I n th e case of the single scatterin g model , th e step size is of the order o f the elastic mean free pat h and thus (depending o n energy) i s between a few nanometer s an d a few tens of nanometers, whil e for the plural scattering model, th e step size is a fractio n of the Bethe range and varies from ten s of nanometers to fractions of a micrometer . In modeling som e effect, i t is therefore necessary to ensure that the granularity 77
78
MONTE CARLO MODELING
of th e mode l i s sufficien t t o resolv e th e kin d o f effec t tha t i s bein g studied . I t i s obvious that a plural scattering model, which at an energy of 10 0 keV would have a step 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 n scattering i n a thi n foi l onl y a fe w hundre d angstroms thick—th e dat a woul d b e excessively "grainy." But care mus t also be taken to se e that the granularity is not too small. For example, at low beam energies, the step length in the single scatterin g model is only a few angstroms and so is approaching atomistic dimensions. Caution must be exercised in this condition, because a fundamental assumption of the Monte Carlo method is that the sampl e can be considered t o be a structureless continuum (sometimes calle d a "jellium"), an d this wil l only b e tru e whe n the ste p lengt h i s much greate r tha n eithe r atomi c o r crysta l lattice dimensions . Conclusion s draw n about electro n behavio r unde r thes e extrem e condition s ma y therefore b e i n error , and it would actually be better t o use a more granular model. An appropriate test is to determin e th e critica l dimension s o f th e phenomen a o r experimen t t o b e 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 e effect. A t the same time we must also ensure that the scale is not so far below that of the problem that excessive time is wasted in computation. For example, th e modeling of backscattered signal s fro m bul k specimens can usually be done with a plural scattering model, because the dimensions of the sample and its features or inclusions are usuall y larg e compare d t o th e ste p size . Bu t i n modelin g secondar y electro n production fro m th e sam e specimen , it may be necessary to use a single scatterin g model, 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 f secondary electrons ) is only a few nanometers. Usin g a single scatterin g mode l in the first cas e would probably give the same result, but at the expense o f much extra computing time; while using a plural scattering model in the second case might give a result that is accurate on the scale of the step length (i.e., fractions of a micron) but inaccurate o n 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 procedures and 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 e procedures ca n either be added to the basic programs by typing them in, or the code fragments o r complet e program s ca n b e take n fro m th e disk . I n mos t cases , th e customization requires onl y the addition o f the procedure o f interest to the body of the program together with the declaration at the start of the program o f any additional globa l variables , th e additio n o f a call t o thi s procedur e (o r procedures ) a t th e appropriate poin t within the Monte Carlo loop, and the addition o f any special tests (for example , determinin g th e positio n o f th e electro n relativ e t o som e featur e or surface) 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
PRACTICAL APPLICATIO N 7
9
the procedures an d their associated global variable s to the program an d check that it still compile s correctly . Next , ad d the cod e tha t perform s an y specifi c test s mad e prior to the calling o f the procedure an d again check that the program compiles an d runs. Finally, ad d the call(s) to the procedure itsel f an d see that the program func tions as expected. Breakin g the process int o these steps greatly eases the problem of debugging th e program i n the event of an error, becaus e onl y one change ha s been made t o the program a t each iteration .
5.4 The "all purpose" program An apparentl y irresistibl e temptatio n i n Monte Carl o modelin g i s the urge to construct an all-purpose simulation that can answer any question about any effect fro m a specimen o f arbitrary geometr y and inhomogeneity. The problem wit h producing such an oracle is that the more general a program must become, the more convoluted must be its logic, and the difficulty o f debugging a program rises exponentially with its complexity. It is not just that a general program is longer but that it has built into it a multiplicity o f options (i.e. , i f ....... . .en...........elsee.........statement that ca n (and , perversely, quit e ofte n do ) interac t wit h one anothe r i n unexpected ways. Thus, while a program may function quit e normally and correctly for one set of conditions , anothe r an d apparentl y equall y reasonabl e se t o f condition s ma y cause a malfunction or , worse, a subtl e error i n the outpu t data. The most reasonable advic e is to construct a new simulatio n for each proble m that is to be solved . For example, if we are interested i n the x-ra y production fro m features i n the shap e of either sphere s or cubes, it is best to write one program that tackles the case o f a spherical sampl e an d another separat e progra m that consider s the case of the cube. Since a high fraction of the code will be identical i n both cases, the additional time taken in constructing a second program is small. But the elimination o f complicate d an d messy test s relate d t o th e specime n shap e wil l make th e code easie r t o writ e an d follow , muc h easie r t o debug , an d (ver y likely) faste r i n execution becaus e som e additiona l shortcuts , simplifications , an d optimization s may becom e possible . I n summary , a Mont e Carl o mode l i s mos t efficien t an d effective whe n it is constructed a s a special too l t o solv e 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-ol d chil d wit h a hammer, everythin g i n th e world is a nail." Monte Carlo users can occasionally b e guilty of the same restricte d vision. Whil e th e techniqu e i s o f ver y wid e an d genera l applicability , ther e ar e problems tha t cannot be solved b y this type of approach. Specifically , th e methods discussed her e canno t be applied t o problems tha t violate th e basic assumption s of the models ; fo r example , electro n channelin g an d mos t problem s associate d wit h imaging i n th e transmissio n electro n microscop e canno t b e investigate d becaus e
80 MONt
E CARL O MODELIN G
they involv e th e crystallin e natur e of a sampl e that the Mont e Carl o simulatio n i s treating a s structureless. No r can Monte Carlo methods be applied to problems tha t rely 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 e programs ma y b e of onl y limite d value at very lo w (belo w say 0.5 keV) and very high (abov e 50 0 keV) beam energie s becaus e importan t physica l effects—suc h a s the consequences of relativistic or nuclear interactions—have been omitted from th e physics. Ther e ar e als o 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 interaction are less significant than purely geometrical effects—wher e a Monte Carlo approach is 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 simulation techniques i s wid e and , as demonstrated i n the subsequen t chapters, th e program s developed her e ca n b e use d effectivel y t o answe r man y question s abou t t o solv e many commonl y encountere d problem s i n microscopy an d microanalysis.
6
BACKSCATTERED ELECTRONS 6.1 Backscattered electrons In this chapter, we will concentrate on simulations associated with various aspects of backscattered electrons . W e wil l defin e backscattere d electron s a s thos e inciden t electrons tha t are scattered ou t of the target after sufferin g deflection s throug h such an angl e tha t the y leav e th e materia l o n th e sid e b y whic h the y entere d (i.e. , fo r normal incidence , the minimu m scattering angl e require d i s 90°). I n practice, i t is often mor e useful t o defin e backscattere d electron s a s those inciden t electrons that are scattere d i n the target i n suc h a way a s to be collectibl e b y a suitable detecto r placed o n the incident beam side of the specimen. This , of course, implie s tha t the apparent magnitude of the backscattering will be affected b y the size and position of the detector relative to the specimen and incident beam. To avoid confusion, we will separate thes e case s b y callin g th e tota l numbe r o f backscattere d electron s pe r incident electro n th e backscattering yiel d TI and the number per incident electro n a s measured by som e specifie d detecto r the backscattered signal . Since ever y Mont e Carl o mode l track s eac h inciden t electro n i n it s passag e through the target, the determination o f whether or not a given electron is backscattered i s inherent in the simulation. At the same time, the backscattering yiel d TI is a convenient macroscopi c measur e o f th e interactio n o f th e electro n bea m wit h th e target an d form s a usefu l experimenta l tes t o f th e prediction s o f a Mont e Carl o model. Befor e attemptin g t o simulat e detail s o f backscattere d imagin g fro m com plex an d inhomogeneous samples , w e must therefore demonstrat e tha t the models developed i n th e previou s chapter s correctl y matc h experimenta l value s fo r th e backscattering 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 d nearly a century ag o (Starke, 1898 ; Campbell-Swinton , 1899) . Figur e 6. 1 show s a compilation of some modern backscattering yiel d data plotted agains t atomic number for an incident beam energy of 1 0 keV using results taken fro m 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
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 acros s the periodic table , increasing fro m abou t 0.06 fo r carbon to about 0.5 for uranium . Th e variation wit h atomic number i s generally smooth, although—a s pointed ou t b y Bisho p (1966)—th e slop e o f th e curve changes discontinuousl y a t about Z = 3 0 and again at about Z = 60 . These changes have been associated wit h the binding energies o f the atomic electrons. However , while the general form of the variation i s evident , i t i s clea r tha t ther e i s significan t scatte r betwee n differen t pieces of data. Although most of the cited authors claim measurement accuracies of better than 5%, variations between comparabl e values are as much as 20% in some cases. Thes e discrepancie s probabl y aris e from th e variety of methods employe d to measure t\ an d i n particula r fro m th e succes s wit h whic h th e effec t o f secondar y electrons ca n be remove d fro m th e data. A complete se t of experimental backscat tered dat a measurement s i s available in Joy (1993) . The backscatterin g coefficien t T\—computed usin g eithe r th e singl e o r th e plural scatterin g Monte Carlo models (1000 trajectories per point)—is seen to be in good agreement wit h the experimental data , either valu e lying within the spread of measured values . Th e singl e scatterin g values , especiall y fo r Z > 40 , ten d t o be slightly on the high side of the best-fit tren d line through the data, but the sense and magnitude of the deviation i s not systematic . The excellent agreemen t fo r either of the model s is , o f course , gratifying , bu t i t i s no t unexpected , sinc e bot h model s contain 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 can be adjusted t o ensure a good fi t to measured data. The expression fo r a a s given in Eq. (3.2) and used in our model is that suggested by Bishop (1976). Similarly, in the plural scatterin g model , the minimu m impact paramete r p0 [Eqs . (4.3 ) an d (4.4)] , when use d i n th e for m give n in Eq . (4.8) , agai n allow s th e compute d backscatte r data t o b e fitte d t o th e experimenta l values . In bot h models , th e paramete r t o b e
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 e Carlo simulate d dat a usin g various models .
adjusted is a simple function of the atomic number Z; hence improving the fit to one chosen dat a valu e will usuall y worsen th e fi t a t som e othe r value . The suggeste d values represent th e bes t overal l fi t t o the measure d values a t 1 0 keV. It is also necessary to consider i n somewhat more detail the variation of T| with composition whe n the targe t i s no t a pure elemen t (Herma n an d Reimer, 1984. ) Figure 6.2 plots the variation of the backscattering coefficient for a solid solution of gold i n coppe r (dat a taken fro m Bishop , 1966) . A s the atomi c percentag e o f gol d increases 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. If we have a materia l wit h th e chemica l formul a S^jX , wher e th e Xt ar e element s of th e periodi c tabl e wit h correspondin g atomi c weight s A,- , an d th e ai ar e thei r valences i n the chemical formula (e.g., i n H2O, al - 2 , a2 = 1 , Xl = H, X2 = O, Al = 1 , A2 = 16) , the n w e can defin e a mass concentratio n ci fro m th e formul a Cj = (djAiltpjA^, wher e £,-c, - = 1 . The data shown in Fig. 6. 2 represents a specia l case o f a genera l resul t (Castaing , 1960 ; Heinrich , 1981) , whic h state s tha t th e backscattering 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 valu e of -n mix b y findin g th e individual values of if y fo r the components, usin g the simulation s alread y described and the summing them using Eq. (6.1). As Fig. 6.2 shows, this provides a very close fit to the experimental data. This procedure is, however, rather tedious if the chemis-
84 MONT
E CARL O MODELIN G
try o f th e targe t i s comple x (excep t fo r th e cas e o f th e HKLC S model , discusse d below); instead , we migh t try t o obtain th e correc t valu e of T) mix b y makin g som e assumption abou t a n effectiv e o r averag e atomi c numbe r fo r th e compoun d o f interest. Th e simplest suggestio n (Miiller, 1954 ) is to use the mean valu e of atomic number Z mix fo r the compound—i.e.,
The effective atomi c weight Amix is found i n a similar fashion , and the value of the density used is the measured value for the compound. Figure 6. 2 shows the results of employing this assumption and the plural scattering Mont e Carlo model o f Chap. 4 to mode l th e copper-gol d system . The agreemen t betwee n th e experimenta l an d computed 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 for most purposes. Alternatively , because electro n stoppin g powers computed from th e Bethe equation are additive, Everhart (1960) suggested that a more physically exact expression for Zmix woul d b e
However, a s show n in Fig. 6.2, application o f this rul e t o th e copper-gol d syste m produces a considerabl e deviatio n betwee n th e predicte d an d experimenta l data , suggesting tha t Eq. (6.2) is a mor e usefu l expression . Simila r result s ar e foun d i n more complex systems. Figure 6.3 plots the experimentally determined backscatter ing coefficien t fo r th e ALpa^^A s syste m a s a functio n o f th e mol e fractio n o f aluminum (Sercel et al., 1989) . Superimposed o n this plot are the computed predic tions fo r th e backscattering, usin g Eqs. (6.2) and (6.3) . I n this example, fo r which the differences betwee n the atomic numbers are relatively small and the composition range i s limited, th e differenc e betwee n th e tw o models i s not a s marked, but i t is clear 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 e complicated expressio n o f Eq . (6.3) . I n th e res t o f thi s volume , therefore , compounds wil l be computed eithe r assumin g the use of Eq. (6.2) or from th e HKLC S procedure, discusse d below. The backscatterin g coefficien t T I i s not constan t wit h energy, a s is often state d in introductor y textbooks , bu t varie s i n a manner tha t depend s o n both th e energ y
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 ) and simulated MC data usin g different 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 the variations at the two energies i s similar, the absolute values change significantly. On moving from 4 to 40 keV, the backscattering coefficient of the lightest elements fall s by a factor of up to two times, while that for the heavier elements rise s by as much as 25% . The plots fo r 4 and 40 ke V actuall y cross a t about Z = 40 . The detaile d form of this variation is shown more clearly in Fig. 6.5 , which plots the variation of
Figure 6.4. Variatio n o f B S yiel d wit h energy ,
86 MONT
E CARL O MODELIN G
Figure 6.5. Variatio n o f B S yiel d wit h energy .
r\ for carbon, silicon, copper, silver , and gold as a function o f beam energy. It is clear that at the lowest beam energies (i.e. , <1 keV), the bulk backscattering coefficient s for al l elements ten d to converge to values between 0.2 and 0.4. Fo r higher energie s (>50 keV ) th e backscatterin g coefficient s fo r ligh t element s ten d t o decreas e b y about 10 % for eac h facto r o f 1 0 increase in bea m energy , while thos e fo r heavie r elements remai n abou t constan t (Antola k an d Williamson , 1985) . Hunge r an d Kiichler (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 n kilo-electron volts) :
where
Neither of the two Monte Carlo models discussed in the previous chapters can predict thi s type of behavior . I n fact , a plot o f T\ versus energ y usin g eithe r o f ou r models 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. (For lower energies , th e value s fro m th e singl e scatterin g mode l ma y vary , but thi s i s because th e 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
BACKSCATTERED ELECTRON S 8
7
reasons fo r this disagreemen t betwee n experimenta l an d computed data . First , th e parameters in both models that adjust the backscattering values to match experimental data a t some nominal energ y ar e designe d t o hold th e valu e of r\ constan t with beam energy , since , unti l quite recently , low-energy electro n interaction s wer e of little interest ; therefore , th e assumptio n tha t T | wa s constan t wit h energ y wa s a reasonable simplification . Second, a s noted in discussing the data in Fig. 6.1 above, the qualit y of the experimental dat a on backscattering coefficient s i s rather mixed, and th e magnitud e o f the variatio n of -r\ wit h energy for most elements i s less than the sprea d betwee n differen t publishe d value s a t th e sam e energy . Consequently , many workers have preferred to take T| as constant until more accurate experimental values were determined. Finally , an d of more fundamental significance, both models use the screene d Rutherfor d cross sectio n as the basis for the model of electro n scattering. For a wide range of conditions—that is, for elements o f low and medium atomic number, electron energie s 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 can be 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 Dirac equation (Reime r an d Lodding, 1984) . I n general terms , th e Mot t cros s sectio n i s essential in applications wher e the interaction of interest consist s of a single elastic large-angle scattering event (e.g., in backscattering fro m thi n foils or in calculations of 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. , backscatterin g fro m bul k samples, x-ra y production, an d secondary elec tron generation) , th e Rutherfor d cros s sectio n give s rathe r goo d agreemen t wit h experimental data except at low beam energies. The Mott cross section is considered in more detail in the final chapte r of this book, but elsewhere th e Rutherford mode l will b e use d because , unlik e th e Mot t model , whic h require s th e generatio n o f extensive table s o f data, it can be expresse d analytically . With th e increase d interes t i n low-energ y scannin g microscop y an d micro analysis, it would , however, be desirabl e t o try an d modif y th e models develope d earlier to correctly predict the variation of T| with energy so as to obtain som e of the benefits of the Mott cross section without the extra effort tha t is required. This is not readily possibl e for the single scatterin g mode l because of the necessity, discussed in Chap . 3 , of terminating the electrons' trajectorie s a t som e predetermine d cutof f energy, usually 0.5 keV. At low energies, thi s cutoff i s a significant fraction o f the incident energ y an d henc e th e precisio n o f th e computatio n i s doubtful . Fo r th e plural scattering model, however, a variation of Z with E can readily be achieved. As discussed in Chap. 4, the scattering angl e $ can be written in the form [usin g Eqs. (4.5) an d (4.10)]:
88 MONT
E CARLO MODELING
Figure 6.6. B S yiel d vs , ta n ( 0/2). Love et al. (1977) reasoned that since, from the form of the Bethe equation, the variation o f (EQ/E) i s substantially independent of atomic number, the backscattering coefficien t 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 backscattering coefficient t ) depend s o n th e valu e of ta n (4>o/2 ) i n a monotonic fashio n bu t i s t o within statistica l erro r independent o f the atomi c number and density o f th e target and 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 e relation:
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 correctio n included in our program [Eq . (4.10)]. To obtain the necessary estimat e of TI , we can now us e th e Hunger-Kiichler relation [Eqs . (6.4 ) t o (6.6) ] discussed above . Give n the atomic number of the target and the beam energy E, this gives us the value of TI and hence of tan (4>o/2). This value can now be used in place of the original estimat e [Eqs. (4.6 ) an d (4.8)] , wit h th e advantag e tha t the backscatterin g coefficien t pre dicted by the Monte Carlo program will vary correctly with incident beam energy. It should be clear that this Hunger-Ktichler-Love-Cox-Scott (HKLCS) model is not a radical revisio n o f th e plura l scatterin g schem e bu t simpl y th e replacemen t o f Duncumb'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
BACKSCATTERED ELECTRON S 8
9
necessary to replace one procedure (hence the value of writing the code in a modular fashion). The revised procedure listed below replaces the original procedure of the same name and implements Eqs. (6.4) , (6.5), (6.6), and (6.8). It is stored on the disk as HKLCS.PAS. To replace th e ol d procedure wit h the new one using the TURBO PASCAL editor, g o into EDIT mode and load PSJVIC.PAS; then scroll through the program until the start of the procedure Rutherford—Factor . Type (Control K R) and a smal l windo w wil l appea r askin g fo r a file name . Typ e i n HKLCS(return) . This block of code will then be read in from the disk and be placed at the cursor position. Now delet e th e old procedure an d recompile th e program. Procedure Rutherford—Factor; {computes the Rutherford scattering factor for this incident energy using the Love, Cox, Scott model and the Hunger-Kiichler backscatter equation} var hkbs,hkc,hkl,hkm:extended; begin {compute the Hunger-Kuchler backscattering coefficient}}} htan:=0,1382-0.9211/sqrt(at_num) ; hkl: =l n ( a t _ n u m ); 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 of the plural scatterin g program , fo r carbon, silver , and gold a s a function o f inciden t beam energy . Th e variatio n o f T ] wit h energy i s clearl y eviden t belo w 1 0 keV, th e yield fo r carbo n risin g a s th e energ y fall s whil e that for silve r remains essentiall y constant and that for gold falls, ultimately to a value lower tha n that for silver. The predicted value s agre e wel l wit h the dat a plotte d i n Fig. 6.5 excep t a t th e lowes t energies, where the Hunger-Kiichler fit is probably inaccurate. Althoug h this revised model i s not a substitut e for th e mor e accurat e Mot t scatterin g cros s section , i t is often a sufficiently goo d approximatio n to make the use of the more complex Mott model unnecessary . A n additiona l advantag e o f thi s approac h i s that , sinc e a n estimate fo r th e backscatterin g coefficien t i s produced o n th e basi s o f th e atomi c number o f th e targe t fro m th e Hunger-Kiichle r model , w e coul d us e Eq . (6.1)
90 MONT
E CARL O MODELIN G
Figure 6.7. compute d variatio n o f B S yiel d wit h energy i n HKLCS model .
directly to treat the case of a multicomponent material. Without coding this example in detail, the procedure woul d 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 Next i Calculate mean BS coefficient as S^iii Find Rutherford factor from equation 6.8
(6.6)
6.3 Predictions of the Monte Carlo models We can now investigate some of the predictions tha t the Monte Carlo model s make about 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 we have 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 n beam relative to the surface normal of the specimen. We can therefore calculate how the magnitude of the backscattering coefficient varie s with the specimen tilt . Figure 6.8 show s som e dat a fo r iro n compare d wit h a n experimenta l measuremen t (My klebust e t al., 1976 ) fo r Fe—3.2% Si . In bot h cases th e backscattering coefficien t T](0) at some angle 0 is normalized by the corresponding backscattering coefficien t at normal incidence T|(0) , and th e calculated an d experimental data a s obtained fo r
BACKSCATTERED ELECTRON S 9
1
Figure 6.8. Experimental an d computed variatio n o f B S yield wit h tilt .
an incident energ y of 30 keV. It can be seen that the amount of backscattering rise s rapidly a s the angl e o f incidenc e i s increased, wit h both th e experimenta l an d the Monte Carlo data showing an increase o f around 50% for a tilt angle of 45°, while for a tilt of 60°, the backscattering double s i n magnitude. These number s will vary somewhat with both the incident beam energy an d 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 t illustrated i n Fig. 6. 8 except fo r the higher atomi c number s ( Z > 50 ) an d for low energies (E < 3 keV). The examination of such phenomena b y running a series of simulations is an excellent wa y of becoming familiar with the use of a Monte Carlo model. Simila r calculation s can, of course, b e performed with the single scatterin g model, but the relative slownes s o f this model make s obtainin g a sufficiently goo d statistical accuracy a rather tedious affair. The actual data obtained ar e close to those of th e 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 e energy fo r a given set of conditions, is an important parameter, becaus e the output from a backscattered detecto r depend s o n both th e numbe r o f backscattered elec trons (i.e., the value of -n) and the energy of these electrons. Any measurement o f the backscattered signa l is therefore a convolution o f the backscattering yiel d an d the energy distribution from th e sample, and consequently ther e wil l not be, in general, a simpl e relationship betwee n thi s signa l an d the atomic number of the target. The energy distributio n an d mean energy ca n readily b e found b y modifying th e back -scatter and display_backscattering procedures in the plural scatterin g model. 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
92 MONT
E CARLO MODELING
traveling whe n i t i s backscattere d an d ad d 1 to th e & th bo x o f a n arra y bs_e [ ] . Since the energy for all electrons o n the k-th step is the same, i.e., E[k], the average backscattering energ y wil l be :
because th e 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 th e program th e entry: bs_e:array[l . . 50] of integer ; Procedure back—scatter ; {handles specia l case of a backscattered electron} begin bk_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 xyplot (y , z , y n, 99 ) ; {plot BS exit} end;
step}
Procedure display—backscattering; {draws a thermometer to display the backscattering coefficient and another to indicate the mean energy of the backscattered electrons} label var
hang; a,b,c,k:integer; mean—energy:extended;
begin a: =GetMaxX-180; b:=bottom+23; c:=20;
{adjust to suit your screen} {ditto} {ditto}
OutTextXY(a,b-8,"0 . . . . 0.25 . . . 0.5 . . . 0.75"); QutTextXY(a+18,b+5,"BS coefficient" ) ; Line ( a , b, trunc ( a + ( b k _ s e t / t r a j — n u m) * 2 2 0 ) ,b ) ; {dra w it } {now compute the mean backscattering energy value} mean—energy: =0; {initializ e th e value}
BACKSCATTERED ELECTRONS
93
for k:*=l to 5 0 d o
begin {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 over total BS] {draw a thermometer to plot up this data value }
O u t T e x t X Y ( 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 display 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 c number for 1 5 keV incident electrons, showing that as Z increases, the value climbs steadily from carbo n to gold. These values are seen to be in good agreement with the experimental data measured by Bishop (1966). From a curve fit of the Monte Carlo data, 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 mea n B S energy wit h Z.
94
MONTE CARL O MODELING
Figure 6.10. Compute d energy spectr a o f backscattered electrons .
This variatio n is significan t because backscattere d detector s usuall y respond mor e efficiently t o electrons of higher energy; therefore, as we move through the periodic table, the output from the detector will increase both because of the higher backscattering coefficien t an d becaus e o f th e highe r averag e mean energy . Th e reaso n fo r this variation in mean energy can be seen by plotting the histogram of the bs_e [k ] array, compute d above , whic h measures th e numbe r of backscattered electron s a t each trajector y ste p k. As show n in Fig . 6.10 , whic h plots dat a for E0 = 1 5 keV beam energy, for carbon this histogram is more or less symmetrical about the energy 0.5£0; but for copper, the maximum in the curve has shifted upward in energy, while for gol d th e curv e has n o maximu m but increase s monotonicall y a s th e backscat tered energ y approache s th e bea m energy . Th e for m o f th e energ y distributio n predicted b y th e Mont e Carl o simulatio n i s i n generall y goo d agreemen t wit h experimental dat a (Bishop, 1966 ; Mykelbus t et al., 1976 ) excep t fo r the top end of the distribution clos e to th e inciden t beam energy, where the numbe r of backscat tered electrons is overestimated somewhat . These particular electrons ar e those that are scattere d i n a singl e high-angl e even t clos e t o th e entranc e surface , an d th e scattering o f suc h electron s i s accuratel y described onl y by the Mot t cros s sectio n rather than by the screene d Rutherfor d model use d here. However, sinc e these are only a smal l fractio n o f th e tota l numbe r o f backscattere d electrons , th e erro r i s insignificant. Although we will not pursue it here, this same code fragment ca n also be used to estimate the information depth o f the backscattered electrons—tha t is, the depth
BACKSCATTERED ELECTRONS
95
beneath the surface reached by an electron before it is backscattered. If an electron is backscattered o n the k-th step, the n the maximum possible dept h to which it could have traveled beneath th e surface is k*step, wher e step is the step length in the simulation, whic h i s usuall y one-fiftiet h o f th e Beth e range . A n analysi s o f th e bs_e [k ] distributio n therefore provides an upper bound on the information depth in th e backscattere d image . Typicall y thi s i s abou t 0. 3 o f th e Beth e range . Th e program JustBS on the disk incoporates thi s and the other modification s discussed above to give a detailed mode l of the backscattering effect , includin g an estimate of the surfac e area fro m whic h the electron s ar e emitted . 6.3.3 Variation of backscattering with density In addition t o 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 y observable althoug h they migh t also be important. A n example o f such an applica tion i s t o as k th e question : "Ho w doe s th e backscatterin g coefficien t o f a sampl e vary with density?" This question is of particular interest because of attempts to use the backscattered signal as a means o f performing chemica l composition analysis. While suc h a method migh t wor k for a homogeneous material , i t seem s natural to ask whethe r changes i n the densit y o f th e target , cause d perhaps b y differen t pro cessing methods , might not lead to a systematic error. Running the plural scatterin g simulation fo r coppe r a t 1 5 keV, leaving al l o f the physica l parameter s unchange d except for the density an d using 5000 trajectories for each value , produces th e data shown i n Fig. 6.11 . To within th e statistical error of the simulation, it can be seen
Figure 6.11. Compute d variation o f BS yield with sampl e density.
96 MONT
E CARL O MOD
that changing the density over a wide range o f values does not change th e backscattering coefficien t fo r a n otherwis e homogeneou s material . W e als o fin d tha t th e mean energy o f the backscattered electrons , althoug h not plotted, is independent o f the density . While a t first sigh t it might seem tha t this result is counterintuitive, a n examination of the equations in Chaps. 3 and 4, which determine electron scattering , shows tha t the densit y appear s onl y in the stoppin g powe r equation . Consequentl y varying the densit y changes onl y the Beth e rang e o f the electrons , an d this woul d not b e expecte d 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 s situation i s examine d late r i n this chapter. 6.3.4 Variation of backscattering with thickness A final demonstratio n 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 is very thin , then the amoun t of backscattering i s small ; while for a sufficientl y larg e thickness a t a given inciden t energy, the backscatterin g coefficient shoul d b e con stant. Our interest her e i s to simulat e the variatio n of i q betwee n these two limitin g conditions 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 discussed in Chap . 5 , th e granularit y o f thi s mode l i s prese t t o b e one-fiftiet h o f th e Beth e range. When the target is a thin foil, eac h ste p of the plural scattering mode l would be a substantial fraction of the thickness of the foil and the quality of the approximation woul d be very poor. Instead, w e must use the single scatterin g model, becaus e the 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 w nanometers at 1 0 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 o f 1 5 keV. For convenience i n comparison, th e thicknesses i n each cas e hav e been expresse d a s a fraction o f the appropriate Bethe range RB calculated from Eq . (4.1). The backscatter yield varies almost linearly with the specimen thicknes s (Niedrig, 1982 ) right up to the point where the backscattering yield reaches it s "bulk" value. The thickness at which thi s occurs , however , varies significantl y fro m on e materia l t o another , a s would be expected fro m a n examination o f the interaction volume s pictures show n in Fig. 4.4 . I n carbon, th e scatterin g o f the electrons is weak, giving a n interactio n volume 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 g saturates. In the case of gold, the electrons ar e strongly scattered, givin g an interaction volume that is squashed u p against the surface. As a result, the backscatterin g yield reaches it s bulk valu e a t only abou t 0.1 RB. Since th e Bethe range i n gold i s only a small fractio n of that in carbon, thi s show s that the information depth o f the
BACKSCATTERED ELECTRONS
97
BS Yield v s Thickness
Figure 6,12. Variatio n of B S yield wit h specime n thickness .
BS signal, (i.e., th e extent of the volume sampled by the backscattered electrons) is much les s in gold than i n carbon.
6.4 Modeling inhomogeneous materials So far every application o f Monte Carlo modeling w e have considered assume s the specimen to be a infinite half-plan e of uniform composition . I n practice, o f course, samples o f suc h a restricted natur e ar e o f littl e interest , sinc e i n th e real worl d of microscopy our specimens are finite in size; have edges, shape, and surface topography; and sho w wide variations of chemical compositio n fro m on e point to another. Fortunately, Mont e Carl o simulations , whic h trac k th e electro n ste p b y ste p a s it moves through the specimen , are ideally suite d to this type of situation, so we can now 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 determin e which material th e electron i s in by testing the value of z .
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 to illustrate how the original program of Chap. 4 is modified to deal with two materials. In order to save space, functions and procedures that have been discussed already, either in this chapter or earlier chapters, are not listed but simply identified as required. A further generalization to three or more materials, or to the situation where a single scattering model is required, is a simple matter; a program of this type 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+} {$E+} uses
{turn on numeric coprocessor} {install emulator package}
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;
BACKSCATTER
99
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.; for m:=l to 21 do begin
{initialize variable to be sure} {siinpsons rule integration}
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 tions}
the range and step length for these condi-
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} G o T o X Y ( 4 0 * ( i - l ) +1,13) ; {displa y 1 o n LHS, 2 on RHS of screen} w r i t e l n l ' R a n g e in ' i , 'i s bethe_range:4:2 ' ' m i c r o n s ' ) ; s t e p [ i ] : =bethe_range/50 . 0 ; {uni t ste p o f simulation} end; Procedure p r o f i l e ( i : i n t e g e r ) ; {compute 50-ste p energy profile for electron beam} var A l , A 2 , A 3 , A 4 , e m : r e a l ; m:integer; begin
100
MONTE CARLO MODELING
E [ i, 1 ] : =inc_energy ; for m : = 2 t o 5 1 d o begin Al: =m _ t _ s t e p [ i ] * s t o p _ p w r (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 e p [ i ] * s t o p _ p w r ( i , E [ i , m - l ] - A 2 / 2 ); A4:=m_t_step[i]*stop_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,51]:=0; {now smooth thes e profiles
out a
little bit}
for m : = 2 t o 5 0 d o begin 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}
BACKSCATTERED
101
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} begin GoToXY(1,5); writeln('Surface Layer'); end else {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] + _num[i],0.19)))*0.001;
(58.5/power(a t
102
MONTE CARLO MODELING
{now get the Rutherford factor b using the HKLCS method} Rutherford—factor(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]
profile(i); end;
{of
the input
loop}
{get the number of trajectories to be run in this simulation} GoToXY(18,15); write("Number of trajectories required"); readln(traj_num); {and set up the display for output of data}
GoToXYfl,16); writeln 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: =n u * r f [ i ] * i n c _ e n e r g y / E [ i , k ]; {and use this to find the scattering angles} sp: = (an+an) / (1 + (an*an ) ) ; c p : = ( l - ( a n * a n ) ) / (1 + (an*an ) ) ;
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 angles} 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 thisisthestartofthemainprogram
set_up_screen; init_counters; randomize; {reseed random number
generator}
{
*
104
MONTE CARLO MODELING
}
while num < traj_num do begin reset—coordinates; for k:=l to 50 do begin {first find out where the electron is now i = l or 2. In the simplest case this is done by checking whether or not the electron z coordinate places it below the boundary layer} if z>=boundary then i:=2 else 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 then begin bk_sct:=bk_sct+l; num:=num+l; goto back—scatter; end else 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 BS coefficient} {to escape from the program press any key} if keypressed then goto abort;
{
*
BACKSCATTERED ELECTRON S 10
}
end;
5
{of the Monte Carlo loop} abort: {escap e from the program} GoToXY(21,21); w r i t e l n l ' . . . h t a t 's al l f o l k s ' ) ; readln; {freeze the display}
end.
6,5 Notes on the program The program starts in the sam e way as for the previous examples b y settin g up the pragmas that select the use of the math coprocessor o r the emulator package. Sinc e this program does not generate any graphical display, the uses declaration include s only th e call s fo r th e function s CR T an d DOS , which ar e required . Th e variabl e declaration sectio n resemble s tha t use d befor e bu t wit h a n importan t difference . Instead o f there bein g a single valu e of , for example, the atomi c numbe r at_wt, there wil l now be one of two possible value s depending o n where within the target the electron i s situated. Therefore the original singl e value of at_wt i s replaced b y an arra y o f at_w t values . I n th e notatio n use d i n PASCAL , w e indicat e thi s by writing at_,w t [ i ] t o represent th e i-th value of at_wt. W e must thus modif y the list of variables in the program to indicate that at_wt, den s i ty, o r any of the other specime n parameter s ca n take two (or more general example s ri) different values. The VAR table woul d then contai n entrie s suc h as: at_wt:array [1 . .4] of extended; at_num:array [1 . .4) of extended; {and so on for every variable
that changes} where the [ . . .] brackets indicat e th e numbe r o f the firs t an d las t member s o f th e array and specify what type of variable it is f Not e that in PASCAL we must specify an actual number of members of the array; this cannot be done in terms of anothe r variable. Having now done this, we must also indicate to the various PROCEDURE S and FUNCTIONS that use these variables whic h of the n values they are to use. We do this by passing a parameter to the procedure, which tells it which particular value to 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 th e array of possible value s densityD'[. The value of / to be used is passed t o the procedure o r function a t the time that we call it; therefore, instea d o f calling p r o f i le t o calculate th e energy profile 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 h material b y substituting the appropriate value s of stopping_pwr, m_t_ste p etc. On e assumption in this program is that E[l,k] * » E[2,k]', i n other words, that the
106 MONT
E CARL O MODELING
instantaneous energ y of th e electron depend s onl y o n the number of the trajectory step k and not on the actual material. This approximation is, in fact, closel y correct , because—from th e form o f the Bethe equation—the instantaneous energy depend s only on the fraction of the Bethe range traveled and not significantly on the atomic number of the materia l itself. The rest of the program then follow s closel y on the original version given in Chap. 4 except that we now test at the top of the loop which of the two materials the electron i s in , /= ! o r i=2, befor e computin g th e scatterin g angle s an d findin g the new coordinates . Becaus e w e ar e not trying to displa y these dat a visually , the procedures fo r graphics setu p and plotting are missing, and if you run this program, you will notice how much faster it performs than the earlier version . While pictures of 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 o f the large tim e overhea d required i n calculating plotting coordinate s an d drawin g th e scree n displays . Therefor e the y shoul d b e omitted i f not strictl y necessary. Figure 6.1 3 shows an application of this program t o the case o f a thin carbo n film o n to p o f a gold substrat e a t 1 0 keV. Sinc e w e ar e usin g a plural scatterin g model 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 a thousand angstroms (i.e., three or four trajector y steps), but the trend is clear (Hohn et al. , 1976) . A t lo w fil m thicknesses , th e backscatterin g coefficient i s essentiall y that of gold; this then decreases wit h film thickness , eventuall y falling to the value
Figure 6.13. Variatio n of B S yiel d from thi n carbo n fil m o n gol d a t 1 0 keV.
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 th e same as that for which an unsupported thin film o f carbon attains its bulk scattering value (see Fig. 6.12). This thickness i s an estimate for the "depth of information" in the backscatter imag e at this beam energy (i.e., the maximum distance beneat h th e surface a t whic h w e coul d deduce—fro m informatio n in th e B S image—tha t th e sample was not soli d carbon) . Several othe r applications of this type of multilayer program are considered late r in this book—for example, in the chapters on electron beam induce d charge (EBIC ) an d x-rays. Depending on the problem, it is sometimes adequate to test the end point z n of a trajectory step to see which part of the specimen it is in, but in other cases cases it may b e bette r t o fin d th e midpoin t of th e ste p 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 make s mor e us e o f th e dat a i n th e simulation an d i s les s likel y t o caus e problem s an d confusio n whe n complicate d geometries are being considered. Car e must also be taken to properly error-tra p the test function; fo r example, if the electron i s backscattered zn<0 , the n the resultant value of z_mi d may be negative and lead to a problem. The safes t procedur e is to deal wit h the specia l case s o f backscattering an d transmission before othe r condi tions ar e tested for. Finally, i n any case wher e the regions bein g considere d i n th e problem ar e small in size compared to the Bethe range, the single scatterin g mode l must be used to avoi d errors . For complicated geometries, the problem of specifying the region of the sample i 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 l involve all three o f the coordiante s rather tha n just the z axis. Th e obviou s wa y to tackle the problem is to apply a string of suitably structured i f . .. the n tests to make th e decision. Fo r example, if x_midback_sid e then i : = 2 els e if z>botto m the n i : = 3 else i : =1; etc. but this is cumbersome and slow, as these tests have to be made on every step of every trajectory . For a completely arbitrar y geometry, however , suc h as a random steps on a surface, this is the only available way. One alternative is to divide up the entire volume of interest into an array of cubes of a size comparable wit h or smaller than the expected ste p length an d then to appl y the sor t o f test describe d abov e to preassign a value of i to each elemen t o f the arra y an d store it, s o that, give n the coordinates o f the electron, th e correct valu e of / can simpl y be looke d up . This i s
108
MONTE CARLO MODELING
fast and quite general but requires very large arrays of data in all except the simplest cases (Joy, 1989a). In one special case, however, there is a simple and elegant solution to this difficulty. If each of the regions of interest in a material is a closed volume that can be described by an equation of the form f(x, y, z) = 0, then we can immediately determine whether any given point p, q, r is inside, on the surface of, or outside the volume 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 iff(p, q, r) > 0, then the point is outside. For example consider the case of a sphere, radius r and centered at the coordinates (0, 0, Zc). We can find whether or not the point (x, y, z) is inside or outside the sphere by a simple PASCAL function, which can be called simply Outside. Function outside(xv,yv,zv:extended):Boolean; {tests whether or not the electron at xv,yv,zv is inside or outside 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 to read 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 is true (or is a function that evaluates to a positive number). Figure 6.14 shows some data obtained from this version of the program. The
BACKSCATTERED ELECTRON S
109
Figure 6.14. B S yiel d acros s a 0.25-(xm coppe r spher e i n carbo n a t 1 5 keV.
matrix of material wa s carbon, containing a copper spher e 0.2 5 jji m i n radius, and the incident beam energy was 1 5 keV. The program was set to calculate the variation of r\ wit h th e positio n o f th e bea m relativ e t o th e cente r o f th e sphere—which , because of the cylindrical symmetry of the problem, we need only do along a single radius. An additional loop was therefore inserted into the program to move the value of the starting y coordinate o f the beam from 0 to some maximum value y_jnax. i n suitable steps . The data of Fig. 6.1 4 show how the apparent backscatterin g coeffi cient varies with the position of the beam an d the depth of the sphere . W e see that for Zc > 1. 0 (Jim, or about one-third the Bethe range, the sphere is not visible, so the "depth of information" i n this case is about 1 |j,m. As the sphere is brought closer to the surface, it s visibility increases an d its apparent width changes, the full widt h at half maximum of the profile being 0.25 (x m when the sphere is at a depth of 0.7 (x m but 0.4 n, m wide when the sphere is at 0.35 (x m depth. These values for the apparent width of the image are interesting because they indicate the sort of spatial resolution that can be achieved in the backscattered image mode. On a simple basis, we might expect tha t the apparen t siz e would be o f th e orde r o f th e actua l diamete r o f th e sphere 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 th e mere fact that an electron reaches th e copper sphere doe s not guarantee that it will be backscattered b y it , sinc e i n orde r t o escape , th e electro n mus t firs t trave l throug h a significant amoun t of the carbon matrix. When the sphere i s deep or on the periph-
110
MONTE CARLO MODELING
ery of the interaction volume, the electrons reaching it are already low in energy and have 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 is certainly a special case, but it is not as restrictive as it might at first appear, because a sphere can be generalized into an ellipse (i.e., the equation becomes of the form ax2 + by2 + cz2 - d), which can then, by an appropriate choice of major and minor axes, be turned into a disk or a plate in any chosen orientation. A search through books on analytical geometry will also reveal a few other closed surfaces (or effectively closed, as in the case of a hyperbola) that might also prove useful. A case of some practical importance occurs when the surface encloses not another material but a vacuum—i.e., when the material contains a void. As can readily be confirmed, this situation cannot be taken care of by expedients—such as representing the void as being a material of zero atomic number and density— because the stopping power and scattering expressions do not behave properly in this limit. Instead, we assume that an electron entering the void will neither be scattered nor deposit significant energy but will simply move in a straight line across the void until it once again leaves. Using the notation from the code given above, the program would be modified to read
while nu m < traj_nu m d o begin reset—coordinates; for k : = l t o 5 0 do begin {fir or 1=1 outside in the matrix" if o u t s i d e ( x , y , z ) the n i : = l else begin {extrapolate previous trajectory step] go_round_agin:{la£>el for next loop if needed} xn: =x + s t e p [ l) *cx; yn: =y+step [1] *cy ; zn:=z+step[l)*cz; if outsid e ( x n , y n , z n ) the n {its gone through} go t o escape d {so leave this loop} else {extend the extrapolation} x: =xn;y: =yn; z : =zn; {reset coordinates} go t o go—round—again ; {and do it again} end;
BACKSCATTERED ELECTRONS
111
escaped: {label for exit from loop] i : = l ; {remember to reset this on exit]
etc.
While th e programmin g style will wi n n o prize s becaus e o f it s us e o f go-t o statements, thi s fragmen t o f cod e correctl y handle s th e void . Th e visibilit y an d apparent 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 e inclusions discussed above, except that the absence of a scattering material leads to a fall i n the backscattering coefficient rather than to a rise. For an interesting study of contras t fro m void s i n th e scannin g electro n microscop e (SEM ) usin g Mont e Carlo 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 compute d backscattering coefficien t and the actua l signal collected i n the SE M by a suitable backscatter detector . I f the backscatter detecto r were perfect, that is, i f it collected every backscattered electron withi n the 2ir steradians above the sample surface and if ever y electron—regardless o f energy—produce d th e sam e magnitude of output pulse, the signal would be directly proportional to the backscattering coefficient. I n general, this is not the case, and circumstances usually require that the properties of the detector be taken into account when a Monte Carlo simulation is being made. As a rule, the position of the detector must be considered if the specimen to be modeled has anything other than a flat (i.e., planar) surface and, since all practical backscatter detectors hav e an output that varies directl y wit h the energ y o f the electron s collected, modelin g th e efficienc y o f th e detecto r fo r electron s o f differen t energ y is always 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 e program, i t i s onl y necessar y t o chec k whethe r o r no t an y give n backscattere d electron i s traveling in the right direction to impinge on the detector. If the detector is assume d t o b e annula r abou t th e inciden t beam—i f th e oute r diameter o f th e detector i s R0 and the distance from th e detector to the sample is D—then, with the coordinate conventio n bein g use d in this book, a n electron wil l be collecte d i f it s direction cosin e c c satisfie s the relation
note that the sign is negative because the positive z-direction is defined to be in the beam 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
112 MONT
E CARL O MODELING
begin bk_set: =bk_sct + l; num:—num+1; goto back—scatter ;
end
where critical-angle is set equal to the quantity o n the right hand sid e of Eq. (6.11). I n thi s wa y th e characteristic s o f a specifi c backscattere d detecto r ca n b e added t o the simulatio n by feeding in the values for R0 an d D a t a suitable point in the program. If the detector i s annular but split into two halves or four quadrants, the values o f the othe r directio n cosin e component s mus t als o 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 collecte d on the two halves A and B (remembering firs t to declare and initialize these variables). The extension o f this cod e to othe r mor e comple x arrangement s is obvious. All backscatte r detector s displa y som e energ y sensitivity . Typically, w e fin d that thei r i s som e minimu m energ y Emin belo w whic h the backscattere d electro n creates n o output signal , whil e abov e Emin a backscatter electro n o f energy E wil l produce a n output signal tha t varies linearl y a s (E—Emin). Th e code for our plural scatter model s woul d now loo k somethin g lik e 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
BACKSCATTERED ELECTRON S
113
Figure 6.15. BS profile acros s sphere an d corresponding detected signal . now be declared as extended or real rather than integer and that the final result will no longer represent th e backscatter yiel d but instead a scaled representation o f the actua l signal detected . Figure 6.1 5 show s the effec t tha t this kind o f correctio n has. The datum is one of the traces from Fig . 6.14, but now corrected fo r a detector that has an Emin value of 5 keV. The two traces show the variation of the backscattered coefficien t an d th e outpu t signa l fro m 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 f including the energy sensitivit y of the detector i s to increase the apparent visibility of th e coppe r sphere , sinc e th e "peak-to-background " variatio n o f th e signa l i s increased by about 20%. There is thus no longer a direct proportionality between the backscatter coefficien t an d the detected backscatte r signal. This is of importance if the backscatte r signa l i s being use d fo r chemica l observations , sinc e i t canno t b e assumed tha t th e detecte d signa l an d th e emitte d backscatterin g coefficient—an d hence th e mea n atomi c numbe r of the target—ar e al l simpl y related together. Be cause th e detecto r respond s a s muc h t o change s i n th e energ y o f th e electron s i t receives a s it does to their actua l number, these two effects convolut e together and cannot simpl y be separated. Quantitativ e 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).
7
CHARGE COLLECTION MICROSCOPY AND CATHODOLUMINESCENCE 7.1 Introduction Charge collection imagin g in the scanning electron microscope , ofte n know n by the acronym EBI C (electro n 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 EBIC methods t o measure semiconducto r parameters , suc h a s th e minority carrie r diffu sion length (Leamy , 1982) , the majority o f charge-collected image s ar e interprete d in a purely qualitative manner. Cathodoluminescence (C/L ) imaging of semiconductor materials , whic h i s i n essenc e ver y simila r t o EBIC , ha s similarl y bee n use d mostly i n a picture-taking rathe r tha n a data-producing mode . Th e proble m i s not that there are no good models to explain the image formation but rather that, in order to provide tractable analytical expressions fo r the calculation of contrast, it is invariably necessary t o make significantl y oversimplified assumptions about the interac tion of the electron beam with the specimen. In this chapter, we demonstrate how the Monte Carlo models discusse d earlie r ca n be used to overcome these problems and make 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 d by the beam is used to promote an electron fro m th e filled valence band , across the band gap , t o th e empt y o r partiall y fille d conductio n ban d (Fig . 7.1) . Sinc e th e valence ban d wa s initially full , th e remova l o f a n electro n leave s behin d a "hole" that has all the physical properties o f an electron bu t carries a positive charge. For each electron promoted acros s th e band gap, one hole is formed, so it is convenient to conside r th e tw o component s togethe r an d tal k o f a n electron-hol e pair . T o generate th e electron-hole pai r requires a n amount of energy esh. Typically, esh is about 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 b y the incident bea m of energy E0 is ultimately unavailable for the generation of electron-hole pairs , then the number o f carrier pair s forme d n eh wil l b e 114
CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENC E 11
5
Figure 7.1. Electron-hole pai r generatio n i n 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 0 electron-hole pairs . Because th e electron an d hole hav e opposite charges , they are electrostatically attracted and will tend to drift togethe r through the lattice, maintaining local electrical neutrality. After onl y a few femptoseconds (10~~15 s), the electron will fall back across the band gap and recombine with the hole, giving up, as it does so, some of the energy used to form th e original carrier pair. It is this effect tha t may result i n th e productio n o f C/ L emission , sinc e th e exces s energ y ca n b e carrie d away by an emitted photon. I n any event, within a very short time after the passage of th e incident electron , th e syste m has returned to its origina l state . Since, unlik e a metal, a semiconducto r ha s significan t resistivity, a potential difference ca n be maintained across it, resulting in the generation of an electric fiel d imposed acros s the sampl e (Fig . 7.2A) . A n incident electro n o f energy E0 will , as before, produce some number of carrier pairs neh, but now, because the electrons and holes carry opposite charges, the electrons will tend to move toward the positive end of the sample while the holes will drift towar d the negative end. One result of this is Table 7.1 Electron-hole pair energies
Material C (diamond ) 13. CdS 7.
CdTe 4. GaAs 4.
GaP 7. Ge 3.9 InP 2. PbS 2. Si 3. SiC 9.
Electron-hole pair energy (eV) 1
5
8 6
8 5 2 0 6 0
116
MONTE CARL O MODELING
(a)
(b)
(c)
Figure 7.2 . Thre e configuration s for charge collectio n microscopy .
immediately apparent. Before the electron beam is turned on, the amount of current flowing throug h th e semiconducto r i s ver y smal l o r zero , becaus e ther e ar e n o electrons in the conduction band and hence there is no way to move charge. But with the beam striking the specimen, each electron produces n eh electron-hole pairs , and the presence of these free carriers will permit charge to flow. Thus the electron beam has induce d conductivit y in th e semiconductor . Thi s effec t i s know n a s electro n
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 m EBIC) or (3-conductivity (Holt and Joy, 1990) . I f the beam is scanned, the resultant conduction signa l ca n be used to for m a n image. In practice , a mor e interestin g procedur e i s t o generat e th e fiel d internall y within the semiconductor. Fo r example, if a semiconductor tha t has been chemically doped to make it a p-type material (i.e., one containing a n excess of holes) is placed in contact with n-type material (i.e., one with an excess of electrons), the n a region is formed around the p-n junction where a potential and hence a field is present (Fig. 7.2B). This field arise s from the attempt of the electrons i n the n-type material to go to th e p-typ e region an d th e hole s i n th e p~typ e materia l to flo w int o th e n-type region. Within a short time, charge fro m uncovere d atomic nuclei produces a fiel d just sufficient t o prevent any further charg e motion. In this region of field, there can be no free charge carriers, so it is called a "depleted region," and it typically extends for a few micrometer s o n eithe r sid e o f th e physica l locatio n o f th e p- n junction (Leamy, 1982) . Alternatively, if a thin metal film is put into atomic contact with the surface o f a semiconductor (Fig . 7.2C) then this "Schottky barrier" again results in the appearanc e 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 , i n eithe r case , a stati c potentia l between the p and n regions or between the metal and semiconductor; bu t if the pand n-type regions, o r the Schottky barrier and the semiconductor, were connecte d together b y a wire, then n o curren t would flow , becaus e th e fiel d exist s onl y i n a region fro m whic h all of the availabl e charg e carriers have alread y been removed . Now let us place the incident electron beam onto the p-n specimen in either the p- or n-type region but away from th e depleted zone. As before, electron-hole pairs will b e generated, but since the material in which they ar e produced is electrically neutral and has no field across it, they will quickly recombine an d no external effec t will be observed. If, however, the beam is placed in the depleted region, the carriers produced wil l se e the depletio n fiel d an d the carrie r pair s wil l b e separated . Thi s motion o f charge s withi n th e specime n wil l produc e a flo w o f curren t 7 CC i n th e external circuit give n by the relation
since eac h inciden t electro n ca n produce n eh carrie r parirs . This signal , which we will call the charge-collected curren t 7 CC, is seen to be substantially greater than the incident current /B. In the scanning electron microscope (SEM) , the current flowing around the external loop is measured and displayed as function of the beam position to produce th e charge-collected , o r EBIC, signal . Note that a n important practica l consideration i s tha t th e curren t w e wis h t o measur e i s actuall y a short-circui t current. Hence external resistance loa d /?L must be of as low a value as possible or else the ohmic voltage drop across it, which is in the opposite sens e to the potential at the depletion layer , will affec t th e signa l collection process .
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 of cm~ 3 s~ 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 very realistic representatio n o f the beam interactio n wit h the solid . The transport o f the minority componen t o f th e electron-hol e pair s generate d i s a diffusio n proble m described b y the equation:
where p(r) i s the density o f the beam-generated minorit y carriers an d D an d T are, respectively, the minority carrier diffusion coefficien t and lifetime. Given the necessary 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 giv e p(r) an d th e induce d curren t 7 CC ca n b e foun d b y integrating 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 d without knowing p(r), which , in turn, requires a knowledge of g(r), and no realistic model o f g(r) yield s an equation tha t is analytically tractable . However, if we use the Monte Carlo procedures we have developed t o describe the incident bea m interactio n wit h the semiconductor , then , a t any instant alon g a trajectory, g(r) is effectively a point source whose strength is equal to the number of electron-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 y segment is at a distance .s from the collecting junction, then the probability of i|/(s) of these carriers diffusin g t o the collecting junction and producing a charge collecte d current is , (Wittr y 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 eac h step of each of the trajectories tha t w e simulat e an d averagin g thi s t o fin d effectiv e charg e collecte d pe r incident electron (Joy , 1986). Although this looks, at first sight, to be quite differen t from 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. A s shown by Possin and Kirkpatrick (1979), w e can generalize th e quantity \\>(s) an d defin e 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
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 satisfies Eq. (7.3) wit h the boundary condition i|;(r ) = 1 at the entrance surfac e (z = 0) . In this case, th e solutio n o f Eq. (7.3 ) reduces t o 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 o f the contributio n o f th e elementar y sources :
where h(z) i s the dept h distribution of the generation. Thu s we can quite generall y calculate the magnitude of 7 CC for a given specimen geometr y an d beam interactio n by first steppin g through the Monte Carlo simulatio n to produce h(z) an d then using Eqs. (7.4 ) o r (7.5 ) an d (7.6 ) t o 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 a simulation o f charge-collectio n microscopy , bu t sinc e th e sample s ar e invariabl y bulk, th e plura l scatterin g approac h wil l b e significantl y faste r an d s o wil l b e illustrated here. Th e first tas k is to compute eh, th e number of electron-hole pairs generated alon g each ste p of the trajectory . Working from th e cod e i n chap. 4, w e can easily inser t thi s as shown below. Sinc e i t is interesting t o be able to view the actual 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 . Since for norma l incidence th e distribution i s going to be radially symmetrica l about the beam axis, we can store this in an array g(r, zz) where r, the radius from the axis, and zz, 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 d quantities 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 ******** }
120 MONT
E CARL O MODELIN G
{eh the number of carriers generated is} eh:= ( E [ k ] - E [ k + l] ) * 1 0 0 0 / 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} zm:=(z+zn)/2; [z coordinate o£ midpoint] {get radius of midpoint from axis in units of range} r: =round(sqrt (xm*xm+ym*ym ) / s t e p ) ; z z : =r o u n d ( z m / s t e p ); {} if zz > = 0 the n {put thi s carrier contribution into the array at r,zz} g[r,zz]:=g[r,zz]+eh; etc.
The array can be printed out at the end of the run to give the spatial distribution g [ r, z z ] . Becaus e th e dat a hav e bee n store d i n unit s o f a radia l variable , th e volume represented b y successive values of r increases steadily , so, in order to make the values directly comparable, i t is necessary t o divide g [ r , z z] b y ( 2 r+1) — i.e., th e are a betwee n th e rth an d ( r + l ) t h annuli . Figur e 7. 3 show s th e carrie r distribution 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 about 0.75 of the range. It is clear, however, that the distribution of carrier generation is far from uniform , with nearly a quarter of the carriers being produced within a volume
Figure 7.3. Isogeneration contour s for electron-hole pairs i n silicon.
CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENC E 12
1
that i s onl y abou t 0. 2 o f the rang e i n diameter . Th e isogeneratio n contour s ar e in good 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 mode l 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 use the Monte Carlo method to analyze, although other arrangements such as that using a p-n junction can as easily be studied by obvious modifications to the development below. The Schottk y barrie r consist s o f a thin layer, typically 10 0 to 30 0 A, o f a metal, 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 e contact with the surface of the semiconductor. Although this film is thin, it may have a significant effect o n the electron beam interaction with the solid, especially at low beam energies, and so must ultimately be included in the simulation. We assume that the 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 V b is the barrier height, (e.g., for Si V b = 0.7 V) plus an y applie d revers e bias . S o for 1 ohm.cm resistivit y silicon , wit h no external applie d bias , zd i s about 0.5 (Jim . The measurable parameter of a Schottky diode in charge-collection mod e is its gain G, which can be define d as:
where 7 CC is the measured short-circui t current collected fo r a given incident beam energy /b. From the discussion above , we can see that G is of the order of n eh, the number of electron-hole pairs generated per incident electron; but it will invariably be lower, because not all of these carriers will ultimately contribute to the signal. Let us consider 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 the trajectory step . I f zm < zd, the n al l of the carriers produce d ar e separated, s o the incremental charge collected c c i s increased b y eh. I f zm > zd, then the carriers must diffuse bac k to the depleted region before they can be separated and collected.
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 the collection of the carriers is totally independent of the generation process, we can conveniently do this by computing just a single set of trajectories but allowing zd and L to take a range of different values and calculating the gain in each case. If we define 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 fragment from above would then look like this: p_scatter; new_coord(step);
{find {find
the scattering angles} where electron goes}
{program-specific code will go here} {******** an d here it is ******** } (eh the number of carriers generated is} e h : = ( 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 begin for j : = 1 t o n d o begin if zm < =z d [ i] the n {al l the carriers are collected} Ice[i,j] :=Icc[i,j]+eh e Ice [ i , j] : =Icc [ i, j] +eh*exp (- ( zzd[i])/L[j]); end; end; etc. . . .
Figure 7.4 shows the variation of the gain G computed in this way for silicon at 30 keV, as the depletion depth varies from 0.5 to 5 (Jim and as L varies from 0.1 to 5 (xm. When the depletion depth zd or the diffusion length L are small compared to
CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENCE 12
3
Figure 7.4 . Variatio n o f current gain i n a silico n Schottk y diod e a t 3 0 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 e function o f thes e parameters ; bu t whe n either o r bot h becom e comparabl e t o th e range, then the gain depends only o n the beam energy. Note that the advantag e of using the same set of trajectories to calculate the gain for each of the variables is not just that of saving computational time. Using the sam e set of random numbers for each piec e o f data ensures that the difference s i n th e gain du e t o a change in th e diffusion lengt h o r depletion depth are not masked because of the statistical variations between one Monte Carlo run and the next. An interesting exercise is to try the effect o n these calculations o f changing the angle of beam incidence (Jakubowicz, 1982; Joy , 1986) . Fo r a given depletio n depth , diffusion length , and beam energy there is a range of angles over which the gain is constant. Since the angle of beam incidence can easily be varied—for example , by rocking the beam or mechanically tilting the sample—this provides a rapid experimental metho d for determining the diffusion lengt h of a diode. In general , w e canno t ignor e th e effec t o n th e inciden t electro n bea m o f th e Schottky barrier metal film. As the electrons pass through this, they lose energy and are scattere d laterally . I n addition , th e effectiv e backscatterin g coefficien t o f th e specimen i s changed . Whil e thes e effect s ar e smal l a t moderat e an d hig h bea m energies (1 5 ke V an d above) , the y ar e quit e significan t a t lowe r bea m energie s because th e meta l film , thoug h thin, i s the n a substantia l fraction o f th e electro n
124
MONTE CARLO MODELING
range. This situation can be modeled by slightly modifying the program BINARY discussed 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 collection is measured to the bottom of the Schottky layer rather than to the surface. It is only necessary 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 then begin bk_sct: =bk_sct + l; num:=num+l; goto back—scatter; end else {compute the gain of the Schottky diode—energy of electronhole pair formation is e—eh—i.e., 3.6 eV for silicon etc.} begin e 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 depleted regi 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 plural scattering simulation, the program cannot be expected to give accurate results above the energy for which the thickness of the barrier film becomes less than about onetenth of the range (e.g., about 12 keV for a 300-A gold film. Figure 7.5 shows the effect of including the Schottky barrier in attempting to compare experimental gain measurements 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 the case with no surface barrier and for the barrier thicknesses of 200, 300, and 400 A, it is clear that the absolute gain values are quite different. The best match between the experimental data and the computed figures is for a barrier layer of 300 A. If the gain can be measured over a sufficiently wide energy range (e.g., from a lower value where the gain is effectively zero because the beam is not penetrating the barrier to an upper value where the gain is at a maximum), then an iterative comparison
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 n including thicknes s o f Schottk y layer .
between the Monte Carlo data and the experimental dat a allows both the parameters of the device (i.e., the diffusion lengt h and depletion depth) and the thickness of the barrier 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 n charge-collection image s by Lander e t al. (1963). Sinc e that time the technique has been widel y used (Leamy , 1982) , no t only because it allow s defects to be imaged without the need t o 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 t place. Contrast is seen fro m defects , because carrie r recombinatio n ca n occur at the defect, s o reducing the number that contribute to the detected current . As shown by Donolato (1978 ) an d using the notation show n i n Fig. 7.6 , a point defec t at som e depth Dd beneat h the surface of a Schottky diode causes a differential signal change in th e collected signa l fro m a distribution o f point source s g(x, y, z) given by
126
MONTE CARLO MODELING
Figure 7.6. Definition of parameter s 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 e defined a s show n i n Fig . 7.6, L i s th e minorit y carrie r diffusio n length , an d th e integral is over the whole excited volume. This derivation assumes that the Schottky barrier ca n be represented a s a surface of infinite recombinatio n velocit y (i.e., any carrier reachin g th e surfac e contributes t o the measured current). As before , the Mont e Carl o approac h allow s us t o replac e thi s integra l b y a summation in which the distribution of point sources g(x, y, z) i s represented b y the carrier generatio n calculate d fo r eac h ste p o f th e trajectory . Fo r eac h ste p i n th e trajectory, 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) an d depends on whether or not the 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 in order to model a dislocation i t would be necessary to integrate Eq. (7.10) along the length o f the defect, or in our discrete Monte Carlo model, to sum Eq. (7.11) along the dislocation line . If the dislocation i s horizontal (i.e., parallel to the surface) and can be considered as infinite in length, then numerical integration (Joy, 1986) shows that th e for m o f Eq . (7.11 ) remain s unchange d except tha t k , representin g th e strength of the point defect, is now replaced by a term representing th e strength per unit length of the line defect. Thi s convenient simplification i s possible because the
CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENCE 12
7
1/r multiplying factors o n each exponentia l in Eq. (7.11 ) greatl y restrict th e range over whic h th e expressio n i s significant . Fo r othe r defec t geometries—suc h a s inclined fault s o r loops—i t woul d b e necessar y t o evaluat e Eq . (7.11 ) fo r eac h trajectory ste p an d for each point defining the defect line. If the defect lies within the depleted region (i.e., Dd < zd), then the effect o f the carrier drift, caused by the depletion field, on the image must also be considered. As shown by Leamy (1982), this can be done by comparing the transit time of carriers across 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 applie d bias V a i s
where the depletion depth zd is given b y Eq. (7.7). The effectiv e strengt h per unit length of the defect is then reduced by a factor £0/(£D + ^o) > where E0 is the fiel d associated wit h the defec t itself, typicall y of the order of 5.10 3 V/c m (Mil'stein et al., 1984) . As before, the basis of the simulation will be the BINARY program, and again only a minor modification to the original code is needed to include the computation of th e effec t o f th e 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 d do_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 :
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 . 5 3 * s q r t ( r e s i s t i v i t y * ( 0 . 5 + b i a s ) ); {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 n ed:=0 {defec t is in neutral material} else begin 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) / z d ; end;
{arid r_crit:=rO*sqrt(5E3/(5E3+ed)); {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 strength of the dislocation, has the units of a length. So in the program, this has been called the "size" rO of the defect, and been assigned a value of 0.3 u-m. This value has been found to give contrast values that are in good agreement with those measured experimentally, and it is also consistent with the expected physical extent of the electrostatic field around a defect in silicon. For other materials or special conditions, 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 the electron beam interacts with the solid. We can therefore again save time, and also improve our statistics, by simultaneously calculating the signal profile at many points across the dislocation for each trajectory step. If we place the dislocation so that it is parallel to the x axis and at y = 0, then for each trajectory step we can loop through the current calculation shifting the effective position of the beam by a series of values pos [ j ] and calculating the corresponding current i_cc [ j ] . Because the profile is symmetrical about the center of the defect, typically five to ten values in the array pos [ j ] are enough to produce a smooth profile. The chosen values for pos [ j ] can either be input by the user or preset in the program code itself. That is,
C H A
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 of the 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 of pos [ 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 the effect of the electrically active defect} var begin [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 by pos[j]} begin {defect is at depth dd} rl: = (zval-dd)*(zval-dd) + (yval-pos[j])*(yval-pos[j]) ; {Fig. 7.6}
end; {o
r 2 : = r l + 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 are collected} i_cc[j] :=i_cc[j] +eh*del_I e l i_cc [ j ] : =i_cc [ j ] +eh*exp(- (zval-zd) / L ) ; e n
f this procedure}
Because computations for ten or so different effective beam positions are made for 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 of random numbers, the precision of the computation is high, and good statistics can be achieved 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 symmetrical profile, will now give the desired profile of the EBIC signal variation across the
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 th e program output th e actual i_cc [ j ] values an d plottin g thes e i n som e othe r progra m o r b y writing th e necessar y fe w lines of code to have the program plot its own output. In either case a great deal can be learned abou t the behavior o f defect image s i n EBIC b y using this program an d trying th e effect s o f variou s set s o f semiconducto r an d defec t parameters . Figure 7. 7 show s the predicted signa l profile s arros s a line defect a t depths of 0.5, 1,1.5 , 2, and 2.5 |xm in silicon. To avoid cluttering the figure, only half profiles are shown . With the physica l parameters assume d here, a resistivity of lOOOft.c m and zero applied bias, the depletion depth is [Eq. (7.7)] about 1 5 |o,m, which is large compared t o bot h th e electro n rang e o f 3 (Ji m an d th e minorit y carrie r diffusio n length o f 1 (jum. Fo r all depths, the profile has the sam e general V-shape d form, but the details of th e profile vary from a narrow, high-contrast di p for a defect just 0.5 |xm below the surface to a broad and rather shallow profile for a defect 2.5 |xm below the 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 b e note d tha t the contrast fro m a defec t effectivel y vanishe s i f th e dept h o f th e defec t exceed s th e range of the incident electrons. Thi s is because, as shown in Fig. 7.3, the majority of carriers 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 t carriers generate d fa r from th e defect will contribute little contrast because th e two exponential terms will be about equal and opposite. Fo r good contrast to be observable fro m a defect , th e carriers ' generatio n maximu m mus t b e a t o r clos e t o th e defect. Th e depth at which a dislocation is situated can thus be estimated wit h good
CHARGE COLLECTIO N MICROSCOPY/CATHODOLUMINESCENC E
131
accuracy by noting the beam energy a t which it first become s visibl e and equating the electro n rang e to the depth (Leam y et al., 1976 ; Jo y et al., 1985) . Figure 7. 8 show s th e profile s predicte d fo r th e cas e wher e the defec t i s a t a constant depth , her e 0. 5 jjun , but th e bea m energ y i s varied. A t 5 keV, where th e beam range is also about 0.5 (Jim , the defect is just detectable, a s would be expected from the discussion above. As the energy is raised, both AS, the signal change across the defect, an d S, the total signal collected, increase, so the contrast AS/S also rises and reaches a shallow maximum at about 1 0 keV, at which conditio n th e electro n range, 1. 5 (Jim , i s abou t three time s th e defec t depth . A t stil l highe r energies , th e signal variatio n A S start s t o fal l whil e S slowl y increases , s o th e contras t falls . Simulations fo r a wide variety o f differen t defec t parameter s sho w that a contras t maximum can always be expected durin g a sweep of the incident beam energy and indicate that this maximum occurs whe n the defect is at a depth of between 0.3 and 0.4 times the beam range. The existence o f such a contrast maximum with accelerat ing voltag e wa s firs t predicte d b y Donalat o (1978) , wh o showe d that, for a poin t defect an d a uniform, spherical , generatio n volume, the maximum would occur a t about 0.5 of the beam range. The knowledge that a dislocation a t a given depth does not becom e visibl e unti l th e bea m rang e firs t reache s tha t depth , an d tha t wit h increasing energ y th e contras t the n goe s throug h a maximum (at abou t twic e th e energy 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 m energy.
132
MONtE CARL O MODELIN G
Figure 7.9. Compute d EBI C profiles acros s a line defect i n silicon a s a function o f diffusio n length.
basis of a method for determining the three dimensional distribution of dislocation s in a semiconductor (Jo y e t al. , 1985) . It will also be expected tha t the minority carrier length L would have a significant effec t o n defec t imagin g in EBIC, since i t is this parameter, togethe r wit h the beam 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 m below th e 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 e value o f L. A s th e diffusio n lengt h increases , th e shap e o f th e profil e remain s essentially unchanged, but the apparen t size o f the feature increases. However , the full widt h at half maximum contrast of the defect image increases only by a factor of two times as L goes from 0. 5 to 50 (xm, and saturates if L is increased any further. In fact, measurement s fro m simulation s o f thi s typ e sho w clearl y tha t th e spatia l resolution o f th e EBI C imag e i s almos t independen t o f th e diffusio n length . Th e width of the defect image is determined by the beam energy (i.e. , the lateral extent of th e generation volume ) and by the position o f the defec t relativ e to the surface . Consequently, even in materials wit h a long minority carrier diffusio n length , highresolution EBI C imagin g i s possibl e provide d tha t the bea m energ y i s reduce d t o minimize th e interaction volume. Although al l of th e examples give n relate t o EBI C imaging , the extensio n t o C/L profiles is straightforward. All of the physics and program code associated with the generation o f carriers and their interaction with defects remains unchanged, but
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 o consider th e presence of a Schottky barrier o n the surface. Unless it is necessary t o consider absorptio n of the C/L radiatio n as it leaves the specimen, the computation can be made straightforwardly by equating the resultant C/L signal with i_cc, th e number of carrier pairs determined for each trajectory step. An example of the use of Monte Carlo simulations for both EBIC and C/L imaging is given in Czyzewski and Joy (1989) . The result s discusse d abov e demonstrat e th e powe r o f th e applicatio n o f th e Monte Carlo simulation methods to the analysis of a practical problem such as EBIC imaging. 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 o achieve th e desire d resul t an d allow s a quantitativ e interpretation o f th e image s generated t o be made .
8
SECONDARY ELECTRONS AND IMAGING 8.1 Introduction Secondary electron s (SE) , discovered b y Austin and Starke in 1902 , ar e defined as being thos e electrons emitte d fro m th e specimen tha t have energies betwee n 0 and 50 eV. Because o f thei r lo w energy , secondar y electron s ar e readily deflecte d an d collected 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 n taken using the SE signal. Secondaries ca n be generated throug h a variety of interactions in the specimen (Wolff , 1954 ; Seiler , 1984) , a typical event being a knock-o n collision i n which the incident electro n impart s some fraction o f its energy t o a fre e electron i n th e specimen . Thi s i s followe d b y a cascad e proces s i n whic h thes e secondaries diffus e throug h the solid, multiplyin g and losing energ y a s they travel, until the y either sink back into the sea of conduction electrons or reach the surfac e with sufficien t energ y to emerge a s true SE. For S E with energies o f a few ten s of electron volts , the inelastic mea n free pat h (MFP) is small, in the range 1 0 to 40 A, so each secondar y typicall y travels only a short distance befor e sharin g som e o f its energy in an inelastic event. However, for most materials, the inelastic MFP reache s a minimum at about 20 to 30 eV; for energies below that value, it increases rapidly, because ther e ar e n o larg e cross-sectio n inelasti c scatterin g event s throug h whe n energy ca n b e transferred . Th e elasti c MF P als o fall s wit h energ y bu t become s approximately constan t a t a few tens o f angstroms for energies belo w abou t 3 0 eV. SE with energies belo w thi s value ar e therefore strongl y elastically scattere d eve n though inelasti c scatterin g i s insignificant . Consequently , a s th e cascad e develop s from som e point below the surface of the irradiated specimen , onl y a finite fractio n will actually reach the surface and escape to be collected. We can thus see that there is a region beneath th e surface—the so-called S E escape depth, perhaps 50 to 15 0 A in extent—beyon d whic h no S E generated ca n reach th e surfac e an d escape . The measur e o f secondary electro n productio n is the S E yield 8 , which is th e total numbe r of SE produced pe r incident electron . Fo r al l materials, 8 varies with incident electron energ y in the same manner as that shown in Fig. 8.1 for silver. The yield is low at high beam energies becaus e most of the secondary productio n occurs too 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 pea k i s reached, correspondin g t o the condito n wher e th e inci 134
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 occurs for a n energy of 1 to 3 keV. At still lower energies , the yield again falls becaus e of the lower energ y input from th e inciden t beam . Any satisfactor y simulation of S E production must be able to reproduce this yield curve for a given material and set of experimental conditions . In general , there wil l be tw o occasion s whe n S E generated b y the bea m can escape from th e specimen surface : first a s the incident electrons pass down through the escape zone and second a s backscattered electron s agai n pass through this zone on thei r wa y back t o th e surface . While th e S E produced i n these tw o event s ar e identical i n nature, their utilit y for imagin g is quite different , sinc e th e firs t grou p come fro m th e beam impac t 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 range and 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 called SE1, whil e thos e produced b y th e exitin g backscattere d electron s ar e calle d SE2 . The ratio between these two components is also an important quantity to be able to calculate because it is a measure of the likely spatial resolution o f the combined SE signal. In this chapter we discuss three levels o f approach to the problem o f doing a Monte Carl o simulatio n of secondar y electron production : 1. A complete first-principles simulation of all inelastic events leading to secondary production and including a model of the cascade multiplication of the SE and of their diffusio n t o th e surface.
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 s assumed t o be dominant. 3. A parametric model of SE production an d escape that can be added to a standard Monte Carl o mode l fo r inciden t electro n 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 e parameters of SE production, e.g., energy, angle, and depth distribution of the SE in addition to the computed secondary yield 8. However, a substantial computing effor t is require d becaus e o f th e comple x nature o f th e physica l model s involve d and , realistically, the applicatio n o f this approach i s limited t o a very few elements an d the most basic geometry. The simpler models typically calculate onl y SE yield, but they can provide this information in a short time even for structures of an arbitrary composition, size , and shape. These types of simulations are thus well suited for the computation o f 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 theoretical research ove r a large number of years since its discovery (Austi n and Starke, 1902). Important pioneer studies were performed by Bethe (1941) and Salow (1940), leading to the development of detailed phenomenological models by Baroody (1950), Jonke r (1952), an d Dekke r (1958) . Followin g Wolf f (1954) , wh o proposed th e use o f the Boltzmann 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 d following the initial work of Koshikawa and Shimizu (1974). Construction of a Monte Carlo model for SE production involves three separate steps: determining the trajectory of the incident electron, computing the rate of SE generation alon g each portion of this trajectory, and finally calculating the fraction o f SE that escape from th e solid after th e serie s o f cascade processes. The first 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 a simple plura l scatterin g metho d t o mode l th e inciden t electro n trajectories . Th e second ste p requires u s to tak e int o accoun t all possible creatio n processe s for SE resulting from th e interaction o f primary electrons an d backscattered electron s wit h free a s well as with bound (i.e., core) electrons. I n addition, th e contribution to SE production fro m th e volum e plasmon deca y shoul d als o b e included . Fo r eac h o f these processes, w e require an excitation cross section. The differential cross section for 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 )
SECONDARY ELECTRON S AN D IMAGIN G 13
7
where E is the energy of the incident electron an d £' is the energy transferred to the secondary. The lowest allowed energy for an SE is chosen to be £F + 4 > (where EF is the Ferm i energ y and <) > is the wor k function), s o that the S E can cros s the surfac e potential barrier an d enter the vacuum state. Gryzinski's function (Gryzinski, 1965 ) is employed to describe th e production of SE from th e excitation o f core electrons :
where E-} i s the bindin g energ y o f the cor e electron . For metals, the contribution t o SE production b y the deca y of plasmons must also b e considered. Usin g th e expressions o f Chung and Everhart (1977) gives a n expression 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 /zw p is the plasmon energy , E0 is the incident electron energy, a0 is the Bohr radius, an d We i s th e g th Fourier coefficien t o f the lattic e pseudopotentia l fo r the reciprocal lattic e vecto r g. It i s usual (Bruining, 1954 ) t o assum e that the probabilit y Pz o f a secondary escaping fro m som e dept h z below th e inciden t surfac e o f th e soli d i s give n by a function o f the kin d
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 ) an d implies tha t the emerging secondarie s ar e unscattered and that any scattering of an SE produces absorption (i.e., only those SE that are not scattere d between their point of generation and the surface can escape). I n fact , these assumptions are not strictly valid (Chung and Everhart, 1977), but the error that they introduce is usually negligible. However , to accurately model th e cascade, it is necessary t o generaliz e Eq . (8.7) . The probability o f a n SE arriving at the surfac e without an y inelastic collisio n i s
because the average escape angl e will be at 45° to the surface. \(E) i s the inelastic mean free pat h for an SE of energy E, whic h for a metal i s given (Sean an d Dench, 1979) b y the formula :
where EF i s the Fermi energy of the metal, and a is the thickness of a monolayer of the meta l i n nanometers . Typicall y \(E) i s o f th e orde r o f a fe w nanometer s fo r energies i n the sub-10 0 eV range . We can now set up the cascade process. From Eq. (8.8), the probability Pz of an SE traveling from z to z' withou t an y 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. , participated i n the cascade) i s
Some SE thus travel to the surface a t a rate governed by the exponential deca y law while others take part in the cascade process an d produce new SE of lower energies . It is convenient to make a distinction between secondaries o f different energ y ranges in th e cascade . Belo w 10 0 eV , th e scatterin g o f th e S E ca n b e assume d t o b e spherically symmetrica l (Koshikawa and Shimizu , 1974) . I f E' i s the energy o f an SE afte r scattering , the n
SECONDARY ELECTRON S AN D IMAGIN G 13
9
where E is the energy before scattering and RND is the usual equidistributed random number. Thu s fo r eac h S E participatin g i n th e cascade , tw o S E appea r afte r a collision 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 generated by core electron ionizations an d from valence and d electrons. Th e calculation of the cascade proces s i s carrie d ou t u p t o a sufficientl y larg e dept h fro m th e inciden t surface t o ensure that al l contribution s ar e accounted for. The final step in the analysis is to calculate what fraction of the SE reaching the surface actually pass the energy barrier an d reach the vacuum. The elastic scattering of the SE can be assumed to be isotropic, because at low energies the elastic MFP is only o f the orde r o f atomic dimension s (Samot o an d Shimizu, 1983) , s o all direc tions of motion are equally probable for the internal SE. In order for an SE of energy E to escape, E must be greater than Ep + 4> > where EF i s the Fermi energy and 4 > is the work function. The maximum angle a a t which the SE can approach the surface is determined b y taking the normal componen t o f momentum Pcos a equa l to the value
Thus the escap e probabilit y p(E) fo r a n S E of energy E a t the surfac e i s
Putting al l o f th e piece s describe d abov e togethe r no w give s u s a complet e Monte Carlo description o f the generation, multiplication , diffusion, an d escape of the secondar y electrons fro m a solid. Th e actua l code wil l not be reproduced her e because, o f necessity, it i s length y an d complex . When applie d t o th e proble m o f computing 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 show n in Fig. 8.2 , (adapte d fro m Lu o an d Joy , 1990) , th e compute d normalize d secondar y energy distribution N(E) i s in good agreement wit h 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 -
140
MONTE CARL O MODELIN G
Figure 8.2. Compariso n o f SE energy spectru m wit h data of Bindi et al . (1980) .
ment of accuracy a difficult matte r (Joy, 1993). It is usual to assume that the angular distribution of emitted secondaries follow s a cosine law (Jonker, 1952), a result that follows directl y fro m th e isotropi c natur e of elastic scatterin g withi n the specime n (Luo and Joy, 1990). However, the detailed simulation shows that when the inelastic scattering that occurs within the cascade is taken into account, there are deviations from th e cosine rule especially fo r the higher-energy SE. Figure 8.3 shows how this deviation appears . Although the effec t i s real, th e fractional number of suc h highenergy S E is small , an d so—fo r mos t practica l purposes—th e cosin e rul e ca n b e taken to apply. The model also calculates how the yield of SE varies as the thickness of the target is increased. Th e SE1 component of the SE emission, that produced by the forward-traveling incident electrons, typically reaches its maximum value for a thickness of only a few nanometers. As the thickness is increased beyon d that value, however, the number of backscattered electrons continues to rise, and so the yield of SE2 secondaries increase s an d the total yield 8 rises. Figure 8.4 shows experimental data fo r copper , illustratin g this effect . Since
we can write
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 t represent the relative efficiency o f backscattered electrons at generating SE . If SE1 is constant , a s i s th e cas e fo r an y targe t thicke r tha n a fe w nanometers , the n th e variation of 8 with thickness provides an experimental wa y to measure the value of P, sinc e we know that T| varies linearly wit h thickness (se e Chap . 6). This indirec t approach mus t b e use d becaus e w e canno t physicall y distinguis h SE 1 an d SE 2 electrons, sinc e thei r propertie s ar e identical . However , i n a calculation , i t i s a simple matte r to compute the SE 1 and SE2 yield separatel y an d hence to obtain a value for p. The computation shows that p is typically in the range 3 to 6, the value being somewha t higher a t lo w energie s (= = 1 keV ) an d fo r material s wit h highe r atomic numbers. This sor t of value is in fai r agreemen t wit h the availabl e experi mental value s (e.g. , Bronstei n an d Fraiman, 1961 ) an d indicates tha t i n a typical metal or semiconductor for which T\ = 0.3 , les s than 50% of the total SE signal i s being produced b y the incident beam . The use of this model with other than a few familiar metals is difficult, primarily becaus e man y of th e require d parameter s i n th e mode l ar e eithe r unknow n or known onl y imperfectly . Fo r nonmetalli c element s suc h a s semiconductor s an d dielectrics, significan t modification s t o th e mode l woul d b e require d t o mak e i t physically realistic. Work in this area is still proceeding. Thus , while this method is of 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 applied to th e real-worl d situatio n i n a n SEM . Fo r thi s kin d o f problem , simpler , les s detailed, bu t mor e pliable, models must be used.
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 ca n simplif y th e complexit y o f th e previou s metho d b y assumin g tha t onl y a single mechanism for the production o f secondary electrons need be considered. As originally suggeste d b y Murat a et al. (1981), a n appropriate assumptio n is that the SE are produced by a knock-on collision i n which an incident electron interact s with a fre e electron . Th e required differentia l cros s section s fo r thi s typ e o f interactio n are poorl y known ; however, thi s typ e o f interactio n ca n b e treate d classicall y b y considering 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 y produced. Sinc e this interaction involve s energy transfer s of [IE an d (1 - fl)E an d since, i n the final state , the incident electro n wil l no longer b e distinguishable, th e two cross sections must be added. For convenience, w e can define the electron with the highest energ y a s the primary; thus fl i s restricted, s o that 0 < fl < 0.5. Th e inelastic scatterin g (Fig . 8.5 ) cause s a deflectio n a o f the primar y electro n i n the laboratory fram e o f reference give n as :
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 i n units of its rest mass (511 keV). For a small energy transfer, say 500 eV for a 20-keV primary, a i s about 1° ; which is thus of 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 a n 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 travel of th e primar y electron . Other cros s section s fo r S E productio n b y knock-o n hav e bee n given , fo r example by Mott (1930), Molle r (1931), and Gryzinski (1965). Thes e models diffe r in th e assumption s tha t they mak e an d i n their functiona l form , bu t th e predicte d values o f the cross section s unde r equivalent condition s diffe r relativel y littl e provided tha t the energ y o f the S E is sufficientl y hig h for i t t o b e 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 r another, we will use the Evans model [Eq . (8.18) and following], sinc e th e values predicted b y this fall i n the middle of the range of numerical values spanned by the other 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 o simulation, since we track an incident electron , a s usual, but if a secondary electro n is generated , w e freez e th e positio n o f th e primary , trac k th e secondar y unti l i t
144 leaves the specimen or loses it energy, and then resume tracking the incident electron again. The model that we will use is the single scattering model of Chap. 3 because we have to investigate each electron interaction individually to see if it is an elastic or an inelastic event. We will use the program to plot the trajectories of either the incident or the FSE and to calculate the yield of SE from the specimen. Below is the key portion of the original listing of the single scattering program of Chap. 3, but now modified to allow for FSE generation. The changes and additions to the original code 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}
SECONDARY ELECTRON S AND IMAGIN G 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 e minimal. The initia l entry o f the electro n proceed s a s before, but now—instea d of just allowin g th e electron to be scattered elastically—we test to see whether o r not an 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 a variable PEL , whic h is the ratio of the elastic cros s sectio n t o the total scatterin g cross sectio n (i.e. , includin g the inelasti c effect) . The elastic scattering undergone by the incident electron is represented as usual by th e Rutherfor d cross sectio n [Eq . (3.2)] . Thi s cros s sectio n CT E define s a mean free pat h X el give n by th e formula
which represent s th e averag e distanc e tha t an electro n 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 y integrating Eq . (8.18) . However , w e not e fro m Eq . (8.18 ) tha t th e cros s sectio n becomes infinite at fl = 0 , so a lower limit fl c must be chosen as a cutoff. Choosin g a finite value of flc no t only avoids the problem of an infinite cross sectio n bu t also has 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 simulation without contributing much to the final result. I t is foun d (Murat a et al., 1981 ) that the choice of Oc does not sensitively affect the results produced, since lowering ft c produces more secondaries bu t each of a lower average energy. So, for convenience,
146 MONT
E CARLO MODELIN G
Table 8.1 Values computed for 20-keV beam incidence Element Carbon 33 Aluminum 28 Silicon 24 Copper 5 Silver 3
X elastic
A. inelastic
8 A 92 9 A 102 0 A 87 4 A 25 6 A 19
7A 0A 1A 0A 8A
a valu e of 0.01 wil l be used here. Equatio n (8.18 ) ca n the n b e integrated ove r th e range flc < d < 0. 5 to give th e total inelastic cros s sectio n cr in an d hence
since the cross section is per electron. X in is the average distance between successive inelastic scattering events. Whereas X el is of the order of 10 0 A for most materials at 20 keV, X. in i s abou t 0.1 (x m a t the sam e energy, s o th e probabilit y o f a n inelasti c collision is small compared to that for an elastic event. Table 8.1 gives some typical values fo r X el and X in. We can define a total scattering MFP—th e average distanc e between scatterin g events o f either type—fro m th e relation
PEL i s the ratio X TAei an d represents the probability tha t a given scatterin g event wil l be elastic. Sinc e A. in > X el, the n PEL is close t o unity an d only a small fraction o f scatterin g event s wil l b e inelastic . Th e typ e o f even t tha t occur s i s determined b y choosin g a random numbe r Test_f or_FSE an d seein g i f thi s is greater tha n PEL . I f i t i s not , then the scatterin g even t wa s elastic , n o FS E wa s generated, 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 to track the FSE while the tracking o f the incident electro n i s suspended. It is convenient to be able to turn FSE production on and off as required. This can be done in the 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;
SECONDARY ELECTRONS AND IMAGING
147
This sets a Boolean variable FSE_on to true if FSE production is required, and to false if FSE are not needed. If FSE_on is true, then PEL is calculated as described above; but if FSE_on is set false, then PEL is set equal to unity, A.T = \el, and the program 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 inelastic scattering.
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 / m f p i) + ( 1 / m f p 2) ; mfp3:=l/mfp3; {make if FSE_o n the n {compute the ratio constant elastic/total} PEL: = m f p 3 / m f p l else begin PEL:=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. This involves several steps that can be displayed schematically as
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 t these 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;
SECONDARY ELECTRONS AND IMAGING
149
{we now store the coordinates of the primary electron to reuse them 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 to consider} if FSEnergy<e_mi n the n {it s no t worth tracking} begin escpae: =750*power (FSEnergy, 1 . 6 6) /density;{estimat e range} 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);
150
MONTE CARLO MODELING
{get the new coordinates} x n : = x + FSE_step*ca ; y n : = y + FSE_step*cb ; z n : = z + FSE_step* c if zn>thic k the n {thi s one is transmitted} begin if 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] begin if 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 , y n, 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} s e _ y i e l d : = s e _ y i e l d + 0 . 5 * e x p ( - ( z + z n ) / ( 2 * s e _ e s c a p e) ) ; goto set_up_reentry ; end else {go round again} X:=xn; y:=yn; z:=zn; 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 - R N D )) ; sp: =s q r t ( l - c p * c p ); 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
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 ( s p ) ; 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 fo r 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. Evaluating thi s gives
which can be seen to yield properly weighted values of fl between 0.5 and 0.001 fo r 0 < RN D < 1.0 . Th e actual energy of the FSE produced i s 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 e incident electro n ar e next store d i n the local variables , SI , S 2 . . . S 7 . The quantities S I throug h S 6 hol d x , y , z , c x , c y , an d c z respectively . S 7 i s set equal t o the energy o f 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 t o 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 n arbitrarily chose n cutof f energ y of 500 eV (not to be confused with the generatio n cutoff fl c), the n th e positio n wher e th e FS E wa s generate d i s plotted . Becaus e
152 MONT
E CARL O MODELIN G
secondaries o f this low an energy do not travel more than a few tens of angstroms in the material, there is no point in tracking them . However, they might contribute to the overal l yield , sinc e ther e i s a finit e probabilit y tha t th e FS E coul d reac h th e entrance surfac e and escape t o be collected a s a secondary electron. Th e chance of this occurrin g i s estimate d b y findin g th e range escap e fo r th e electro n a t the energy FSEnerg y {estimate the FSE escape distance from range equation} escape : =750 . *power (e_jnin , 1. 6 6 ) / d e n s i t y; {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 e distance z back t o th e surface :
The factor 0.5 accounts fo r the fact that the SE can travel in any direction, so on average onl y hal f th e secondarie s wil l trave l towar d th e entranc e surface . Th e se_yield counte r i s the n incremente d b y thi s fractiona l amoun t p(z) an d th e function return s t o th e mai n program . Thi s i s clearl y no t a rigorou s approac h t o accounting for the behavior of the FSE below the cutoff energy , but it is a plausible first approximation . Otherwise, if the energy of the FSE is about 500 eV, then the angle sp a t which the FS E leave s it s generatio n poin t relativ e t o th e primar y electron' s directio n o f travel i s compute d fro m Eq . (8.20) , th e azimutha l directio n g a i s foun d fro m a random numbe r call, an d th e ste p length for thi s event i s found b y computin g the elastic MF P fo r th e FS E a t th e energ y FSEnergy , usin g th e functio n FSEmf p from th e expression s develope d i n Chap . 3 . Not e tha t w e d o no t conside r th e possibility o f th e FS E i n it s tur n havin g a n inelasti c collisio n an d producin g a tertiary electron , althoug h this could be done with little additiona l programming if required. The ne w coordinate s o f th e FS E ca n no w b e foun d again , usin g ou r usual formulas. It might, a t first sight , see m wastefu l t o include these equation s i n this Track_the_FS E procedur e rathe r tha n t o us e th e procedur e alread y included i n the main program, which does the same job. Th e reason thi s is done is that 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 of global and local variables, see Chap. 2) . If we want to use this sam e procedur e to handle th e FSE, the n we would have to store the global variable s (since these refe r to the inciden t electron), substitut e the appropriat e quantitie s for the FSE, perfor m the calculation, an d then swo p back the origina l parameters. I t is less confusin g t o use a purely local version of this and the other calculations required (e.g., the elastic MFP computatio n for th e FSE) , an d i t als o remove s a likel y sourc e o f errors an d bugs in the program code .
SECONDARY The new coordinates o f the FSE are now tested. If the FSE has left th e botto m surface o f the specimen , then it has been transmitted, s o the tracking is terminated, the coordinates of the incident electron ar e picked up from thei r temporary storage, and th e functio n exit s bac k t o th e mai n program . I f th e FS E ha s lef t throug h the entrance surface , the n the counter se_yiel d is incremented b y 1 , since a detect able secondary electron wil l have been produced, and the function then exits back to the main program. If the FSE is still in the specimen, then the energy of the FSE is corrected fo r the amoun t that it has lost along thi s step, using the normal stoppin g power relationship; th e coordinates ar e reset, and the FSE is scattered again , applying the standar d Rutherford scatterin g mode l of Chap. 3 . This procedure is continued until either the FSE leaves the specimen o r falls below the minimum energy. If the FS E i s foun d t o b e belo w th e minimu m energy of interest , the n w e abor t th e tracking an d agai n estimat e th e probabilit y tha t the FS E coul d reac h th e entranc e surface an d escap e t o b e collecte d a s a secondar y electron , usin g th e procedur e described above . Figure 8.6 A and B shows the program in operation for a 2500-A foil of silico n at 100 keV. In Fig. 8.6A the fast secondary generation is switched off and the display shows, as usual, the incident electro n trajectories . I n Fig. 8.6B , FSE generation has been turned on and the display now shows the corresponding FS E trajectories. Th e distinctive features i n the FSE plot are the trajectories o f som e of the high-energ y secondaries tha t leav e almos t norma l t o th e origina l inciden t bea m directio n an d then travel through the specimen . Onl y a few secondaries hav e sufficient energ y to travel a great distance, but it is worth noting that the spatial distribution of those that do is quite unlike the usual cone into which the incident electrons spread . An FSE is just a s likel y t o b e forme d a t th e entranc e surfac e o f th e foi l a s i t i s a t th e exi t surface, s o th e FS E produc e a n approximatel y cylindrica l distributio n abou t th e beam axis . This result is of some significance, as discussed below. The low-energy FSE produce d d o no t travel , s o thei r location s mar k ou t th e trajectorie s o f th e incident electrons. Th e use of the model is not restricted to thin foils, o f course; but
Figure 8.6. Primar y ( A an d fas t secondar y (B ) electro n trajectorie s i n silico n a t 10 0 keV.
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 e computation tim e fo r a bul k specime n ca n b e undesirabl y long . Wher e possible , therefore, i t is desirabl e t o use a thin rathe r tha n a bulk sampl e a s th e 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 th e electron range . I n thi s cas e a substantial fractio n o f the inciden t electron s ar e stil l transmitted, thu s savin g 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 certainl y not perfect—estimat e o f what would be expecte d fo r a bulk sample . The program print s ou t the yield of secondary electron s tha t is generated. Th e magnitude of the value depends o n the element, the beam energy , and the assumed thickness 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 e usually between 0.1 and 1 . This is as would be expected, sinc e the high-energy FS E are not "secondary electrons " In the usual definition of the term (i.e. , havin g ener gies between 0 and 50 eV). This model is therefore only of limited value in predicting 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 l distribution 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 o backscattering occurs , the n th e FS E tha t ar e generate d ar e a mode l o f th e SE 1 electrons. Usin g th e procedure describe d above , w e assume that thos e FSE that do not reac h th e surfac e by th e tim e thei r energ y ha s droppe d belo w 50 0 e V subse quently diffuse, followin g the straight-line approximatio n [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 t beam point can then be determined b y dividing the surfac e into concentri c ring s of radius r n. An FSE tha t is tracked t o som e radial coordinat e r from th e beam poin t and is at a depth z beneath th e surface then contributes an SE yield proportional t o exp(-z/escape) t o th e annulu s n, wher e r n _ 1 < r < r n. Figur e 8. 7 show s th e trajectories o f the FSE i n a 50-A foi l o f aluminum at 20 keV an d the correspondin g SE surface yield profile. The SE1 signal can be seen to be localized wit h a full width at hal f maximu m intensity o f about 3 nm, wit h the tai l o f the profil e fallin g away rapidly outsid e that limit. Th e width of this distribution doe s depen d somewha t on the material and the beam energy, since at low energies th e incident electrons ca n be elastically scattered close enough to the surface to broaden the distribution, although the lower probability of producing higher-energy FS E will also reduce the intensity of the tail (Joy, 1984) . I t is the width of this profile that sets an ultimate limit to the resolution 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 e thickness o f the target but then saturates at a thickness that is typically 50 to 60 A. In the example shown , the SE 1 signa l reaches abou t half o f its maximum value for a foil 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 s approximately linearly proportional t o the thickness. This rapid variation in SE yield
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 emission profile (b) .
is exploited in high-resolution SEM (Joy, 1991). A continuous film of chromium or vanadium with an average thickness of about 1 0 A is deposited over the sample. In regions where the surfac e is flat, the SE yield from th e film wil l be that appropriate to the nominal 10- A thickness, but in areas wher e there is surfac e topography, the effective thicknes s of the film is increased i n the beam direction a s the film rises up over an edge and thus produces an increase i n the SE yield. This "mass-thickness" contrast i s a n important technique i n extending the performance o f the SEM . As can be deduced fro m a n examination of Fig. 8.6, including the FSE contribution makes a very significant change in the way in which energy is deposited i n a material. Fo r a thi n foi l irradiate d b y high-energ y electrons , then , i f th e FS E ar e
156
MONTE CARL O MODELING
Figure 8.8. Variatio n of SE 1 yield wit h 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 have high spatial resolution under these conditions. But if the FSE are included, then the situation is seen to be different. Th e FSE spread the energy deposition perpendicula r to th e bea m directio n int o a volum e tha t i s approximatel y cylindrica l an d thu s independent o f the foi l thickness . Becaus e the FSE have, on average , significantl y less energy than the primary electrons, their stopping power is much higher and they deposit mor e energ y into the target. Thus, althoug h th e yiel d o f FSE i s small , the integrated contributio n o f the FS E to th e energy depositio n ma y represent 50 % o r more o f th e tota l (se e Joy , 1983 , fo r a detaile d discussion) . Figur e 8. 9 show s contours o f equal energy depositio n compute d for the cas e of an unsupported thinfilm resist irradiated at 10 0 keV. The change in both the absolute magnitude and the distribution of the energy deposition when the FSE are included is very evident. It is this effect whic h ultimately limits the spatial resoluton of electron bea m lithography and x-ray microanalysis at high beam energies, since the average sideways spread of the FS E wil l become greate r tha n the conventional conical broadening o f the incident 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 y describes th e experimental behavior of SE without worrying about any of the actual
SECONDARY ELECTRON S AND IMAGING
157
Figure 8.9. Energ y contours i n 1000- A PolyMethyl Methacrylate film expose d by 100-ke V beam. Dotte d line s are corresponding contour s for elastic scatterin g only .
detail o f the generation o r cascade processes . A s before, w e have to consider bot h the generation o f the secondaries and their subsequent transport to the surface of the specimen. Salo w (1940) and Bethe (1941) independently suggeste d that the rate JVSE at whic h S E wer e bein g produce d pe r uni t length o f th e trajector y a s a n electro n traveled through the specimen wa s directly proportional to the stopping power of the electron a t that point. Tha t is ,
where e i s a constan t fo r a given material . Thi s assertion , whic h i s equivalen t t o saying tha t a fixe d amoun t o f th e energ y dissipate d i n a soli d i s availabl e fo r S E production, is found experimentall y t o be a good approximation . Not e that if incident 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 e correct—i.e., th e S E yields unde r electro n an d ion bombardmen t ar e i n th e sam e ratio a s the stoppin g power s o f the electrons an d ions i n the target (Schou , 1988) . Since i n any Monte Carlo simulatio n the stopping power is known for each portion of th e trajectory, Eq. (8.26 ) immediately give s a n expression fo r th e instantaneou s rate o f S E generation . As before , i t wil l b e assume d tha t th e "straight-lin e approximation " (Dwye r and Matthew, 1985) ca n be used as a description of the escape o f the SE from thei r
158 MONT
E CARL O MODELING
point of generation. I n this model, an isotropic sourc e of strength N a t some depth z beneath th e surfac e would lead t o an emission /(-/, z) at the surface , wher e
where y i s the angle of emission relativ e to the surfac e normal. I f effects o f refraction and reflection on the transmission of SE through the surface are ignored and the SE are assumed to be at zero concentration a t the surface, the n the average escap e probability p(z) fo r a secondar y electro n produce d a t dept h z wil l b e (Wittr y an d Kyser, 1965 )
where A is a constant of order 0.5 (since half of the SE will move toward the surfac e and half wil l move away) . The total secondar y electro n yiel d 8 is then
where th e integral i s evaluated fro m th e surfac e (z = 0 ) to the en d of the electro n range ( z = R), assumin g tha t th e inciden t electro n travel s norma l t o th e surface . Thus combining Eqs. (8.26 ) an d (8.28) give s
If suitable analytical models ar e used for the electron range and the stopping power, then Eq . (8.30 ) ca n b e evaluate d t o giv e a n expression fo r th e secondar y yiel d i n terms o f th e parameter s E, -y , e (e.g. , Salow , 1940 ; Dekker , 1958) . Suc h a result , although obviousl y a n oversimplification, ca n provide usefu l insight s int o both the theory 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 o simulation wher e both the instantaneous stopping powe r and the dept h of the incident electron ar e known at all times, then the model is freed fro m th e limitations of the analytical approximation s an d becomes bot h mor e accurat e an d more flexible . Either of the two basic models discussed in this book can be used, although— since S E effects ar e most usually of interest i n bulk specimens—the plural scattering model is usually the most convenient. Incorporatin g Eq . (8.30) into the model is simple. Afte r th e usual computation of the coordinates o f the trajectory , end-poin t
SECONDARY ELECTRONS AND IMAGING
159
coordinates xn, yn, zn, then num_sec, or the number of SE produced along that step of the trajectory, can be found from Eq. (8.26) in the form num_sec =
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 the production 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 procedure
sei_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}
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 ) else se_yield: =se_yield + 0 . 5 * n u m _ s e c * ( m _ f _ p / ( z n - z ) ) * ( e x p < - l c ) exp(-ld)); end;
If the incident electron is backscattered during a step, then the above procedure is not used. Instead, the escape probability is assigned to a random number RND to avoid the necessity of calculating the length of the exit portion of the trajectory that lies within the sample. Since the number of BSE is small, the error produced by this approximation 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, a loop that changes the incident beam energy through a range of values, so that the variation of SE with energy can be computed. To run the program, it is necessary to know the values of the parameters e and X. 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 and then attempt to fit these data points by supplying the simulation with trial values of e and X. If a good fit can be obtained, then the validity of the model is established and appropriate values of e and X have been established. (8 + TI) can readily be measured in the SEM by using a calibrated specimen current amplifier and a Faraday cup. 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
SECONDARY ELECTRON S AN D IMAGIN G 16
1
In order to obtain goo d results , it is necessary t o ensure that the specimen doe s not recollect electron s scattere d fro m the chamber walls or pole piece (e.g. , Reimer and Tolkamp, 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 these materials varies only slowl y over the energy range, the variation in yield i s mostly due t o the chang e in the S E component. In eac h case the profil e ha s a generally similar form, in which the yield rises to a value of units or greater at around 1 keV. An initial guess for the value of X can be obtained b y using the Salow (1940) result that the SE yield is a maximum when the electron rang e R = 2.3X , where R is evaluated using th e norma l Beth e expressio n (se e Chap . 4) . Estimatin g X in thi s wa y an d initially setting e to 50 eV then allows a trial yield curve to be computed. The quality of fit can then be iteratively improved by adjusting the two parameters. The effects of the choice of X and e on the yield profile are quite different, s o the determination of the bes t fi t value s is unambiguous . Table 8. 2 gives X and e values for a variety of commonly encountere d 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 conside r th e physical significanc e of these tw o quantities, e can be considered a s being related to the energy required the initiate the SE cascade. This energy will be relatively high, certainly some way above the energy at which the cross section of collisions betwee n an energetic electro n and a conduction electron i s a maximum—which, for a metal, is the plasmon energy. Thus the values of e deduced from th e fitting process , which are mostly 50 eV or higher and so two to 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 electron cannot b e "absorbed, " implies tha t i t represents th e averag e distance a SE travels before undergoing a scattering event in which it gives up sufficient energ y to make its subsequen t escap e impossible . X , which i s typicall y o f th e orde r o f 1 nm fo r energies o f a fe w hundre d electro n volts , fall s t o a minimu m value fo r energie s around 3 0 to 5 0 eV an d the n rises agai n becaus e ther e ar e n o larg e cross-sectio n inelastic scatterin g processes availabl e (Powell, 1984) . Averaging the inelastic MFP over the energ y distributio n o f the secondar y cascade predict s value s of X that ar e quite close t o those determined b y the fittin g procedure . Thu s it can be conclude d that th e value s o f e an d X derived fro m a fi t t o experimenta l dat a ar e physically reasonable an d consistent wit h the cascade mode l fo r S E production. 8.4.1 Application of the model With appropriate values of e and X substituted in the program SE_MC, it is possible to model some important aspects of the behavior of SE. For example, it is instructive to examin e ho w th e secondar y yiel d coefficien t 8 varie s wit h the angl e o f bea m inclination 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 -
Figure 8.10. Experimenta l total electron (secondary and backscattered) yield s for C, Cu, Ag, and Au.
162
Figure 8.10. (continued)
163
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
mE
mE
2
Carbon 12 Aluminum 6 Silicon (xtal ) 7 poly-Si 17 Chromium 12 Copper 12 Molybdenum 10 Silver 18 Gold 7
5 5. 0 2. 0 3. 5 11. 5 2. 5 2. 0 2. 0 3. 5 1.
5 1. 5 1.6 0 1.2 0 1. 5 1.1 5 1.1 0 1.2 5 1. 0 1.
8 1. 7 0.4 0 0.5 1 0. 6 0. 8 0. 4 0.6 0 1. 1 0.
0 3. 0 1.9 0 1.4 9 2. 6 2. 9 2. 5 3. 2 4. 8 4.
0 5 5 5 5 8 7 0 6
SiO2 4 GaAs 7 Si3N4 11 PMMA 7
0 5. 0 5. 0 4. 0 5.
0 2. 0 1. 5 1.3 0 1.
4 0. 2 0. 7 0. 1 0.
7 3. 8 3. 8 1. 4 0.
5 0 1 6
SiC 6
0 3.
5 1.
6 0.
6 1.
A12O3 5
0 3.
0 2.
6 0.
6 4.
6
0
malized to the yield at normal incidence, fo r silicon for a number of different bea m energies. A t accelerating voltage s abov e 5 kV, the yield variatio n with X is in clos e agreement wit h the measured secan t (6 ) behavior (Kanter , 1961) . A s the energy i s reduced, however , th e variatio n o f yiel d become s les s pronounced , an d a t abou t 0.75 ke V a condition i s reached wher e the yield goes throug h a maximum and then
Figure 8.11. Compute d variatio n o f S E yiel d wit h tilt angl e an d bea m energy .
SECONDARY ELECTRONS AND IMAGING
165
declines wit h a further increas e i n tilt. The decreasing sensitivit y o f the secondar y yield 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 a surface recorded a t low beam energies mus t be interpreted rathe r differently t o that of the same area recorded at , say, 30 keV. The explanation for this effect i s seen to be tha t at low energie s th e value s of X. , which determines th e escap e o f th e SE , i s comparable with the inciden t electro n range . Thus the majorit y o f SE generated in the specime n wil l always escape regardles s o f the orientatio n o f the surfac e t o th e beam. 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 e electron beam. If the incident beam current is 7b, then current balance at the surfac e requires that
where 7 SC is the specime n curren t flowing to (o r from) ground . I f the sampl e i s a n insulator, then 7 SC = 0 and s o charging will occur (i.e., current balanc e will not be possible) unless (T| + 8 ) = 1 . In general, there may be two incident beam energies at which this condition ma y be satisfied, an energy El, which is typically of the order of 5 0 to 15 0 eV, and a higher energ y E2, whic h is usually in the range 50 0 eV to 2 keV. If the value of E2 for a particular material is known, then operating the SEM at this energy will allow the sample to be examined without charging artifacts even though it is a nonconductor. E2 can readily b e found fro m SEJVIC , since bot h the secondary an d backscattere d yield s ar e computed. Table 8. 1 show s the E 2 values computed i n this way. These ar e i n good agreemen t wit h experimenta l determina tions (Joy , 1987b) . It is also instructive to apply the model to the case of a specimen tilte d through some angl e 9 relative t o th e inciden t beam . Both the S E and th e BS yield ca n b e expected t o rise as 6 is raised, s o E2 will also be expected t o increase. Figur e 8.12 plots E2 as a function o f 0 for a several different materials . In each case E2 rises, but the effec t i s les s pronounce d for material s wit h highe r atomi c numbers. To a firs t approximation, we find tha t E2(6), the value of E2 computed for angle of incidence of G , is given by th e relatio n
where E2(0 ) i s th e valu e o f E 2 a t norma l incidenc e (Sugiyam a et al. , 1986 ; Joy , 1987b; Reimer, 1993). While thi s result overestimates th e variation of E2 for highatomic-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 goo d example o f a result tha t canno t b e produced b y a genera l analytica l mode l o f th e beam interaction .
166
MONTE CARLO MODELIN G
Figure 8.12. Compute d variation of E2 wit h 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 y backscattered (BS ) as compared with primary electrons [Eqs . (8.16) and (8.17)], can also be determined from this model. The procedure is to compute SE and BS yields as a function o f specimen thicknes s 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 S E yield vs. B S yiel d gives p value .
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 carry out this computation, then the sample thickness must be at least 5 % of the electro n range at the chosen beam energy, so that the simulation includes at least two to three steps as a minimum.) (3 values are found to be typically in the range 2.5 to 4. This i in goo d agreemen t wit h th e value s measure d b y Shimiz u (1974 ) bu t somewha t lower 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 e general question : Fo r a specime n o f a give n chemistr y an d geometr y form , wha t would b e th e for m o f th e secondar y electro n lin e profil e o r imag e tha t woul d be produced i n a SE M under a specifie d se t o f operatin g conditions ? Th e abilit y t o perform thi s job i s o f importanc e in the fiel d o f SE M metrology (Poste k an d Joy, 1986) as well as being a tool for the detailed interpretatio n o f normal SEM images. The basic requirement is to be able to compute the SE (and usually the BSE) signals at selected points on a surface of arbitrary shape and composition. The first problem is that of defining the geometry of the specimen itself. The mathematical description of a completely genera l specimen topograph y is possible throug h the use of fracta l representations, but fortunately this level of complexity is not normally required. In the case of the metrology application, where the specimen is a trench or an interconnect on a substrate, the specimen can be adequately define d as being bounded by a number of straight-line segments that fix the geometry. Computing the BS signal in this case is then relatively straightforward. First, we test whether or not the electron is, a t this time, inside o r outsid e o f th e specime n surface . If i t i s outside , then it s direction 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 is thus counted as a BSE. If it is traveling downward, then it will eventually impact the specimen agai n and be rescattered; suc h electrons ar e thus not counted . Determining the SE yield requires a calculation of the escape probability of the secondaries generate d within the specime n tha t takes into accoun t the for m o f the surface geometry. The first ste p 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 regio n bounde d b y mor e tha n on e surface—for example , when it is close t o an edge o r in a raised region suc h as an interconnect line—th e SE escape probability p ca n be written to a first approximation a s
where
168
MONTE CARL O MODELING
Figure 8.14. Geometr y fo r determinatio n of S E yield.
and the % an d si2 are, respectively , the perpendicular distance s fro m th e start and finish o f th e trajector y ste p t o th e /t h surface . I t i s clea r tha t thi s approac h i s a n oversimplification becaus e i t doe s no t tak e int o accoun t th e relativ e soli d angle s subtended a t the S E generation poin t b y each o f the exit surfaces . As a result, the escape probabilit y compute d fro m Eq . (8.35 ) i s a n overestimat e a s compare d t o values obtaine d b y direc t numerica l integratio n (Joy , 1989a ) i n region s tha t ar e close t o edge s an d corners. However , becaus e th e exponentia l term s deca y i n a distance of order \, th e region tha t is, in error i s narrow (i.e., a few nanometers) in comparison wit h the overal l exten t o f th e simulate d profil e o r imag e (typicall y a micron o r more) an d s o does no t usuall y present a problem. I f highe r accurac y is required i n thes e regions , the n th e value s o f th e directl y compute d escap e 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 E signal lin e profil e simulation , using th e procedure s discusse d i n thi s section . Th e program is based on the plural scattering code originally developed in Chap. 4. This speeds u p th e computation, whic h i s desirable, sinc e i t i s necessary t o d o 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 0 points to produce a useful profile. On the other hand, the inherent samplin g scale of the 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 straightforward and provide s a worthwhile improvement in resolution, bu t a t th e cos t o f a greatly increased 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 place d o n a fla t substrate , although both th e siz e an d shap e ca n readil y b e change d b y obviou s modification s to th e code. The materials of the structure and the substrate, the height of the structure, and the angles made by the walls of the structure to the vertical can all be determined by the user . Th e program compute s an d plots th e secondar y an d backscattered signa l profile a t 20 different pixe l points across the structure and substrate. Because of the symmetrical geometry, all of the pixels are placed in the positive half-space relative to th e cente r o f th e structure . The compute d dat a ar e the n reflecte d throug h th e origin of coordinates Y = 0 to yield a complete profile. To make the simulation more realistic, th e incident electro n bea m i s assume d to be Gaussian in profile and of a
SECONDARY ELECTRONS AND IMAGING
169
Figure 8.15. Geometr y for computatio n 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 of 20 elements and x_val y_val are Gaussian distributed random numbers with a variance 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 begin repeat vl: =2 . 0"random-1.0; v2 : =2 . 0*random-l. 0; r : = (vl*vl) + (v2*v2) ;
value}
{pick a number} {pick another number} {radiu s of unit circle}
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: =v 2 * f a c; {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 } g l i s e t : = 0 ; {rese t th e flag} end;
end;
z_val ca n no w b e determine d fro m a knowledg e o f th e specime n geometry . A structure define d by it s height an d widt h can have two form s (Fig . 8.16)—on e o which can be called "overcut" and the other "undercut." If the wall-angle is set to be negative, then the structure is undercut and a Boolean variable (i.e., a variable that can have two values, true o r false) i s set to false . {compute th e parameters necessary to describe the structure} tn: =s i n ( w a l l _ a n g l e / 5 7 . 4 ) / c o s ( w a l l _ a n g l e / 5 7 . 4 ); {Pasca l ha s no tangent} ch: =cos ( w a l l _ a n g l e / 5 7 . 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: =f a l s e; {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.
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 y y_pos [m] ; s o given this value, the geometry o f the structure z_va l ca n now be determined. y-val: =y_pos [m ] + (probe_size*GasDev ) ; {Gaussian beam profile] i begin if y_val > = tw the n {it misses the top edge] z_val:=0.0 else 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 progra m i s straightforward and requires n o detailed comment . Th e longest section is the application of Eq. (8.35) to compute the SE yield. The program proceeds by locating the position o f the electron i n one of four possible regions—in the 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 computing the possible exi t paths. One small refinement is to consider th e possibility o f the specimen recollecting som e of its own emitted electrons. Ever y emerging BS E (e.g., from the side walls of the feature) is checked to see if it has a component of velocity towards the substrate . If it does, the n it is allowed to reenter th e specimen and the program continue s t o track it 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 1 jjim wide and 1 urn high with walls at +5 ° t o the vertical (i.e. , a n overcut structure) placed on a silicon substrat e and for beam energies of 2,10, and 30 keV. The profiles demonstrate how the "image" of this simple object is affected b y the choice of beam energy. At 2 keV, both the SE and BSE line profiles reveal the edges of the structure clearly. I n the S E image, th e simulatio n show s that the lin e woul d appea r slightl y bright above background, with sharp white edges. Th e BS profile shows the aluminum lin e and the silicon substrat e at about the same brightness, bu t the edges o f the feature ar e marked by bright band s wit h a width of the orde r o f the incident bea m range (i.e., abou t 500 A). At 1 0 keV, the SE profile remains muc h the same, but the
172
MONTE CARL O MODELING
Figure 8.17. Compute d SE and BSE signal profiles across an aluminum bar 1 fun wid e 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 of magnitude as the size of the feature. The beam range is now of the order of the width of the feature, so the whole line is bright abov e background with no clearly defined edges/ Note also tha t the background intensit y from th e silico n substrat e dip s as it approaches th e edg e o f th e featur e becaus e o f electro n penetratio n beneat h th e structure. 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 BSE profile because the thickness of the line is now a small fraction of the electron range.
SECONDARY ELECTRONS AND IMAGING
173
A comparison o f the various line profiles wit h the real cross-sectional geome try of the structure shows that determining th e position of the top and bottom edges from an y of the traces is difficult o r impossible. Hence, althoug h it is easy to image a micron-scale device , "measuring " th e profil e wit h an y accurac y usin g th e S E or BSE signal s i s a muc h mor e challengin g tas k becaus e o f th e constantl y shiftin g relationship betwee n th e real an d apparent edge positions. On e o f the most usefu l applications o f suc h simulation s a s these, therefore , i s t o tr y an d devis e rule s that will allow experimental lin e profiles t o be interpreted in such a way that the width, height, an d wall angl e of the structur e fro m whic h they came ca n be deduced (see , e.g., Poste k an d Joy, 1986) . A comparison of these computed profiles and corresponding experimenta l dat a shows that the qualitative agreement i s excellent, wit h the simulations predicting al l of th e feature s o f th e experimenta l profiles . However , th e leve l o f quantitativ e agreement is not always so encouraging, for a variety of reasons. A key reason is the behavior an d efficiencie s o f th e S E an d BS E detector s use d i n th e experimenta l system. 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 the irradiated area , o n the bias applied t o it, and on the presence an d magnitude of any local charging . Thes e consideration s ca n drasticall y modif y th e detai l o f th e S E profile. Unfortunately , computing the efficiency o f the SE detector requires a determination of the electrostatic field distribution s in the SE M specimen chamber , and this is a lengthy task (Suga et al., 1990 ; Bradle y and Joy, 1991 , Czyzewsk i and Joy, 1992). I n addition , i n complex structure s such as parallel array s of closel y space d lines, there is a possibility that emerging BS E will be recollected b y some other part of the structure, generating SE at the point of entry and during the subsequent travel (Kotera et al., 1990) . Detaile d calculations , therefore, requir e testin g for the possi bility o f recollection b y tracing th e path o f th e BS E a s they leave . Expanding thes e line-profil e computation s t o th e simulatio n o f a complet e image is , in principle, straightforward , although the time required t o obtained ade quate statistic s migh t be dauntin g on an y but th e fastes t computers . Nevertheless , with the growing interest in quantitative image interpretation (e.g. , for microdimensional metrology), and for the comparison of images between, say, the SEM and the scanning tunneling microscope (STM) , this is likely t o be an important applicatio n and extensio n o f th e techniques discusse d above .
9
X-RAY PRODUCTION AND MICRO ANALYSIS
9.1 Introduction The process of fluorescent x-ray generation in a sample by electron bea m irradiatio n makes it possible t o perform a chemical microanalysis of small (micrometer siz e or less) region s o f a specimen . However , i n orde r t o obtai n quantitativ e data , i t i s necessary t o b e 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 l studies of Monte Carlo modeling by Bishop (1966). Although, it many cases, simple analytical 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 s offer a genera l approac h t o th e microanalysi s o f a n arbitrar y specimen . I n thi s chapter w e examin e x-ra y production , bot h characteristi c an d continuu m (Bremsstrahlung), i n thi n foil s an d i n bul k specimen s usin g th e Mont e Carl o model s previously developed .
9.2 The generation of characteristic x-rays The production of characteristic x-rays along a step of an electron trajectory can be calculated i f th e cros s sectio n fo r x-ra y production i s known . Typically th e Beth e cross 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 l ionization energ y i n kil o electro n volts , U is th e overvoltag e E/EC, bs an d cs ar e constants, an d a the n ha s th e unit s o f ionization s pe r inciden t electron s pe r atom/cm2. Fo r example , fo r th e K shell , bs an d 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, the appropriate constant s an d range o f applicabilit y ar e les s wel l establishe d (Powell , 1976). In some cases, for example, the production of x-rays in a thin foil, the energy of 174
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 the case of bulk specimens, i t is clear that, since the energy of the electron decrease s as it travels through the specimen, ultimately the overvoltage will no longer satisfy th e condition U s4 and the predicted cross section may become inaccurate. Alternativ e cross-section model s ar e available , fo r exampl e Casnat i e t al . (1982) , whic h ar e valid fo r lo w overvoltages , an d thes e shoul d b e considere d fo r th e mos t accurate work; 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 s nearly universa l use i n all 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 th e trajectory i s then
where NA i s Avogadro's number (6 X 1023 atoms/mole), A is the atomic weight, p is the 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 e constants 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 t o the characteristic x-ra y signal used for microanalysis, there is also a continuum, or Bremsstrahlung, x-ray signal generate d by th e slowin g down of the electrons in the coulomb field o f an atom. By analogy with Eq. (9.2) , we can write the continuu m yield per inciden t electro n int o a unit steradian 7 CO as
where Q is the continuum cross section. The continuum radiation, unlike the characteristic line , i s anisotropicaly emitted, being peaked abou t the forward direction of travel o f the electron . I n considerin g Bremsstrahlung production i n bulk samples , this effect i s of little consequence because it is averaged ou t by the plural scattering of the electrons; bu t in the case o f thin films, where the incident electron s ar e only scattered throug h smal l angles , th e polarizatio n an d directivit y o f th e continuum must be properly accounte d for. A simple cross section for continuum production can be obtained by combining
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 e maximum energy that can be given up by an incident electron is equal to its kinetic energy E0, numerically equa l to the beam voltag e V 0; thus the highest energy tha t can appea r i n th e continuu m spectrum i s E0, the so-calle d high-energ y o r DuaneHunt limit. Second , for thin specimens i t is foun d tha t the continuu m energy in an energy interval A £ is about constant (Compton an d Allison, 1935 ) fro m zer o up to the high-energy limit. Thus, the fraction of the total emitted continuum energy Er in the 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 f continuum productio n i s define d as th e tota l continuu m energy i n th e rang e fro m near 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 y divided b y th e energ y lost . Kirkpatric k an d Wiedman n (1945 ) showe d fro m th e theory o f Sommerfeld (1931) that this efficiency wa s 2.8 X 10~ 9 Z V0, where V0 is the bea m voltag e i n kilovolt s an d Z i s th e atomi c number . Th e tota l continuu m energy i s thu s
The fractio n o f thi s quantit y i n th e energ y interva l A E the n give s th e numbe r o f photons 7 CO of energ y E; i.e. , th e numbe r of photons i n th e energ y interva l A E is ET.AE/(£ EO). S o
In the Monte Carlo simulation , dV is simply the energy loss occurring alon g a given ste p o f th e trajectory , a quantit y that i s evaluate d eithe r directl y fro m th e stopping 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 m intensity a t some energ y £ i n the energy interval A£ directly . This simpl e expression produce s 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 h isotropic emission and uniformity in energy distribution. More accurate and detailed models are available, the most widely used of which is that of Sommerfeld (1931) as modified b y Kirkpatric k an d Wiedman n (1945) . Sommerfeld' s mode l assume s a pure Coulomb field abou t a point nucleus ignoring screenin g effect s an d represents the scattered electrons a s plane waves. Stricly speaking, this theory is valid only for low electro n energies , wher e relativisti c effect s ca n b e neglected . Kirkpatric k an d Wiedmann (1945 ) gav e a n algebrai c fi t t o th e Sommerfel d theor y tha t correctl y accounts fo r th e polarizatio n o f th e Bremsstrahlung an d i s more easil y compute d numerically. The algebra is messy and will not be reproduced here , but a routine for the evaluation of the Kirkpatrick an d Wiedmann expression base d o n that given by Statham (1976 ) will be give n later i n thi s chapter.
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 y microanalysis. 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 th e composition o f small precipitates or the composition profile at a boundary. In this kind of situation, the specime n is thin (typically 30 0 to 150 0 A ) and the incident bea m energy i s high (10 0 to 200 keV). A s ca n b e see n b y runnin g th e SS_M C progra m (Chap . 3 ) for thi s typ e of condition, the majority o f electrons pass through the sample unscattered because the specimen 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 bea m energ y i s usually much greate r than th e excitation energ y of the x-ra y line o f interest, th e volum e associated wit h x-ray generatio n i s identical wit h that associated wit h the electron scattering , since the ionizatio n cros s sectio n wil l b e essentiall y constant . Sinc e th e x-ra y spatia l resolution is commonly defined as the radius of the volume within which 90% of the emitted x-ray s are generated, i n this approximatio n th e resolution ca n be take n as being th e radiu s withi n whic h 90 % o f th e transmitte d electron s emerg e fro m th e bottom surface of the foil. Incorporation of this into the SSJVIC program is straightforward. If an electron is determined as being transmitted (i.e., zn > thickness of the foil) then the length of the exit vector is first found and the exit radius from the beam axis (x = y = 0 ) i s computed. The botto m surfac e is divide d int o an arra y of 10 0 annular rings, radius [ 0 . . 9 9 ] , o f constant width scale where scale is set to 1 0 A. The exit radius is converted t o give the number of the annular ring (0 to 100) 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
178
MONTE CARLO MODELING
At the end of the desired number of trajectories, the beam is found by starting from the center annulus (r_val = 0) and counting out until 90% of the total number of transmitted electrons have been included. The radius at which this occurs is then the 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. We have 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 do begin dum:=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 appropriate length} 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 compares with the simple analytical estimate given by Goldstein et al. (1977) for the case of a 100-keV beam incident on a foil of copper. It can be seen that the two models predict the same type of behavior with increasing thickness, even though they give somewhat different values for the broadening. This is not surprising, because the analytical model is estimating the average exit diameter on the assumption that each electron is scattered just once, at the midpoint of the foil, and this figure is not directly related to the 90% definition used in the Monte Carlo case. In addition, once the foil becomes thick enough for plural scattering to be significant, the value estimated by the analytical model is no longer valid. It is clear, in any case, that a single "beam broadening" number cannot faithfully represent the actual experimental situation. While it provides a guide as to the resolution to be expected, it cannot say what effect this resoluton might have on, for example, a measured composition profile. For that kind of problem, it is necessary to use the actual x-ray generation profile of the beam, again on the assumption that this is directly related to the distribution of trajectories of the incident electrons. The program AEM_MC on the disk provides this ability. It is essentially the same single scattering program, the only modification being that the incident electron beam is
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 Goldstein et al . (1977) equation.
assumed t o be a Gaussian distribution o f som e given ful l widt h at half maximum height (FWHM) . Basically, the first par t of the procedure i s identical t o that given above, so that the number of electrons travelin g through—and hence the number of x-rays produced in a given annular ring—is determined as before. Imagine now that the beam i s placed a t a distance X fro m some tes t poin t i n the sample. When X i s very large and negative, no x-rays will be produced at the test point, but the number will increas e a s X i s reduced, reac h a maximum when X = 0 , an d then fal l away again as X becomes larg e and positive. A plot of the integrated x-ra y generation in the positive half spac e x > 0 as a function o f the incident beam position X give s a S-shaped profile (fig. 9.2), which rises from 0 % to 100 % of the total x-ray generation. I n a manner analogou s t o tha t use d fo r specifyin g the prob e diamete r o f a n electron beam, the distance travelled in raising the x-ray signal from 10 % to 90% of its maximum value can be called the x-ray spatial resolution. The program plots the profile 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 as to 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 s dominated by the Gaussian shape of the probe, since electron scattering is small and the profil e i s a standar d erro r functio n (o r "erf" ) curve . A s th e foi l thicknes s increases, however , th e profil e change s shap e an d i s compose d o f tw o distinc t regions, (1) a central region that is still approximately the error function, surrounded by (2) broad tail s as a result o f electron scattering . The effect o f this particular beam profile on an experimental measurement can
180
MONTE CARL O MODELIN G
Figure 9.2. Variatio n of integrate d 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 i n which two materials A and B are in contact at some interfac e and in which B is diffusing int o A, and the case of an interface region o f some width W o f material B surrounded by material A, again allowing for the diffusion o f B into A. I t i s assume d i n eithe r cas e tha t th e electro n scatterin g power s o f A an d B ar e sufficiently simila r tha t th e for m o f th e electro n bea m profil e i s no t significantl y altered. C(B) X the concentration o f B in A a t some distanc e x fro m th e interface , i s given th e form :
Figure 9.3. Interfac e geometrie s fo r thin-fil m x-ra y program .
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 n copper, with L = 3 0 A.
where L is a characteristic diffusio n length . I f L is specified , the n th e for m o f th e composition profile that would be experimentally measured acros s the chosen interface can be found by numerical convolution of the computed beam profile with the 0 '.en for m o f the interface . Becaus e the procedures fo r doing thi s are straightforward, they are not given here, but they can be studied in the source code on the disk. Figure 9. 4 show s ho w the "real " compositio n profile an d the predicte d measure d profile would compare for a 1000-A-thick copper film an d a 25-A beam at 10 0 keV for th e case where the interface region wa s 1 0 A wide (e.g., a grain boundary) and the diffusion lengt h L is 30 A. If experimental data are available from a n analytical electron microscope , th e values of L and W can be obtained by iteratively fitting the computed an d measure d profiles . Th e mode l ca n readil y b e extende d t o othe r geometrical situations . 9.4.2 The effect of fast secondary electrons In the previous chapter, the generation of fast secondar y electrons (FSE ) was incorporated int o a Mont e Carl o program . I t wa s note d tha t thes e FSE , whic h hav e energies u p to half that of the incident beam, tended to travel almost normal to the original directio n o f the inciden t beam. Clearly , i f these FS E ca n generate x-rays , this coul d adversel y affec t th e spatia l resolutio n o f microanalysis . Equatio n (9.3 ) shows tha t the yiel d o f x-ray s by a n electro n o f energ y E i s proportiona l t o l/U, where U is the overvoltage E/Ek. Conside r then the case of oxygen x-rays (Ek = 53 0 eV) 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-ra y ionizatio n b y th e FS E i s 5 0 time s higher 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
182
MONTE CARLO MODELING
electron in a hundred generated an FSE, 50% of the measured x-ray yield could be coming from secondaries rather than the incident beam. Since, as we saw, the spatial distribution of the FSE is also quite different from that of the incident beam, it is clear that the effect of including fast secondary production could be significant. To examine this effect, the Monte Carlo model must be modified to include x-ray generation using Eq. (9.3) for some arbitrary x-ray energy. The code for this is straightforward: 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, a t _ r : i n t e g e r ; begin x_ray_yield: =l n ( e n e r g y / E _ c r i t ) / ( e n e r g y * E _ c r i t) ; x_ray—yield: =x_ray_yieId*stepsize; {assign X-ray production to a box at given radius and depth} a t _ z : = r o u n d ( ( z + zn) / (2*step ) ) ; {depth } at_r: =round(sqrt ( ( x + x n) * ( x + x n) - ( y + y n ) * (y+yn) ) / ( 2 * s t e p ) ) ; {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 array} x_ray_gen[at_z,at_r] : =x_ray_gen [at—z , at_r] +x_ray—yield;
into
end;
In this example, the computed x-ray yield is deemed to have occurred at a point defined 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. The box size can be chosen to be any value, but a convenient choice is often to make step equal to one-fiftieth of the estimated electron range. The variable stepsize passed to the procedure is the length of the trajectory step. If, on this step, the electron is either transmitted through or backscattered from the specimen, the stepsize must be modified accordingly. This can be done exactly—e.g., the actual distance 11 traveled within the specimen for an electron that is backscattered out of the 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 approximated putting the stepsize equal to stepsize*RND. The insertion of the procedure into the FSE_MC code is obvious and needs no detailed comment. In either the primary loop, or in the FSE loop, the x-ray genera-
X-RAY PRODUCTION AND MICROANALYSIS
183
Table 9.1 Effect of FSE on X-ray resolution Line Used
Mode
IronKa N
o FSE 6 With FSE 6 o FSE 6 With FS E 6 o FSE 6 With FSE 7 o FSE 6 With FSE 8
Silicon K a N Oxygen Ka N Carbon K a N
Resolution
X-ray Yield
0A— 4A + 0A— 5 A +3.1 0A— 5 A +6.0 0A— 5 A +11.2
1% % % %
tion can be computed a s soon as the new coordinates xn,yn,zn have been calculate d and th e subsequen t behavio r o f th e electro n ha s bee n determine d (i.e. , doe s th e electron remai n i n the sampl e o r is it transmitted o r backscattered?). Thu s z n : = 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 FS E production i s ofte n quit e significant. Table 9. 1 shows data computed for the effective resolutio n an d total x-ray yield for several differen t elements i n a 500-A thick sampl e o f iron examine d with a 100-ke V beam. It ca n b e see n tha t i n th e simpl e approximatio n wher e secondar y effect s ar e neglected, the spatial resolution is independent of the energy of the x-ray line that is being examined , because only th e volume occupie d by the trajectories o f the inci dent electrons are considered. Bu t when FSE are included, the resolution gets worse because of the lateral motio n of the secondaries. Th e lower the energy of the x-ray, the further a given secondary ca n travel before it no longer has sufficien t energ y to excite th e chose n line , s o a s th e ionizatio n threshol d i s lowered , th e compute d resolution becomes worse. Fo r iron Ka wher e £crit is around 7 keV, the change in resolution is negligible because relatively fe w FSE have high enough energies; bu t for carbo n K a (£ crit = 0.2 8 keV), the relution i s degraded b y som e 40%. Sim ilarly, including FSE production als o changes the predicted yiel d of x-rays from a n element. Th e exten t t o whic h thi s occur s depend s o n th e natur e o f th e matri x i n which the element t o be observed i s sitting. If the matrix is of low density and low atomic number , then th e numbe r o f FSE produced , an d the consequen t chang e i n x-ray yield, will be small; but for a dense, high-atomic-numbe r matrix, the number of FSE produced is high and consequently extra fluorescence of the element occurs. This indicates that care must be used in performing quantitative microanalysis under
184
MONTE CARLO MODELING
conditions where FSE production is significant. For example, at high beam energies and thus generally hig h overvoltage-ratios, the majority of x-ray production may be coming vi a th e FSE rather than from th e inciden t electron . I n thi s cas e th e spatia l resolution will be significantly worse than predicted b y the simple theory—and, in fact, wil l get worse rather than better a s the beam energy is increased, bu t it will be more o r less independen t o f the foi l thickness—and th e intensit y ratios o f various elements wil l vary in a complex way with composition because changes i n chemistry will cause changes in the number of FSE and hence in the amount of excitation. Microanalysis a t beam energies o f 200 keV o r above is likely to demonstrate these problems. 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 give n x-ra y line, typicall y chromium (Williams an d Steel , 1987) . Value s that hav e bee n publishe d i n th e literatur e fo r various microscopes var y by nearly a factor of 10 , and there has also been consider able discussion about how the figure might be expected t o 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 o address som e o f thes e questions . The simples t approac h i s to us e a Kramer' s la w model for the Bremsstrahlung contribution in the form given in Eqs. (9.4) and (9.5). Although thi s 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 detaile d analysis. 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 e chosen 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 called bkg_ro_z. The cod e woul d have th e followin g 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 radiation. The continuum window is at an energy E—bkg} constant window=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}
X-RAY PRODUCTION AND MICROANALYSIS
185
bkg_yield:=2 .8E-9* (at_num/E_bkg) *del_E*window; {Kramer's law} end else 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 energy window used for measuring the Bremsstrahlung is 10 eV (0.01 keV) wide. The rate of continuum production is proportional to the electron stopping power, so the energy lost along this step of the trajectory must be determined. Note that this is the flux emitted into 4ir steradians. The angular distribution of the continuum is not, however, isotropic, but forward peaked about the beam direction through the thin film, so some account must be taken of this. The corresponding characteristic intensity can be computed by a slight modification of the routine given above, so as to 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 energy and the critical excitation energy of the x-ray. Fixed constants 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: =r o u n d ( 5 0 * z / t h i c k) ; {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-tobackground intensity ratio at a given energy, E_Bkg for the continuum can be put equal 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);
186 MONT
E CARL O MODELIN G
to the program a t appropriate point s i n the program (i.e. , whe n the coordinates ar e reset, or when the electron i s backscattered or transmitted) calls the two routines. At the end of the simulation, the depth distributions for the characteristic an d continuum signal s mus t b e summe d u p ove r th e whol e thicknes s o f th e specimen . Sinc e both signals are at the same energy, it is a reasonable approximatio n to assume that any x-ra y absorptio n i n the specime n wil l be the sam e i n both cases an d thus will disappear i n th e ratio . Similarly , the soli d angl e subtende d b y th e detecto r i s th e same for both the continuum and characteristic signal s and also disappears from th e result. Finally , th e missin g constant s (suc h a s Avogadro' s number , density , an d atomic 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 b e reinserted s o as to give th e prope r numerica l values. {sum the x-ray contributions} for k : = 0 to 5 0 d o begin 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* ( d e n s i t y / 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 m as a specimen, the predictions of the program can be tested against published data values (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 th e C r Ko t lin e t o th e intensit y in a 10-eV-wid e windo w o f th e continuum a t the sam e energy . A t 10 0 keV, the progra m predict s a value between 1300 and 1200, fallin g slightly as the film thickness is increased fro m 250 A to 5000 A. Figur e 9. 5 plot s ho w thi s peak-to-backgroun d (P/B ) rati o varie s wit h inciden t beam energy for a 1000-A-thick film of chromium. At 1 0 keV, the ratio is only about 250, bu t thi s valu e rises rapidl y a s th e energ y i s increase d (an d plura l scatterin g becomes les s pronounced in the sample). Note that the P/B ratio continues to rise for energies abov e 10 0 keV, but only relatively slowly . These value s are in fairly goo d agreement with , althoug h somewha t lower than , both publishe d experimenta l dat a and othe r theoretica l estimate s (e.g. , Fior i e t al., 1982) . Thi s leve l of agreemen t i s only 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 e forward-directed anisotrop y o f the continuum and s o is probably overestimating it s intensity i n th e directio n o f th e detector . Th e simpl e Beth e cros s sectio n fo r th e characteristic signa l i s als o 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 s section, whic h i s no t onl y mor e accurat e bu t whic h explicitl y account s fo r th e
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 evaluation and fit of Sommerfeld's Bremsstrahlung cross-section data (1931) made by Kirkpatrick and Wiedmann (1945). The procedure given below uses is a modification by Blackson (private communication) of the routine given by Statham (1976), with the relativistic corrections of Scheer and Zeitter (1955) and Zaluzec (1978). The original, rather cryptic notation of Kirkpatrick and Wiedmann has been retained so as to help 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) ;
188 MONT
E CARL O MODELING
beta: =17 (beta*beta ) ; joe: =Eo/(300*at_num*at_num) , - {K-W scaling {now evaluate the terms in the K-W numerical fit} yl: = exp ( - 2 6 . 9* j o e) , yl:=0.22*(l-(0.39*yl)); y2: 0.06 7 + ( 0 . 0 2 3 / ( j o e + 0 . 7 5 ) ) ; y3:= 0.0025 9 + ( 0 . 0 0 7 7 6 / ( j o e + 0 . 1 1 6 ) ) ;
factor}
h : = ( ( = 0 . 2 1 4 * y l ) + (1.21*y2 ) -y3 ) / ( ( 1 . 4 3 * y l) ( 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) - exp(84.9*joe) ; a : = e x p ( - 0 . 2 2 3 * j o e ) — e x p ( - 5 7 * j o e) ; c:= 1.47* b - 0 . 5 0 7 * 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* ( i o v e r - 0 . 1 3 5 ) * ( i o v e r - 0 . 1 3 5 ); Ix:=(0.252+Ix)-la; Ix: = ( 1 / j o e) *Ix*1.51E-27 ; {X-component} I y : = 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; Q z : = (Ix * ( Q r / d e n) ) + (ly* (1+Qs) ) ; {so the net contribution is} bkg_yield:=stepsize*Qz; end {of the if statement} else bkg_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;
X-RAY PRODUCTIO N AND MICROANALYSI S
189
In orde r t o properl y account for th e anisotrop y o f th e continuum , th e takeoff angle o f the detector must be known. In standar d microanalysis nomenclature , th e takeoff angl e (TOA ) is the angl e between th e line joining the detector t o the beam point and the surface of the specimen. In order to match the Kirkpatrick-Wiedmann notation, this angl e 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 e summed, ove r depth, an d 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 r takeoff angl e of 30°, this model predict s a Fiori number at 10 0 keV of about 2400 , again falling by about 5% as the film thicknes s is varied over the range 250 to 5000 A. This number is in excellent agreement with current experimental data. Figure 9.6 show 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 previous model, a rapid rise wit h energy up to 10 0 keV and then a slow increase. Figur e 9. 7 show how the Fiori number at 10 0 keV is changed b y the choice of detector takeof f angle. A s TO A i s varie d fro m 0 (i.e. , lookin g a t glancin g incidenc e acros s th e specimen surface ) t o 60° , th e P/ B rati o increase s b y abou t 50 % becaus e o f th e forward pea k of the continuum, confirming the usual preference fo r a high-takeoff angle detector. Further sophisticatio n i n both th e continuum and characteristic cros s section s could b e use d t o ge t stil l bette r dat a (e.g. , Gra y e t al. , 1983) , i n particula r a t th e highest energies, where relativistic effect s ar e significant. However, for most typical
Figure 9.6. Compute d P/ B rati o vs . energy, using Wiedman-Kirkpatrick model .
Figure 9.7. Compute d P/ B variatio n wit h detector takeoff angle . 190
X-RAY PRODUCTIO N AN D MICROANALYSI S 19
1
operating conditions , the models give n here ar e accurate enough to provide a good guide 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 straightforward, sinc e exactly th e sam e cod e ca n be used . As usual, however, th e spee d o f a bulk simulatio n usin g a single scatterin g mode l ma y be unacceptabl y slow , so the plural scatterin g approac h ma y b e o f mor e practica l use . The foundatio n o f al l quantitative method s fo r bul k microanalysi s i s th e dept h dependenc e o f th e x-ray production, a function usuall y called (|>(pz) , following Castaing (1960), who defined 4>(pz) a s th e x-ra y generation i n a slic e 8(pz ) of th e specimen , o f density p and a t some depth z beneath the surface, normalized by the corresponding x-ray production from a n identical freestandin g slice. Whe n presented i n this way , the 4>(pz ) curves are foun d t o be, t o a good approximation, of a simple generi c an d analytica l for m that is sensibl y dependen t o n the atomi c number o f 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 e Carlo method s wer e applie d (Bishop , 1966) , an d muc h o f th e developmen t o f quantitation 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 th e form specifie d by th e origina l Castaing definitio n is possible, bu t the majorit y of computations have instead normalized the data by the value of c|>(pz) at the surface of the specimen. There is than a constant rati o between th e valu e that woul d be derive d fro m Castaing' s definitio n and 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 e Generate_x_rays discusse d above and our usual plural scatterin g Monte Carl o model. Since the Bethe range of the incident beam is already divided into 50 steps in this model, these step s are used as the intervals for the 4>(pz ) histogram. A s before, x-ray generatio n i s assigned to the midpoint of the trajectory step. Onc e the energy of incident electrons has fallen below the critical excitation energ y Ecrit for the x-ray line of interest, th e trajectory calculation ca n be aborted without error to save time. However, for illustrative purposes it is sometimes bette r to continue the computation but 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 p between th e x-ray generation volum e and the beam interaction volum e can readily be seen. In the PHIROZ program on the disk, the approach use d by Curgenven and Duncumb (1971) i n their pioneer wor k is followed. A random weighting algorithm varying with the x-ray ionization cross section determine s whethe r or not a dot will be plotte d a t the midpoin t o f each trajector y ste p fo r whic h th e electro n energ y i s above Eciit. This builds up a display in which dot density i s proportional t o ionization probability. Figure 9.8 shows a typical output from th e program for the genera -
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 K a x-ray s at 2 0 keV . 4>(pz ) i s plotted a s a horizontal histogra m on th e same scal e a s the trajectories, s o that the relationship between them can readily b e seen. A s the depth beneath th e surfac e i s increased, c|>(pz ) rises becaus e the ioniza tion cross section [Eq . (9.1)] continues to rise as E falls until E = = 2.5 X £crit. Figure 9.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 variou s energies.
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 systemati c change in the 4>(pz ) curves is evident. As the accelerating voltage is increased the peak magnitude of the profile rises, and moves deeper into the sample but the general shape of the profile remains the same. This is further illustrate d in Fig. 9.10, which shows ()>(pz) profiles for iron Ka a t 20 keV and silicon K at 5 keV, which in both cases represents an overvoltage U = 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 respectiv e electro n range s diffe r b y nearly a n order o f magnitude, demonstratin g th e valu e o f th e <Xpz ) approac h a s a way o f simplifying th e representation o f x-ray generation. A complete program for quantitative 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-ra y productio n from a thi n fil m o f a "tracer " elemen t embedde d a t differen t depth s withi n th e material of interest (Castaing, 1960), since only in this way can be the specific depth dependence o f generation b e separate d fro m th e total emission . However , because the x-ray line that is being studie d in the tracer is not excited at the same energy as the desired line from th e material, the form of the cf>(pz ) profile will not be identica l with tha t expecte d fro m th e elemen t itself . B y usin g th e PHIRO Z program , thi s problem ca n also b e studied . Figure 9.11 shows two c|>(pz ) profiles, one computed for th e Ka lin e o f a Mn tracer i n iron an d the othe r fo r iro n K a i n iron . Th e Mn profile peaks slightly sooner an d slightly higher than the Fe curve, because the Mn line i s of lower energy . A similar simulatio n for a tracer o f higher energ y tha n the
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 good experimental approximatio n to th e 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 variatio n o f the Bremsstrahlung generatio n ca n als o be studied . In this case the energy of the continuum window to be modeled, previously se t 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 variatio n o f continuu m productio n a t 1 , 5, 10 , 15 , and 1 9 keV.
X-RAY PRODUCTION AND MICROANALYSIS
195
shows a sequence o f "<|>(P Z)" plots obtained i n this way for an iron sample at 20 keV and for continuu m energies o f 1 , 5, 10 , 15, and 1 9 keV obtaine d fro m th e progra m BREMS o n the disk , whic h implements thi s approach . Al l o f the continuum windows are computed simultaneously from th e same set of trajectories, sinc e they are independent events . Note that the shape of the 4>(pz) profile is different fro m that for characteristic 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 sam e as the energy 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 correct for x-ra y absorption i n the sampl e (Statha m an d Pawley, 1978 ) will not generall y produce a satisfactory result (Rez and Kanopka, 1984) unless corrected (L u and Joy, 1992) t o accoun t fo r this discrepancy. Bot h Kramer's la w an d the Kirkpatrick and Wiedmann model s fo r continuu m productio n yiel d ver y simila r result s fo r bul k samples because the multiple scattering of the beam averages out the polarization of the continuu m signal. Eithe r ca n thus be used a s desired . The mode l ca n b e furthe r develope d b y computin g th e shap e o f th e Bremsstrahlung a s see n b y a n energ y dispersiv e spectromete r (EDS ) detecto r place d outside of the sample. This requires that the continuum be simulated for a number of energy windows between zero and the incident beam energy; here, 1 9 such regions equally space d ar e used . Eac h o f thes e result s mus t the n b e correcte d fo r x-ra y absorption both in the specimen and in the EDS detector window. The absorption of x-ra from th e point o f production in the for m /(*) = /(O) . expt-^p*] (9.7
)
where p is the densit y an d u , is the mass-absorptio n coefficient. | x depends bot h on the material an d on the energy o f the x-ray passing through it. Tables of values are available (e.g., Goldstein et al., 1992), but since numerical fits through the data have been mad e by Heinrich, a simple routin e can be used to compute the | x values that are 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;
begin if photon_energy<E_cri t the n [below K-absorption begin A:=1.0; B:=-0.2544711;
edge}
196
MONTE CARLO MODELING
C:=4.769245; D:=-10.37878; F:=2.73 end else {w e ar e above the begin
K-edge]
A:=1.0; B:=-0.2322294; C:=4.070053; D:=-6.220746; F: =e x p ( - 0 . 0 0 4 5 5 2 2 * l n ( a t _ n u m ) * l n ( a t _ n u m ) - 0 . 0 0 6 8 5 3 5 * I n ( at _num)+1.070181); end; {compute the value using appropriate constants] dum: =B*ln) at_num) *ln (at_num) +C*l n (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 at depth z beneath the surface, the exit path length is z/sin (TOA). At the end of the simulation, therefore, the continuum "4>(pz)" data is corrected in a stepwise fashion for 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. Over most of the energy range, the dominant effect is absorption in the beryllium window in 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 beryllium window:
X-RAY PRODUCTION AND MICROANALYSIS
197
Function det_factor(wind_z,wind—thick,wind_density,energy:real}:real ; {com atomic number and density} var f a c t o r , f a c t o r 2 , f a c t o r s :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 : =e x p ( - f a c t o r 2) ; [Beer's law} det_factor: =factor3; end;
thus we have for i : = l t o 1 9 d o {the 19 continuum windows} begin photon_energy: =i * i n c _ e n e r g y 7 2 0 . 0; {putting in constants for a Be window 6 jju n thick, Z = 4, p = d e t _ e f f i e [ i ] : =d e t _ f a c t o r ( 4 , 6 , 1 . 2 , p h o t o n _ e n e r g y ); {now correct data for this additional absorption} bremss [i] := brems s [i] *det_ef f ic [i] ; end;
1.2}
The final step is then to interpolate data points linearly between the calculated values so as to simulate the whole spectrum. Figure 9.13 shows the result of a calculation for the Bremsstrahlung spectrum of carbon at 20 keV. The dots show the corresponding experimental data, scaled to match at the peak of the continuum. As can be seen, the agreement between the normalized and experimental spectra is excellent, even though the model is simple; although the ratio of absolute predicted and measured intensities is less good. The Bremsstrahlung spectrum is not often considered as being worthy of examination and is usually removed mathematically before any analysis of the characteristic peaks is made. However, with the aid of a model such as we have developed here, the behavior of the continuum can conveniently be studied, and we find that this component of the spectrum can provide much useful information, especially because the Bremsstrahlung covers a wide range of energies. First, the area beneath the continuum after correction for x-ray absorption varies linearly with, the atomic number of the target, so providing a simple check on any qualitative analysis that is performed. Second, the shape of the continuum depends on the absorption experienced by the photons as they travel to the surface. Thus the shape depends on the general shape of the surface—i.e., its topography. This is important in analyzing particles, samples containing edges, or samples with a large degree of surface topography, since the form of the continuum
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 0 keV, 8-|j, m B e window .
can be used both to understand what is happening i n the sample an d then to correct for this . For example, the position of the peak in the Bremsstrahlung depends on the length of the aborption path to the surface. If the effective radiu s of curvature of the surface 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 measure of the surfac e conformation can be obtained from a n observation of the continuum. Similarly, the presence of charging fields in the specimen will systematically distor t the for m o f the Bremsstrahlung profile. The techniques discussed above can readily be extended t o deal with any other geometrical condition . For example, the important case of performing x-ray analysis of a thin film o n a substrate can be modeled by using the procedures give n in Chap. 6 t o comput e th e 4>(P Z) profile s i n th e tw o material s an d the n accountin g fo r th e x-ray absorptio n o f th e substrat e radiatio n i n th e fil m b y usin g th e routin e give n earlier i n this chapter. In general, it is sufficient t o employ a plural scattering routine to comput e th e trajectories, bu t i n an y cas e wher e a region o f interest i s les s tha n about 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 e scattering mode l t o ensure better accuracy .
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 e accurate enough to be useful predictive tools but simple enough to be accessible to nonspecialists. Th e previou s chapter s o f th e boo k hav e demonstrate d that , within these limits, a great deal can be done. However, in meeting these goals, approximations an d simplification s hav e ha d t o b e made . Specifically , w e hav e mad e th e assumptions that only elasti c scattering , a s described b y the Rutherfor d cros s sec tion, need be considered an d that energy loss can be treated a s a continuous rather than as a discrete process. Such assumptions are not essential to the construction of a Monte Carl o simulatio n o f electro n scattering , an d s o th e obviou s an d desirabl e move i s t o remov e thes e approximation s fo r thos e case s wher e the y represen t a n unacceptable restriction . An important first ste p is to use the more accurate description of elastic scattering provide d b y th e Mott , o r partia l wav e expansion , cros s section . A s note d i n Chap. 3 , the Rutherfor d cross sectio n work s wel l fo r th e scatterin g o f medium to high-energy electrons by nuclei of low atomic number. However under some conditions, particularly at low beam energies (E < 2 0 keV) and for high-atomic-number elements ( Z > 30) , where the scattering angles ar e large, the Rutherford formula is only an approximation. When the cross section is derived from th e relativistic Dirac equation, takin g int o accoun t spin-orbi t coupling , then th e "Mott" scattering cros s section whic h result s ca n diffe r significantl y fro m th e Rutherfor d values . Suc h discrepancies becom e important, and experimentally detectable, in cases where each electron i s scattered onl y a few times and where the angular distributions of transmitted 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 reaso n wh y th e Mot t cros s section , despit e it s superiority , ha s no t bee n more 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 l function—i.e., on e that can be evaluated fro m a n equation—but a n array of differ ential cross-sectio n value s representing th e scatterin g probability for electrons o f a particular energ y i n a specifie d direction . Typicall y (Czyzewsk i e t al. , 1990 ) th e Mott cross section must be evaluated at energy steps of 10 0 eV or so from 2 0 eV to 20 keV and for angular increments o f 1 or 2° from 0 to 180° , giving a total of some 199
200 MONT
E CARL O MODELIN G
2500 sets of numbers for each element. Storing the data for the entire periodic table therefore require s severa l megabytes o f storag e spac e o n disk . Angula r scatterin g probabilities an d total cross section s must then be found b y numerical integrations of thes e dat a arrays. Whil e thes e operation s ar e not intrinsicall y difficult, the y are messy an d ten d t o mak e th e program s tha t emplo y the m loo k rathe r comple x compared t o the normal ru n o f personal compute r software. One approach that has been successfully implemente d to obtain the benefits of the Mott cross section without the complexity is to reduce it to an analytical form by a proces s o f parametrization . Brownin g (1992) showe d tha t th e tota l elasti c Mot t cross sectio n CTM could be writte n as
where u = lo glo(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 e directly du e t o periodic variation s of the siz e of the atoms . Suc h effects hav e littl e macroscopic effec t o n the scattering o f electrons by a solid, however. This parame trized cross section can be substituted directly for the usual Rutherford cross section in th e singl e scatterin g program . Sinc e th e Mot t cros s sectio n i s typicall y smalle r than the corresponding Rutherfor d value, the elastic mea n free path s that are computed will be larger and the number of scattering event s that must be computed will therefore generall y b e smaller , leadin g t o 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 e modified t o match the results of the Mott cross section . A s shown in Fig. 10.1, the cumulative angular scattering distributio n for the Mott model is rather more squar e in for m tha n th e Rutherfor d distribution . Thi s behavio r ca n b e approximate d b y modifying th e form o f the Rutherfor d equation, e.g. , Equation (3.10):
to be
c Parametrized model s 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
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 Rutherford models .
extreme conditions—suc h a s ver y lo w voltage s (< 1 keV ) an d a t hig h scatterin g angles—the approximatio n wil l no t b e accurate . Whe n suc h condition s mus t b e explored, i t i s therefor e necessar y t o g o t o a ful l Mot t model , usin g numerically tabulated differential cross-sectio n data . Man y such programs have been described (e.g., Reimer and Stelter, 1987 ; Kotera et al., 1990 ; Czyzewsk i and Joy, 1989), and tabulated sets of Mott cross sections have been published by several groups (Reimer and 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 of backscattering with incident energy, an d microscopic data , such as the angular and energy distribution s o f scattere d an d transmitte d electron s (Reime r an d Krefting , 1976). With the continued increas e 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, care must b e take n tha t al l aspect s o f th e Mont e Carl o progra m tha t i s develope d ar e equally advanced. Some published programs that have gone to great lengths to use the Mott cross section have compromised th e quality of their results by using poor electron stopping-powe r formulations or by terminating the simulation at relatively high energies an d relying o n diffusio n model s t o account fo r the rest of the trajec tory. A second important area of research activity has been to construct Monte Carlo simulations in which all types of scattering, elastic and inelastic, are considered and in whic h energ y losses ar e treate d a s discret e rather than continuous event s (e.g. ,
202 MONT
E CARL O MODELIN G
Shimizu an d Ichimura , 1981) . Suc h model s considerabl y exten d th e boundarie s within whic h Mont e Carl o modelin g ca n b e considere d useful , althoug h a t th e expense of increased complexit y and computation time. The procedure followed is a generalization o f tha t discusse d i n Chap . 7 fo r th e modelin g o f fas t secondar y electrons. I n additio n t o the usual elastic mea n free pat h A E, a total inelasti c mea n free 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 s considered (Fittin g an d Reinhart , 1985) . Th e tota l mea n fre e pat h i s A- p wher e
and fo r eac h scatterin g even t a rando m numbe r RN D i s compare d wit h th e rati o AT/AE to determine i f the event is elastic or inelastic; then a second rando m number is draw n to decid e wha t type o f inelasti c even t is occurring . Th e usual Bethe la w expression givin g the electron stoppin g power is replaced by the sum of the energy lost in the inelastic event s 2 (A£j) encountered . Sinc e th e mixture of events along each trajector y will be different, th e energy losse s wil l correspondingly vary, leading to range straggling-—th e phenomenon o f a statistical variatio n in electron rang e for a fixed inciden t energy—jus t a s is observed experimentally . A program o f this type is needed i f information about the energy an d angular distribution of electron s is sought , fo r example , to mode l Auge r or energ y 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 Carl o simulation s has been an d remains that it is a sequential procedure. Onc e the model has been constructed, it must be run a large numbe r of times on e after another i n order t o achieve the desired statistica l accuracy befor e th e dat a ca n b e extracted . Althoug h th e spee d o f al l computer s continues t o increase , th e necessit y o f runnin g 500 0 o r mor e trajectorie s pe r dat a point can still represent a major investment in time when perhaps 5 0 or more points must 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 onl y a limited degree of improvement, especially sinc e the ver y fastes t machine s ten d t o b e multiuse r computer s tha t allocat e t o eac h program only some fraction of the available processo r time . For example, whe n the time required for data input and output on a typical time-sharing system is included,
WHAT NEX T I N MONT E CARLO SIMULATIONS ? 20
3
a Cray supercompute r i s less than twic e a s fast i n running th e sam e cod e a s a 33Mhz 486-typ e MS-DO S compute r equippe d wit h a mat h coprocesso r chip . On e solution to this dilemma is to run more than one trajectory at a time—that is, to use parallel computin g techniques . Mont e Carl o method s ar e wel l suite d t o thi s ap proach because th e code is relatively compact and each trajectory is independent of every other . I t i s therefor e straightforwar d to achiev e a larg e gai n i n throughput simply by running one copy o f the program on each of the processors i n a parallel machine. Severa l example s of this have been reporte d (e.g. , Michaels e t al., 1993 ) on machines employin g u p to 12 8 processors. Impressiv e results , combining both good statistics an d many data points, have been demonstrated for situations such as the modeling o f x-ray generation across a complex interface an d for the production of S E imag e simulations . Th e actua l improvemen t i n speed , whil e dramatic , i s usually somewha t les s tha n th e numbe r o f CPU s use d i n parallel , becaus e th e number of computations required for each trajectory is not a constant. One processor may therefore finish all of its allotted simulations while another is still working, and unless th e compute r ca n reorganiz e it s workloa d t o reoccup y al l o f th e availabl e processors, the speed advantage gradually decreases a s more and more CPUs finish their task s an d fal l idle . Nevertheless , wit h computer s tha t hav e mor e an d mor e parallel architecture becoming available, this will be an important avenue of progress in thi s 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 o investigate 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 a backscattered electro n signa l profil e o r ho w alterin g th e morpholog y o f a surfac e might vary the x-ray yield. In such cases, even though almost al l of the condition s remain th e same , i t i s stil l necessar y t o reru n th e entir e simulatio n ove r agai n in order t o get the new data, whic h is a wasteful an d time-consuming procedure . A n interesting alternativ e procedure has been described (Desai and Reimer, 1990 ; Wang and Joy , 1991 ; Czyzewsk i an d Joy , 1992) , whic h is a mixture o f a conventional Monte Carl o mode l an d a n alternative physica l representatio n calle d a "diffusio n matrix." 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 of cubes, each of which has the property of emitting electrons at a certain rate and with some know n angula r distribution . Th e measure d yiel d o f backscattere d electron s will resul t fro m th e emission s comin g fro m thos e cube s wit h one face o n the to p surface of the specimen. If the topography, for example, i s now changed—perhaps by placing a groove across the surface—then som e additional cubes will have faces at th e surfac e an d the numbe r o f emitted electron s wil l change .
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 a specified exi t angle pas s throug h a strip of width AS at angle fl t o the horizontal i n each cell.
The strength of each elemental cuboid emitter of electrons i s found b y running a Monte Carlo simulation for the chosen experimental conditions. However, unlike a conventional simulation , th e inciden t bea m i s considere d t o b e emergin g fro m a point insid e th e specime n (Fig . 10.2 ) rathe r tha n impingin g a t a surface . Ever y trajectory i s followe d unti l th e electro n completel y dissipate s it s energy , becaus e there i s now no surfac e fro m whic h to be backscattered. Th e interaction volum e is again divide d int o cubes , bot h abov e an d belo w th e bea m point , an d th e Mont e Carlo 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 th e face s o f the cube a t various angles relative to the axes is determined. Th e resultant multidimensional array then completely specifie s th e matri x o f cubes . (Th e nam e diffusion matrix refers t o a n analogous model i n whic h a point diffusio n source—suc h a s a sourc e o f heat—is replaced b y an array of emitters that gives the same resultant properties). Typically the interaction volume is divided into 64 X 64 X 32 cubes, the angular variation into 20 steps, and the energy into 10 steps. As usual, the Monte Carlo simulation must be continued for a sufficient numbe r of trajectories so that each element of the array has adequately goo d statistics . The arra y can be furthe r extende d b y including compo nents representin g th e correspondin g fluxe s o f S E o r x-rays , and som e initia l re search has demonstrate d th e feasibility of considering eve n multicomponent specimens.
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 geometry o r for an y specifie d detecto r positio n relativ e t o the specime n ca n be found b y simply summing the relevant contributions fro m al l the surface cubes. This makes it possible t o almos t instantaneousl y compute , fo r example , th e effec t o f tilt o n th e backscattered yiel d o r th e S E profil e fro m a surfac e o f give n geometry . I n a n implementation o n a Macintos h Ilc i machine , th e tim e t o recomput e a 256-pixe l surface profile for a specified surface geometry was less than 1 sec, so this technique is 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 y matched to an experimental profile. For many applications, thi s method has a great deal of promise, since it offers a good balance between speed an d accuracy even on small computers. The diffusion matri x method is, of course, an approximation rather than an exact solution, since it assumes that each cubical element has properties that are fixed an d independent o f its surroundings and position relative to a surface. The method also cannot take account of effects suc h as the recollection, or scattering, of emitted electron s fro m th e sampl e itself , whic h ma y b e significan t i n congeste d geometries. However , i t i s a valuable extensio n o f the standar d Mont e Carl o ap proach and can produce a lot of additional information for little extra computation .
10.4
Conclusions
Simulations will become a n increasingl y important an d effective too l fo r proble m solving i n electro n microscop y an d microanalysis . Wit h furthe r improvement s i n both computers and the software that is run on them, it is not too fanciful t o envisage a "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 e effect o f differen t experimenta l parameters , t o optimiz e conditions , an d even produce "images " an d "spectra " withou t th e nee d t o us e expensiv e tim e o n a rea l microscope. Eve n a t a less exalte d level , th e simulation s discusse d i n thi s boo k provide a convenient, flexible , and accurate way of interpreting data and images, a useful resourc e fo r plannin g experiments , an d a satisfyin g teachin g tool .
This page intentionally left blank
REFERENCES Akamatsu B., Heno c J. , an d Henoc P . (1981), J. Appl. Phys., 52:724 5 Antolak A. J. and Williamson W. (1985), /. Appl. Phys., 58:525-31 Archard G. D. (1961), /. Appl. Phys., 32:1505-9 Austin L . an d Stark e H . (1902) , Ann. Phys. Baroody E . M. (1950), Phys. Rev., 78:78 0 Berger 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. 13 5 Berger 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 5 Bethe H. A. (1941), Phys. Rev., 59:940 Bishop, H . E . (1966) , "Measurement s an d Calculation s o f Electro n Backscattering. " Ph.D . thesis, Universit y of Cambridg e Bishop H. E. (1965) , Proc. Phys. Soc., 85:85 5 Bishop 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 Publication #460 , p. 5 Bradley G. F. and Joy D. C. (1991), Proc. 49th Ann. Meeting EMSA (Sa n Jose), (Ed . G. W. Bailey), (Sa n Francisco Press : Sa n Francisco), p . 534 Bresse J. F. (1972), Proc . 5t h Ann. SEM Symposium (Ed. O. Johari and I. Corvin), (Illinoi s Institute of Technology Research Institute : Chicago) , 10 5 Bronstein I . M. an d Fraiman B . S . (1961), Sov. Phys. Solid State, 3:1188 Browning R. (1992), Appl. Phys. Lett., 58:284 5 Bruining H . (1954) , Physics and Applications of Secondary Electron Emission, (Pergamo n Press: London ) Cailler M. and Ganachaud J . P. (1972), J. Physique, 33:90 3 Campbell-Swinton A. A. (1899), Proc. Roy. Soc., 64:377 Casnati E., Tartar! A., and Baraldi C. (1982), /. Phys. B, 15:15 5 Castaing R. (1960), "Electro n prob e microanalysis," in Advances in Electronics and Electron Physics, 13:31 7 Catto CJ.D. and Smith K.C.A . (1973) , J. Microsc., 98:41 7 Chung M. and Everhart T. E. (1977) , Phys. Rev. B, 15:469 9 Compton 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
208 REFERENCE
S
Czyzewski Z. an d Joy D. C . (1989), J. Microsc., 156:28 5 Czyzewski Z. an d Joy D . C. (1991) , Scanning, 13:22 7 Czyzewski Z. an d 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), 954 Czyzewski Z., MacCallum D. O., Romig A. D., and Joy D. C. (1990), J. Appl. Phys., 68:3066 Darlington E. H. (1975), / . Phys. D, 8:8 5 Dekker A. J. (1958), Solid State Phys., 6:25 1 Desai V . and Reime r L . (1990) , Scanning, 12: 1 Devooght J. , Dubu s A. , and Dehaes J. C. (1987), Phys. Rev. B, 36:509 3 Donolato C . (1978) , Optik, 52:1 9 Donolato C . (1985), Appl. Phys. Lett., 46:270 Donolato C . (1988) , Proc . Bur. Congr . o n EM, Inst. Phys. Conf. Ser., 93, 2:5 3 Drescher H. , Reimer L. , an d Seidel H . (1970) , Z. Angew. Phys., 29:331-36 Duncumb P. (1977), persona l communicatio n cited o n pag e 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 4 Duntemann J . (1987) , Complete Turbo Pascal, (Scot t Foresman an d Co.: Sa n Francisco ) Dwyer V . M. an d Matthe w J.A.D. (1985) , Surface Sci., 152:88 4 Egerton 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. 57 6 Everhart T. E. (1960), /. Appl. Phys., 31:1483-90 Fiori 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 Francisc o Press : Sa n Francisco), p . 57 Fitting H . J., Glaefek e H. , an d Wil d W. (1977), Phys. Stat. Sol. (a), 32:18 5 Fitting H . J. an d Reinhardt J . (1985) , Phys. Stat. Sol. (a), 88:245 Gasper J . K. and Greer R. T. (1974), in Scanning Electron Microscopy 1974 (ed. O . Johari), p. 24 4 Goldstein 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 5 Goldstein J . L, Newbury D. E. , Echli n P. , et al . (1992) , Scanning Electron Microscopy and X-ray Microanalysis (Ne w York : Plenum) Gray C . C., Chapma n J . N. , Nicholson W.A.P., et al. (1983), X-ray Spectrometry, 12:16 3 Green M . (1963) , Proc. Phys. Soc., 82:20 4 Gryzinski M. (1965), Phys. Rev. A, 138:33 6 Hammersley J . M. (1964) , Monte Carlo Methods (Ne w York: Wiley) Hasegawa S. , lida Y. , an d Hidaka T. (1987), /. Vac. Sci. technol., B5:14 2 Hayward E . an d Hubbell J. (1954) , Phys. Rev., 93:95 5 Hebbard D . F . and Wilso n P . R. (1955) , Austral. J. Phys., 8:9 0 Heinrich K.F.J . (1981) , Electron Beam X-ray Microanalysis (Va n 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 f Commerce/National Burea u of Standards) , NBS Special Publicatio n #460 , p. 5 Herrmann R . and Reimer L . (1984) , Scanning, 6:2 0 Hohn F. J., Kind t M., Niedri g H., an d Stu m B. (1976) , Optik, 46:49 1 Holt D. B. and Joy D. C. (1989), "SE M Microcharacterizatio n of Semiconductors" (Academi c Press: London ) Hunger H.-J . an d Kuchler L . (1979), Phys. Stat. Sol. (a), 56:K45 ICRU (1983) , Stopping Powers of Electrons and Positrons, Repor t #3 7 t o Internationa l Committee o n Radiatio n Units (ICRU : Bethesda, Md. ) Jakubowicz A. (1982) , Solid State Electronics, 25:65 1
REFERENCES
209
Jonker J.L.H . (1952) , Philips Res. Rep., 7: 1 Joy D . C . (1983), Microelectr. Eng., 1:10 3 Joy D . C. (1984) , J. Microsc., 136:24 1 Joy D . C. (1986) , J. Microsc., 143:23 3 Joy D . C. (1987a), /. Microsc., 147:5 5 Joy D. C. (1987b), in Microbeam Analysis—1987 (ed . R. H. Geiss), (San Francisco Press : San Francisco), p . 11 7 Joy D. C. (1989a), in Computer Simulation of EM Diffraction and Images (ed. W. Krakow and M. O'Keefe) , (Minerals , Metals an d Materials Society : Warrendale , Pa.), 209 Joy D . C. (1989b) , Hitachi Instrument News, 16: 3 Joy D . C . (1991) , Ultra-microscopy, 37:21 6 Joy 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. an d Luo S . (1989) , Scanning, 11:17 6 Joy 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. 17 1 Kahn H . (1950) , Nucleonics, Ma y 27 Kanaya K. and Ono S. (1984), i n Electron Beam Interaction with Solids (Eds. D. Kyser, D. E. Newbury, H . Niedrig, an d R. Shimizu) , (SE M Inc. : AM P O'Hare, III), p. 69 Kanter H. (1961) , Phys. Rev., 121:68 1 Kirkpatrick P . and Wiedmann L. (1945) , Phys. Rev., 67:32 1 Koshikawa T . and Shimizu R. (1974), /. Phys. D: Appl. Phys., 7:130 3 Kotera M. , Kishida T., and Sug a H. (1990), Scanning Microsc. Suppl. , 4:111 Kyser 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 9 Lander J . J., Schreiber H. , Buck T. M., and Matthews J. R. (1963), Appl. Phys. Lett., 3:20 6 Leamy H . J. (1982) , J. Appl. Phys., 53:R5 1 Leamy H . J., Kimerling, L. C., and Ferris S . D. (1976), Proc . 9t h SE M Symposium (Ed. O. Johari), (SEM Inc. : Chicago) , p . 529 Leiss J . E. , Penne r S. , and Robinson C . S. (1957), Phys. Rev., 107:154 4 Love G. , Co x M.G.C. , an d Scot t V . D. (1977) , J. Phys. D: Appl. Phys., 10: 7 Lu Y . and Joy D . C . (1992), Proc . 50th . Ann . Meeting EMSA (Boston) , (Ed . G. W. Bailey), (San Francisc o Press : Sa n Francisco), vol . 2 , p. 167 8 Luo S . an d Joy D . C. (1990) , Scanning Microscopy Suppl., 4:12 5 Luo S. , Zhang Y. , an d Wu Z. (1987) , J. Microsc., 148:28 9 McCracken D . D. (1955), Sci. Am., 192:9 0 Merlet C . (1992) , X-ray Spectrometry, 21:22 9 Metropolis N . and Ulam S . (1949), /. Am. Statis. Assoc., 44:33 5 Meyer H . A., ed . (1956) , Symposium on Monte Carlo Methods (Wiley : Ne w York) Michael J . R., Plimpton S . J., an d Romig A. D . (1993) . Ultramicroscopy, 51:16 0 Mil'stein S. , Joy D. C., Ferris S . D., and Kimerling L. C. (1984), Phys. Stat. Sol. (a), 84:36 3 Moller C . (1931) , Z . Phys., 70:786 Mott N . F. (1930), Proc. Roy. Soc. London A, 126:25 9 Miiller R. H. (1954) , Phys. Rev., 93:891 Murata K., Kyser D. F., an d Ting C. H. (1981), /. Appl. Phys., 52:4396 Murata K., Matsukaw a T., an d Shimizu R . (1971) , Jpn. J. Appl. Phys., 10:67 8 Myklebust R . L., Newbury D. E., and Yakowit z H . (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. of Commerce/National Bureau of Standards) , NBS Specia l Publicatio n #460 , p. 10 5 Neubert G . an d Rogaschewski S . (1980), Phys. Stat. Sol. (a), 59:3 5
210 REFERENCE
S
Newbury D . E . an d Myklebus t R . L . (1981) , i n Analytical Electron Microscopy 1981 (Ed . R. H . Geiss), (Sa n Francisco Press : Sa n Francisco), p . 9 1 Neidrig H . (1982) , J. Appl. Phys., 53:R1 5 Possin G. E. and Kirkpatrick C. G. (1979), Proc . 12t h Ann. SEM Symposium (Ed. O. Johari), (SEM Inc : Chicago), 1:24 5 Possin G. E. and Norton J. F. (1975), Proc. 9th Ann. SEM Symposium (Ed. O. Johari), (IITRI: Chicago), p . 457 Postek M . T . and Jo y D . C . (1986) , Solic State Technol., 12:7 7 Powell C . J. (1976) , Rev. Mod. Phys., 48:3 3 Powell C . J . (1984) , i n Scanning Electron Microscopy 1984 (Ed . O . Johari) , (SE M Inc. : Chicago), vol . 4 , p. 164 9 Press, 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:5060 Reimer L. (1993), "Image formatio n in Low Voltage SEM" (SPJE Optical Engineering Press : Bellingham WA) Reimer L. and Kreftin g 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 S Special Publicatio n #460 , p. 45 Reimer L . an d Lodding B . (1984) , Scanning, 6:12 8 Reimer L . and Stelte r D . (1987), Scanning, 8:26 5 Reimer L . an d Tolkamp C . (1980) , Scanning, 3:3 5 Rez P . and Kanopk a J . (1984) , X-ray Spectrom., 13:3 3 Salow H. (1940), Phys. 2., 41:434 Samoto N. and Shimiziu R . (1983), /. Appl. Phys., 54:3855 Schou J . (1980), Phys. Rev. B., 22:214 1 Schou J . (1988) , Scanning Microscopy, 2:60 7 Scheer M . and Zeitter E . (1955) , Z. Phys., 140:64 2 Seah M . P . and Denc h W . A. (1979) , Surf. Interface Anal., 1: 2 Seller H. (1984), /. Appl. Phys., 54:R 1 Sercel P. C., Leben s J . A., and Vahal a K. J. (1989) , Rev. Sci. Instrum., 60:377 5 Shreider Y u A. (1966) , The Monte Carlo Method (Pergamo n Press : Ne w York) Shimizu R . (1974) , J. Appl. Phys., 45:210 7 Shimizu 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 7 Sidei T. , Higasimur a T., Kinosita K . (1957), Mem. Fac. Engng. Kyoto Univ., 19:22 0 Sommerfeld A . (1931) , Ann. Physik., 11:25 7 Starke H . (1898), Ann. Phys., 66:49 Statham P. J. (1976) , X-ray Spectrometry, 5:15 4 Statham P. J. and Pawley J. B. (1978), i n Scanning Electron Microscopy—1978 (Ed . O. Johari and I . Corvin), vol . 1 , p. 46 9 Suga 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. 410 Sugiyama N. , Ikeda S. , an d Uchikav a Y. (1986), J. Electr. Microsc., 35: 9 Tung C . J., Ashley J. C., an d Ritchie R. H . (1979) , Surface Science, 81:42 7 Wang X. and Joy D. C. (1991), /. Vac. Sci. Techn., B9:3753 Williams D . B. and Steel E . B. (1987) , i n analytical Electron Microscopy—1987 (Ed . D. C. Joy), (Sa n Francisc o Press : San Francisco), p . 22 8
REFERENCES 21 Wilson P . R. (1952) , Phys. Rev., 86:26 1 Wittry D . B. and Kyse r D . F. (1964), J. Appl. Phys., 35:243 9 Wittry D . B. an d Kyser D. F. (1965), J. Appl. Phys., 36:1387 Wolff P . A. (1954) , Phys. Rev., 95:56 Zaluzec N . (1978), Ph.D. thesis , University of Illinoi s
1
This page intentionally left blank
INDEX all purpose program , 7 9 angular differentia l Rutherfor d cros s section, 29-3 0 annular detector, 11 2 Archard model , 54-5 5 Auger electron , 3 , 20 2 automatic computin g machines , 5 Avogadro's number , 2 8 axis convention , 10 , 26, 7 2
cascade process , 134 , 138-39 cathodoluminescence, 114 , 132-33 charge collectio n microscopy , 11 4 compiler directives , 46-47 , 71 , 105 compounds atomic numbe r of, 50-51 backscatter yiel d of , 83-84, 106 computer languag e ADA, 1 2 C, 1 2 MODULA-2, 1 2 PASCAL, 12 , 22, 10 5 QUICK PASCAL , 1 3 QUICKBASIC, 1 2 TURBO PASCAL, 12 , 89 computers Macintosh Ilci , 205 main-frame, 6 , 7 parallel processor , 20 3 personal, 7 , 203, 205 conductivity, induced, 116-1 7 coordinate system , 10 , 26 coprocessor chips, 46-4 8 coprocessor, floating-point , 46-47 Cosslet, V . E., 6 Courier typeface , 1 7 csda range , 57 current balance , 16 5 cutoff energy , 34-35, 52-53 , 145-46, 151-52
backscatter yields , 81-86 , 203 discontinuities in , 8 2 variation wit h density, 95-96 variation wit h energy, 85-8 6 variation wit h thickness, 96-9 7 variation wit h tilt , 90-91 backscattered electrons , 4 , 81 energy distributio n of , 91-94, 112-1 3 information depth , 95 , 10 9 line profiles , 171-7 3 mean energ y of , 93-94 beam broadening , 178-7 9 Beer's law, 195 Berger, M., 6 beryllium window , 196 Bethe equation , 26 , 32 modified, 35-36 , 58 Bethe range , 57 , 96, 11 9 steps of , 5 8 BGI files , 2 3 Bishop, H. , 6 bkg_ro_z, 185 Boltzmann transpor t theory , 13 6 Bremsstrahlung, 26, 175-7 7 Buffon, A. , 5 bulk specimen , 56 , 75, 96
debugging, 2 2 defects crystallographic, 125-2 7 EBIC profiles of , 129-3 2 electrically active , 12 5 size of, 12 8 depletion region , 117 , 121-2 2 detector efficiency , 111-12 , 173 , 196-97
calculators, mechanical , 6 carrier pairs , 118-1 9 213
214 detector geometry , 111-12 , 173 diffusion length , 118 , 122-24 , 125-28, 132 diffusion matrix , 203-5 Dirac equation , 19 9 direction cosines , 10 , 26, 31-32, 72, 111-12 drunken walk , 9-12 Duane-Hunt limit, 17 6 Duncumb, P., 6 EBIC, 11 4 EDSAC I I computer, 6 electron lithography , 156-5 7 electrons Auger, 3 , 20 2 backscattered. See backscattere d elec trons energy loss , 2 6 energy los s spectra , 20 2 secondary. See secondar y electron s stopping power, 26 , 32 , 84 tertiary, 15 2 transmitted, 4 valence, 3 electron-hole pair , 114-15 , 121 energy los s continuous model, 26 , 32-36 parabolic model , 34-3 5 energy profile , 58 , 7 3 error (erf ) function , 17 9 E2 energy, 164-6 5 Evans model , 14 2 fast secondar y electrons , 142-4 7 energy of , 15 1 energy depositio n of , 155-5 6 production o f x-rays, 181-8 3 spatial distributio n of , 153-5 5 yield of , 15 4 Fiori number, 186-87 , 18 9 FORTRAN, 6 function generation, 118-2 1 Gryzinski's, 13 7 functions, 19 , 10 5 abs_corr,195 Archard_range,54-55 delay, 21
INDEX
GasDev, 169 GetAspectRatio, 20 GetMaxX, 20 , 48, 73 GetMaxY, 20 , 48 keypressed, 22 lambda, 38 , 47 outside, 108 POWER, 37 , 47 , 62 , 71 , 9 8 stop_pwr, 38 , 47, 62, 71 xyplot, 40, 48 YES, 38 , 47-48 Gaussian distribution , 169 granularity, 77-7 8 graphics drive r routines, 19 , 23 h_scale, 73 holes, 114-1 5 hplot_scale, 41 ICRU tables, 33 impact parameter , 58 , 82-83 inelastic cross section , 14 6 information, dept h of , 107 , 10 9 inhomogeneous materials, 97-10 5 interaction volumes , 52-53, 74-75, 96, 120-21 teardrop shap e of, 96 , 12 0 ionization, 3 energy, critical , 17 4 mean potential of, 32-33, 10 1 / (mean ionization potential), 32-33 , 101 jellium, 7 8 Kahn, H. , 4 keywords, 1 7 begin, 19 const, 18 end, 19 function, 18-19 label, 47 procedure,18-19 program, 17 uses, 17 var, 1 7 knock-on collision , 134 , 142-4 3 Kramer's law , 184
INDEX
Manhattan Project , 5 mass-thickness contrast, 155 matrix, diffusion , 204- 5 mean fre e pat h elastic, 27-29, 202 inelastic, 146 , 20 2 total, 146 , 202 mean ionizatio n potential, 32-33, 51 , 60, 101 metrology, 167 , 17 3 Metropolis, N. , 5 micron markers , 4 9 minicomputers, 7 minority carrie r length . See diffusio n length Monte Carl o method definition of , 4- 5 history of , 5- 7 Monte Carl o simulation , 5 applicability of , 79-80 double, 143-4 4 precision of , 23-24 Mott cros s section , 87 , 199-20 1 nuclear interactions , 8 0 nuclear screening , 27 , 59 numerical integration , 126, 168, 20 0 overcut structure , 170 overvoltage, 174-75 , 18 1 PC. See computer , persona l peak-to-background ratios , 184-91 , 195 photographic emulsion , 51 plasmon decay , 137-3 8 plot—scale, 41 plotting scales , 48-4 9 plural scatterin g model, 56 , 75, 77-78, 124 polymethyl methacrylate (PMMA), 15 7 pragmas, 46-47, 71 , 105 printing, 5 0 procedures, 19 , 105 back_scatter, 43, 49, 69, 71, 74, 92
continuum, 184 , 187-8 8 display-backscattering, 69, 71, 79, 92 do_defect, 127 FSEmfp,148-49
215
generate_x-rays, 182 , 185 , 19 1 get—constants,38, 48 init_counters, 67 , 70, 102, 10 3 initialize, 14 , 19, 21, 40, 49, 66, 70,73 new-coord, 14 , 20, 68, 71, 73, 103 p_scatter, 68 , 71, 73, 102 plot_xy, 15 , 20 prof ile, 58, 65, 72, 99, 105 randomize, 20, 70 range, 57 , 64, 70, 99 reset—coordinates, 15 , 21, 41, 67, 71 , 10 2 reset-next-step, 69, 71, 103 Rutherf ord_Factor, 64, 70, 72, 89, 10 0 s_scatter, 42 , 49 sei_sig,159 set_up_graphics, 41-49 , 66, 70, 73 set-up-screen, 39, 48, 72, 63, 70, 100, 10 3 SetViewPort, 21 show_BS_coeff, 44 , 49 show_traj_num, 44 , 50, 69, 71, 74 stop_pwr, 57, 105 straight-through, 43, 49 Test_for_FSE, 146 Track_the_FSE, 148 , 15 2 transmit—electron, 43, 49 xyplot, 40, 67 pseudopotential, lattice, 137 quadrant detector, 11 2 random number generators, 5-6, 20 random numbers , 4, 20 random sampling , 4, 24 random walk, 9-12, 23-24 range equation, 48, 15 2 Runge-Kutta method, 72 Rutherford cros s section. See screened Rutherford cros s section samples, geometry of, 107- 9 scattering elastic, 3 , 25 inelastic, 3 , 25 small-angle, 61 , 88
216
INDEX
scattering angle , 30 , 59-60, 200- 1 azimuthal, 30 , 6 1 minimum, 59-6 0 Schottky barrier, 117 , 121, 124 gain of , 121-2 4 screen dump , 5 0 screened Rutherfor d cross section , 25, 27 , 87, 19 9 angular differential , 29-3 0 total, 27 , 58-59, 14 5 screening parameter , 27-2 8 secondary electrons , 3 , 134 , 142-47 analytical yiel d model, 15 8 angular distribution , 135 , 140-41 attenuation length , 158-6 1 beta factor , 140-42 , 166-6 7 energy distribution , 135 , 139-40 escape depth , 13 4 escape probability , 152 , 167-6 8 fast. See fas t secondar y electron s generation energy , e, 158-6 1 line profile, 171-7 3 plasmon-generated, 135-3 6 production, 7 8 production b y BSE, 135, 166-67 production b y valence excitations , 135 36 recollection, 17 1 variation wit h thickness, 142 , 154 variation wit h tilt, 161 yield coefficient , 134-35 , 158, 161 SE1, 135 , 140-42, 154 SE2, 135 , 140-42 Simpson's rule , 7 2 single-scattering model , 25 , 75, 77-78 spin-orbit coupling , 19 9 statistical scatter , 2 4 stepsize, 182 stopping power , 26 , 32-36, 157 , 202 straggling, range , 20 2 straight-line approximation , 138 , 154 , 157-58 supercomputer, 20 3
takeoff angl e (TOA) , 189 , 196 thermometer scale , 4 9 thin film , 97-98, 15 4 tilt, effect s of , 72, 75, 123-2 4 topography, 203- 4 total electro n yields , 161-6 3 tracer elements , 193-9 4 Ulam, S. , 5 undercut structure , 170 v_scale, 73 variables, 1 7 Boolean, 17 , 22, 47-48, 14 7 extended, 1 7 global, 17 , 15 2 integer, 1 7 local, 17 , 15 2 longinteger, 1 7 private, 47 real, 1 7 virtual reality , 205 voids, 110-1 1 von Neumann , J., 5 window absorption , 196-9 7 x-rays Bethe ionizatio n cros s section , 17 4 Casnati cross section , 17 5 characteristic, 3 , 17 4 continuum, 175-7 7 continuum depth variation , 194-9 5 continuum, effec t o f curvature , 19 8 continuum, integrate d valu e of, 19 7 continuum polarization , 176 , 187 detector windo w effect s on , 196-9 7 effect o f FSE on , 181-8 3 peak-to-background ratio s for , 184-86, 190 PhiRoZ program fo r computing, 191 94 spatial resolutio n of , 177-79 , 18 3