Creating a material map using G4Navigator

Dear all,

I am trying to create an overview material map like radiation length in the various projections (xy/xz/yz) of a setup by stepping into the respective volumes. My current approach is based on the G4Navigator as the example below shows. In addition, I also use it to calculate the radiation length along a certain path.

G4Navigator* g4Navigator = new G4Navigator();

// Get volume at position
G4VPhysicalVolume* volume = g4Navigator->LocateGlobalPointAndSetup(position);
const double radLen = volume->GetLogicalVolume()->GetMaterial()->GetRadlen();

// Stepping length in volume
double stepLength = this->_g4Navigator->ComputeStep(position, direction, proposedPhysicsStep, newSafety);
if( stepLength > proposedPhysicsStep  ) {
    stepLength = proposedPhysicsStep;

// Cross boundary
stepLength += boundaryStep;

It is working as expected, but unfortunately it is kind of slow scanning for instance the material in a 500x500 bin histogram.

Therefore I am wondering whether there is a better way to do this? (or even a correct way if I am totally on the wrong path here).

Thanky you very much in advance,