Navigation
index
next
|
previous
|
OpticksDevNotes 0.0.1 documentation
»
Previous topic
Ideas
Next topic
CSG Intersect Comparisons
This Page
Show Source
Quick search
Enter search terms or a module, class or function name.
issues
ΒΆ
CSG Intersect Comparisons
Approaches ?
cfg4 review
makeSolid
GScene compareMeshes : bbox comparisons
Classification of top 25 issues down to 1mm
Review Revisit
After CSG_SEGMENT handles the tube deltaphi
parsurf vs g4poly bbox chart
bbox differences : review the top of the chart
lvidx66_again (4)
lvidx_65_69_56_tube_deltaphi (1,2,3) HAVE BEEN KNOCKED DONE TABLE
lvidx68 (5) + lvidx55 (8) + lvidx17 (9) + lvidx103 (10) + lvidx131 (11)
lvidx83 (6) + lvidx81 (7) both coincidence artifacts between cylinders and cones
lvidx31 (14) lvidx30 (20): difference of large thin-z cones intersecting with cylinder : worst case for parsurf bb precision
lvidx46 (15)
lvid 39 : FIXED : 1214.74 OcrGdsTfbInLso0xbfa2370 cone-z should be centered
lvid 185 : FAILED POLY false alarm
lvid_41_40_39_23_38 : five with no par surface points : ~FIXED by move to adaptive
try comparing CSG_BBOX_PARSURF against CSG_BBOX_G4POLY
fixing the placed bbox difference bug moves lvid 30 down the chart
tri.GMesh.bbox vs ana.CSG.bbox diff table
GMesh bbox diff table
lvidx66 (formerly in 4th) NOW IN POLE POSITION
Using loaded CSG vs generated NNodeTest
parsurf surface points not getting above x=0 ?
surface points with difference switch to union
surface point debugging
overview
lvidx_65_69_56_tube_deltaphi
TODO
Intersect with nconvexpolyhedron rather than two slab intersects ?
Trapezoid is similar
Revisit again following move to CSG_SEGMENT
Revisit following tube deltaphi via two slab intersects
lvidx 56 : RadialShieldUnit : segmented ring with 6 cylinder cuts : tambourine
lvidx 65
lvidx 69
Are the top 3 biggies all tube deltaphi ?
Looks like lvid 56 too
NCylinder : how to do phi segment SDF ? think 2 cutting planes
multi unbound ?
Hmm looks like it got balanced and messed up in the process
Allowing double unbound
disabling balancing is not a solution
lvidx 56 RadialShieldUnit0xc3d7da8
Viz : following move to CSG_SEGMENT python primitive (phi0,phi1,z,rmax)
Issues with two slab intersects : AVOIDED BY MOVE TO CSG_SEGMENT
parsurf bb is kinda mute because raytrace not working
dumping the raw and blanced trees
Raytrace tree height limit : max 7
opticks-tbool 56
Checking tree balancing with slab cuts
lvidx69 : segment ring with 4 box cuts
lvidx 65 : two box cuts from segmented ring : SstBotCirRibBase0xc26e2d0
CSG
GDML
lvidx67
Viz
lvidx30
lvidx140 (19)
Viz
tbool
lvidx46 (15)
Summary
parsurf xy slimmer
Viz
GDML
opticks-;opticks-nnt 46
lvidx31
lvidx131
parsurf.bb.min.z goes lower
manual bb matches parsurf
lvidx103
Issue : parsurf bbox bigger in z, g4poly bb misses both zsphere ends of capsule
viz
opticks-;opticks-tbool-vi 103
GDML
G4DAE
lvidx 17 : g4poly (coincident union) misses T-bottom of the H girder
Issue : parsurfbb.min.z is -12 mm off from g4polybb.min.z
Viz
G4DAE : min.z is -135 here !!
Huh : manual bb calc matces parsurfbb, note union coincidence at z=+-135
GDML : Corresponds with my CSG python.
bb deviation chart
lvidx55 : 20 mm : position 8
lvidx81 : position 7 : 26mm
lvidx68 : in at position 5 : 320 mm : SstTopHub0xc2643d8 : TODO : difference out the inner cy
Summary
320 mm
g4poly bbox vs parsurf bbox
opticks-tbool-vi 68
op –dlv68 –gltf 3
lvidx 83 : 28.0747 : OcrGdsTfbInLsoOfl0xc2b5ba0 : TODO uncoincide dicyco
issue : parsurf min.z goes lower
Ahha uncoincide : doesnt kick in for straight dicyco
opticks-;opticks-tbool-vi 83
g4poly bbox vs parsurf bbox
Five volumes 41 40 39 23 38 with no par surface points
checking the csg type mask of offenders, using current default parsurf_level=2
From CSG_BBOX_PARSURF against CSG_BBOX_G4POLY
opticks-;opticks-nnt-vi 41 40 39 23 38
Increasing parsurf_level yields some surface points
lvid247
Impinging Volumes
Plan
NEXT
Insights from RTCD p81
Float Precision
How to do object-object testing ?
Generate Vertices On the Surface of the object
Self node/sdf check : 8/12230 nodes are outside 1e-3 SDF epsilon band
prioritization
IavTopHub
parent/node impingement test : avoiding precision issue does not resolve
NScene::check_surf_points : this node SDF issues
NScene::check_surf_points : parent node SDF issues
Parametric Convex Polyhedron ?
Check SDF values of one object for surface verts of other object
Checking Composite Surface Point Generation
tgltf-t : Look at gds example
Whats the appropriate fix ?
Are there missing transforms ?
NScene::check_containment checking bbox containment of all node/parent pairs
NScene::postimportmesh
Checking the solids individually
lvid 30 OcrGdsTfbInLso0xbfa2370 : cone-z misinterpretation
After fixing the bbox zeros still appearing with Z offset issue
HUH : THOUGHT FIXED BUT STILL SHOWS UP : DUE TO BBOX ZEROS
FIXED
CSG bbox looks unreasonable
Succeed to Reproduce the issue in a small test
lvidx65 : SstBotCirRibBase0xc26e2d0 /dd/Geometry/AdDetails/lvSstBotCirRibBase0xc26e220
lvidx65 : First Cause : tube deltaphi is not handled
lvid 185
Issue bbox v.diff
Diagnosis : failed ana polygonization (gltf 3 looks fine)
DBGMESH=MOFTTube0xc046b40 NSceneMeshTest
GDML cone/tube z-interpretation
FIXED : lvid 66 : unbelievable big impingement : trapezoid/convexpolyhedron machinery bug
Issue
FIXED
After fix : surface coincidence
Before fix : huge (1025mm) impingement
Running with just 2 nodes of the geometry
GDML/glTF branch
G4DAE branch
GDML/glTF CSG dumping : before z/2 trapezoid fix
GDML/glTF dump after trapezoid z/2 fix
G4DAE GMesh dumping from G4DAE
Inspecting GDML
DONE : fixed tbool bash/python generation to handle convexpolyhedra such as trapezoid
tbool90 : parent node big cylinder
tbool66 generated
Geoselection at py level inconvenient
Analytic Geometry Shakedown
Issue : flickery ray trace in rib shape
Impinging Volumes Test
DONE: auto-detect intended unions with coincident faces, and auto-uncoincide them
DONE : Generalized intersect test
tgltf.py
NCSGScanTest
Issue : upward yellow cone lid photons think start in Ac
GScene::dumpNode
Approach ? Decide to implement recursive geo selection to onion in on the problem
NScanTest zero crossings
not outside ?
NScanTest table (0.1 mm step)
Status Check Revisit
Lvidx 85 Uncoincide Fail
Tree level z-nudging of unions of cylinders and cones fixes most odd nzero crossings
lvidx 29 : wierd nzero 5
Visualizing problem geometry
Visualize nzero 3,5,7
With some uncoincidencing
Central x,y -z to +z scanline
extras/66 fails to load : problem with planes
tree level uncoincidence ?
Analytic Triangulated Viz Differences
DONE : Mostly fixed by move to absolute tree approach
DONE
LEAVING AS IS : mesh ordering different in gdml and dae branches
assimprap/AssimpGeo
Partial Geometry Control And Analytic Geometry ?
Launchers
Test Fails
Full Analytic Route Needs Material Hookup
TODO : C++ alignment + cross accessors
GMergedMesh expecting relative ?
mesh index alignment looks like simple offset wont work
DONE : sensor crossover
DONE : gltftarget(config) and targetnode(metadata)
DONE : analytic/triangulated tree alignment for full traversals
GGeo/GGeoLib
GDML File LV volume elements have material refs
Whats needed for analytic material ?
Contrast with G4DAE/Assimp route
Analogous paths in the two routes
CSG Coincidence Speckle
FIXED : Very Thin Cylinder Speckles in CSG difference holes
Complex box cuts from hollowed cylinder speckles
FIXED : CSG Deep Trees (solid level issue)
FIXED : DYB has some deep CSG trees
Lots of subtraction of rotated boxes : results in deep trees
How to handle deep unbalanced trees ?
Non Mono Balancing ?
Checking Deep Volumes with tboolean-deep
sc.py KLUDGE SKIPPING deep CSG until work out how to balance
Deep Volumes, 22 out of 249 are have tree height > 3
Enumerating Distinct Top Solids
Big node trees
Final Deep Tree
GDML-glTF Geometry Route Transform Debug
Review Transforms
CSG and Structural Transform workflow
Issue : PMT gets scrambled when apply global placement transform
FIXED : top level (non-instanced) transforms ignored by raytrace
FIXED : PMTs pointing in reverse direction !
Red Herring
GDML/glTF route
GDML Stage
GDML Manual Unhelpful
GLM Euler
GDML/glTF Tracing Transforms
Leftfield Error Following BFile change attempt
FIXED with help from Guard Malloc
QUICK TIP : USING Guard Malloc
ISSUE : early crash of OKTest when invoked with some arguments
Guard Malloc : points to GGeo instanciation
Test Fails
Full Build : without optionals
Initial Indication of corruption in NSensorList
Guard Malloc doesnt get along with OptiX
oxrap OInterpolationTest asserts at python level for lack of IDPATH GBndLib.txt
FIXED : OInterpolationTest PASS depending on CInterpolationTest having been run recently (/tmp unwiped)
Hmm SG Fail
Dec 2017 : OInterpolationTest FAIL back again, IMPROVED ERROR HANDLING : NOT FIXED
Oct 2017 : FIXED old chestnut
June 2017
Another lack of GBndLib issue in CTestDetectorTest
Malloc Debugging
how malloc works
malloc_history
libgmalloc
leaks
Detecting Heap Corruption
Fabstep Targetting
Review Progress and Where Next ?
Immediate
Recent Progress
TODO : j1707 review size of GPU buffers, any more instancing possible ?
TODO : j1707 deep trees, expand balancing to handle ?
TODO: get verbosity under control in GDML/glTF route especially GParts
TODO: deep csg trees are still being skipped
TODO: polycone testing, general coincident surface testing(how?)
TODO: zero-repetition scene data structure
TODO: analytic path caching
TODO: thin solid polygonization
TODO : Push CSG node tree support thru to cfg4
NOPE : More Primitives
What is needed to add primitives
NOPE: Add NPolygonization of partlist ?
What is NOT needed for each primitive ?
DONE: tboolean-pmt converts ddbase.py PMT into NCSG node tree
Polygonization Fails Producing Large BBox Placeholder
Clipping Mode With GDML/glTF geometry make instances disappear
Issue
FIXED
OpenGL gl_ClipDistance
Clipping in oglrap and okc
Greenfield Installation Testing
opticks-t fails
Greenfield run errors
Error Report from Axel
Checking Green Field Opticks Installation
BUT CMake has some hardcoded paths ??
Tests using optional externals, need detection of the externals presence
Polygonization Zippering Boundaries
Zippering Realizations for CSG union of box and sphere
OpenFlipper Boundary Snap
Mesh zippering
Investigate boundary loops with modded combine_hybrid
Leftmesh frontier “ribbon” with outer and inner boundary edge loops
Polygonization Sqrt3 Subdiv
Overview
Higher Level Approaches
BASH Funcs
Meshes from Parametric Shapes
Joining Endcaps to body
Facemask splitting
Refining boundary faces
Boundary curve ?
Objective of parametric geometry description
Welding with OpenMesh ?
Joining meshes
Review Parametric Approaches
par
Too Many Ridx Instances
Can siblings be grouped into added subtrees in crowded nodes ?
Where to implement sibling grouping ?
Finding nodes with lots of children
General Sibling grouping
Initial Approach
GTreeCheck triangulated approach
Subtree Instances Missing Transform
FIX/WORKAROUND not yet sure which
ISSUE : GMergedMesh subtree assemblies missing transform ?
A similar issue for global ridx 0 solids was handled with isUsedGlobally
Max CSG Height skipping, effectively prunes progeny of nodes with overheight csg
GLFW/OpenGL GPU Hang
CSG BBox Dont use the characteristics of CSG operations to trim bbox
Targetting Non Existing Volume
Opticks Analytic Scene Description
ISSUE : Polygonization Repetition
gltf samples
TODO : make input serialization smarter ? avoiding repetition
TODO: Converting GDML description into instance-ized CSG trees “OpticksSceneGraph”
Whats needed in OpticksSceneGraph ?
GDML->GGeo vs G4DAE->GGeo
Validation
OpticksSceneGraph Technicalites
Why not parse GDML with G4 and work with G4 in-memory tree ?
CSG Complement
TODO: Look into and handle when intersecting two complemented solids
FIXED ISSUE : complemented solids via normal flip yields unexpected intersections (mirror object)
Background
CSG Single Hit Ray Trace Sub-object combination tables
Difference is Equivalent to intersect with complement
can single hit CSG implementation handle complements ?
INTERSECT(A, !B)
What does (MISS !B) mean ...
FIXED: Invert TRS Mismatch
ISSUE
Analytic Scene
Detdesc generation
Multi File Detdesc Parsing with ddbase.py ?
NCSG Translated PMT
ISSUE : ImplicitMesher fails to polygnonize thin volumes
FIXED : ImplicitMesher fails to find surface
FIXED: manual seeding headed in wrong direction
FIXED : Missing physvol placement transforms
FIXED : Cathode Inner or Outer
CSG Transform Support
Transforms with Ray-trace and SDF
Use higher level optix geometry transforms ?
FIXED : funny normals back again following scale fix
FIXED : SPHERE SCALE TRANSFORM ISSUE
Investigation
What is sphere intersect assuming that box intersect isnt ?
FIXED ISSUE : Extra intersects with ellipsoid
FIXED : Rotated geometry shows invalid boolean surfaces
FIXED : All nodes in CSG tree with gtransformIdx 1 ?
input csg very spartan
can partlist work with derived bbox ? does not look like it
move bbox calc to GPU
SDF
local/global transforms ?
Transform references
Need to make space in part/node buffer for transform referencing
Transforming Rays
Transforms GPU side
Transforming BBox ?
Models
Where to hang the transform ?
parent.rtransform OR node.transform ?
tpmt broken by OpticksCSG enum move
Vague recollections
2017-10-20 tpmt– broken (again) : QUALITATIVELY FIXED
Slice testing to isolate z-offset part
FIXED : two physvol offsets not being honoured
GPU dumping : note parallelised shuffle
old overview
2017-10-20 issue : boundaries not getting into the GParts ?
Review NCSG::Deserialize boundary handling
revisit tpmt–
root cause of difficulty
symptom3 : surface attachement failure
symptom 2 : CPU/G4 cfg4/CTestDetector misunderstanding primordial CSG buffer ?
looks like okg4 not updated since primordial GCSG
FIXED : symptom 1, GPU side mis-interpreting parts buffer after enum change
review of analytic PMT serialization
Comparing existing serializations
Triangulation of CSG defined geometry using SDF
Bottom Up Much Faster with Coarse then Nominal approach
Dual Contouring Sample
Multievent Performance
Observations about performance : large pinch of salt
VM growth indicates are just leaking
0.5M tpmt timings very different now
OK
3080 multievent was failing
3080 multievent times
Next Steps
DONE : Get compaction operational in multievent setting
G4
Production Performance
OptiX CUDA Interop With 3080
FIX
Reference
Overview of seeding interop
Boost Visibility Linker Warnings
Issue : many linker warnings
Solution ?
Cause
FIXED : Invisible Propagation
Fix
Issue
Natural Gensteps Shakedown
FIXED : by getting G4StepNPY.cc to handle mixed gensteps
Issue : no visible prop, all photons missing geometry
Odd Photon Flag History ?
Issue
DEFERRED
TODO: migrate dscale
cu/propagate.h
Issue Where is the Reemission ?
FIXED : Automated Interop Tests
Former Issue
How Fixed
Actually already have
–noviz/-V*
option
Detecting CTest Running ?
Event Layout Awkward
First Stage of Migration Done
New Layout Idea
Questions
Current Layout
Linux Interop Buffer Overwrite
Following changes for OptiX 400 Assumed Similar Issue Still Manifest
Weihai Investigations
FIXED : OptiX 400 Interop Wierdness
TODO
check performance implications of OptiX zeroing ?
FIXED : missing creation mode metadata
WORKAROUND : OptiX zeroing record buffer in generate.cu
Debug Approaches
OOAxisAppCheck
GGeoViewTest : Interop and Compute Mode not matching
interop
tpmt– : origin attraction and swarming
interop
compute
compute mode still matching g4
FIXED : interop : fail to pullback/persist sequence buffer
op –cerenkov
interop
compute
optix 400 : seedPhotonsFromGenstepsImp FATAL : mismatch between CPU and GPU photon counts
Focussed workaround on gensteps using OpticksBufferControl
Issue
OptiX 400 Shakedown
optix 400 : seedPhotonsFromGenstepsImp FATAL : mismatch between CPU and GPU photon counts
Focussed workaround on gensteps using OpticksBufferControl
Issue
FIXED : OptiX 400 Interop Wierdness
TODO
check performance implications of OptiX zeroing ?
FIXED : missing creation mode metadata
WORKAROUND : OptiX zeroing record buffer in generate.cu
Debug Approaches
OOAxisAppCheck
GGeoViewTest : Interop and Compute Mode not matching
interop
tpmt– : origin attraction and swarming
interop
compute
compute mode still matching g4
FIXED : interop : fail to pullback/persist sequence buffer
op –cerenkov
interop
compute
FIXED : Composition Not Targetted with Loaded Event
The Fix
Former Problem
Approach : persist gensteps together with evt and use for targetting
Box Asymmetry
CFG4 PMT Edge Double Reflect
FIXED : a TIR bug
Geocache Versioning ?
Borked Photon Record Colors
where do the colors come from
JPMT Scint not working
Leaky Triangulated Box
Summary
Initial Observation
Leaky Analytic Sphere
Executive Summary
Refs about floating point epsilon
Polar Leak
Scaling the BBox
Radial Shooting from all directions
Moving Bookmarks
Nopstep failing to appear : viz debugg
Optical Local Time Goes Backward
PhotonsNPY Update for structured records ?
PMT Distributions
PMT Test
[FIXED] Rdr upload count mismatch
Scattering : GdLS missing RAYLEIGH
Scintillation Photons
Tracing thru Opticks
G4Scintillation
DYB Scintillation props
Torch Stratification
Summary
Issue
Visualization Artifact Only ? NO
Time Banding
Time Compression Artifact ? YEP
Improve Time Compression ?
Changing Position/Time Domain used for record compression
Position Compression Artifact ? Dont think so
Refs
Surface Debug : lacking hits due to surface/volume model mismatch
Chroma Solution to same issue
How to do this with GGeo ?
Approach using AssimpGGeo::convertSensors
Possibly a problem with PMT normals ?
Detdesc dive
Sphere Sphere Intersection
How to try some simple replacement cathode ?
Analytic OptiX geometry
Triangulated Case
Now with simplified OptiX geometry
Union Splitting
Mesh mending
Visualisations
applying fix to fuller geometry
oav fix
Check Topology of Meshes
Where to do mesh fixing ?
Mesh Surgery implemented in openmeshtest-
G4DAE/G4 triangulation code quickly goes down rabbit hole
Idea mesh scanning to identify internal faces
ExplodeZVertices makes it obvious that have two closed meshes, not interior faces of one
Single face eyeballing
Numerical view
many upwards going photons think their m1 is Ac when actually Gd
Isolate issue to single volume : 3158
OpenGL Eyeballing
NumPy Look at faces/vertices
Next volume : 3159, same structure acting OK
Check at detdesc level
~
Offset Vacuum Base
[RESOLVED] Containing Material placeholder leading to DUD in buffer
Issue
Groupvel Related issues
Optical Photon Propagation Times need to use GROUPVEL
Where/when/how to bring into GGeo ?
Another material property added to the G4DAE export ?
GROUPVEL in Geant4
G. Horton-Smith, 2005/04/14
Geant4 fix into 4.7.1
Observe
G4MaterialPropertiesTable::SetGROUPVEL
Recreate the calc ?
Bringing GROUPVEL into Opticks
How to handle GROUPVEL in comparison against cfg4- ?
Groupvel Kludge Unintended Consequences
geant4_opticks_integration
tconcentric
setup
remnant pflags discrep ?
RESOLVED seqmat truncation difference, c2 down to 0.91
seqmat still some truncation difference ?
seqmat mismatch mostly resolved
psel selection of truncated
opticks seqmat
ISSUE: seqmat mismatches, zeros
how should truncation be handled ?
ISSUE : negative times on exceeding time domain
RESOLVED: bad REjoin onto scatter, 3 in 1M
elaborated fix
initial fix
issue rare SC/AB at truncation
MOSTLY RESOLVED: pflags inconsistency : due to incomplete REjoins, AB not scrubbed and replaced with RE
Mostly Resolved
Nov 4, 2016 : seqhis chi2 now less than 1
RESOLVED : scattered counts and distrib mismatch
MATCH : no selection CFG4/OK rayleigh scattering in isolation
RESOLVED : scatter discrep
FIXED : wrong wavelength compression/decompression in CFG4
ASIS : polarization de-normalizing
viz
truncation control
FIXED Longstanding pflags issue
FIXED : Opticks not doing “TO BT BT BT BR ..” by polz correction
FIXED : chi2 large contribs from SC lines
dbgzero lines
seqmat truncation discrep, lots of zeros in tail
pflags
FIXED seqhis
remaining discreps by cmx selection
truncation avoidance trick
zeros in long tail issue, from truncation ?
with flags fixed
FIXED : funny badflag 00
avoiding truncation by pushing bouncemax and recordmax
switch to unified model fixes incorrectly specular DR
post DR discrep
seqhis after optical surfaces hookup with test geometry
seqhis
lack DR due to lack of complete Optical Surface ? with test geometry
topline 8ccccd 4% Opticks deficit
Profiling Duplication
TODO
OpticksProfile
Related : npy-/Timer
Boolean CSG on GPU
TODO: numerical/chi2 history comparison with CFG4 booleans
TODO : python trees into opticks
TODO : randbox photon source
TODO : more natural test tree construction
TODO: support transforms in op nodes
TODO: support empties, ie non-perfect trees
TODO : algorithm characteristic comparisons
Boolean Debugging
FIXED : Root Termination problem
slavish.py
CSG Errors
DONE: boolean csg tree implementation
OptiX array
C : Two meanings of static
CUDA guide : static local variables within function
OptiX/CUDA static variables
Adding node transforms
OptiX : const float3
OptiX float4 as a very short stack
Lookup tables in C
Whats missing for opticks csg tree ?
Needs to be almost complete tree anyhow for easy serializing
Tree Threading ?
CsgInBox test geometry
Where is the tree ?
Tree serialization
FIXED Issue : ray trace “near/tmin” clipping fails to see inside booleans
scene_epsilon
FIXED Issue : boolean insides invisible from outside
FIXED : Issue : cannot see booleans from inside
FIXED : Issue : ray trace of box shows slab intersects extending behind the box
CUDA fminf/fmaxf/max infinity/nan handling ?
FIXED Issue : boolean intersection “lens” : boundary disappears from inside
FIXED Issue : lens not bending light
approach
SurLib with Test Geometry
tpmt
Review Analytic Geometry Workflow
Changes needed
Test Geometry
configured eg in tboolean-
config string parsed with GGeoTestConfig
GGeo::modifyGeometry : steering of geometry mods in test mode
GGeoTest::createBoxInBox act on config
GMaker::make tesselated vertices etc.. in associated GMesh, analytic desc in associated GParts
GParts provides control of float parts (n_part,4,4) and uint prim (n_prim,4) buffers
hemi-pmt.cu
intersect_boolean.h
tree generalization
recursion to iteration
Sliced Composited Raytraced Rasterized
Test geometries
Oglrap
Tracer Crash
Tidy Actions
OKG4 G4GUN Shakedown
Red Gensteps everywhere issue
FIXED issue: G4Gun ignoring gunconfig argument and using default
Genstep visualization
Lack of scintillation propagation
Genstep examination
Tao commit changing Scintillaton and Cerenkov
Debug running
Peculiarities
Known sources of difference
JUNO JPMT Shakedown
Issue : default torch source goes off somewhere in TT
Issue : segv due to no input gensteps
Material Code Mapping Generalization
env/chroma/G4DAEChroma
Mapping Codes ?
Where is genstep path configured ?
Review Genstep
Issue : Sep 2017 : Still getting lookup fails
Issue : Dec 2016 : Lookup fails with live g4gun
Legacy Approach
Translate on load
Lookups
Changes
Geant4 Optical Code History
Geant4 On Github
Scattering Bug
ProposeVelocity does nothing as CalculateVelocityForOpticalPhoton is repeatedly called
GROUPVEL From Wrong Material Issue ?
Bug 1275 : The velocity is wrong in optical photon propagation
Close look at Bug 1275
Checking History
GROUPVEL
Approach
Issue 1
Issue 2
See Also
Transport gets velocity from preStep
GROUPVEL Injection at tail of PSDIP has no effect
Can I replace G4Transportation with a debug version ?
AddTransportation
DsG4OpBoundaryProcess dumping : looks like getting groupvel from Ac instead of LS and MO
Back to basics after moving to fine domain (1nm)
tconcentric check
Review
Now get G4 warnings when run without groupvel option
Opticks GROUPVEL
G4 GROUPVEL
Reemission Review
recsel segv : last one issue
fixing REJOIN recording
checking matching with extremes of material properties
switch off reemission with nore option
tlaser : sizable differences in many categories : how to proceed ?
push stats to 1M have 35 CRecorder/Rec discrepant seqhis/seqmat
seqhis machinery inconsistency between CRecorder and Rec
pushing out truncation, pushes out the problem
FIXED : was comparing before all REJOINs are in
truncation control
CRecorder m_seqhis
Rec m_seqhis
How to proceed ?
Adopting DYBOp into CFG4
CRecorder and Rec are almost matching at 10k level : truncation difference
Hmm seems hijacking ParentID is not so easy
attach primaryPhotonId ?
flags borked, so flying blind
live reemission photon counts
Contining the slot for reemiisions with G4 ?
reemission continuation are difficult to implement
REEMISSIONPROB is not a standard G4 property
Multi Event
Overview
FIXED : Issue
FIX
Workaround
Things to try
DONE : bufferTest.cu bufferTest.cc
Trivial Program works
tconcentric_distrib
Look for presentational hists
Comparing interpolation blib
After move to c2shape comparisons : listing seq points with sum of distrib chi2 > 20
DONE machinery shakedown
multiplot slice(0,10) quick look
tconcentric agreement sufficient to move on to distribs
tconcentric pflags mismatch from_truncation handling
Status
Issue
FIXED BY ENFORCING HARD_TRUNCATE IN CANNED RUNNING
Internal CFG4 Opticks event inconsistency
CRecorder::RecordPhoton
tconcentric.py
Selecting mismatch using PFLAGS_DEBUG
Dump first mismatch photon
Dump 2nd mismatch
Truncation handling
post recording has seqmat zeros
Overview
After Fix seqmat chi2 is 0.93
FIX REQUIRED matSwap BASED ON NEXT BOUNDARY
Issue
Cause
Opticks code check shows no kludging for DR SURFACE_DREFLECT
CFG4 Dumping of mismatched photons
Flags : NA NAN_ABORT actually means boundary status StepTooSmall
Differences between live and canned modes of CRecorder
Canned post writing Example
Live pre writing
Canned
Review Geant4 Stepping Time Velocity
where does G4 set times anyhow ?
G4TrackingManager::ProcessOneTrack
G4Step::InitializeStep Track->PreStepPoint
G4StepPoint::AddGlobalTime
G4Step::UpdateTrack PostStepPoint->Track
Interpolation Mismatch Continued
Issue
TODO: check time distrib diff matches expectation from groupvel interpol mismatch
Testing finebndtex
How to up samples ?
Possible Approaches to reduce interpolation mismatch
Dumping Interpol deviations
SURFACE_DREFLECT (DR) diffuse reflection
issue : now resolved
CFG4 SURFACE_DREFLECT from LobeReflection or LambertianReflection
Cause of discrepant reflection, different imps
Reimplement Opticks diffuse reflection
SURFACE_DREFLECT discrepant polarization b,c
NumPy DoReflection calc
chi2 after fix, notably the pflags decreased from 1.21 to 1.07
Test Fails
SURFACE_ABSORB
NEXT
dbgseqhis
Boundary 37 (with os:RSOilSurface) : wrong way around ? inner not outer surf ?
Concentric test
Compare with tdefault where photons distributed randomly from point source
Complement checks...
Visual inspection of photon termination points
Surface info comparison with CInterpolationTest and OInterpolationTest
Commenting out ESRAir reflectivity diddle doesnt fix the 20%
1M 2016 Oct 28 seqhis
SA Opticks
G4 SA
tlaser
1M 2016 Oct 28 seqhis
DONE: badflags fixed by categorizing SAM:SameMaterial as BT in cfg4-/OpStatus
DONE: property comparison using G4 interpolation and Opticks tex interpolation
Using constant material prop values gives much better agreement
With fixpol doesnt change much
Progressive masking for following discreps step by step
After REJOIN fix still large discreps, eg top line SA
Optical Surface Trace
Prior to fixing aim
Laser aim issue
after fix aiming, restricted to top seq
After fix CG4 skin surfaces
Termination boundaries
probable cause CG4 logical skin surfaces lacking lv
After fix CG4 logical skin surfaces
full seq following fixed aim
initial ana
Badflags
Interpol Mismatch
tboxlaser
check fx machinery
tbox
OKG4 tpmt revisited
FIXED : CTestDetector::kludgePhotoCathode was incorrectly using dielectric_dielectric
Perhaps surface conversion not yet implemented for CTestDetector ?
G4 EFFICIENCY
Divergence following many changes : g4 not stopping at cathode ?
FIXED : tpmt takes exception to duplicated OpaqueVacuum material name
Missing CFG4 Surface Detect
Issue
Observations
Fixed ? N
CGDMLDetector vs CTestDetector
Writing G4DAE Optical surfaces
Reading G4DAE/ggeo Optical Surfaces
Ancient GDML Export has no surfaces OR optical props (is also has no material properties)
CGDMLDetector::addMPT
CGDMLDetector::addSurfaces ?
NEXT
Code Trace photon SD flags
optixrap- where flags come from
optixrap where properties come from
CFG4 Where the flags come from
G4 Where Detection flags come from
OKG4 Torch Shakedown
Issues Overview
CG4 more BT than OK : zero order fixed
Possible cause of history diff : no evidence seen for this yet
Major culprit was incomplete skin surfaces in CG4, after fixing that
CG4 zero flags
What would be useful for debugging ?
tlaser testing
seqvol : volume sequence indexing
Simulation
Analysis
Viz
vizg4 using opticks index ?
OKTest vizg4 fail
OKG4Test vizg4 index fail
Initially not in same ballpark, after an afternoon get into same ballpark
zero flags, SR?
dbgseqhis c0cac0cccd
FIXED : Positional bug
bouncemax zero check
FIXED : Material reporting with CG4
seqvol : volume sequence indexing
tlaser node index dumping
dbgseqhis
Where did the surface handling come from in Opticks...
op –bnd : shows no isur/osur duping but there are more skin surfs that border surfs, SO THIS IS A BUG
optical_buffer
closest_hit_propagate
instance_identity comes from the intersects
mesh_intersect
identityBuffer
FaceRepeatedIdentityBuffer
OKG4 vizg4 noshow
Issue
tpmt.py
tokg4.py
G4/Op Integration Overview
Objectives
See Also
DONE : High Level Cleanup/Refactor
WIP : Multi event handling
TODO : G4 driven multievent
DONE : init and per-event distinction
DONE : Optical Step Collection
DONE : Material Code Mapping Generalization
DONE : Integrated G4GUN running
DONE : genstep handling rationalize
DONE : avoid duplication between OKMgr and OKG4Mgr
NEXT : OKMgr/OKG4Mgr propagation multi-event test
NEXT : loaded propagation viz lacks index
NEXT : OKG4 genstep shakedown
WIP : Integrated Torch running debug
FIXED : OKG4 : Material Map chicken/egg problem
Mapping A
Mapping B
Fix
NEXT : G4/Op Comparison of generation distribs
NEXT : event handling in integrated mode
NEXT : move CG4 event creation later for multi-event
Approach
ggeoview-/App
OpticksEngine base class
OpticksApp
How does Opticks and G4 need to interface ?
DONE
DEBUGGING
TODO
Interop Failures
FIXED : Interop mode with seed buffer : get hard crash even with trivial
Trying to do raytrace when loaded, fails for lack of record buffer
Multi event testing CUDA memory error
Multi Event : Seed Stuck at Zero for 2nd Event
Interop Mode
WITH_SEED_BUFFER
Compute Mode
DONE: Getting OptiX to notice CUDA/Thrust change to Photon buffer
Dirty CUDA Interop Buffers
FIX: Using BUFFER_COPY_ON_DIRTY for photon buffer and manually marking dirty
Maybe Use Separate INPUT_ONLY SEED BUFFER ?
TODO: Measure multievent compute speed using INPUT_OUTPUT seeded photon buffer vs INPUT only seed buffer
OptiX Changing Event Buffer
Objective
Observation : trying to prelaunch in init fails
Context validation fails without evt buffers
Changing Event Buffers ?
OptiX 400 Guide, p14 on OptiX Buffers
OptiX 400 Guide, p60 on Interop Buffers
Thoughts
Experience
Changing OpenGL Buffers
glBufferData
oglrap- Scene::uploadEvent
NEXT : G4 Optical Step Collection
Objective
Stages
Review old collection with G4DAEChroma
G4DAEChroma Observations
csa-
originally named after ChromaStackAction, but now handles DetSimChroma
G4DAEChroma Things to plunder : looks like very little, NPY handles most of it
Approach to reviving optical step collection
DONE : Near Standard G4 Scintillation/Cerenkov Step Collection
TODO: details of scintillation generation, compare Opticks vs G4 generated distrib
Opticks Engineering
Material Properties
[WORKED AROUND] Issue : old GDML export omits material properties
Broken Indexing
Broken PMT Test
FIXED
Issue : photon record positional qwns all zero
G4GUN Debug
Integration starting point : pure g4gun
Evt debug with npy-/g4gun.py
domains
Opticks Space Domain
G4/GDML Space Domain
Geometry Selection
shape
G4GUN Material Reporting
Approach
Fishy flags in history
Taming Geant4 Verbosity
FIXED Issue : g4 geometry cleanup WARNINGs
FIXED Issue : g4 process verbosity control
Issue : g4 couples table noise, comment call to DumpCutValuesTable()
Issue : g4 init is slow, how to cache the physics tables ?
Issue : g4 Em noise control
Issue : g4 noise control
[FIXED] GUI Photon Flag Names All NULL
progress
initial issue
[FIXED] GUI Photon Selection Failure
FIXED
Background
Approach to solving
Not Working
Working
High Level Refactor
Objective
Approach
DONE
Tests Commands To Run Whilst Refactoring
[FIXED] OP record vis broken by OpticksEvent simplifications
[FIXED] Left field flakiness
FIXED: Photon record coloring M key seems wrong
[FIXED] CFG4 load count mismatch assert
Time Goes Backward
[FIXED] Issue : with GDML geometry opticalphoton time going backwards
Navigation
index
next
|
previous
|
OpticksDevNotes 0.0.1 documentation
»