First Barcelona Techno Week Course on semiconductor detectors ICCUB, 11-15th July 2016 Monte Carlo simulation of photon and electron transport Francesc Salvat Monte Carlo 1
Simulations performed with the code system PENELOPE, an acronym for "PENtration and Energy LOss of Positrons and Electrons" A general-purpose Monte Carlo simulation code system with - Realistic, well defined interaction models - Fast and accurate random sampling algorithms - Efficient tools for tracking particles through complex geometries (constructive quadric geometry) - Complementary tools: variance reduction, transport in electromagnetic fields, tabulation of macroscopic interaction parameters,... Distributed by the OECD/Nuclear Energy Agency Data Bank (Paris) and the RSICC (Oak Ridge National Laboratory) More than 1,500 copies distributed References: Introduction F. Salvat, PENELOPE-2014: A Code System for Monte Carlo Simulation of Electron and Photon Transport. OECD NEA Data Bank/NSC DOC(2011)/5 (OECD Nuclear Energy Agency, Issy-les-Moulineaux, 2011) http://www.oecd-nea.org/lists/penelope.html F. Salvat and J.M. Fernández-Varea, "Overview of physical interaction models for photon and electron transport used in Monte Carlo codes", Metrologia 46 (2009) S112 S138 Monte Carlo 2
Photon interactions Photonuclear absorption is neglected Monte Carlo 3
Electron and positron interactions Electron rest energy: kev Monte Carlo 4
Program TABLES >>>>>>>>> TABLES The program TABLES reads a material data file and generates a number of ascii files with relevant energy-dependent interaction data (total cross sections, mean free paths, stopping powers and radiation yields of electrons and positrons, ranges,...). [...] In principle, TABLES gets the interaction properties of a material from its PENELOPE material data file. [...] If that file does not exist, TABLES builds it by calling the PENELOPE routines; in this case the user has to provide some information on the material (chemical composition, density,...), which is entered from the keyboard. For the 280 materials listed in the file 'material_list.txt', the user only needs to enter the identification number of the material. [...] The output file 'tables.dat' is generated by the PENELOPE routines and contains most of the quantities used in the Monte Carlo simulations. The output files with the extension '.tab' contain sets of related quantities, which are described in the heading comments of each file. To visualize the contents of output files, we use the plotting software gnuplot, which is small in size, available for various platforms (including Windows and Linux) and free (distribution sites are listed at the gnuplot central site, http://www.gnuplot.info). When gnuplot is installed on the computer, the provided script 'fname.gnu' plots the contents of the output file with the same filename, 'fname.tab'. Monte Carlo 5
Screenshot of TABLES (gold, Z = 79) Electron mean free paths (MFP) 1.0E+2 1.0E+1 1.0E+0 Elastic Inelastic Bremsstrahlung Inner shell ion. Total MFP*rho (g/cm**2) 1.0E-1 1.0E-2 1.0E-3 1.0E-4 1.0E-5 1.0E-6 1.0E-7 1.0E+2 1.0E+3 1.0E+4 1.0E+5 1.0E+6 1.0E+7 1.0E+8 1.0E+9 Energy (ev) Monte Carlo 6
Screenshot of TABLES (gold, Z = 79) Electron mass stopping powers (STP) 1.0E+9 1.0E+8 1.0E+7 STP [ev/(g/cm**2)] 1.0E+6 1.0E+5 1.0E+4 1.0E+3 1.0E+2 Collision Radiative Total 1.0E+2 1.0E+3 1.0E+4 1.0E+5 1.0E+6 1.0E+7 1.0E+8 1.0E+9 Energy (ev) Monte Carlo 7
Screenshot of TABLES (gold, Z = 79) Photon mass attenuation coefficients (mu/rho) 1.0E+6 1.0E+4 1.0E+2 Rayleigh Compton Photoabsorption Pair production Total mu/rho (cm**2/g) 1.0E+0 1.0E-2 1.0E-4 1.0E-6 1.0E-8 1.0E+2 1.0E+3 1.0E+4 1.0E+5 1.0E+6 1.0E+7 1.0E+8 1.0E+9 Energy (ev) Monte Carlo 8
ξ = random number, U(0,1) Random sampling Monte Carlo: Numerical solution methods based on the use of random numbers Consider the cumulative distribution function and set, i.e., x is the solution of the sampling eq. Example: exponential distribution, RITA (Rational Inverse Transform with Aliasing): optimal generic algorithm for sampling arbitrary single-variate distributions (discrete or continuous) Monte Carlo 9
Practical detailed simulation Scattering model: Two interaction mechanisms, A and B, with DCSs and Total cross sections: Path length to the next interaction: Kind of interaction: Effect of each interaction: Monte Carlo 10
vacuum mat. 1 mat. 2 E 2, ^ d 2 E 1, ^ r d 2 1 B s W r 1 θ, φ s r 3 E3, ^ d A 3 r n A E n, ^ d n s r n+1 s B Reliability depends on : 1) accuracy of adopted DCSs 2) validity of the "trajectory model" (de Broglie wavelength, λ db, much less than the inter-atomic spacing) For electrons and positrons Monte Carlo 11
Program SHOWER >>>>>>>>> SHOWER The program SHOWER generates electron-photon showers within a slab of one of the 280 materials listed in the file 'material_list.txt', and of any material whose definition file has been previously generated by running the program TABLES. SHOWER displays the generated showers projected on the computer screen plane. The program is self-explanatory, and requires only a small amount of information from the user, which is entered from the keyboard in response to prompts from the program. Electron, photon and positron tracks are displayed in different colors and intensities that vary with the energy of the particle. The maximum number of showers that can be plotted in a single shot is limited to 50, because the screen may become too cluttered. Once on the graphical screen, the view plane can be rotated about the horizontal screen axis by typing 'r' and the rotation angle in degrees; the screen plane can also be rotated progressively, by 15 deg steps, by pressing the 'enter' key repeatedly. Entering the single-character command 'n' erases the screen and displays a new bunch of showers. Observation of single showers projected on a revolving plane gives a truly three-dimensional perspective of the transport process. Monte Carlo 12
Screenshot of SHOWER (10 MeV electrons in water) Monte Carlo 13
Statistical uncertainties Statistical uncertainties: All Monte Carlo calculations are equivalent to integrals In radiation transport studies, p(x) is unknown. The simulation of individual showers can be regarded as a sampling procedure of the random variable (shower) x Example: Energy deposited within the sensitive volume of the detector Monte Carlo estimators: Simulation result: - Central limit theorem uncertainty interval includes the exact value with 99.9 % probability - Usually, simulation is slow (but results come with the associated uncertainties!) Monte Carlo 14
Monte Carlo simulation code MCtracks Simulation geometry: A material cylinder and a point source of mono-energetic radiation, partially collimated. Program PENCYL of the PENELOPE code system Delivers very detailed information on the transport process t r x z E θ y z θ dˆ y φ α E 0 source (x 0, y 0, z 0 ) x φ Direction vectors and polar coordinates Monte Carlo 15
Input file formats (tracks-si.in) TITLE Point source and a homogeneous cylinder.. GSTART >>>>>>>> Beginning of the geometry definition list. LAYER 0 0.1 [Z-lower and Z-higher] CYLIND 1 0 0.1 [Material, R-inner and R-outer] GEND <<<<<<<< End of the geometry definition list.. >>>>>>>> Source definition. SKPAR 2 [Primary particles: 1=electron, 2=photon, 3=positron] SENERG 40e3 [Initial energy (monoenergetic sources only)] SPOSIT 0 0 0 [Coordinates of the source center] SCONE 0 0 5 [Conical beam; angles in deg] >>>>>>>> Material data and simulation parameters. MFNAME Si.mat [Material file, up to 20 chars] MSIMPA 1e3 1e3 1e3 0.05 0.05 1e3 1e3 [EABS(1:3),C1,C2,WCC,WCR] >>>>>>>> Counter array dimensions and pdf ranges. NBE 0 0 100 [Energy window and no. of bins] NBANGL 45 18 [No. of bins for the angles THETA and PHI] >>>>>>>> Energy-deposition detectors (up to 25). ENDETC 0 0 250 [Energy window and no. of bins] EDBODY 1 1 [Active cylinder] >>>>>>>> Dose and charge distributions. DOSE2D 1 1 100 50 [Active body (KL,KC), nos. of bins in Z and R] >>>>>>>> Job properties. RESUME dump.dat [Resume from this dump file, 20 chars] DUMPTO dump.dat [Generate this dump file, 20 chars] DUMPP 60 [Dumping period, in sec] NSIMSH 1e9 [Desired number of simulated showers] END [Ends the reading of input data] Monte Carlo 16
MCtracks results Monte Carlo 17
MCtracks results Monte Carlo 18
MCtracks results Monte Carlo 19