Looking at the source code for dielectric-dielectric optical boundary processes: https://gitlab.cern.ch/geant4/geant4/-/blob/master/source/processes/optical/src/G4OpBoundaryProcess.cc#L1036 it appears that the check on surface roughness uses the variable cost1 before it is properly initialised. The initialisation happens at line 1080.
Thanks for reporting this. It is now fixed and will be available in the next release.
(In reply to Daren Sawkey from comment #1) > Thanks for reporting this. It is now fixed and will be available in the next > release. Hello, With the edits in the new release, it looks like the "SurfaceRoughnessCriterionPass" will always be set to true since "cost1" is set to zero. This means that the following checks are always false: https://gitlab.cern.ch/geant4/geant4/-/blob/master/source/processes/optical/src/G4OpBoundaryProcess.cc#L1112 and https://gitlab.cern.ch/geant4/geant4/-/blob/master/source/processes/optical/src/G4OpBoundaryProcess.cc#L1183 What was the purpose of the "SurfaceRoughnessCriterion" in the first place? and what's the rationale behind its formula?
Hi Ahmed, I believe the implementation originates from a scalar theory of scattering. The "SurfaceRoughnessCriterion" corresponds to the probability to reflect rather than scatter from the surface. This type of scattering is relevant for DIRC detectors (and e.g. the Belle II TOP), where there are large numbers of reflections and the surface roughness is sub-nm. Tom
I neglected to backport the fix to 10.7 patch2. It is fixed in the beta preview of version 11.