Message: RE: Infinite loop in G4SubtractionSolid::DistanceToIn() Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None RE: Infinite loop in G4SubtractionSolid::DistanceToIn() 

Forum: Geometry
Re: Warning Infinite loop in G4SubtractionSolid::DistanceToIn() (Svetlana Biktemerova)
Re: Question Re: Infinite loop in G4SubtractionSolid::DistanceToIn() (Gabriele Cosmo)
Re: Question Re: Infinite loop in G4SubtractionSolid::DistanceToIn() (Linda Schnorrenberger)
Date: 03 Sep, 2010
From: Makoto Asai <Makoto Asai>

Hi Linda,

Let's say your subtracted solid is made as such as C = A - B,
and at least one surface of solid B is touching to one surface
of solid A. Due to the rounding errors, there always is a
possibility that surface of solid B is slightly inside of the
surface of solid A. Thus we suggest you to make solid B bigger
to avoid sharing the surface. In your particular case, I would
suggest like this. 

   // hole cone
   G4Cons* collimatorHole  = new G4Cons("CollimatorHole",
      0,0.5*cm,0.*cm,0.625*cm,25.*cm,0.*pi,2.*pi);
                              ^^
This subtracting solid will not make any volume overlap to
any other volumes.

Hope this helps,
Makoto

> -----Original Message-----
> From: Linda Schnorrenberger [mailto:schnorrenberger@ikp.tu-
> darmstadt.de]
> Sent: Friday, September 03, 2010 3:21 AM
> To: geometry-g4hn
> Subject: Re: Infinite loop in G4SubtractionSolid::DistanceToIn()
> 
> 
> *** Discussion title: Geometry
> 
> Hi,
> I experience a similar problem using the following geometrical
> Object:
> 
> *****************************************************************
> ********
>   G4double x = 10.*cm;
>   G4double y = 10.*cm;
>   G4double z = 40.*cm;
> 
>   // Copper Block
>   G4Box* collimatorBox =  new G4Box("CollimatorBox", x/2, y/2,
> z/2);
>   // hole cone
>   G4Cons* collimatorHole  = new G4Cons("CollimatorHole",
>  0,0.5*cm,0.*cm,0.625*cm,20.*cm,0.*pi,2.*pi);
>   // Collimator
>   G4SubtractionSolid* collimatorDim =
> new
> G4SubtractionSolid("collimatorDim",collimatorBox,collimatorHole);
> *****************************************************************
> ********
> 
> I experience 100% CPU and now more new events beeing processed.
> My gdb tells me (after Ctr+C):
> 
> Program received signal SIGINT, Interrupt.
> 0x00000001001765a5 in G4SubtractionSolid::DistanceToIn () at
> G4String.hh:119
> 119       virtual ~G4String () {}
> 
> Sometimes it is the same problem with DistanceToOut ().
> 
> Has there been a bug fix on that problem since March 2009?
> (I am using geant4 version 4.9.0 and CLHEP 2.0.3.1)
> 
> My two solids, that I subtract have exactly the same z length. Do
> you think it would help,
>  if I make the G4Cons slightly longer? I guess the problem occurs
> due to the
> faces at +/- 20 cm in z, where the G4Cons is beeing subtracted?
> 
> Thank you for your help,
> Linda
> 
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to
> reply or unsubscribe) at:
> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/geometry/
> 956/1/1.html

 Add Message Add Message
to: "RE: Infinite loop in G4SubtractionSolid::DistanceToIn()"

 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 ]