Open fzeiser opened 9 years ago
And received the answer:
Peter
can I have a shared surface between a mother and daughter volume?
yes
Or is does that lead to problems as mentioned below?
there should be no issues
I attached a picture of an example geometry below.
In this case, you have six surfaces (three plus their reverse):
MotherA to MotherB Daughter A to MotherB Daughter A to MotherA MotherB to MotherA MotherB to DaughterA MotherA to DaughterA
If you want perfectly smooth surfaces between your volumes, then you don't even need to define any BorderSurface.
In case I have optical processes and define surfaces between the different physical volumes, (how) does Geant4 decide which optical surface definition to use for a particle that travels from "Daughter A" to "Mother B" .
It will use:
b) OpticalSurface from"Daughter A" to "Mother B"
The choice comes from the volume pointers in the pre and postStep.
(there is a dedicated forum for optical photon questions)
Here's another comment that @grytveten found. To me, it seems to be almost in conflict to the simple answer above. http://hypernews.slac.stanford.edu/HyperNews/geant4/get/geometry/1384/1.html?inline=-1
On Sun, 07 Dec 2014 23:24:35 GMT, Andrea Conti wrote:
There have already been many questions about holes: in general, it is quite clear that the best way to implement a filled hole in a host material is to represent the hole as a daughter volume of the holed volume, with the filling material as material of the daughter (or air if the hole is hollow).
But this way the daughter will share a surface with the mother (that is, the mouth of the hole, on the same plane as the host material's surface) and nobody addressed this problem: is it acceptable ? Or are there going to be problems with the consistency of the geometry ?
If the surfaces are simple planes along X, Y or Z, then you can do this safely as the coordinate of the surface will be floating-point identical in the two cases. If the surface (even a plane) is not exactly on-axis, you are likely to have situations where the computation of the two surfaces do not coincide. In these cases, particles can get "trapped" between the surfaces, or you can have unexpected boundary interactions, etc. This is why we generally discourage shared surfaces, because the cases where they are safe are quite limited.
If your situation is a through hole, or a cavity in which the material is the same as the material surrounding the volume (e.g., a cube with a beam aperture through it), then you might be better off implementing it as a boolean (G4SubtractionVolume) or as a tesselated solid where you compute surface facets externally. In that case, when you place the volume in the mother, the hole will automatically be filled with the surrounding medium (air, vacuum, whatever).
-- Michael Kelsey
Conclusions for Us /current problem Currently we only have a place along the z-axis where the mother/daughter shares a surface. Then both answers agree on that it's ok. Do we have to readdress this when we set the single detectors in an array? In that case we rotate the detectors, so the shared surface is not along a primary axis any longer.
1) From this post here, I can also see that one has to be carefull with boolean substraction indead. http://hypernews.slac.stanford.edu:5090/HyperNews/geant4/get/geometry/1308/1.html
Summary of the post: Making holes in volumes (Marek Szuba)
- Section 4.1.2.2 of the Geant Application-Developer Guide (which discusses solids made by Boolean operations) mentions the following: "The constituent solids of a Boolean operation should possibly avoid be composed by sharing all or part of their surfaces. This precaution is necessary in order to avoid the generation of 'fake' surfaces due to precision loss, or errors in the final visualization of the Boolean shape.". Given holes implemented through subvolumes share parts of their surfaces with respective mother volumes, don't they suffer from the same problem? I do occasionally see some visualisation artefacts there;
Yes. In fact, when making holes with Booleans, we recommend that you define the second (subtracted) solid to be larger than the primary solid. That avoids the shared-surface issue, and the "extra" stuff isn't part of the final solid that gets used.
1->2) If using boolean subtraction, create a workaround geometry: http://hypernews.slac.stanford.edu/HyperNews/geant4/get/geometry/348.html?inline=-1
The problem you are seeing most likely comes from an attempt to subtract a volume that shares a surface with the subtractee. This is also mentioned in the other messages on this thread. Make sure your subtracting tubes are longer than the subtractees. If there is still a problem, try a small (physicallly insignificant) change of radius.
3) It might be worth looking at different posts like this here in the optical photons forum: http://hypernews.slac.stanford.edu/HyperNews/geant4/get/opticalphotons/124.html?inline=-1
Optical Photons: alternative ways of defining wrapping material? Forum: Processes Involving Optical Photons Date: 27 Nov, 2008 From: Estela Suarez
I send a message on hypernet: http://hypernews.slac.stanford.edu/HyperNews/geant4/get/geometry/1440.html