We are simulating optical photon propagation in GEANT4 and have found that a problem reported already on hypernews: http://hypernews.slac.stanford.edu/HyperNews/geant4/get/opticalphotons/313/1/1.html is still present in the code. The bug results in total internal reflection not properly applied when polishedbackpainted surface is used. After many tests we believe this would be important to fix for all users that use UNIFIED model and polishedbackpainted surfaces.
Thanks for reporting this. We'll investigate.
Hi, Can you please provide more details. To me it looks like the interaction follows the figure in the Application guide: http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/html/TrackingAndPhysics/physicsProcess.html#fig-unified-surface-model What specifically do you think is not happening correctly? Thanks.
Thank you for investigating! When using UNIFIED model and polishedbackpainted surface, the optical photons that should undergo total internal reflection are reflected under some random angle. We are simulating PET detectors with great interest in the optical photon propagation, and have noticed strange results when using the polishedbackpainted surface. A toy simulation with optical photon source with defined original directions showed the behaviour described above - photons that should reflect totally, i.e. under the same angle as is the incidence angle, are reflected under random angles. After applying the changes to the code described in the hypernews link and recompiling Geant, the toy simulation showed the expected behaviour as did the full simulation results. The change to the code applied is, in "geant4.10.04.p03/src/source/processes/optical/src/G4OpBoundaryProcess.cc", lines 1110 and 1178: //original: //if ( theModel == unified && theFinish != polished ) //manual fix: if ( theModel == unified && theFinish != polished && theFinish != polishedbackpainted ) ChooseReflection();
The existing code seems to agree with the documentation. It sounds like you expect the first surface to be polished. Actually it is ground. The 'polished' in 'polishedbackpainted' refers to the back paint ("wrapper" in the manual). If you want photons undergoing total internal reflection to have the same angle as the angle of incidence, the surface needs to be specified appropriately. Try the macro below with example extended/optical/OpNovice2 and look at the first boundary scattering for each event. Please let me know if I misunderstand your post. /control/verbose 2 /tracking/verbose 2 /opnovice2/boxProperty RINDEX 0.000002 1.31 0.000008 1.32 /opnovice2/boxProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 0.000008 3000000 /opnovice2/worldProperty RINDEX 0.000002 1.01 0.000008 1.01 /opnovice2/worldProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 0.000008 3000000 /opnovice2/surfaceModel unified /opnovice2/surfaceType dielectric_dielectric #### try each in turn /opnovice2/surfaceFinish polished #/opnovice2/surfaceFinish ground #/opnovice2/surfaceFinish groundbackpainted /opnovice2/surfaceSigmaAlpha 0.0 /opnovice2/surfaceProperty SPECULARSPIKECONSTANT 1.0 /opnovice2/surfaceProperty RINDEX 1.01 /run/initialize /gun/particle opticalphoton /gun/energy 3 eV /gun/position 99 0 0 cm /gun/direction .1 .9 0 /opnovice2/gun/optPhotonPolar /run/beamOn 10
(In reply to Daren Sawkey from comment #4) > The existing code seems to agree with the documentation. It sounds like you > expect the first surface to be polished. Actually it is ground. The > 'polished' in 'polishedbackpainted' refers to the back paint ("wrapper" in > the manual). If you want photons undergoing total internal reflection to > have the same angle as the angle of incidence, the surface needs to be > specified appropriately. Try the macro below with example > extended/optical/OpNovice2 and look at the first boundary scattering for > each event. > > Please let me know if I misunderstand your post. > > /control/verbose 2 > /tracking/verbose 2 > > /opnovice2/boxProperty RINDEX 0.000002 1.31 0.000008 1.32 > /opnovice2/boxProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 0.000008 > 3000000 > > /opnovice2/worldProperty RINDEX 0.000002 1.01 0.000008 1.01 > /opnovice2/worldProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 > 0.000008 3000000 > > /opnovice2/surfaceModel unified > /opnovice2/surfaceType dielectric_dielectric > > #### try each in turn > /opnovice2/surfaceFinish polished > #/opnovice2/surfaceFinish ground > #/opnovice2/surfaceFinish groundbackpainted > > /opnovice2/surfaceSigmaAlpha 0.0 > /opnovice2/surfaceProperty SPECULARSPIKECONSTANT 1.0 > /opnovice2/surfaceProperty RINDEX 1.01 > > /run/initialize > > /gun/particle opticalphoton > /gun/energy 3 eV > /gun/position 99 0 0 cm > /gun/direction .1 .9 0 > /opnovice2/gun/optPhotonPolar > /run/beamOn 10 Dear Daren, many thanks for your dedicated investigation and explanation. Your explanation makes sense and the total reflection behaves as expected in our code when defining the SPECULARSPIKECONSTANT=1.0 constant of the surface. This is also exactly as specified in the manual. The reason I presumed this is a bug was the hypernews link in my original comment, where the maintainer of the G4OpBoundaryProcess.cc at the time referred to this as a bug. In any case your explanation solves the issue in a way consistent with the manual, so I believe this can be considered solved.