Summary of the Geometry Parallel Session and Field Working - - PowerPoint PPT Presentation

summary of the geometry parallel session and field
SMART_READER_LITE
LIVE PREVIEW

Summary of the Geometry Parallel Session and Field Working - - PowerPoint PPT Presentation

Summary of the Geometry Parallel Session and Field Working Session/Stint J. Apostolakis VecGeom = Evolved USolids Recent Developments in USolids/VecGeom + Many-Particle API Status + Plans + Geometry Model / Navigation Sandro Wenzel /


slide-1
SLIDE 1

Summary of the Geometry Parallel Session and Field Working Session/Stint

  • J. Apostolakis
slide-2
SLIDE 2

Recent Developments in USolids/VecGeom Status + Plans

Sandro Wenzel / CERN-PH-SFT

Vec Geom SIMD/GPU support complete geometry modeler

=

VecGeom Evolved USolids = Many-Particle API Geometry Model / Navigation + +

This talk: focus on aspects relevant for Geant4 (single track functionality) vector API vector API

void DistanceToOut(„multitrack-interface“) void ComputeStep(...“multi-track“ interface...)

Main components of VecGeom

Box, Tube,... LogicalVolume PlacedVolume NavigationState

„Shapes“ Geometry Modeller Navigation

Transformations Navigator

scalar API

scalar API

double DistanceToOut(Vector3D const &p, Vector3D const &d) double ComputeStep(Vector3D, Vector3D)

AIDA1 USolids

slide-3
SLIDE 3

„outside“ „inside“

~ n1 ~ n2 ~ a2 ~ a1 ~ P ϕ

  • utside test for point P was so far

exclusively done using atan2 now very fast test using only 2 dot products of 2D vectors enormously speeding up „Contains“, Safety, ... for many shapes

Algorithmic improvement - a wedge for tubs, cons, sphere, ..

375 750 1125 1500 DistanceToIn SafetyToIn Contains

ROOT Geant4 USolids VecGeom ScalarAPI VecGeom ManyParticle API ROOT G4 USolids VecGeom scalar VMP

time units

improved scalar performance

  • improved

algorithms (avoid atan2)

Effect of „wedge“ on TubeSegment shape (SafetyToIn and Contains)

slide-4
SLIDE 4

dir G4 ROOT VecGeom y 21.5s 12.7s 5.9s z 10.7s 6.58s 4.09s

time to obtain the X-Ray image for the CMS calorimeter (VecGeom timing not yet using latest navigators)

A global performance evaluation

Accelerating Navigation in VecGeom

MBWheel_1N (~700 volumes); most complex element in CMS detector

recent R&D activity to improve navigation with a focus on algorithms that can benefit from SIMD vector units

slide-5
SLIDE 5

Integrating VecGeom into Geant4

Integration of VecGeom into Geant4

Guilherme Lima (Fermilab) for the VecGeom Group

  • What is it?

It means that we can run “any Geant4 job” using solids and algorithms from the VecGeom library

– ...uses VecGeom shapes when available, if not uses

the USolids versions then the Geant4 ones

– no changes are needed in user/application code

  • ther than turning on a few compilation switches

– VecGeom shapes: only scalar algorithms are used –

no parallelized SIMD processing of tracks!

  • How is it done?

– VecGeom was designed to be USolids-compatible – Existing USolids interface was used, e.g.

G4Box → G4UBox → UBox → (VecGeom) SimpleBox

slide-6
SLIDE 6

VecGeom integration how-to Testing with a complex detector

  • FullCMS test in geant4 tests repository
  • Built agains geant4.10.2.beta
  • CMS geometry loaded from a GDML 9le
  • Identi9ed some missing features

– e.g. points on surface from polycone's Inside()

  • Some pathological cases tracked and 9xed

– negative Rmin in polycone bounding tube,

negative safeties, missing tolerances, …

polycones

  • Current status

– 9rst batch of shapes available – choice of shapes based on a full CMS model – ready: box, trapezoid, tube, cone, polycone, polyhedra, with native

phi-wedges and Rmin where appropriate

  • tested under FullCMS conditions

polycone's bounding tube tolerance added to Rmax and subtracted from Rmin – if non-zero

slide-7
SLIDE 7

Extensions to testing suite and effects on using coarse/precise safety calculation

Tatiana Nikitina, CERN PH/SFT

On behalf of the Geant4 Geometry WG & VecGeom team

UTubs

(Rays in SurfaceNormal Test)

VecGeomPolycone

(GetPointOnSurface Test)

UTrd

(X-ray profile)

Testing suite Unit tests Extended testing suite ShapeTester USolids and VecGeom Jenkins On Run Time or for developing shapes Offline mode Jenkins-ready

Extensive testing suite : ShapeTester

Geant4 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

Testing Suite for USolids and VecGeom :ShapeTester Geant4+USolids+Root tests New 'X-Ray Scan' Test + Visualisation and options for debugging + All shapes are included

Tatiana Nikitina, CERN PH/SFT

On behalf of the Geant4 Geometry WG & VecGeom team

ShapeTester DistanceToIn() accuracy

a b dir

Point ‘b’ located on surface Accuracy = DistanceToIn(a,dir) − a – b ∣ ∣ ∣∣

slide-8
SLIDE 8

Comparing implementations to cross-check answers

Safety studies

What next ?

  • Specific test for precise Safety
  • Changes in interface are needed, if we want

to call Precise and Coarse safety on each step

ShapeTester

X-Ray Scan

Crossed_distance Rays Grid

VecGeom Cone

ShapeTester

UCons vs VecGeom Cone GetPointOnSurface()

slide-9
SLIDE 9

OPEN ISSUES IN TRANSPORTATION AND PROPAGATION IN FIELD

  • J. Apostolakis
  • G4V Intersection Locator role is to confirm and refine a

candidate intersection point.

  • Three implementations - challenges
  • “Simple” Locator - ‘linear’ = slow
  • Multi-Level Locator - adds ‘bi-section’ = complex
  • Brent Locator - adds quadratic conv. = MLL++
  • 2. Key Problem in Propagation in EM field
  • ATLAS - Particles think they are in poly-cone too long
  • ALICE - Crashes with negative step size
  • Both linked to Multi Level Locator - a type of G4V Intersection Locator
  • 1. Optical processes
  • Problem with the exit normal in

presence of coincident surfaces

slide-10
SLIDE 10

A DIFFICULT CASE

  • The algorithm must cope with challenging cases such as

the one above.

  • Track just misses a surface, but keeps on almost grazing it
  • The complex code has been challenging to make robust
  • But potentially found two remaining issues for ALICE

1st 2nd try - linear (slow convergence) 3rd-Halving 4th-Halving

slide-11
SLIDE 11
  • 1. Somnath BANERJEE & 2. Jason SUAGEE

(Students in Google Summer of Code 2015)

New Methods of Field Integration

  • 1. Dense output and FSAL
  • 2. Nystrom steppers with dense output
slide-12
SLIDE 12

Runge-Kutta Integration in Geant4

Geant4 uses Runge-Kutta methods to simulate trajectory of particles

6 computed points in a circular trajectory Calling 100 times between each pair of points, to give “Dense” output Interpolated result

Dense output - or interpolation

slide-13
SLIDE 13

10-14 10-10 10-6 10-2 Relative error Bogacki Shampine 45 Range of most interest Best Worst Cost CashKarp45