Celeritas 0.7+981ab2d
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::optical::EnteringSurfaceNormalSampler< Calculator > Class Template Reference

Sample a valid facet normal by wrapping a roughness sampler. More...

#include <SurfacePhysicsUtils.hh>

Public Member Functions

template<class... Args>
 EnteringSurfaceNormalSampler (Real3 const &dir, Real3 const &normal, Args &&... args)
 
template<class Engine >
Real3 operator() (Engine &rng)
 

Detailed Description

template<class Calculator>
class celeritas::optical::EnteringSurfaceNormalSampler< Calculator >

Sample a valid facet normal by wrapping a roughness sampler.

Some facet normal calculators might not produce surface normals valid for optical physics surface crossings (see is_entering_surface ). This functor will construct and repeatedly sample the distribution until the track is exiting the sampled facet normal.

Example

This uses a gaussian roughness distribution to accept only facets that have a direction where the track is exiting the sampled normal.

track.geometry().dir(),
s_phys.global_normal(),
data.sigma_alpha[sub_model_id]};
auto rng = track.rng();
s_phys.facet_normal(sample_facet(rng));
Sample a valid facet normal by wrapping a roughness sampler.
Definition SurfacePhysicsUtils.hh:100

The documentation for this class was generated from the following file: