Message: Access to smart voxels during tracking Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Access to smart voxels during tracking 

Forum: Geometry
Date: 31 Aug, 2012
From: Tom Roberts <Tom Roberts>

Geant4 geometry uses smart voxels to improve the efficiency of navigating the geometry volume hierarchy. I have a similar problem in G4beamline when there is a large number of magnets in a system.

The code calculates a bounding box for the field of each magnet (including fringe fields, which can be much larger than the volume of the magnet itself). During tracking the code loops over all fields, evaluating those for which the current point is inside the bounding box. For a system with >100 magnets, this loop dominates the CPU time of tracking, and with >1000 magnets it is intolerable.

How can I access the Geant4 voxel information? I need:
 1. a method to get the current voxel in which the current track is located.
 2. a method to find the voxel containing any given point (independent
    of tracking).
 3. a method to find the boundaries of any given voxel.
 4. a method to enumerate all voxels (or obtain a list or vector).

The idea is to maintain a map from voxel to a (short) list of all fields whose bounding boxes intersect the voxel. The loop over all bounding boxes is only needed the first time any track enters a given voxel; after that only the short list for the voxel is scanned. This "lazy" approach avoids spending time on voxels which no track ever enters.

Is there any documentation on the use of voxels in Geant4?

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Access to smart voxels during tracking   (John Allison - 01 Sep, 2012)
2 None: Re: Access to smart voxels during tracking   (John Apostolakis - 03 Sep, 2012)
1 None: Re: Access to smart voxels during tracking   (Tom Roberts - 03 Sep, 2012)
 Add Message Add Message
to: "Access to smart voxels during tracking"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]