I have set up a project with a voxelized volume, with the goal of determining the total dose to a subset of the voxels. I was initially using nested parameterisation with G4PSEnergyDeposit3D, and defined dose as the sum of energy deposit in the voxels divided by the total mass of those voxels.
I recently discovered the G4PhantomParameterisation class, and found that it is significantly more CPU efficient when the option SetSkipEqualMaterials(true) is set. However, I also found that the dose values were consistently a factor of ~2 greater than those from the simulations using nested parameterisation.
I then tried using the phantom parameterisation without boundary skipping, i.e. SetSkipEqualMaterials(false), and the dose results suddenly matched the nested parameterisation, but the CPU speedup disappeared, of course.
Finally, I tried defining a simple voxelized phantom with a single material and I still observed the 2x higher dose when using boundary skipping.
I have used G4PhantomParameterisation many times and got the correct dose deposition, with or without SkipEqualMaterials. Can you send me (privately if you prefer) you code?
Thank you very much for your response. I was preparing my code to send it to you by removing all of the auxiliary classes that were irrelevant (or so I thought) to the issue, only to notice that the problem went away.
It turns out that the cause of the issue is that I had a parallel world in my geometry. I am not sure though why this would only impact the results when boundary skipping is turned on.