Hi,
I've been tracking through the G4OpBoundaryProcess code, trying to
understand the light tracing process in backpainted surfaces in the
unified model with dielectric_dielectric interfaces.
For the moment, I'm trying to simulate collection from light generated
within a fairly high index scintillator (n=2.1) with polished surfaces
and loosely backed with either specular or diffuse reflecting material.
I'm using a G4LogicalBorderSurface and G4OpticalSurface to specify the
properties of the surface. Index in the surface is set to n=1 to
simulate the loose wrapping.
If I launch optical photons at close to oblique angles to the
scintillator, I get a high probability of transmission. If I launch at
45 degrees I get total internal reflection. No surprises there.
However, it seems that the order of use of the parameters is not what I
would expect.
I've grabbed local copies of G4OpBoundaryProcess.cc and .hh and thrown
in lots of print statements to trace the code's operation. The trace
below is the first few bounces from an initial launch at 45 degrees to
the local surface normal.
==================================================================
RDP Entry: G4OpBoundaryProcess::PostStepDoIt
pPostStepPoint position = (6.35,4.65,0) momentum =
(2.12132e06,2.12132e06,0) momentum.unit() = (0.707107,0.707107,0)
globalTime = 0.0232799
RDP found materials table for material 1
RDP found RINDEX for material 1.
RDP border surface found
RDP border surface has a materials property table
RDP polishedbackpainted  groundbackpainted RINDEX2 = 1
RDP Explicit REFLECTIVITY specified. Using this value of 0.995
RDP Explicit EFFICIENCY specified. Using this value of 0
RDP Unified model branch.
RDP using SPECULARLOBECONSTANT of 0.108088
RDP using SPECULARSPIKECONSTANT of 0.56765
RDP using BACKSCATTERCONSTANT of 0.108088
RDP Entering dielectric_dielectric calculation branch 1
RDP Entering dielectric_dielectric calculation branch 2
RDP NOT (polishedfrontpainted  groundfrontpainted) ... calling
DielectricDielectric
RDP DielectricDielectric entry
RDP  Start of do loop cycle  Rindex1 = 2.1 Rindex2 = 1
cost1 = 0.707107 sint1 = 0.707107 sint2 = 1.48492
RDP calculating TIR
RDP ChooseReflection entry:
prob_ss = 0.56765 prob_sl = 0.108088 prob_bs = 0.108088 : Returning
SpikeReflection
RDP *** SpikeReflection ***
RDP theStatus != FresnelRefraction
NewMomentum.unit() = (0.707107,0.707107,0) theGlobalNormal =
(1,0,0) Done = 1
RDP DielectricDielectric exit
RDP return 10: G4OpBoundaryProcess::PostStepDoIt
with NewMomentum.unit() = (0.707107,0.707107,0)
==================================================================
RDP Entry: G4OpBoundaryProcess::PostStepDoIt
pPostStepPoint position = (6.35,4.65,0) momentum =
(2.12132e06,2.12132e06,0) momentum.unit() = (0.707107,0.707107,0)
globalTime = 0.0232799
RDP returning... step is too small
RDP return 2: G4OpBoundaryProcess::PostStepDoIt
==================================================================
RDP Entry: G4OpBoundaryProcess::PostStepDoIt
pPostStepPoint position = (6.35,8.05,0) momentum =
(2.12132e06,2.12132e06,0) momentum.unit() = (0.707107,0.707107,0)
globalTime = 0.149091
RDP found materials table for material 1
RDP found RINDEX for material 1.
RDP border surface found
RDP border surface has a materials property table
RDP polishedbackpainted  groundbackpainted RINDEX2 = 1
RDP Explicit REFLECTIVITY specified. Using this value of 0.995
RDP Explicit EFFICIENCY specified. Using this value of 0
RDP Unified model branch.
RDP using SPECULARLOBECONSTANT of 0.108088
RDP using SPECULARSPIKECONSTANT of 0.56765
RDP using BACKSCATTERCONSTANT of 0.108088
RDP Entering dielectric_dielectric calculation branch 1
RDP Entering dielectric_dielectric calculation branch 2
RDP NOT (polishedfrontpainted  groundfrontpainted) ... calling
DielectricDielectric
RDP DielectricDielectric entry
RDP  Start of do loop cycle  Rindex1 = 2.1 Rindex2 = 1
cost1 = 0.707107 sint1 = 0.707107 sint2 = 1.48492
RDP calculating TIR
RDP ChooseReflection entry:
prob_ss = 0.56765 prob_sl = 0.108088 prob_bs = 0.108088 : Returning
Lambertian
RDP *** LambertianReflection ***
RDP theStatus != FresnelRefraction
NewMomentum.unit() = (0.85588,0.256875,0.448869) theGlobalNormal
= (1,0,0) Done = 1
RDP DielectricDielectric exit
RDP return 10: G4OpBoundaryProcess::PostStepDoIt
with NewMomentum.unit() = (0.85588,0.256875,0.448869)
=============================================================
It seems pretty clear that in using a polishedbackpainted surface, if
the photon reflects immediately at the surface, the SPECULARLOBE,
SPECULARSPIKE, BACKSCATTER, and implied LAMBERTIAN reflection parameters
are used.
However, if the photon arrives at a more oblique angle and is
transmitted, it appears that the reflection back from the backpaint
material is always specular.
==================================================================
RDP Entry: G4OpBoundaryProcess::PostStepDoIt
pPostStepPoint position = (6.35,4.23835,6.66056) momentum =
(2.98412e06,9.8419e08,2.92159e07) momentum.unit() =
(0.994706,0.0328063,0.0973864) globalTime = 0.431902
RDP found materials table for material 1
RDP found RINDEX for material 1.
RDP border surface found
RDP border surface has a materials property table
RDP polishedbackpainted  groundbackpainted RINDEX2 = 1
RDP Explicit REFLECTIVITY specified. Using this value of 0.995
RDP Explicit EFFICIENCY specified. Using this value of 0
RDP Unified model branch.
RDP using SPECULARLOBECONSTANT of 0.108088
RDP using SPECULARSPIKECONSTANT of 0.56765
RDP using BACKSCATTERCONSTANT of 0.108088
RDP Entering dielectric_dielectric calculation branch 1
RDP Entering dielectric_dielectric calculation branch 2
RDP NOT (polishedfrontpainted  groundfrontpainted) ... calling
DielectricDielectric
RDP DielectricDielectric entry
RDP  Start of do loop cycle  Rindex1 = 2.1 Rindex2 = 1
cost1 = 0.994706 sint1 = 0.102764 sint2 = 0.215804
RDP calculating transmission coefficient of 0.876219
RDP photon is being transmitted
RDP *** FresnelRefraction ***
RDP theStatus == FresnelRefraction
NewMomentum.unit() = (0.976437,0.0688933,0.204511)
theGlobalNormal = (1,0,0) Done = 1
RDP Jumping back to the beginning of the DielectricDielectric code
RDP  Start of do loop cycle  Rindex1 = 1 Rindex2 = 2.1
cost1 = 0.976437 sint1 = 0.215804 sint2 = 0.102764
RDP calculating transmission coefficient of 0.876252
RDP photon is being transmitted
RDP *** FresnelRefraction ***
RDP theStatus == FresnelRefraction
NewMomentum.unit() = (0.994706,0.0328063,0.0973864)
theGlobalNormal = (1,0,0) Done = 1
RDP DielectricDielectric exit
RDP return 10: G4OpBoundaryProcess::PostStepDoIt
with NewMomentum.unit() =
(0.994706,0.0328063,0.0973864)
=============================================================
So.... how would I simulate the reflections from inside a highindex
perfectly smooth optical surface, wrapped with an infinitesimal air gap
then backed with a lambertian reflector?
I'd want:
 shallow angle totalinternalreflection bounces to always be specular
and
 higher incidence angles to have a probability of exiting the
scintillator, bouncing off the backing, and coming back with some
probability of lambertian reflection (and maybe specularspike,
specularlobe and backscatter).
It seems to me the individually specified SPECULARLOBE, SPECULARSPIKE,
BACKSCATTER and LAMBERTIAN parameters would be more appropriately
applied only to photons that have been transmitted out and are hitting
the backing. The sigma_alpha surface roughness parameter seems more
appropriate for the photons while they are still within the
scintillator, for determining probability of reflection or transmission,
and angular deviation from specular from the local surface normal for
this.
The dowhile construct within
G4OpBoundaryProcess::DielectricDielectric()
seems ideally set up for dealing with possible multiple bounces between
the volume and the surface until the photon gets back within the volume
(or is absorbed).
Or am I missing some incantation of parameters that will get me this
behavior?
Thanks,
Rob.

Robert D. Penny
