Problem 1299

Summary: rotation is not orthogonal gps/pos/rot1 in event\G4SPSPosDistribution.cc G4SPSPosDistribution::GenerateRotationMatrices()
Product: Geant4 Reporter: Hristo Marinov <joaquinphoenix>
Component: eventAssignee: Laurent Desorgher <desorgher>
Status: RESOLVED FIXED    
Severity: trivial CC: desorgher
Priority: P5    
Version: 9.5   
Hardware: All   
OS: Windows   

Description Hristo Marinov 2012-03-30 17:39:31 CEST
Hello there

From file "MODULE:G4SPSPosDistribution.cc" body of the function GenerateRotationMatrices() on row 186 in package geant4_9_5_p01 and in geant4_9_3_p02 down to maybe
"
...
  // This takes in 2 vectors, x' and one in the plane x'-y',
  // and from these takes a cross product to calculate z'.
  // Then a cross product is taken between x' and z' to give
  // y'.
  Rotx = Rotx.unit(); // x'
  Roty = Roty.unit(); // vector in x'y' plane
  Rotz = Rotx.cross(Roty); // z'
  Roty = Rotz.cross(Rotx); // y'
...
"
(Rotx,Roty,Rotz) form matrix transform and then used. But obviously is not orthogonal. It must have, and I add this:
Rotz = Rotz.unit();
Roty = Roty.unit();

I'll email author Dr. Fan Lei to let him know too.

Bye there
Comment 1 desorgher 2012-07-23 16:20:32 CEST
Bug has been resolved on April 2nd, 2012 (tag event-V09-05-04) according to recommendations in bug report.


Best regards

Laurent