Problem 1953

Summary: G4ParallelWorldProcess::HyperStep() does not appear to always be set properly
Product: Geant4 Reporter: Michael Kelsey <kelsey>
Component: processes/scoringAssignee: asai
Status: RESOLVED INVALID    
Severity: major CC: goessmann, Zachary.Yokley
Priority: P4    
Version: 10.2   
Hardware: All   
OS: All   

Description Michael Kelsey 2017-03-16 06:56:41 CET
I've been trying to debug a situation where an optical photon passes into a volume from the world (on the first step) without being reflected.  The volume is configured with a SkinSurface with 100% reflectivity.  The result is that the optical photon gets inside the volume, and then bounces around forever.

I finally isolated this to lines 179-181 of G4OpBoundaryProcess.cc, where the code looks to see if a parallel-world HyperStep() exists.  If it does, then that "hStep" _replaces_ the originally passed mass-world "aStep", and is used through the rest of the boundary code.  I've separated reported that this replacement is itself not fully correct, as it won't have the proper preStepPoint to implement the boundary process.

However, I have discovered, that the HyperStep() appears to be not correctly updated at a boundary in the mass world.  Specifically, in my test code, the boundary crossing occurs in the mass-world at (0,0,16.667 mm), between volumes "World" and "Detector."  

But the HyperStep(), which gets used in G4OpBoundaryProcess, still has it's own postStepPoint at a position (0,0,50 mm) in "World", corresponding to the original launch of the primary (i.e., Step 0).  This suggests that the HyperStep() is NOT getting properly updated when a boundary crossing occurs in the mass world.

This issue may affect releases back before 10.0.
Comment 1 asai 2017-06-13 18:03:26 CEST
*** Problem 1952 has been marked as a duplicate of this problem. ***
Comment 2 asai 2018-04-26 16:36:19 CEST
Couldn't reproduce the issue.
Most-likely, this was caused by the user's code that has a mismatch between having
the parallel world geometry but no associated G4ParallelWorldProcess process (or vice versa).