Problem 1736 - G4Exception: GeomNav0003
Summary: G4Exception: GeomNav0003
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/solids (show other problems)
Version: 10.1
Hardware: All Windows
: P5 trivial
Assignee: tatiana.nikitina
URL:
Depends on:
Blocks:
 
Reported: 2015-04-21 08:43 CEST by Vladislav
Modified: 2015-05-26 09:31 CEST (History)
0 users

See Also:


Attachments
Program with example of G4Exception: GeomNav0003 error (31.91 KB, application/x-zip-compressed)
2015-04-21 12:20 CEST, Vladislav
Details
Fix for calculation of normal for G4Para (37.03 KB, patch)
2015-04-28 11:57 CEST, tatiana.nikitina
Details | Diff

Note You need to log in before you can comment on or make changes to this problem.
Description Vladislav 2015-04-21 08:43:28 CEST
Could you help me?

I want to model a scintillator and a detector. My model is very simple.

X -ray incidents to the scintillator and result in optical photons. Then, excluding certain details, photons pass through the scintillator, an optical grease and glass and are registered by detector.

I didn't have any problems when I used rectangular parallelepiped (i.e. G4Box), but now I am trying to use a parallepiped geometry (G4Para) and have an error.

This error emerge if I set up non-zero alpha angle:

G4Para* solid_para = new G4Para("solid_para", scintillator_length_x / 2.0, scintillator_length_y / 2.0, scintillator_height / 2.0, alpha, 0 * degree, 0 * degree); (where alpha = 1*degree, for example)

But if I use zero angles, there are no problems, but this case is qual to G4Box geomegry and is uninteresting for me. In addition, if alpha angle equal to 45 degree, there are no problems too.

Error (for 1 degree angle) :

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomNav0003
      issued by : G4Navigator::GetGlobalExitNormal()
 WARNING> Expected normal-global-frame to be valid,  i.e. a unit vector!
  - but |normal|   = 57.28996163  - and |normal|^2 = 3282.139704
 which differs from 1.0 by 3281.139704
   n = (0.9998476952,-57.28123609,0)
============================================================
   State of Navigator: 
The current state of G4Navigator is: 
  ValidExitNormal= 1
  ExitNormal     = (0.9998,-57.28,0)
  Exiting        = 1
  Entering       = 0
  BlockedPhysicalVolume= pScintillator
  BlockedReplicaNo     = 0
  LastStepWasZero      = 0

 Current Localpoint = (1.7639561,0.79954604,1.4433903)
 PreviousSftOrigin  = (1.1432369,1.75,0.9989291)
 PreviousSafety     = 2.220446e-016
Current History: 
Level=[0]: Phys Name=[pWorld] Type=[N]

============================================================
Value obtained from stored global-normal is not a unit vector.

*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------


Error (for 44 degree angle) :

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomNav0003
      issued by : G4Navigator::GetGlobalExitNormal()
 WARNING> Expected normal-global-frame to be valid,  i.e. a unit vector!
  - but |normal|   = 1.035530314  - and |normal|^2 = 1.072323031
 which differs from 1.0 by 0.07232303078
   n = (0.7193398003,-0.7448981692,0)
============================================================
   State of Navigator: 
The current state of G4Navigator is: 
  ValidExitNormal= 1
  ExitNormal     = (0.7193,-0.7449,0)
  Exiting        = 1
  Entering       = 0
  BlockedPhysicalVolume= pScintillator
  BlockedReplicaNo     = 0
  LastStepWasZero      = 0

 Current Localpoint = (3.1065107,1.4047079,8.2650118)
 PreviousSftOrigin  = (2.7251633,1.75,8.934397)
 PreviousSafety     = 0
Current History: 
Level=[0]: Phys Name=[pWorld] Type=[N]

============================================================
Value obtained from stored global-normal is not a unit vector.

*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
Comment 1 tatiana.nikitina 2015-04-21 09:59:13 CEST
Dear Vladislav,

Thank you for reporting this error,it seems that Normal is not a unit vector for some angles.

I will inspect the code of G4Para. 

Could you provide a simple version of your test?It will help a lot to fix this bug.

Best Regards,
Tatiana
Comment 2 Vladislav 2015-04-21 12:20:16 CEST
Created attachment 334 [details]
Program with example of G4Exception: GeomNav0003 error
Comment 3 tatiana.nikitina 2015-04-27 11:30:33 CEST
Dear Vladislav,

Thank you for the program.Using it I could identify the error in the calculation of the normal. I'm preparing a fix for it.

Best Regards,
Tatiana
Comment 4 tatiana.nikitina 2015-04-27 17:04:24 CEST
Dear Vladislav,

Fix for G4Para is ready.For what version of Geant4 I can send you this fix?

Best Regards,
Tatiana
Comment 5 Vladislav 2015-04-28 08:57:35 CEST
Dear Tatiana,

I use gean4-10-01 and work on Windows platform.

Best Regards,
Vladislav
Comment 6 tatiana.nikitina 2015-04-28 11:57:36 CEST
Created attachment 341 [details]
Fix for calculation of normal for G4Para
Comment 7 tatiana.nikitina 2015-04-28 11:59:35 CEST
Dear Vladislav,

In attachment you can find a file with fix for G4Para.
Let us know if it is working for you.

Best Regards,
Tatiana
Comment 8 Vladislav 2015-05-22 12:34:04 CEST
Dear Tatiana,

Sorry for the long silence, I have checked out your fix right now and it works very well.

Thanks for help!

Best Regards,
Vladislav
Comment 9 tatiana.nikitina 2015-05-26 09:31:31 CEST
Dear Vladislav,

Thank you for testing and for the message.

Best Regards,
Tatiana.