RE: Level of a TGeoNode/TGeoVolume

From: Fine, Valeri <>
Date: Wed, 30 Nov 2005 08:28:07 -0500

Hello Christian,
Do you want an equivalent of "TVolumeViewIter::GetDepth()" method ?  

I think for TGeo one can use the same idea. One should not pollute the "geometry desciption" class with new and new methodd to satisfy many different needs rather provide the base "geometry iterator" and let the end-user to subclass it "as needed".  


-----Original Message-----

	From: on behalf of Christian Holm Christensen 
	Sent: Wed 11/30/2005 7:36 AM 
	To: Andrei Gheata; ROOT Talk 
	Subject: [ROOT] Level of a TGeoNode/TGeoVolume

	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?

___ | 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: Web: | |
Received on Wed Nov 30 2005 - 14:28:43 MET

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