19
U-Solids: new geometrical primitives library for Geant4 and ROOT Marek Gayer CERN Physics Department (PH) Group Software Development for Experiments (SFT)

U-Solids: new geometrical primitives library for Geant4 and ROOT

  • Upload
    jabir

  • View
    26

  • Download
    1

Embed Size (px)

DESCRIPTION

U-Solids: new geometrical primitives library for Geant4 and ROOT. Marek Gayer CERN Physics Department (PH) Group Software Development for Experiments (SFT). Introduction, motivation. - PowerPoint PPT Presentation

Citation preview

Page 1: U-Solids: new geometrical primitives library for Geant4 and ROOT

U-Solids: new geometrical primitives library for Geant4

and ROOT

U-Solids: new geometrical primitives library for Geant4

and ROOTMarek Gayer

CERN Physics Department (PH)

Group Software Development for Experiments (SFT)

Page 2: U-Solids: new geometrical primitives library for Geant4 and ROOT

Introduction, motivationIntroduction, motivation

Two geometry modellers in ROOT and Geant4

Solids are 80% of maintenance effort in geometry modeller

Consolidate algorithms into a single, new U-Solids library

Introduce few new solid shapes Optimized, adapted to new architectures

04/20/23 2

Page 3: U-Solids: new geometrical primitives library for Geant4 and ROOT

Solids to be implementedSolids to be implemented

Union of all solids from Geant4 and ROOT– Simple solids (e.g. box, tube, cone, trapezoid) -

mostly ported from the existing implementation, used to provide an initial set for tests within the new library

– Complex existing solids (e.g. polycone, extruded polygone) - to be consolidated in the new library (one of the priorities)

New solids to optimize existing use cases: union of many solids using voxelization techniques

The ordering of implementation is to be decided.

304/20/23

Page 4: U-Solids: new geometrical primitives library for Geant4 and ROOT

Currently implemented solidsCurrently implemented solids

For the start, the simplest shapes were selected

Box, Orb (done), Trapezoid (ongoing)

04/20/23 4

Page 5: U-Solids: new geometrical primitives library for Geant4 and ROOT

Navigation functionality and library services for each solid

Navigation functionality and library services for each solid

Performance critical methods:

– Location of point either inside, outside or on surface

– Shortest distance to surface for outside points

– Shortest distance to surface for inside points

– Distance to surface for inside points with given direction

– Distance to surface for outside points with given direction

– Normal vector for closest surface from given point

Additional methods: Bounding Box, Capacity, Volume,

Generating points on surface/edge/inside of solid, Creating mesh for visualization …

504/20/23

Page 6: U-Solids: new geometrical primitives library for Geant4 and ROOT

Criteria of inclusion of new and existing codes from Geant4, ROOT

Criteria of inclusion of new and existing codes from Geant4, ROOT

Validity of returned results Performance Readability, simplicity of algorithm Possibility of easy vectorization Caution about not introducing new

errors

04/20/23 6

Page 7: U-Solids: new geometrical primitives library for Geant4 and ROOT

Suite of testsSuite of tests

U-Solids codes should pass:

– Optical test

– Solid Batch Test (SBT)Original geometry and voxel testsResults comparison testPerformance test

– ROOT tests (Todo)

04/20/23 7

Page 8: U-Solids: new geometrical primitives library for Geant4 and ROOT

Optical EscapeOptical Escape

Optical photon is generated inside solid Repeatedly bounces from inner surface Particle must not escape the solid

04/20/23 8

Page 9: U-Solids: new geometrical primitives library for Geant4 and ROOT

Solids Batch Test (SBT) geometry and voxel testsSolids Batch Test (SBT) geometry and voxel tests

Random points test (groups of inside, outside and surface points)

Various distance type methods are tested by numerous checks

E.g. for each inside random point p, SafetyFromInside(p) must be > 0

It also tests random voxels with random inside points

04/20/23 9

Page 10: U-Solids: new geometrical primitives library for Geant4 and ROOT

Solids Batch Test (SBT) performance and results comparison tests

Solids Batch Test (SBT) performance and results comparison tests

Attempt to compare performance of Geant4, ROOT and new U-Solids

Similar performance as one indicator of correct implementation of new methods

Also, values and their differences from different codes can be compared

Plots are used for quick evaluation Work in progress Todo: port and measure in Linux

1004/20/23

Page 11: U-Solids: new geometrical primitives library for Geant4 and ROOT

Example plot: performance testExample plot: performance test

1104/20/23 Note: preliminary results, to be validated on Linux with standard compilation flags

Page 12: U-Solids: new geometrical primitives library for Geant4 and ROOT

Example plot: Results comparison testExample plot: Results comparison test

1204/20/23

Page 13: U-Solids: new geometrical primitives library for Geant4 and ROOT

Example plot: Results comparison testExample plot: Results comparison test

1304/20/23

Page 14: U-Solids: new geometrical primitives library for Geant4 and ROOT

Example plot: Normal vectorsExample plot: Normal vectors

1404/20/23

Page 15: U-Solids: new geometrical primitives library for Geant4 and ROOT

Example plot: Normal vectorsExample plot: Normal vectors

1504/20/23

Page 16: U-Solids: new geometrical primitives library for Geant4 and ROOT

Example plot: Normal vectorsExample plot: Normal vectors

1604/20/23

Page 17: U-Solids: new geometrical primitives library for Geant4 and ROOT

Future workFuture work

Tests consolidation Finish trapezoid based on test results From other simple solids up to the more

complex ones Continue work on union of many solids Polycone is very often used and has

room for improvement

04/20/23 17

Page 18: U-Solids: new geometrical primitives library for Geant4 and ROOT

AcknowledgmentAcknowledgment

Part of AIDA project, coordinated by Gabriele Cosmo

Definition / steering in collaboration with Andrei Gheata and John Apostolakis

Other contributors:– Jean-Marie Guyader - Multi-union

implementation (summer student)– Tatiana Nikitina - Geant4 integration and

testing

1804/20/23

Page 19: U-Solids: new geometrical primitives library for Geant4 and ROOT

1904/20/23

Thank you for your attention.Thank you for your attention.

???Do you have any questions ?