VMC geometry tree

Dear Rooters
How to check what is the current VMC volume tree depth during transport?
I need to find a way to get rid of messages like:
Warning in TGeant3::CurrentVolOffName: Offset requested 3 but stack depth 2

Hi Kirill,

Unfortunately there is no method in TVirtualMC to get the gurrent geometry depth, which can be indeed useful. On the other hand, you should not try to identify the interesting volumes in your geometry by: gMC->CurrentVolOffName(name,depth). This can be very expensive at tracking time if you are not using G3 native geometry (where volumes have 4 characters names mapped as an integer). Instead, you can store the interesting volume ID’s at build time: either the value returned by gMC->Gsvolu() or use just once gMC ->VolId(name) (in case of divisions)

Regards,