Problem 709

Summary: sign error in G4LowEnergyPolarizedCompton::GetPerpendicularPolarization
Product: Geant4 Reporter: nicolas.produit
Component: processes/electromagnetic/lowenergyAssignee: capra
Status: CLOSED FIXED    
Severity: normal    
Priority: P2    
Version: 6.1   
Hardware: All   
OS: All   

Description nicolas.produit 2005-01-11 02:08:23 CET
In G4LowEnergyPolarizedCompton::GetPerpendicularPolarization
We see the formula:
// p = a + (a o n)/(n o n)*n
return gammaPolarization +
gammaPolarization.dot(gammaDirection)/gammaDirection.dot(gammaDirection)*gammaDirection;

I think the formula should read:
// p = a - (a o n)/(n o n)*n

so that
p o n = a o n - a o n / (n o n) * (n o n)= 0
What the function try to achive

with the formula above
p o n !=0

Correct code should be:
return gammaPolarization -
gammaPolarization.dot(gammaDirection)/gammaDirection.dot(gammaDirection)*gammaDirection;
Comment 1 francesco.longo 2005-05-27 07:35:59 CEST
The problem has been found also by another developer who took care of modify the
CG4 class in the proper way.
Comment 2 capra 2005-05-31 06:47:59 CEST
Sign corrected