Is there a simple way to define the placement of a volume with respect to global reference frame? The manual (TGeoMatrix’s class description) says that it is handled by the manager class, but I do not understand how to do it. Let’s consider this simple piece of code (see attachment, it shows the simplest cace without rotations)
I would like to define a placement of vol2 with respect to totl. I see the only way to do it:
Define a placement of vol1 with respect to totl using translation tr1.
Define the placement of vol2 with respect to vol1 using transltion tr2
But the geometry I’m working with has a deep hierarchy of objects (volumes-inside- volume-inside-volume-etc), and I would like to define a placement of any volume with respect to totl in one step (without care of current volume’s nesting level). How do I do it? test.C (941 Bytes)
[quote=“musinsky”]Sorry, but I don’t understand:
??? why placement of vol2 with respect to vol1 ??? why not simple define a placement of vol2 with respect to totl using translation tr2 ?
totl->AddNode(vol2, 1, tr_y);
[/quote]
Because tr_y is given to me with respect to vol1 but not totl and I have no idea how to get translation of vol1 with respect to totl using the same way as show in the script.