Geometry and benchmarks


Is there any published benchmarks (with recommandations) on ROOT geometry package?

For example, on page 325 on the 5.26 ROOT UserGuide, it is written to use TGeoVolumeAssembly when you have something like honeycomb structures (repetitive strucutres). This should optimize navigation.
However, on page 324 of the same manual they introduce the “division” feature that allows to have repetitive patterns (same as honeycombs). And it is written that this should be fast.

I understand that adding one by one a node to a volume is not efficient but what alternative method should I use in cas of repetitive patterns? TGeoVolumeAssembly or Divide? May be thet depends on some parameters I don’t have any idea (for example if all shapes are the same but with different materials?)

So if there some recommandations and some benchmarking to help me make the right choice?

Thanks a lot

Hi Matthieu,

Good point. Rule of the thumb: division beats anything else since it uses binary search. But you cannot use division for any repetitive structure - most common ones are implemented in ROOT geometry but for the most general 3D lattice there was no time and manpower (contributions are of course welcome anytime) There was an attempt of TGeoPatternHoneycomb but it never made it…

Now sometimes repetitive structures can be decomposed in rows that one may describe as divisions, which is also the case for a honeycomb. The problem is that whatever you do the boxes that are embedding honeycomb rows are overlapping and this is not allowed by the geometry. A way out is to define rows as assemblies (which have no shape, but just components). Assembly rows will not be as fast as divisions, but not far because they get very well voxelized along one axis so only one cell gets to be checked at a time. This triggers the recommendation from 325.

Why rows and not the whole structure in one go: a very flat structure with many objects on one level is harder to be optimized - assemblies are shapeless but they still introduce one level in depth in the geometry and they get voxelized within their bounding box.