17/11/2014 SFT group meeting, Tatiana Nikitina 1
USolids Project : Status and Plans 17/11/2014 SFT group meeting, - - PowerPoint PPT Presentation
USolids Project : Status and Plans 17/11/2014 SFT group meeting, - - PowerPoint PPT Presentation
USolids Project : Status and Plans 17/11/2014 SFT group meeting, Tatiana Nikitina 1 Outline v Current status of developments v First USolids shapes were included in Geant4 release 10.0 v Revised shapes: UPolycone, UMultiUnion v Extended
17/11/2014 SFT group meeting, Tatiana Nikitina 2
Outline
v Current status of developments
v
First USolids shapes were included in Geant4 release 10.0
v
Revised shapes: UPolycone, UMultiUnion
v
Extended testing suite v Plans for inclusion in Geant4 release 10.1
v
New shapes & USolids as independent library v USolids and VecGeom vectorised primitives
v
Including first VecGeom shape v Ongoing developments and plans
17/11/2014 SFT group meeting, Tatiana Nikitina 3
USolids shapes in Geant4 release 10.0(December 2013)
v
Box, Tube, Cone, Orb, Sphere, Trd, Tet, Polycone, GenericPolycone, Polyhedra
v
In order to use USolids in Geant4, wrappers are created for each solid, based on ‘bridge’ pattern
v
Cmake configuration: G4GEOM_USE_USOLIDS replaces Geant4 original solids by USolids ones
5 0 0 1 0 0 0 5 0 0 1 0 0 0 2 0 0 4 0 0 6 0 0 8 0 0 1 0 0 0- 1 0 0 0
- 5 0 0
- 1 0 0 0
- 5 0 0
- 1 0 0 0
- 5 0 0
- 1 0 0 0
- 5 0 0
- 1 0 0 0
- 5 0 0
- 1 0 0 0
- 5 0 0
17/11/2014 SFT group meeting, Tatiana Nikitina 4
UPolycone
Revised implementation
v UPolycone (or ordinary Polycone): composite shape
constructed from sections of Tubs and Cons
v Added missing methods:
v
GetPointOnSurface, Capacity, SurfaceArea
v
Visualization in Geant4 wrappers v Reviewed implementation of
main methods:
v
Corrected treatment of Convexity and Safety
17/11/2014 SFT group meeting, Tatiana Nikitina 5
Revised UPolycone:
Differences in SafetyFromInside() USolids - Geant4
17/11/2014 SFT group meeting, Tatiana Nikitina 6
Revised UPolycone:
Scalability for DistanceToOut(p,v)
Polycone in Geant4 has not spacial optimisations(internal voxelisation)
17/11/2014 SFT group meeting, Tatiana Nikitina 7
UMultiUnion
Revised implementation
( will be included in release 10.1, December 2014)
v
UMultiUnion structure: represents a union of many [displaced] solids, adopting voxelisation technique for optimisation on location
- f components
v
Added missing methods:
v
GetPointOnSurface, Capacity, SurfaceArea
v
Visualization in Geant4 wrappers v
Corrected treatment of transformations
v
Integration in GDML
v
Ability to import/export as GDML (3.1.1) in Geant4
17/11/2014 SFT group meeting, Tatiana Nikitina 8
UMultiUnion structure:
Visualization in Geant4
Intersection of ray with surfaces
17/11/2014 SFT group meeting, Tatiana Nikitina 9
UMultiUnion structure:
Voxelisation studies
Time for 125 solids(sec) Time for 1000 solids(sec) Ratio G4UMultiUnion 10.9 13.25 1.22 Loop of Placements 12.43 17.58 1.41 Ratio 1.14 1.33
v
Test case: a regular structure of boxes as UMultiUnion or as loop of simple placements
v
Transportation of ‘geantinos’
17/11/2014 SFT group meeting, Tatiana Nikitina 10
Extended 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 test shape on Run Time
Shape Tester
Geant4+USolids+Root tests New 'X-Ray Scan' Test
SBTperformance Unit tests New Testing Suite for USolids and VecGeom
17/11/2014 SFT group meeting, Tatiana Nikitina 11
Extended testing suite
Status
Shape Tester
Geant4+USolids+Root tests New 'X-Ray Scan' Test
SBTperformance Unit tests v
Unit tests for USolids and VecGeom Solids
v
Done for Box, Tubs, Cons, Trd, Trap, Tet, Polycone, Polyhedra, Orb,Sphere,Paraboloid
v
Missing tests for GenericTrap, ExtrudedSolid, TessellatedSolid (ongoing) v
ShapeTester is ready
v
Option for visualisation of results
v
Debugging possibility : errors are stored with information needed for debugging
v
Missing test for convexity
17/11/2014 SFT group meeting, Tatiana Nikitina 12
Extended testing suite
X-Ray Scan
v Estimated Volume = ∑(distance × cell-area) v Error = Analytic Volume − Estimated Volume
Scan can be done for different angles in Theta and Phi Crossed_distance Rays Grid Grid
17/11/2014 SFT group meeting, Tatiana Nikitina 13
Extended testing suite
X-Ray Scan, examples for Box and Tubs
v Lego plot option from ROOT
17/11/2014 SFT group meeting, Tatiana Nikitina 14
Extended testing suite
X-Ray Scan, Estimated Volume for Tubs
17/11/2014 SFT group meeting, Tatiana Nikitina 15
Extended testing suite
Optical Escape or Shape Normals
point
v Improved original “Optical Escape”
test to use random reflection on surface
v
Better distribution of points
UBox(Rays) UBox(Created points) UTubs(Rays)
17/11/2014 SFT group meeting, Tatiana Nikitina 16
Extended testing suite
DistanceToIn() accuracy
a b dir
v Point ‘b’ located on surface v Accuracy = DistanceToIn(a,dir) − a – b
∣ ∣ ∣∣
v Derived from Geant4 test : SurfaceChecker
17/11/2014 SFT group meeting, Tatiana Nikitina 17
Extended testing suite
DistanceToIn() accuracy test: UTubs
Order of magnitude
17/11/2014 SFT group meeting, Tatiana Nikitina 18
Extended testing suite
DistanceToIn accuracy test: UBox and VecGeom Box
Order of magnitude Order of magnitude
UBox VecGeom Box(Scalar version)
17/11/2014 SFT group meeting, Tatiana Nikitina 19
Extended testing suite
DistanceToIn()/DistanceToOut() accuracy
v Difference = max (|dmove – d1 – d2|) v Derived from ROOT test : ShapeDistances()
(point,dir) (point1,- dir) dmove d2 d1
17/11/2014 SFT group meeting, Tatiana Nikitina 20
Extended testing suite
DistanceToIn/ToOut accuracy test: UBox and VecGeom Box
Order of magnitude Order of magnitude
UBox VecGeom Box(Scalar version)
17/11/2014 SFT group meeting, Tatiana Nikitina 21
Extended testing suite Consistency tests, example test SurfacePoints
v
Test consistency between Inside() and GetPointOnSurface() Inside(GetPointOnSurface())== kSurface
v
Check consistency between of DistanceToIn() and DistanceToOut() (can not be both zero)
v
Check accuracy of DistanceToIn() and DistanceToOut()
GetPointOnSurface() UBox GetPointOnSurface() UTubs epsilon
17/11/2014 SFT group meeting, Tatiana Nikitina 22
Extended USolids set for Geant4.10.1
v More USolids shapes: Trap, GenericTrap, MultiUnion, ExtrudedSolid v USolids module as
standalone external library
- 1 0
- 5
- 5
- 6
- 4
- 2
17/11/2014 SFT group meeting, Tatiana Nikitina 23
First shape from VecGeom in USolids
v
First shape from VecGeom included in USolids library
v
Paraboloid: shape developed in VecGeom with both vector and scalar implementations
17/11/2014 SFT group meeting, Tatiana Nikitina 24
UParaboloid
17/11/2014 SFT group meeting, Tatiana Nikitina 25
Ongoing developments and plans
v Implementation of missing shapes:
v
CutTubs, Hyperboloid, Ellipsoid, EllipticalTube, EllipticalCone, Torus
v
Many developers working on shapes with vectorized and scalar implementation
v
Vectorised implementation of existing shapes
v
Orb, Sphere, Trap, Polyhedra, Tubs, Cons v New Boolean shapes (union, subtraction, intersection)
with templated signature
v Integration of VecGeom shapes in USolids library v Creation of Comparison Solid for comparison of methods
- f two shapes during run-time
17/11/2014 SFT group meeting, Tatiana Nikitina 26
Evolution of USolids library project
Started as project
- f common
library for Solids primitives
~2010 December 2013
First UShapes included in Geant4.10.0 (easy testing)
May-June 2014 December 2014
Fast Tessellated Solid for Geant4.9.6 (voxelisation)
2012
MultiUnion Common TestingSuite With VecGeom First vectorised Shape from VecGeom External lib in Geant4
17/11/2014 SFT group meeting, Tatiana Nikitina 27
Conclusions
v First set of USolids shapes introduced in release 10.0
v
Activation optional at configuration time v Extended set will be introduced in release 10.1
v
USolids as external library
v
VecGeom shapes will progressively replace the current primitives
v
Many developers are working on shapes
v
Already first shape with vector and scalar implementation included
v
A lot developments and testing ahead !!! And fun!
Thanks!
A special thanks to G.Cosmo, J.Apostalakis, A.Gheata, S.Wenzel and J.de Fine Licht for help and advises!
- UMultiUnion. Performance.