Geometry: Defining volumes passing through several others

I use the ROOT geometry package to model certain components to be used by GEANT3, via the VMC interface. Having stumbled upon certain complications lately, I would like to ask you for opinions as well as possible suggestions.

The component in question is basically multi-walled pipe (represented by a series of tubes, some to describe walls proper and some to describe gasses between them) with two relatively complicated caps and flanges (represented by complex shapes) at both ends as well as several gas-circulation lines connected to different layers. The whole thing has been placed inside a two-walled box, sticking out on both sides. We want its GEANT description to be as accurate as possible because it is located close to the beam and can therefore generate many secondary particles.

Unfortunately even with complex shapes used to group volumes constituting respective components, it is still rather difficult to describe this object by a hierarchy of volumes. There are basically two problems I’ve run into:

  1. Placing end caps on the tube. With the gas volumes described by simple tubes, they either leave gaps or overlap with end-cap material. They cannot be made children of the end caps because there are two end-cap objects. On the other hand, end caps cannot be made children of gas volumes because in addition to having more than one of the latter - with different materials, too - it would require making them larger than they really are to avoid protrusions.

I see several possibilities of solving this, some of which sound to me better than others (but I’ll only say which later in order not to influence you):

  • add additional gas volumes which would accurately reflect the shape of the interior of end caps;
  • as above but converting the gas volumes into complex shapes incorporating these details instead of letting them remain separate volumes;
  • combine both end caps into a single complex shape.
  1. There are some volumes which pass through several others. Flow tubes start in internal gas volumes, pass through end caps exiting the pipe, pass through both walls of the outer box and only terminate in the world volume. Flanges are mounted in the walls of the outer box, protruding both outside the outer wall and inside the inner wall. The whole pipe itself only ends halfway between the two walls of the outer box, inside flanges. There are also support structures… I think you can see where this is going.

Here I have thought of the following possibilities, none of which I actually like much:

  • go against logical grouping and split each such volume into fragments, each of them only passing through to a single parent;
  • subtract the shapes of such volumes from parents (converting the latter into complex volumes in the process) to avoid overlaps;
  • bite the bullet, explicitly define such nodes as overlapping and try to set priorities so that correct materials are used by GEANT.

I shall be very much grateful for your suggestions on how to solve these problems properly!