Message: Problem with the segmentation of a Solid Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Problem with the segmentation of a Solid 

Forum: Geometry
Date: 21 Jan, 2011
From: David Dennetiere <David Dennetiere>

Hello,

I have encountered some problem in the definition of my Solids. I have a solid that can be described as the intersection of a sphere and a box (cf. code #1). Until there, everything's fine. But the problem is the segmentation of this solid along the Phi angle (cf. code #2) : geant compiles it, execute but as soon as a particle has a trajectory close to any part of the segmented solid, geant enters a infinite loop...

Could someone help me on this one? I've been trying for several weeks now and this has got me nowhere...

Thank you very much

Code #1 :

  G4Sphere* Support_sphere = new G4Sphere ("Support_sphere", Support_Rmin,Support_Rmax,Support_PhiMin,Support_PhiMax,Support_ThetaMin, Support_ThetaMax);
  G4Box* Support_box = new G4Box("Support_box",900.*mm,900.*mm,40.*mm);
  G4IntersectionSolid* Support = new G4IntersectionSolid("Support",Support_sphere,Support_box);
  Support_log = new G4LogicalVolume (Support,Mat_Al, "Support_log", 0,0,0);
  Support_phys = new G4PVPlacement(0, G4ThreeVector(Centre_x,Centre_y,Centre_z),Support_log,"Support_phys",ExperimentalHall_log,false,0);

Code #2 :

   G4Sphere* Support_SphereTab[40];
 	  for(G4int j=0;j<40;j++)
 	  {
 		  stri<<j;
 		  Support_SphereTab[j] = new G4Sphere("Support_sphere"+stri.str(), Support_Rmin, Support_Rmax, Support_PhiMax*j/40., Support_PhiMax/40., Support_ThetaMin, Support_ThetaMax);
 		  stri.str(""); // efface le contenu du stringstream
 	  }
  G4Box* Support_box = new G4Box("Support_box",900.*mm,900.*mm,40.*mm);
   G4IntersectionSolid* SupportTab[40];
   for(G4int i=0;i<40;i++)
   {
 	  stri<<i;
 	  SupportTab[i] = new G4IntersectionSolid("Support"+stri.str(),Support_SphereTab[i],Support_box);
 	  stri.str("");
   }
   for(G4int i=0;i<40;i++)
      {
 	     stri<<i;
 	     Support_logTab[i] = new G4LogicalVolume (SupportTab[i],Mat_Al, "Support"+stri.str()+"_log", 0,0,0);
 	     stri.str("");
      }
   for(G4int i=0;i<40;i++)
   {
 	  stri<<i;
 	  Support_physTab[i] = new G4PVPlacement(0, G4ThreeVector(Centre_x,Centre_y,Centre_z),
 			  Support_logTab[i],"Support"+stri.str()+"_phys",ExperimentalHall_log,false,0);
 	  stri.str("");

   }

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

1 None: Re: Problem with the segmentation of a Solid   (Tatiana Nikitina - 21 Feb, 2011)
(_ None: Re: Problem with the segmentation of a Solid   (David Dennetiere - 29 Mar, 2011)
(_ None: Re: Problem with the segmentation of a Solid   (Tatiana Nikitina - 29 Mar, 2011)
 Add Message Add Message
to: "Problem with the segmentation of a Solid"

 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 ]