Problem 2510 - boundary reallocation step doesn't happen
Summary: boundary reallocation step doesn't happen
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/optical (show other problems)
Version: 11.0
Hardware: All All
: P4 normal
Assignee: Daren Sawkey
URL:
Depends on:
Blocks:
 
Reported: 2022-09-15 00:36 CEST by Daren Sawkey
Modified: 2022-10-20 11:51 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Daren Sawkey 2022-09-15 00:36:38 CEST
G4OpBoundaryProcess tests for very short step lengths. If the step length is shorter than the geometrical tolerance, it is the volume reallocation step after one of the reflection-type boundary interactions (i.e. the particle is going back into the same volume it came from). The status is set to StepTooSmall, and the code returns (after setting velocity).
https://geant4.kek.jp/lxr/source/processes/optical/src/G4OpBoundaryProcess.cc#L186

However, occasionally the step length is greater than the geometric tolerance (1e-9 mm). In this case the status is not set to StepTooSmall. The example LXe has code to check for this. 
https://geant4.kek.jp/lxr/source/examples/extended/optical/LXe/src/LXeSteppingAction.cc#L168

This results in a JustWarning exception (see it with LXe.mac, maybe increasing the number of particles). 


G4WT4 > step length: 2.10214e-09
G4WT4 > LXeSteppingAction::UserSteppingAction(): trackID=1498 parentID=871 opticalphoton E(MeV)=2.43451e-06n/ at (-79.9805,-0.685051,-126.228) prePV: Cladding1 postPV: Fiber
G4WT4 > 
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : LXeExpl01
      issued by : LXeSteppingAction:
LXeSteppingAction: No reallocation step after reflection!Something is wrong with the surface normal or geometry

*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
Comment 1 Daren Sawkey 2022-10-20 11:51:43 CEST
A warning in G4OpBoundaryProcess is now printed when the optical photon step length is between 1e-9 mm and 1-e8 mm, stating that the boundary scattering may be incorrect.

Coincidentally, I'm no longer seeing step lengths greater than 1e-9 in the Geant4 development version.