Add optical absorption and Rayleigh interactors
Add optical absorption and Rayleigh interactors and respective tests to be able to do initial testing of optical models. Also includes an optical Interaction class for the results of discrete optical interactions.
New files are placed in the celeritas::optical namespace, so the class and file names do not have the usual Optical prefix. Both interactors don't depend on any physics or material data, so they're rather simple.
The optical::TackView class is just a placeholder for testing, and will need to be changed later for when the optical state and track code is set up. I'm including it now so that RayleighInteractor's function signature will match the usual pattern of passing a track view, and also removes ambiguity of passing two Real3 arrays to a function.
Since the generator/pregenerator code already has polarization in there, I'm taking back what I said about removing it—sorry @hhollenb about the flip-flop and sorry this PR has taken so long. Thanks again for the great work!
@amandalund Could you give a last quick once-over and hit the auto-merge button if it looks good? Thanks!
I went ahead and updated with the rejection sampler to speed this up (and take a little work off your sholders!): @hhollenb the reduced rejection rate here looks correct to me, but I don't know about the updated scattering angles: https://github.com/celeritas-project/celeritas/pull/1317/commits/39c7a511521ce4c1cf6627506318f8244e1bb845
I went ahead and updated with the rejection sampler to speed this up (and take a little work off your sholders!): @hhollenb the reduced rejection rate here looks correct to me, but I don't know about the updated scattering angles: 39c7a51
Made a quick plot of the scattered polarization angles (e.g. dot_product(new_pol, inc_pol_))) and compared it to the expected $\cos^2\theta$ probability distribution and it looks like they're fairly similar:
There is a little shape difference but I'm not entirely certain if that's within the error bounds or just an artifact of rejection sampling method.
@hhollenb thanks for the plot. It's not surprising the distributions are different since we changed "accept when" to "reject when", as @amandalund suggested. The question is whether the new distribution is correct...