Update on USolids/VecGeom Integration in Geant4 by Gabriele Cosmo at CERN EP/SFT

Slide Note
Embed
Share

Status update on the implementation and testing of shapes in Geant4 using USolids/VecGeom integration, highlighting open issues, VecGeom shapes usage, and expected geometry features in Geant4 10.3. The transition from USolids to VecGeom as a unified solids library in Geant4, aimed at enhancing geometrical primitives and algorithm unification across platforms, is discussed. VecGeom's focus on vectorization for improved performance in simulations is emphasized.


Uploaded on Oct 10, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Update on USolids/VecGeom integration in Geant4 Gabriele Cosmo, CERN EP/SFT

  2. Contents Status of implementation of shapes Status of testing in Shape Tester Open issues to address Status of VecGeom shapes usage in Geant4 Geometry features expected in Geant4 10.3 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 2

  3. USolids to VecGeom Geant4 geometry modeler VecGeom ROOT/TGeo AIDA USolids ~1995 ~2002 ~2010 ~2013 USolids (Unified Solids) library started as AIDA project Goal: develop a new library of geometrical primitives to unify algorithms existing in Geant4 and Root VecGeom: started as feasibility study of vectorization for geometry Geometry primitives code development as long-term evolution of USolids Developed back-to-back with USolids as independent library Now incorporating USolids implementation and sharing same interfaces Will replace USolids in the medium/long term Activity part of AIDA-2020/WP3 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 3

  4. VecGeom: targeting vectorization Vector signatures Internal algorithm vectorization internal loop over lateral planes for distance calculation parallel collision detection For vectorized transport Beneficial for current simulations 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 4

  5. Status of implementation of shapes 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 5

  6. Available shapes: status 1000 1000 800 1000 500 500 600 0 0 Both in USolids and VecGeom: Box, Orb, Trapezoid (Trap), Simple Trapezoid (Trd), Sphere (+ sphere section), Tube (+ cylindrical section) , Cone (+ conical section), Generic Trapezoid (Arb8), Polycone, Polyhedron Only in Usolids: Tetrahedron (Tet), Multi-Union, Tessellated Solid, Generic Polycone, Extruded solid Only in VecGeom: Paraboloid, Parallelepiped (Para), Hyperboloid, Ellipsoid, Torus (+ torus section), Scaled Solid, Boolean (addition, subtraction, intersection) Missing: Elliptical Cone, Elliptical Tube, Cut Tube, Twisted shapes (box, trap, tube) 400 -500 -500 200 -1000 1000 -1000 1000 1000 500 1000 500 0 500 1000 0 -500 500 1000 -500 0 -1000 0 -1000 -500 500 -500 500 -1000 -1000 0 0 4 x 10 6 4 2 0 -2 -4 5 -6 -10 0 4 x 10 -5 0 4 -5 x 10 5 1000 0 -1000 4000 3000 4000 2000 3000 1000 2000 0 1000 -1000 0 -1000 -2000 -2000 -3000 -3000 -4000 -4000 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 6

  7. Available shapes: final target 1000 1000 800 1000 500 500 600 0 0 in VecGeom: Box, Orb, Trapezoid (Trap), Simple Trapezoid (Trd), Sphere (+ sphere section), Tube (+ cylindrical section) , Cone (+ conical section), Generic Trapezoid (Arb8), Polycone, Polyhedron 400 -500 -500 200 -1000 1000 -1000 1000 1000 500 1000 500 0 500 1000 0 -500 500 1000 -500 0 -1000 0 -1000 -500 500 -500 500 -1000 -1000 0 0 4 x 10 6 4 2 0 -2 -4 5 -6 -10 0 4 x 10 -5 0 4 -5 x 10 5 Tetrahedron (Tet), Multi-Union, Tessellated Solid, Generic Polycone, Extruded solid 1000 0 -1000 4000 Paraboloid, Parallelepiped (Para), Hyperboloid, Ellipsoid, Torus (+ torus section), Scaled Solid, Boolean (addition, subtraction, intersection) 3000 4000 2000 3000 1000 2000 0 1000 -1000 0 -1000 -2000 -2000 -3000 -3000 -4000 -4000 Elliptical Cone, Elliptical Tube, Cut Tube, Twisted shapes (box, trap, tube) 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 7

  8. The testing suite Geant4 tests - Unit tests - SBT(solid batch test) - SurfaceChecker - OpticalEscape - SurfaceVisTest - testDistanceAccuracy.cc Extensive Testing Suite Root tests CheckShape: -ShapesDistances() -ShapesSafety() -ShapeNormal() Possibility to test shape on Run Time USolids tests -SBT -OpticalEscape -SBTperformance (Comparison Usolids, Root, Geant4) Shape Tester Geant4+USolids+Root tests New 'X-Ray Scan' Test Unit tests SBTperformance Testing Suite 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 8

  9. Coverage extension in Shape Tester - ongoing One shape for each different topology Sections, shells, Degenerated configurations Pathological cases Shapes selection from a DB DB generated from imported LHC experiments geometries Random generation of shapes Per type, dimension and position in space Batch or interactive mode 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 9

  10. Status of testing in Shape Tester & open issues 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 10

  11. Current status of shapes in ShapeTester Shape Conventions test Stress tests Box (o) OK OK Tube (o) OK OK Trapezoid (o) (x) OK OK Generic Trapezoid (Arb8) (o) (x) OK OK Simple Trapezoid (Trd) OK OK Orb (o) OK OK Sphere OK OK Paraboloid (o) OK OK Cone (x) OK OK Parallelepiped (Para) (o) OK OK Polycone (x) Failures Failures Polyhedron (x) OK OK Torus (x) All other shapes either missing or showing failures 15/09/16 Failures Failures (o) Migrated to new framework (x) Being worked out now Update on USolids/VecGeom integration in Geant4 - G.Cosmo 11

  12. Currently working on Migration of shapes to new framework adopting VecCore Rationalization of interfaces and vector signatures Careful evaluation of performance figures: no impact expected Improvement of Trap performance Special focus on DistanceToIn() function Addressing issue affecting Cone and Polycone Errors reported from ShapeTester Scalability with increasing number of Z-sections in Polycone Internal vectorisation Review of CalculateExtent() in Geant4 for geometry optimisation Rationalize and improve existing code Need to apply same voxelisation technique to VecGeom shapes as for G4 ones Required in order to have meaningful performance comparisons 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 12

  13. Shapes: immediate open issues to address Fix errors reported by Shape Tester Including any new added topologies Improve Trap performance DistanceToIn() in UTrap is faster Internal vectorisation Improve robustness and performance for Cone and Polycone Complete migration to new VecCore framework for all shapes Complete review of CalculateExtent() in Geant4 for all shapes Robustness and fixes for problems detected only when running on complex setups 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 13

  14. Status of VecGeom shapes usage in Geant4 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 14

  15. Using VecGeom from Geant4 - status USolids can be used in Geant4 since release 10.0 Passing the whole Geant4 testing suite Some run-time warnings with CMS bench VecGeom solids can be used seamlessly since Geant4 10.2 as external library Part of nightly builds in Geant4 VecGeom shapes from Git master Tested on CentOS/gcc-5.3 A number of tests failing (mainly FPE errors) or showing run-time errors/warnings With current Geant4 development version, VecGeom works in batch and interactive mode Also in multi-threading (MT), including parameterisations Ability to select shapes to replace at installation, since 10.2.p02. Future plan: provide specialised navigation interface class to VecGeom navigation 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 15

  16. Building Geant4 to use USolids/VecGeom a. Install USolids/VecGeom libraries Configure to either use USolids implementation: cmake -DBACKEND=Scalar -DGEANT4=OFF -DUSOLIDS=ON -DUSOLIDS_VECGEOM=OFF \ [...other optional VecGeom switches as needed...] \ -DCMAKE_INSTALL_PREFIX=${VecGeomINSTALLDIR} ${VecGeomSOURCE} make install or VecGeom implementation: cmake -DBACKEND=Scalar -DGEANT4=OFF -DUSOLIDS=ON -DUSOLIDS_VECGEOM=ON \ [...other optional VecGeom switches as needed...] \ -DCMAKE_INSTALL_PREFIX=${VecGeomINSTALLDIR} ${VecGeomSOURCE} make install b. Install Geant4 export USolids_DIR=${VecGeomINSTALLDIR}/lib/Cmake/USolids Add -DGEANT4_USE_USOLIDS=ONwhen configuring Geant4 with CMake NOTE: reasonably recent version of the gcc/clang compilers required. Windows VC++ not supported 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 16

  17. Geometry features in Geant4 10.3 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 17

  18. Expected geometry features in Geant4 10.3 Ability to exercise a limited set of shapes from VecGeom Box, Tube, Cone, Orb, Para, Sphere, Trap, Trd, Torus, Polycone, Polyhedron Approaching production quality in terms of correctness and robustness Extension of Geant4 CMake build system to enable use of shapes individually (already available in 10.2.p02 and 10.3-beta) Ability to scale shapes along Cartesian axes Extended GDML schema (new version 3.1.4) 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 18

  19. Summary Most common shapes now implemented in VecGeom Shapes passing Shape Tester: box, tube, cone, orb, para, sphere, trd, trap, generic trap, paraboloid, polyhedron Performance issues: cone, trap, polycone In process to extend Shape Tester On going extension of coverage for shapes topologies VecGeom through Geant4 in place (shapes level) Expecting near to production quality performance in Geant4 release 10.3 for a set of relevant shapes 15/09/16 Update on USolids/VecGeom integration in Geant4 - G.Cosmo 19

Related


More Related Content