How to reduce the number of steps if two adjacent boxes of variable dimensions share the same material?

Hi everyone,

I would like to know if there is any method to skip on the fly the boundaries between two boxes with variable dimensions if they share the same material as a method that is already supported for a set of boxes of equal dimension via G4PhantomParametrisation class.

Thanks and regards,

Jaafar

https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/Detector/Geometry/geomNav.html?#the-geometry-navigator

Skipping borders of voxels with same material

Another speed optimisation can be provided by skipping the frontiers of two voxels which the same material assigned, so that bigger steps can be done. This optimisation may be not very useful when the number of materials is very big (in which case the probability of having contiguous voxels with same material is reduced), or when the physical step is small compared to the voxel dimensions (very often the case of electrons). The optimisation can be switched off in such cases, by invoking the following method with argument skip = 0: