- Code library:
- azimuthal.m - Azimuthal angle sampling
- ccylz.m - Calculates the distance to a cylinder of radius R concentric and aligned with the z-axis
- cgkernel.m - Generic transport kernel for a combinatorial geometry
- ellipsoid.m - Calculates the distance to an ellipsoid centered at an arbitrary point
- plane.m - Calculates the distance of a particle to a planar surface normal to the z-axis
- quadric.m - Calculates the first positive distance to an arbitrary quadric surface
- rotate.m - Deflects direction vector into a random azimuthal angle about it's polar scattering angle
- rutherford.m - Samples the Rutherford distribution for a given screening parameter a
- sphere.m - Calculates the distance to a sphere of radius R centered at an arbitrary point
- xplane.m - Calculates the distance of a particle to a planar surface normal to the x-axis
- yplane.m - Calculates the distance of a particle to a planar surface normal to the y-axis
- zplane.m - Calculates the distance of a particle to a planar surface normal to the z-axis
- Class examples:
- Lecture 8:
- p1p2c1es1.m - Escape zone strategy 1, for a right circular cyclindrical solid
- p1p2c1es2.m - Escape zone strategy 2, for a right circular cyclindrical solid
- p1p2c1es3.m - Escape zone strategy 3, for a right circular cyclindrical solid
- zplanes3a.m - Geometry example: 3 parallel planes, 1 cylinder, simple interacting beam
- Lecture 7:
- track2plane.m - Demonstrates tracking to a plane
- track2sphere.m - Demonstrates tracking to a sphere
- Track2sphere.m - Demonstrates tracking to a sphere with much diagnostic output
- track2quadric.m - Demonstrates tracking to all of the quadric2, double and even single planes
- zplanes3.m - Geometry example: 3 parallel planes, non-interacting beam
- zplanesN.m - Geometry example: N parallel planes, non-interacting beam
- zplanes3a.m - Geometry example: 3 parallel planes, 1 cylinder, simple interacting beam
- Lecture 4:
- zrotphi.m - Demonstrates axis rotation
- randomWalks.m - Random walks simulations
- Lecture 3:
- coin.m - Coin flip simulation
- Lecture 2:
- mcrng32.cpp - A 32-bit MCRNG: Multiplicative Congruential Random Number Generator
- lcrng32.cpp - A 32-bit LCRNG: Linear Congruential Random Number Generator
- mcrng64.cpp - A 64-bit MCRNG: Multiplicative Congruential Random Number Generator
- conv.cpp - Solution to Problem 1 in Chapter 3: converting random int to real
- tt.cpp - "Torture Test" for critical functions used in Monte Carlo
- rand0.cpp - Basic rand() default functionality in C
- rand1.cpp - Basic rand() functionality in C: reseeding
- rand2.cpp - Basic rand() functionality in C: reseeding "randomly" (from the system clock)
- rand3.cpp - Conversion to doubles using C default rand()
- randomPi.cpp - Determining Pi by random dart tossing
- randomIn.cpp - 1D integration using MC
- randTrill.cpp - Beat the clock, MC style (just for fun)
- Other examples that my be used in the future: