[Gate-users] G4sphere not available on nanometer scale

성원모 wsung at snu.ac.kr
Sun Nov 15 10:59:51 CET 2015


Dear John Apostolakis


I appreciate your feedback.


First of all, G4exception still occurred with your file.

I added "G4GeometryManager" line before creating GateBox for world in GateDetectorConstruction.cc. But Geant4 still induce G4exception.


Also, I found some interesting phenomenon.

If another full sphere inside hollow sphere is added, then this G4exception does not occur.


I add answers to your questions as below.

________________________________
보낸 사람: John Apostolakis <John.Apostolakis at cern.ch>
보낸 날짜: 2015년 11월 11일 수요일 오후 8:10
받는 사람: 성원모
참조: gate-users
제목: Re: [Gate-users] G4sphere not available on nanometer scale

A colleague informed me that there was a fix made recently (done in August) which was not included in the latest patch to 10.1
to G4GeometryTolerance, to tune radial tolerance. In the past only the Cartesian one was tuned to the size of the setup.

I attach the relevant file which you can use to replace the file source/global/management/src/G4GeometryTolerance.cc<http://G4GeometryTolerance.cc>

Perhaps that can help.
John
===================================================
John Apostolakis,  PH Department, CERN



On 11 Nov 2015, at 11:29, John Apostolakis <john.apostolakis at cern.ch<mailto:john.apostolakis at cern.ch>> wrote:

Dear Wonmo Sung,

Thanks for your feedback.

1) It seems that you have discovered a weakness in G4Sphere.  I note that the point that is reported
  p.x() = 5.106433541911882e-07 mm
  p.y() = -7.11253374326104e-07 mm
  p.z() = 9.224550730873363e-08 mm
is at a radius
  Rp = 8.80424460864498e-07 mm
that is smaller than the inner radius.

So this point is outside the solid, but DistanceToOut is being called.  It on the wrong side of the boundary for this method, so it should not be have been called by the Navigator.
[ The solid should be able to provide an answer without an exception - so we should understand and address the issue. ]

2) Could you please explain which values of G4GeometryTolerance you have tried ?

>> I've tried from e-15 mm to e-40 mm

3) To figure out a solution (or potentially avoid having this problem) it is important to try to understand why it happened: why did the track arrive at this location while thinking that it was inside this solid.

Sometimes this happens because the geometry has problems. Could you explain whether you have other volumes inside this hollow sphere or near it ?

>> I don't have other volumes inside this hollow sphere or near it.

To try to diagnose the cause of the navigator’s misunderstanding:
- How early does this problem occur ?  Can you provide verbose output for the track on which this occurs ?  ( This requires activating verbose tracking for that event using "/tracking/verbose 1” )

>> Below are the output lines with G4exception.
It seems like source was generated inside the hollow sphere even though I assigned source generating inside the hollow sphere. Maybe this is source generator problem? not G4sphere? I tried to figure out with this output lines but failed.

*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0 4.34e-06 1.37e-05 1.77e-06    0.0001        0        0         0  world_phys initStep
    1 4.73e-06 1.41e-05 2.03e-06    0.0001 8.78e-14 6.03e-07  6.03e-07 Sphere_phys Transportation
    2 5.38e-06 1.47e-05 2.45e-06         0   0.0001    1e-06   1.6e-06 Sphere_phys StepLimiter

*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0 -7.82e-06  5.5e-06 1.16e-05    0.0001        0        0         0  world_phys initStep
    1 -7.82e-06  5.5e-06 1.16e-05    0.0001        0        0         0 Sphere_phys Transportation

-----------------------------------------------------------
    *** Dump for solid - Sphere_solid ***
    ===================================================
 Solid type: G4Sphere
 Parameters:
    inner radius: 1.5e-05 mm
    outer radius: 2.000000000000001e-05 mm
    starting phi of segment  : 0 degrees
    delta phi of segment     : 360 degrees
    starting theta of segment: 0 degrees
    delta theta of segment   : 180 degrees
-----------------------------------------------------------

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomSolids1002
      issued by : G4Sphere::DistanceToOut(p,v,..)
Undefined side for valid surface normal to solid.
Position:

p.x() = -7.822839418765414e-06 mm
p.y() = 5.497727012249996e-06 mm
p.z() = 1.155760135291585e-05 mm

Direction:

v.x() = 0.0314195148038913
v.y() = -0.09605354506485335
v.z() = 0.9948801588985289

Proposed distance :

snxt = 9e+99 mm

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


-----------------------------------------------------------
    *** Dump for solid - Sphere_solid ***
    ===================================================
 Solid type: G4Sphere
 Parameters:
    inner radius: 1.5e-05 mm
    outer radius: 2.000000000000001e-05 mm
    starting phi of segment  : 0 degrees
    delta phi of segment     : 360 degrees
    starting theta of segment: 0 degrees
    delta theta of segment   : 180 degrees
-----------------------------------------------------------

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomSolids1002
      issued by : G4Sphere::DistanceToOut(p,v,..)
Logic error: snxt = kInfinity  ???
Position:

p.x() = -7.822839418765414e-06 mm
p.y() = 5.497727012249996e-06 mm
p.z() = 1.155760135291585e-05 mm

Rp = 1.499999893019781e-05 mm

Direction:

v.x() = 0.0314195148038913
v.y() = -0.09605354506485335
v.z() = 0.9948801588985289

Proposed distance :

snxt = 9e+99 mm

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


-----------------------------------------------------------

- Is there a simple version of your GATE input which can reproduce the problem, and which you can share ?

>> Please see the attachment for simple GATE input


4) What version of Geant4 have you used: what was the original version you used with GATE v7.1 ?  have you used the whole of Geant4 10.1.p02 now, or just G4Sphere?

>> I tested with whole of both Genat4 10.1.p02 and Gate v7.1 master version.


John
===================================================
John Apostolakis,  PH Department, CERN

On 10 Nov 2015, at 15:32, 성원모 <wsung at snu.ac.kr<mailto:wsung at snu.ac.kr>> wrote:

Dear John Apostolakis

Thanks for immediate and valuable comments!
However, unfortunately, both of your solutions does not resolve the problem.

1. I tried newest patch of Geant4 (e.g., v.4.10.01.p02) but same G4exception occurred.
2. I found how to change tolerance in G4 User Guide. Gate main or detector construction was modified so that it has G4GeometryManager just before defining any geometrical component of the setup.

e.g.,
G4GeometryManager::GetInstance()->SetWorldMaximumExtent(some value);

Tolerance change was observed using G4GeometryTolerance and tolerance was smaller than e-9 mm. However, same G4exception remains if I use setRmin.

I'm going to test same thing with Geant4 alone and report it in Geant4 Problem reporting system. I would appreciate any comments if you have any insights on this issue.

Regards,
Wonmo Sung


________________________________
보낸 사람: John Apostolakis <John.Apostolakis at cern.ch<mailto:John.Apostolakis at cern.ch>>
보낸 날짜: 2015년 11월 10일 화요일 오후 4:42
받는 사람: 성원모
참조: gate-users at lists.opengatecollaboration.org<mailto:gate-users at lists.opengatecollaboration.org>
제목: Re: [Gate-users] G4sphere not available on nanometer scale

Dear Wonmo Sung,

Could you confirm the version of Geant4 you are using?

I have two suggestions. The first is to try using the version of G4Sphere from the newest patch of Geant4. You can copy the source file into your installation, and, if needed only the header file and inline icc file from the include directory - and of course then the rebuild Geant4 libraries.

The second concerns the tolerance. The default value is 1.e-09 mm, which is not small enough for your geometry. You can see in the Users Guide how to adapt it to the size of your setup.

If your problem remains, I suggest to report it in the Geant4 Problem reporting system.

Regards,
John Apostolakis

On 10 Nov 2015, at 08:15, 성원모 <wsung at snu.ac.kr<mailto:wsung at snu.ac.kr>> wrote:

Dear Gate users

Hello
I'm currently using Gate v7.1.

I tried to use setRmin for hollow sphere on nanometer scale.
e.g.,
/gate/sphere/geometry/setRmin 1 nm
/gate/sphere/geometry/setRmax 20 nm

However, I got G4Exception as below.
This error does not occur if I replace nm with mm OR if I use 0 nm for setRmin (=full sphere).
Could you provide any comments or help to solve this problem? I appreciate any help in advance.

-----------------------------------------------------------
    *** Dump for solid - sphere_solid ***
    ===================================================
 Solid type: G4Sphere
 Parameters:
    inner radius: 1e-06 mm
    outer radius: 2.000000000000001e-05 mm
    starting phi of segment  : 0 degrees
    delta phi of segment     : 360 degrees
    starting theta of segment: 0 degrees
    delta theta of segment   : 180 degrees
-----------------------------------------------------------

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomSolids1002
      issued by : G4Sphere::DistanceToOut(p,v,..)
Logic error: snxt = kInfinity  ???
Position:

p.x() = 5.106433541911882e-07 mm
p.y() = -7.11253374326104e-07 mm
p.z() = 9.224550730873363e-08 mm

Rp = 8.80424460864498e-07 mm

Direction:

v.x() = 0.9926097739516453
v.y() = -0.02063914065141685
v.z() = 0.1195820326338147

Proposed distance :

snxt = 9e+99 mm

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

Regards,
Wonmo Sung
_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org>
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org>
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20151115/bd3d39cf/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: G4Exception.tar.gz
Type: application/x-gzip
Size: 4554 bytes
Desc: G4Exception.tar.gz
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20151115/bd3d39cf/attachment-0001.bin>


More information about the Gate-users mailing list