Problem 1299 - rotation is not orthogonal gps/pos/rot1 in event\G4SPSPosDistribution.cc G4SPSPosDistribution::GenerateRotationMatrices()
Summary: rotation is not orthogonal gps/pos/rot1 in event\G4SPSPosDistribution.cc G4SP...
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: event (show other problems)
Version: 9.5
Hardware: All Windows
: P5 trivial
Assignee: Laurent Desorgher
URL:
Depends on:
Blocks:
 
Reported: 2012-03-30 17:39 CEST by Hristo Marinov
Modified: 2012-07-23 16:28 CEST (History)
1 user (show)

See Also:


Attachments

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