Problem 709 - sign error in G4LowEnergyPolarizedCompton::GetPerpendicularPolarization
Summary: sign error in G4LowEnergyPolarizedCompton::GetPerpendicularPolarization
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/electromagnetic/lowenergy (show other problems)
Version: 6.1
Hardware: All All
: P2 normal
Assignee: capra
URL:
Depends on:
Blocks:
 
Reported: 2005-01-11 02:08 CET by nicolas.produit
Modified: 2005-05-31 06:50 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
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