| Summary: | Problem with G4OpBoundaryProcess | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | tetsuma-yaguchi <tetsuma-yaguchi> |
| Component: | processes/optical | Assignee: | gum |
| Status: | RESOLVED FIXED | ||
| Severity: | trivial | ||
| Priority: | P5 | ||
| Version: | 10.1 | ||
| Hardware: | All | ||
| OS: | Linux | ||
|
Description
tetsuma-yaguchi@kylab.sci.waseda.ac.jp
2016-02-10 07:57:51 CET
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
|