celeritas-project / celeritas

Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
https://celeritas-project.github.io/celeritas/user/index.html
Other
62 stars 33 forks source link

Add minimal version of GenTrap (Arb8) shape #1171

Closed mrguilima closed 6 months ago

mrguilima commented 6 months ago

Add support for the GenTrap shape [orange]

Tracing unit tests to be implemented in another MR.

This is a simplified version of the GenTrap (or ROOT's Arb8) shape, which still does not support twisted side faces.

Also, for the case of triangular z-faces, it seems to work properly for well behaved cases (e.g. triangular prism), while failing for harder ones, like when the two z-face triangles are not directly aligned (e.g. mirror-reflected triangles).

Lastly, the ROOT docs suggest that a tetrahedron (1 + 3 vertices) should work, but this is not yet supported.

Still, the current implementation works for a lot of the intended cases, as far as the side-faces are planar.