Opticks : GPU Optical Photon Simulation

http://simoncblyth.bitbucket.io/env/presentation/opticks_gpu_optical_photon_simulation_psroc.html (Jan 2016) http://simoncblyth.bitbucket.io/env/presentation/opticks_gpu_optical_photon_simulation.html (Jan 2016) http://simoncblyth.bitbucket.io/env/presentation/optical_photon_simulation_with_nvidia_optix.html (July 2015)

Executive Summary

Opticks integrates Geant4 simulations with state-of-the-art NVIDIA OptiX GPU ray tracing.

Contents

Simon C Blyth, National Taiwan University
January 2016

Detecting Neutrinos via Optical Photons 1

Detecting Neutrinos via Optical Photons 2

JPMT Before Contact 1

JPMT Before Contact 2

JPMT Before Contact 3

NVIDIA OptiX GPU Ray Tracing Framework

Apply Image Synthesis Tool to Photon Simulation

Same rate determining step : geometry intersection

OptiX Provides:

CUDA compiler optimized for Ray Tracing

NVIDIA expertise on efficient GPU(s) usage

IHEP Performance Check

Used IHEP 4 GPU workstation to verify near linear performance scaling across multiple GPUs

https://developer.nvidia.com/optix

https://research.nvidia.com/publication/optix-general-purpose-ray-tracing-engine

Brief History of GPU Optical Photon Simulation Development

1704

2013(Aug-) [liberate geometry]

2014 [integrate geometry/event data with Chroma]

2015 [replace Chroma with Opticks]

Introducing Opticks : Recreating G4 Context on GPU

Basis packages

Geometry packages

GPU library interface packages

Main packages

Opticks Absolute Reflection compared to Fresnel expectation

Comparison of simulated absolute reflection of S and P polarized single events against expectation from Fresnel formula. Using uniform planar incident cyclindrically directed light.

/env/numerics/npy/reflection.png

Opticks Prism Deviation vs Incident angles for 10 wavelengths

Prism geometry and Snell's law at two refractions allows deviation angle vs incident angle to be predicted. Comparison of simulation results with expectations for 10 wavelengths using refractive index of Schott F2 Flint Glass.

/env/numerics/npy/prism-deviation.png

Validating Opticks against Geant4

Compare Opticks/Geant4 propagations with simple test geometries and light sources. For each test shape:

Shape OptiX OpenGL Geant4
sphere Y Y Y
box needs debug Y Y
prism Y Y  
convex lens Y Y  
DayaBay PMT Y Y needs port

Multiple Rainbows from a Single Drop of Water

/env/presentation/rainbow-mechanism.png

Caustic bunching at least deviation causes rainbow

  1. Primary bow, single reflection : ray f at bow angle
  2. Secondary bow, double reflection : ray g at bow angle
  3. Deviation angles 0:180 degrees hemisphere opposite to incident rays

Jearl D. Walker, 1975, Multiple rainbows from single drops of water and other liquids http://patarnott.com/atms749/pdf/MultipleRainbowsSingleDrops.pdf

Disc beam 1M Photons incident on Water Sphere (S-Pol)

Photons shown by lines with color representing polarization direction. S-Polarized (perpendicular to plane of incidence) intersection by disc radially directed polarization. Geodesic icosahedron tesselation just for OpenGL visualization, actual OptiX geometry is perfect sphere.

/env/graphics/ggeoview/rainbow-spol-disc-incident-sphere.png

2ns later, Several Bows Apparent

/env/graphics/ggeoview/rainbow-spol-disc-several-bows.png

Rainbow deviation angles

Deviation angle distribution of all 3M photons. Photon wavelengths from Plankian 6500K blackbody spectrum (implemented with inverse CDF GPU texture lookup). Simulated "images" obtained from wavelength spectrum of each bin using CIEXYZ weighting functions converted into sRGB/D65 colorspace. The two images exposed for luminance (CIE-Y) of max bin of 1st and 2nd bows.

/env/numerics/npy/rainbow16_deviation_angle.png

Rainbow Spectrum for 1st six bows

Spectra obtained by selecting photons by internal reflection counts. Colors obtained from spectra of each bin using CIEXYZ weighting functions converted into sRGB/D65 colorspace. Exposures by normalizing to bin with maximum luminance (CIE-Y) of each bow. White lines indicate geometric optics prediction of deviation angle ranges of the visible range 380-780nm. 180-360 degrees signifies exit on same side of droplet as incidence.

/env/numerics/npy/rainbow6-spectrum.png

1M Rainbow S-Polarized, Comparison Opticks/Geant4

Deviation angle(degrees) of 1M parallel monochromatic photons in disc shaped beam incident on water sphere. Numbered bands are visible range expectations of first 11 rainbows. S-Polarized intersection (E field perpendicular to plane of incidence) arranged by directing polarization radially.

/env/optix/cfg4/rainbow-cfg4-spol.png

Performance Comparison Opticks/Geant4

Average Propagate Time for 1M photons

MacBook Pro 2013, NVIDIA GeForce GT 750M 2GB (384 cores)

Rainbow Test Geant4 10.2 Opticks Interop Opticks Compute
1M (S-Pol) 56 s 1.62 s 0.28 s
1M (P-Pol) 58 s 1.71 s 0.25 s

Opticks Interop/Compute Modes

JPMT Inside Wide

JPMT Wide

http://simoncblyth.bitbucket.io/env/graphics/ggeoview/jpmt-wide_half.png

JPMT After Contact

http://simoncblyth.bitbucket.io/env/graphics/ggeoview/jpmt-after-contact_half.png

JPMT Approach

http://simoncblyth.bitbucket.io/env/graphics/ggeoview/jpmt-approach_half.png

JPMT Arrival

http://simoncblyth.bitbucket.io/env/graphics/ggeoview/jpmt-arrival_half.png

JPMT Inside Outside

http://simoncblyth.bitbucket.io/env/graphics/ggeoview/jpmt-inside-outside_half.png

JPMT Headview

http://simoncblyth.bitbucket.io/env/graphics/ggeoview/jpmt-headview_half.png

JPMT Backview

http://simoncblyth.bitbucket.io/env/graphics/ggeoview/jpmt-backview_half.png