Problem 351 - The G4Navigator returns the normal vector in the wrong coordinate system
Summary: The G4Navigator returns the normal vector in the wrong coordinate system
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/volumes (show other problems)
Version: 4.0
Hardware: PC Linux
: P1 normal
Assignee: John Apostolakis
URL: http://apapanes.home.cern.ch/apapanes/G4
Depends on:
Blocks:
 
Reported: 2002-02-08 07:16 CET by a.papanestis
Modified: 2002-06-06 08:31 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 a.papanestis 2002-02-08 07:16:06 CET
Dear G4 Team,

In G4OpBoundaryProcess the following code is used to get the vector normal to
the surface being crossed by a photon:

theLocalNormal = theNavigator->GetLocalExitNormal(&valid);
...
theGlobalNormal = theNavigator->GetLocalToGlobalTransform().
	                                TransformAxis(theLocalNormal);

The problem appears when a photon exits a solid.  The local normal vector
should be given in the coordinate system of the volume left behind (where
PreStepPoint belongs). Instead, it is given in the coordinate system of the
MOTHER volume, and the tranformation of the volume where PostStep belongs is
applied.  This works only in the case when PostStepPoint belongs in the mother
volume, but fails if two daughter volumes are touching each other and
PostStepPoint belongs in a different daughter volume.

In the last case the local normal vector is given in the coordinate system of
the mother volume, but the transformation of the second daughter volume is
applied.  As a result the local vector is wrong in the global coordinate system.

best regards

Antonis Papanestis

PS I will try and put some more material in the URL, but it may take a couple
of days.
Comment 1 John Apostolakis 2002-02-21 23:19:59 CET
Thank you for the clear report.

We are looking into this, and expect to provide a fix in the near future.
Comment 2 John Apostolakis 2002-06-06 08:31:59 CEST
Thank once again for your report and explanation.  These together with the
assistance of Peter Gumplinger in creating this as a test case have proven very
helpful in hunting down the contributing factors to this problem.

  We believe that we have now found the different issues contributing to this
problem and resolved them.  A candidate tag including the fixes for this
problem has been created and is under system testing (you should also have
received a fix-tag last week).  The fixes should now appear in the
upcoming public release at the end of this month.