Level of a TGeoNode/TGeoVolume

From: Christian Holm Christensen <cholm_at_nbi.dk>
Date: Wed, 30 Nov 2005 13:36:30 +0100


Hi there,

Is there a way to get the level (depth) of a given TGeoNode/TGeoVolume in a geometry? What I'd like to do is to get the level of some nodes/volumes and then calculate the relative depth of the nodes/volumes. For example

	Int_t a_level = gGeoManager->GetLevel("A_1");
	Int_t b_level = gGeoManager->GetLevel("B_1");
	Int_t depth   = b_level - a_level;

This number `depth' will then be used in a stepping routine in a simulation (using VMC) to get ID's of parent volumes.

Note, that depending on the actual the geometry, the relative depth may vary. For example, you may implement two kinds of geometries: One where you do an effective volume, and one where you make a complicated volume using intersections and so on. Hence, the depth may not be known a priori, at least not until the geometry has been closed.

Perhaps something like the attached?

Yours,

-- 
 ___  |  Christian Holm Christensen 
  |_| |  -------------------------------------------------------------
    | |  Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
     _|           DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
    _|            Denmark                    Office: (+45) 353  25 404
 ____|   Email:   cholm_at_nbi.dk               Web:    www.nbi.dk/~cholm
 | |

Received on Wed Nov 30 2005 - 13:36:11 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:13 MET