Closed ggalgoczi closed 1 month ago
The magic happens here: https://github.com/BNLNPPS/esi-opticks/blob/esi/optixrap/cu/propagate.h#L134
Essentially a path -- calculated from the mean free path with random number to simulate stochasticity -- for all physical processes are calculated together with the distance to the next boundary.
Then they are compared and the process with the shortest length happens. Will reopen this issue when we get to the implementation and something will not be clear.
The optixrap module isn't used in g4cx/tests/G4CXTest.cc or g4cx/tests/G4CXApp.h, which is why it hasn't been on my radar until now.
It is likely that those examples do not do proper optical photon propagation on GPU, right?
By the way CaTS uses G4CXOpticks.
As you mentioned optixrap is not used anymore, it was replaced by qudarap that takes care of "generation and propagation".
Can I close this one @plexoos ?
I don't really have anything to add here. Again, I hope our simple simulation based on Opticks runs the photons on both the CPU (Geant4) and GPU, but we'll confirm this as we go.
In ray-tracing the code just checks what is the next boundary. Then it retrieves the potential physical processes that can happen on the boundary. However Rayleigh scattering and other processes happen along the step.
Essentially how is Optix combined with MC?