TGeo ->Draw() strange behaviour

Hi,

I am currently preparing a detector geometry and have a problem to draw the geometry. The detector consists of several sub-detectors and each sub-detector of several layers.The full geometry is stored in a .root file. My problem is, that I can Draw() the whole detector (including my sub-detector) and single layers of my sub-detector, but when I try to Draw() my sub-detector completely, only an empty Canvas shows up. I tried already to check and uncheck all options and I am now really desperate. The other sub-detectors can be drawn separately without any problems. Do you have any idea what could be the reason for this behavior?

Thanks in advance,
Christian

Can you attach your geometry and tell me what are you trying to see ?
Cheers,

Hi,

please find attached the geometry file. I would like to draw ‘PXD’, but only
‘PXD_Layer_1’, ‘PXD_Layer_2’, or further daughter volumes can be drawn.
I have no idea what’s wrong.

Cheers, Christian
test.root (18.4 KB)

Well, your geometry is too deep for the default visible level (3). Use something like:

Some things may be a bit outdated, but you can find this one among other useful details in the user documentation.

Cheers,

Hi,

thank you so much!!! However, I think there is some bug or feature: Before I had a TGeoVolumeAssembly of a TGeoVolumeAssembly of a TGeoVolumeAssembly (I know this is bad for performance!). I changed now the last container to a TGeoVolume and no more problems to show the geometry! It also worked fine to show the whole detector together with other subdetectors…

Christian

Hi,
You are right about assemblies: use them only when you actually need them. But related to visualization: a volume assembly has no real shape - you can only visualize its content, i.e. one level down. If the content is made again of assemblies, you go again down to visualize, until you find a REAL volume to display… The visualization uses the so called visible level, but it may happen that at that level you have no volume to display. So yes, this is a feature, you just have to understand how it works.

There is an option however to compute automatically a visible depth for you - this is not used by default and gets disabled if you use SetVisLevel(). You can call gGeoManager->SetMaxVisNodes(10000) (or some other number) that will try to compute the depth so that the number of displayed objects do not exceed the request. Try that - it may help.

Cheers,