Problem 1835

Summary: dose deposited incorrectly with Regular Navigation, when skipping boundaries between voxels with same material
Product: Geant4 Reporter: Daren Sawkey <daren.sawkey>
Component: processes/scoringAssignee: Pedro.Arce
Status: RESOLVED FIXED    
Severity: normal CC: daren.sawkey, Gabriele.Cosmo
Priority: P5    
Version: 10.2   
Hardware: All   
OS: All   
Attachments: plot of dose deposit, with and without skipping voxel boundaries.
tarball of code to reproduce
tarball to reproduce (updated DICOM.cc)

Description Daren Sawkey 2016-02-24 20:57:13 CET
Created attachment 387 [details]
plot of dose deposit, with and without skipping voxel boundaries.

With regular navigation, choosing the option to skip voxel boundaries when they are the same material gives incorrect dose deposit. The attached figure shows dose for a 3 MeV e- beam into a water phantom, with and without skipping voxel boundaries.

I modified the DICOM example to have a simple water phantom (will attach).

Also the DICOM example documentation says the option to skip voxel boundaries is on by default. It's not.
Comment 1 Daren Sawkey 2016-02-24 20:59:11 CET
Created attachment 388 [details]
tarball of code to reproduce

Modified DICOM example to use a water phantom.
Comment 2 Pedro.Arce 2016-03-01 14:19:07 CET
Your problem is due probably to the fact that you are not properly distributing the dose among voxels. By default the dose is given at the end of step, so if the step traverses several volumes, it is not distributed in them, as it should be. Try using G4EnergySplitter class and tell me if the problem persists.
Comment 3 Daren Sawkey 2016-03-01 20:21:28 CET
Thanks Pedro. G4EnergySplitter class is already activated. With make option -DVERBOSE_ENERSPLIT, I get lots of output like:

G4WT0 > G4EnergySplitter::SplitEnergyInVolumes1 RN: iter1 energy lost 0.036839 energy at interaction 2.95072 = stepLength 0.216082 * dEdx 0.170486
Comment 4 Daren Sawkey 2016-03-01 20:32:57 CET
Created attachment 390 [details]
tarball to reproduce (updated DICOM.cc)

The code attached previously doesn't run because DicomHandler is looking for the file Data.dat, which I didn't include. This DICOM.cc doesn't instantiate DicomHandler.
Comment 5 Pedro.Arce 2016-03-04 11:54:05 CET
The problem is not in the regular navigation, but in the fact that you are giving too big steps for the precision you want:

with the physics you have defined the first step is usually around 4.7 mm: this means that the energy loss is calculated with an initial energy of 3 MeV. In this step the e- has lost about 0.7 MeV, so the energy loss is not precise (dE/dx changes a lot along the step). This is why you see the change of slope around 4.7 mm. 

The solution is to make smaller steps. Set a user limit, or try a more precise physics, I checked that changing the multiple scattering step limit type from 
 fUseSafety to fUseDistanceToBoundary helps.

Pedro