GDML: remove some geometries/volumes via gGeoManager->

I’m using TGeoManager::Import(“mydet.gdml”) to get geometry descriptions;

and I would like to list Name of physical (detector) volume to kill
visualization of some of them I saved in mydet.gdml.

Is it possible to list volume “Names” and kill some of them by gGeoManager->Something() ?

or Do I have to directly remove several sentences in mydet.gdml
by looking corresponding description?

Best regards!

Hi, you should do something like: gGeoManager->GetVolume("dont_want_to_see")->VisibleDaughters(false); Do this for the top-level volumes you don’t want to see. Note that by default visualization shows only volumes at a given depth (3) and you can change this using gGeoManager->SetVisLevel().

I see , thank your for your comment. I test it!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.