Common Geometry Primitives library WP3 – date

Slides:



Advertisements
Similar presentations
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Advertisements

Simulation Project Major achievements (past 6 months 2007)
Modelling. Outline  Modelling methods  Editing models – adding detail  Polygonal models  Representing curves  Patched surfaces.
Introduction to Software Testing
Witek Pokorski, Radovan Chytracek, Jeremy McCormick, Giovanni Santin
Unit tests, Integration tests Physics tests Andrea Dotti, Gunter Folger, Pere Mato CERN – PH/SFT Geant4 workshop 2012.
CMSC 345 Fall 2000 Unit Testing. The testing process.
U-Solids: new geometrical primitives library for Geant4 and ROOT Marek Gayer CERN Physics Department (PH) Group Software Development for Experiments (SFT)
G EANT highlights kernel modules Gabriele Cosmo, CERN PH-SFT for the Geant4 Collaboration Gabriele Cosmo, CERN PH-SFT for the Geant4 Collaboration.
Nightly Releases and Testing Alexander Undrus Atlas SW week, May
DTIAtlasBuilder Adrien Kaiser Neuro Image Research and Analysis Laboratories University of North Carolina at Chapel Hill A tool to create an atlas from.
Usage of ROOT geometry with GEANT4
USolids meeting Conventions. DistanceToIn(p,v) Geant4USolidsVecGeomROOT Point p is Outside No intersection Between shape and ray(p+v*t) Infinity.
TECH 104 – Technical Graphics Communication Week 13: 3D Modeling Basics.
Unified Solids Marek Gayer, John Apostolakis, Gabriele Cosmo, Andrei Gheata, Jean-Marie Guyader, Tatiana Nikitina CERN PH/SFT The 17 th Geant4 Collaboration.
W. Pokorski - EP/SFT Simulation Project1 GDML - recent developments Witek Pokorski
Detector Simulation on Modern Processors Vectorization of Physics Models Philippe Canal, Soon Yung Jun (FNAL) John Apostolakis, Mihaly Novak, Sandro Wenzel.
Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI,
New software library of geometrical primitives for modelling of solids used in Monte Carlo detector simulations Marek Gayer, John Apostolakis, Gabriele.
Jump to first page The new ROOT geometry package Andrei Gheata - ALICE Institute of Space Sciences, Bucharest.
M Gallas CERN EP-SFT LCG-SPI: SW-Testing1 LCG-SPI: SW-Testing QMTest test framework LCG AppArea meeting (16/07/03) LCG/SPI LCG Software.
Introduction What is detector simulation? A detector simulation program must provide the possibility of describing accurately an experimental setup (both.
VMC workshop1 Ideas for G4 navigation interface using ROOT geometry A.Gheata ALICE offline week, 30 May 05.
STATUS OF THE UNIFIED SOLIDS LIBRARY Gabriele Cosmo/CERN Tatiana Nikitina/CERN.
G EANT highlights kernel modules Gabriele Cosmo, CERN PH-SFT for the Geant4 Collaboration Gabriele Cosmo, CERN PH-SFT for the Geant4 Collaboration.
Outline  Developments/fixes in the last year  Introduced in release 9.6 and patches  Planned for release 10.0 and ongoing …  Currently under development.
U-Solids: new geometrical primitives library for Geant4 and ROOT Marek Gayer CERN Physics Department (PH) Group Software Development for Experiments (SFT)
Geant4 CPU performance : an update Geant4 Technical Forum, CERN, 07 November 2007 J.Apostolakis, G.Cooperman, G.Cosmo, V.Ivanchenko, I.Mclaren, T.Nikitina,
Geant4 is a toolkit to simulate the passage of particles through matter, and is widely used in HEP, in medical physics and for space applications. Ongoing.
Current status of the development of the Unified Solids library Marek Gayer CERN PH/SFT.
Enabling Grids for E-sciencE INFSO-RI Enabling Grids for E-sciencE Gavin McCance GDB – 6 June 2007 FTS 2.0 deployment and testing.
Toward Geant4 version 10 Makoto Asai (SLAC PPA/SCA) For the Geant4 Collaboration Geant4 Technical Forum December 6 th, 2012.
Outline  Developments/fixes in the last year  Introduced in release 10.1 and patches (also to 10.0)  Planned for release 10.2 and ongoing …  Currently.
Status of the development of the Unified Solids library Marek Gayer, CERN PH/SFT 2 nd AIDA Annual Meeting, Frascati 2013.
STATUS OF GDML SUPPORT IN ROOT A.Gheata SFT group meeting, June 2, 2014.
New features in ROOT geometrical modeller for representing non-ideal geometries René Brun, Federico Carminati, Andrei Gheata, Mihaela Gheata CHEP’06,
TECH 104 – Technical Graphics Communication Week 12: 3D Modeling Basics.
Modularization of Geant4 Dynamic loading of modules Configurable build using CMake Pere Mato Witek Pokorski
CERN, 7 November 2011 Anton Pytel Slovak Technical University TRIP FROM GENERATORS TO GEOMETRIES.
Status of TFluka: geometry and validation Andrei Gheata ALICE Off-line week, 21 Feb
Getting Started with JUnit Getting Started with JUnit The benefits and ease of writing and running JUnit test cases and test suites. The benefits and ease.
Code improvement: Coverity static analysis Valgrind dynamic analysis GABRIELE COSMO CERN, EP/SFT.
Update on USolids/VecGeom integration in Geant4 Gabriele Cosmo, CERN EP/SFT.
Philippe Canal (FNAL) for the GeantV development team G.Amadio (UNESP), Ananya (CERN), J.Apostolakis (CERN), A.Arora (CERN), M.Bandieramonte (CERN), A.Bhattacharyya.
Geometry & Persistency Recent & ongoing developments
Auxiliary Views Chapter 7.
How to Contribute to System Testing and Extract Results
Software Testing.
(on behalf of the POOL team)
INTRODUCING Adams/CHASSIS
Status of geometrical modeler
Geant4 Geometry Speed-ups
Recent performance improvements in ALICE simulation/digitization
CPU Benchmarks Parallel Session Summary
Generator Services planning meeting
Releases and developments
Markus Frank CERN/LHCb CHEP2013, Amsterdam, October 14th–18th 2013
Analysis framework - status
Ideas for G4 navigation interface using ROOT geometry
Instructor: Prasun Dewan (FB 150,
The New ROOT Geometry Package
Introduction to Software Testing
Matlab as a Design Environment for Wireless ASIC Design
Geometry checking tools
EMF Compare Ganymede Simultaneous Release
Simulation Framework Subproject cern
Simulation and Physics
Simulation Project Structure and tasks
Advanced Examples Alex Howard, Imperial College, UK
M. Kezunovic (P.I.) S. S. Luo D. Ristanovic Texas A&M University
Presentation transcript:

Common Geometry Primitives library WP3 – date M. Gheata, CERN EP/SFT for the USolids/VecGeom team

M.Gheata - Common Geometry Primitives library Outline Motivation Status Directions and work plan Conclusions 16/06/16 M.Gheata - Common Geometry Primitives library

Motivation for the development Originally seen as a consolidation of solids algorithms in Geant4 and ROOT, for better performance and easier maintainability Scope extended due to new requirements added by GeantV Vectorization Portability to other architectures (GPU, MIC, …) The larger scope required developing a new geometry package: VecGeom Development of USolids an VecGeom merged into a single package This path aiming to release a single high performance product used more or less everywhere Activity part of AIDA-2020/WP3 ~1995 ~2002 ~2010 ~2013 Geant4 geometry modeler ROOT/TGeo AIDA USolids VecGeom 16/06/16 M.Gheata - Common Geometry Primitives library

VecGeom: targeting vectorization Vector signatures Internal algorithm vectorization internal loop over lateral planes for distance calculation “parallel” collision detection  For vectorized transport (GeantV) Beneficial for current scalar simulations 16/06/16 M.Gheata - Common Geometry Primitives library

Available shapes: status 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, Extruded Solid, Generic Polycone Only in VecGeom: Paraboloid, Parallelepiped (Para), Hyperboloid, Ellipsoid, Torus (+ torus section), Scaled Solid, Boolean (addition, subtraction, intersection) Missing: Elliptical Cone, Elliptical Tube, Cut Tube (composable) Twisted shapes (box, trap, tube) – complex & infrequent use Working on a comprehensive common set 16/06/16 M.Gheata - Common Geometry Primitives library

Correctness: ShapeTester testing suite Geant4 tests - Unit tests - SBT(solid batch test) - SurfaceChecker - OpticalEscape - SurfaceVisTest - testDistanceAccuracy.cc … Extensive Testing Suite USolids tests -SBT -OpticalEscape -SBTperformance (Comparison Usolids, Root, Geant4) Root tests CheckShape: -ShapesDistances() -ShapesSafety() -ShapeNormal() Possibility to run tests interactively through ROOT Shape Tester Geant4+USolids+Root tests New 'X-Ray Scan' Test SBTperformance Unit tests VecGeom Testing Suite 16/06/16 M.Gheata - Common Geometry Primitives library

Coverage extension in Shape Tester - ongoing One shape for each different topology Sections, shells, … Degenerated configurations Pathological cases (long/thin shapes, …) 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 16/06/16 M.Gheata - Common Geometry Primitives library

New features: precision on boundaries p1 = p0 + Dref*v v ε = max|Dback-Dref|vn -v Dback= DistanceToIn(p1, -v) p0 p1 n Systematic check in Shape Tester for every shape 16/06/16 M.Gheata - Common Geometry Primitives library

Performance monitoring after changes Goal: develop algorithms as accurate but faster than Geant4/ROOT/USolids Plot on polyhedron performance, evolution with commits Needs systematic checks Time[s] Less accurate: using bbox Less accurate: limited to current Z segment 16/06/16 M.Gheata - Common Geometry Primitives library

Current status of shapes in Shape Tester Conventions test Stress tests Box OK Tube Trapezoid Generic Trapezoid (Arb8) Simple Trapezoid (Trd) Orb Sphere Cone (x) Parallelepiped (Para) Polycone (x) Failures Polyhedron (x) Torus (x) All other shapes either missing or showing failures -> to be addressed (x) Being worked out now… 16/06/16 M.Gheata - Common Geometry Primitives library

Shapes: immediate open issues to address Fix errors reported by Shape Tester Including any new added topologies Provide missing auxiliary functions (GetPointOnSurface, Capacity, SurfaceArea) Already implemented in USolids Required by Geant4 Improve Trap and Cone performance DistanceToIn() in UTrap is faster Scalar performance for Cone can be improved for distance functions Improve scalability for Polycone and Polyhedron Poor performance with high number of Z-sections in VecGeom shapes Internal vectorisation on Z sections not yet working – to be developed Review application of conventions for points on the “wrong side” Final validation: robustness and fixes for problems detected only when running on complex setups 16/06/16 M.Gheata - Common Geometry Primitives library

Integration with Geant4 and ROOT Objective: profit from demonstrated VecGeom scalar performance improvements in existing setups Without requiring user code to change Important step for validating the new package as replacement of geometry Usolids/VecGeom integrated with Geant4 as optional alternative Work done to integrate VecGeom solids with ROOT Implementation: bridge classes deriving from the base class for solids (G4VSolid, TGeoShape) Delegating navigation methods to the VecGeom library 16/06/16 M.Gheata - Common Geometry Primitives library

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 Now part of nightly builds in Geant4 VecGeom shapes from Git master Tested on CentOS/gcc-5.3 Several tests failing or showing run-time errors/warnings In release 10.3-beta, VecGeom will work in batch and interactive mode Also in multi-threading (MT) Still failing parameterisations in MT mode Missing some auxiliary methods in VecGeom 16/06/16 M.Gheata - Common Geometry Primitives library

Building Geant4 to use USolids/VecGeom 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 \ Install Geant4 export USolids_DIR=${VecGeomINSTALLDIR}/lib/Cmake/USolids Add -DGEANT4_USE_USOLIDS=ON when configuring Geant4 with CMake 16/06/16 M.Gheata - Common Geometry Primitives library

Expected geometry features in Geant4 10.3 Release 10.3 of Geant4 planned for December 2016 Beta preview (10.3-beta) at end of June Ability to exercise a limited set of shapes from VecGeom Box, Tube, Cone, Orb, 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 Ability to scale shapes along Cartesian axes Extended GDML schema (new version 3.1.4) Future plan: Provide specialised navigation interface class to VecGeom navigation 16/06/16 M.Gheata - Common Geometry Primitives library

VecGeom solids used in ROOT TGeo TPluginManager Using ROOT plugin mechanism to avoid direct library dependencies Load library, create the converter TGeoVGConverter TVirtualGeoConverter::instance()::ConvertGeometry() A single call to convert the shapes in any TGeo geometry to VecGeom ones libVGConverter.so libvecgeom.a libGeom.so TVirtualGeoConverter The base interface is defined in the TGeo library ::ConvertGeometry() = 0 derives TGeoVGShape Make VecGeom solid look like a regular ROOT shape TGeoBBox TGeoTube TGeoCone … fShape VPlacedVolume Keep the original ROOT shape and the corresponding converted solid Navigation using the VecGeom converted solid General functionality not available in VecGeom Graphics, alignment, … Contains() DistanceToIn() Safety() … 16/06/16 M.Gheata - Common Geometry Primitives library

Status and availability Supports any ROOT geometry (shapes not yet available are not converted) Alignment, graphics, navigation, geometry checking, … Used as debugging tool (ray-tracing, root shape tester) Expecting important gains for some methods Still to measure overheads/gains systematically (per shape) and in full transport Committed to ROOT master (commit 0bdd34b) New module created in geom/vecgeom creating libConverterVG.so(dyld) Requirement – compilation of ROOT after VecGeom (and Vc) are installed Assuming $VCROOT and $VECGEOMROOT are the install prefixes for Vc and VecGeom -DCMAKE_PREFIX_PATH=$VCROOT/lib/cmake/Vc;$VECGEOMROOT/lib/CMake/VecGeom -Dvc=ON –Dvecgeom=ON 16/06/16 M.Gheata - Common Geometry Primitives library

M.Gheata - Common Geometry Primitives library Summary Most of the common shapes now implemented in VecGeom Missing still some auxiliary methods to allow for full usage in Geant4 Shapes passing Shape Tester: box, tube, cone, orb, para, sphere, trd, trap, generic trap, polyhedron Performance issues: cone, trap, polycone, polyhedron In process to extend Shape Tester Added new checks like boundary precision checks/tuning Ongoing extension of coverage for shapes topologies VecGeom through Geant4 and ROOT in place (shapes level) Expecting near to “production quality” performance in VecGeom release in time for Geant4 10.3 16/06/16 M.Gheata - Common Geometry Primitives library

M.Gheata - Common Geometry Primitives library Contributors EP/SFT+ AIDA 2020: J.Apostolakis, G.Cosmo, A.Gheata, M. Gheata, F.Carminati, T.Nikitina, W.Pokorski G.Amadio(UNESP), G.Lima(FNAL), R.Sehgal(BARC), E.Tcherniaev(RAS), S.Wenzel(CERN) 16/06/16 M.Gheata - Common Geometry Primitives library