Voxelize problem in the geometry package


I got some problems with my geometry in the “Voxelizing” step, in the comand gGeoManager->CloseGeometry().
It seems something related to the number of volumes, becouse it works when I draw only a fraction of my detector.

Is there any constraints about the number of volumes?

I am sending my macro. Just type “root CaloBuild.C” and wait some time. You wiil see the error during the voxelize step.

I am using version 5.14.00

CaloBuild.C (4.97 KB)

Hi Luciano,

None except the limitation in memory of your computer… You put 96000 nodes in the same volume. The voxels are structures trying to optimize navigation speed for several daughters (nd) in the same volume. They do a good job but they take space proportional to nd^2… You should try to build your geometry in a hierarchic rather than flat way. That means you should group volumes which are alike according your detector symmetries and create some containers to put them in. If they cannot fit any container just use TGeoVolumeAssembly to define one. An optimized segmentation is hard to prescribe, but you should not have more than O(100) volumes at one level.
I should probably put a big warning when nd>500, since these structure penalize tracking time even if they are very well voxelized.

Have a look in the attached modified version of your macro that produces a more or less reasonable calorimeter geometry. Of course that this can be further improved if you get the idea inside.

CaloBuild.C (5.93 KB)

Hi agheata,

Thank you very much!
You helped me a lot!

Were you the one who wrote this geometry package?
It is very nice!



Now I am trying to do some boolean operations to cut all the volumes outside the top volume.
I got other voxelize problem, now in the the method SortAll.

I am sending the root macro.

Do you know what is going on?
CaloBuild.C (15.8 KB)

Hi Luciano,

You create in a loop composite shapes using the boolean expression constructor, where all shape/matrix components are looked for by name. Since you do not change the name of the matrix at definition time, the composite shapes will be all built exactly same position (first found matrix) - causing a warning that points to some geometry problem. I have attached your macro fixed.

CaloBuild.C (16.8 KB)