I didn't get proper light distribution in optical simulation with the LUT model. I found a problem with G4OpBoundaryProcess.cc and made a little change in it. It seems to work. diff G4OpBoundaryProcess.cc 841a842,844 > NewMomentum = > NewMomentum.rotate(anglePhotonToNormal-thetaRad, > PerpendicularVectorTheta); 846a850,852 > NewMomentum = > NewMomentum.rotate(anglePhotonToNormal-thetaRad, > PerpendicularVectorTheta); 850,852c856 < NewMomentum = < NewMomentum.rotate(anglePhotonToNormal-thetaRad, < PerpendicularVectorTheta); ---
Sorry, what exactly did you change, and why?
(In reply to comment #1) > Sorry, what exactly did you change, and why? I changed a part of "void G4OpBoundaryProcess::DielectricLUT()", line 751-809 of file G4OpBoundaryProcess.cc. I moved "NewMomentum = NewMomentum.rotate(anglePhotonToNormal-thetaRad,PerpendicularVectorTheta);" from line 799-801 to above line 791 and to above line 796. I think "NewMomentum" must be rotated around "PerpendicularVectorTheta" before definition of "PerpendicularVectorPhi" at line 791 and 796.
this is now fixed with tag: op-V10-02-00 The code in G4OpBoundaryProcess::DielectricLUT now reads: PerpendicularVectorTheta = NewMomentum.cross(theGlobalNormal); if (PerpendicularVectorTheta.mag() < kCarTolerance ) PerpendicularVectorTheta = NewMomentum.orthogonal(); NewMomentum = NewMomentum.rotate(anglePhotonToNormal-thetaRad, PerpendicularVectorTheta); PerpendicularVectorPhi = PerpendicularVectorTheta.cross(NewMomentum); NewMomentum = NewMomentum.rotate(-phiRad,PerpendicularVectorPhi); e.g. the sequence of rotations are: P_perp_theta = P x N P_new = rotate P by theta around P_perp_theta P_perp_phi = P_perp_theta x P_new P_new_prime = rotate P_new by phi around P_perp_phi thanks to Tetsuma Yaguchi