Message: RE: Problem with using Solid type: G4Sphere Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None RE: Problem with using Solid type: G4Sphere 

Forum: Geometry
Re: Question Problem with using Solid type: G4Sphere
Date: 20 Jul, 2007
From: John Apostolakis <John Apostolakis>

Dear Gao,

It appears to me that the small size of your spheres may pose some
difficulty.

Geant4 version 9.0 provides the new capability to change the tolerance
(thickness of boundaries for the purpose of the inside method).  I
suggest to investigate this as a first option, as the code will be
portable with future versions of Geant4.

Else, for something quicker or if you do not want to move to Geant4 9.0,
I suggest to change the constant kCarTolerance in the file geomdefs.hh
in the globals category.   Choosing a value that is around 10^-12 times
the diameter of your world volume should generally suffice.  In case
your smallest volumes are 10^-6 smaller than this diameter, you may wish
to make the tolerance smaller by one or more orders of magnitude.

If this does fix the problem, I suggest that you file this as a problem
report - to enable us to investigate the issue further and see whether
we could improve the algorithm further.

Best regards,
John Apostolakis
------------------------------------------------------------------------
John Apostolakis                   Email:  John.Apostolakis@cern.ch
  

> -----Original Message-----
> From: jgzm6@umr.edu [mailto:jgzm6@umr.edu] 
> Sent: Friday, July 20, 2007 8:11 PM
> To: PublicHyperNews@slac.stanford.edu
> Subject: Problem with using Solid type: G4Sphere
> 
> *** Discussion title: Geometry
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/geometry/761"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Hi, G4s:
>    I try to G4parameterised the G4Sphere into my phantom. 
> my code is:
> -------------------------------------------------------
>        G4double NanoWidth=100e-6*mm;    // only for the 
> nanoParticles   
>        G4int    NbOfNanos =10648;    // Nano parameter (5)
>        G4double NanoSpacingX = 450e-6*mm;
>        G4double NanoSpacingY = 450e-6*mm;
>        G4double NanoSpacingZ = 450e-6*mm; 
> 
>        G4double NanoWidth=100*nm;    // only for the nanoParticles   
>        G4int    NbOfNanos =10648;    // Nano parameter (5)
>        G4double NanoSpacingX = 450*nm;
>        G4double NanoSpacingY = 450*nm;
>        G4double NanoSpacingZ = 450*nm; 
> 
>          G4double FnewRmin  =25e-6*mm; 
>        G4double FnewRmax  =50e-6*mm; 
>        G4double FnewSphi  =0.0;
>        G4double FnewDphi  =360*degree; 
>        G4double FnewDphi  =2*pi; 
>        G4double FnewSTheta=0.0;
>        G4double FnewDTheta=180*degree;
>        G4double FnewDTheta=pi;
> -----------------------------------------------------------
> The following problem came out. I looked at the other's post 
> questions on the forum, But I still didn't figured out the reason.
> I checked the overlap geometry. But it is OK. 
> --------------------------------------------------------
> 
>     *** Dump for solid - nano ***
>     ===================================================
>  Solid type: G4Sphere
>  Parameters: 
>     inner radius: 2.5000000000000001e-05 mm 
>     outer radius: 5.0000000000000002e-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 
> -----------------------------------------------------------
> Position:
> 
> p.x() = 0.78820512863445735 mm
> p.y() = 2.2441686502724139 mm
> p.z() = 0.60965208650127067 mm
> 
> Rp = 2.4554502483753406 mm
> 
> Direction:
> 
> v.x() = 0.021778871749767559
> v.y() = 0.99925174805573891
> v.z() = -0.031962865216643876
> 
> Proposed distance :
> 
> snxt = 8.9999999999999999e+99 mm
> 
> *** G4Exception : Notification
>       issued by : G4Sphere::DistanceToOut(p,v,..) Logic 
> error: snxt = kInfinity  ???
> *** This is just a warning message.
> 
> -----------------------------------------------------------
>     *** Dump for solid - nano ***
>     ===================================================
>  Solid type: G4Sphere
>  Parameters: 
>     inner radius: 2.5e-05 mm 
>     outer radius: 5e-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 
> -----------------------------------------------------------
> Position:
> 
> p.x() = -2.29626533148064e-05 mm
> p.y() = 2.294602273522628e-06 mm
> p.z() = 6.050147066893885e-06 mm
> 
> Direction:
> 
> v.x() = 0.01494702801659739
> v.y() = 0.9886359670238919
> v.z() = -0.1495844612926267
> 
> Proposed distance :
> 
> snxt = 9e+99 mm
> 
> *** G4Exception : Notification
>       issued by : G4Sphere::DistanceToOut(p,v,..) Undefined 
> side for valid surface normal to solid.
> *** This is just a warning message.
> 
> -------------------------------------------------
> thanks at first!
> 
> Gao
> 
> 

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Question: RE: Problem with using Solid type: G4Sphere   (jgzm6@umr.edu - 09 Aug, 2007)
 Add Message Add Message
to: "RE: Problem with using Solid type: G4Sphere"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]