Geant4 Version: 11.2.2
Operating System: Linux
Compiler/Version: GCC 14.2.0
CMake Version: 3.31.6
Problem:
Hi,
I’m currently working on scoring the dose in a 3D volume and comparing it with my GATE simulation of the same setup to validate my Geant4 simulation. However, I’m noticing that the dose is overestimated at the boundaries by about 3% when I set the user-limit max step size to 0.1 mm, and by around 8% when I set it to 1 mm. The same overestimation occurs even when I don’t set a max step size. The voxel size of the volume is 1 mm.
The dose calculation is done in the following way:
phantom_VolumeSD::ProcessHits(G4Step *step, G4TouchableHistory *)
{
G4StepPoint *v = step->GetPreStepPoint();
G4double edep = step->GetTotalEnergyDeposit();
dosemap->addVal(v->GetPosition() - orig, edep);
return true;
}
Initially, I suspected that the issue might be that the first G4Step in the volume is the post-step point, causing the pre-step point to be outside. However, this doesn’t seem to be the case, because even when I add this condition:
// Only add dose if pre and post volumes are the same
if (preVolume && postVolume && preVolume == postVolume) {
dosemap->addVal(preStepPoint->GetPosition() - orig, edep);
}
The problem still persists.
Does anyone have any ideas on what might be causing this issue? Any guidance or suggestions would be much appreciated.
Thanks in advance!