|Message: Re: Any example (in G4 or from some user out there) for custom G4VSolid subclass?||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
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