EPJ Web of Conferences (Jan 2019)

A vectorization approach for multifaceted solids in VecGeom

  • Apostolakis John,
  • Cosmo Gabriele,
  • Gheata Andrei,
  • Gheata Mihaela,
  • Sehgal Raman,
  • Wenzel Sandro

DOI
https://doi.org/10.1051/epjconf/201921402025
Journal volume & issue
Vol. 214
p. 02025

Abstract

Read online

VecGeom [1] is a multi-purpose geometry library targeting the optimisation of the 3D-solids’ algorithms used extensively in particle transport and tracking applications. The implementations of these algorithms are templated on the input data type and are vectorised based on the VecCore [2] abstraction library in case of multiple inputs in a SIMD vector. This provides additional performance for applications supporting a multi-particle flow, such as the GeantV [3] prototype. VecGeom allows also scalar queries for all the supported solids, an option that started being used in Geant4 [4] since the release 10.2, as optional replacement of the geometry functionality provided by the native Geant4 solids. In single particle mode, VecGeom can still issue SIMD instructions by vectorizing the geometry algorithms featuring loops over internal data structures. This approach has proven to bring very large benefits for the tessellated solids represented in terms of triangular facets. To expose more vectorization in the scalar mode we have extended the approach used for the triangular tessellations to other multifaceted shapes, such as the extruded polygon, the poly-hedra and different trapezoids. We hereby present the strategy used to vectorise the different processing phases for tessellated solids, the performance improvements compared to the previous scalar implementations for other solids using this approach, and how this is reflected in Geant4 simulations using VecGeom as geometry engine.