Message: Re: Any example (in G4 or from some user out there) for custom G4VSolid subclass? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Any example (in G4 or from some user out there) for custom G4VSolid subclass?  

Forum: Geometry
Re: Question Any example (in G4 or from some user out there) for custom G4VSolid subclass? (Michael H. Kelsey)
Re: None Re: Any example (in G4 or from some user out there) for custom G4VSolid subclass? (John Apostolakis)
Date: 23 Feb, 2017
From: Michael H. Kelsey <Michael H. Kelsey>

On Thu, 23 Feb 2017 10:06:02 GMT, John Apostolakis wrote:
> I think that it should be possible to create a working implementation 
> without creating your own solid.
[...]

Thank you so much for your recommendations, John!

I see what you mean about the replicated or parametrized volumes being the most efficient way to put together my geometry. That solution would make some of our other features awkward -- for example, we provide a way to generate primaries (contaminants) from volumes which the user specifies by name. Breaking up the cryo can into multiple named volumes would make that more difficult for users. Similarly, scored hits become more difficult to collate when they come from "different" volumes in a "sliced and diced" object.

Gabriele Cosmo was able to make a slightly different suggestion, which allowed me to preserve the "single solid, single volume" situation. By creating a disjoint solid as the union of all of my hole positions, I could subtract that from my bare cylindrical shell in one step, dramatically reducing the work needed to both draw (in OpenGL) or to track) the actual volume.

As you know, disjoint solids are "forbidden" in Geant4 because of how badly they confuse the tracking. In this case, the disjoint object is never "visible" as a placement, but is hidden inside the G4SubtractionSolid.

I've attached a couple of pictures showing my cryo can with all of the holes right where they belong, just for completeness. The first is drawn (very fast) by OpenGL, the second (slowly, but not terribly so) by RayTracer.

  -- Mike Kelsey

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2017/02/23/12.24-12162-ftholes.gif
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2017/02/23/12.24-23493-ftholes_RayTracer.jpeg

 Add Message Add Message
to: "Re: Any example (in G4 or from some user out there) for custom G4VSolid subclass? "

 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 ]