move point of carrier creation to end of Geant4 step
Description
inside SensitiveDetectorAction.cpp .
At the moment the point of carrier creation is taken in the middle of the G4 step.
G4ThreeVector mid_pos = (preStepPoint->GetPosition() + postStepPoint->GetPosition()) / 2
for MIPs (short steps) this is fine. However, when you have long steps it makes more sense to have the point of creation at the end of the step. Attached is an example of what happens in case of a 10 keV photon depositing charge via the photoelectric effect. It looks like the charge deposit comes from two far apart points whereas it should all be located in one point (the end of the step in this case). PhotoElectric_Ap2.pdf
Proposal
Move the point of creation to the end of the step e.g:
G4ThreeVector end_pos = postStepPoint->GetPosition()
A priori I think this is fine for MIPs too.
Make sure these are completed before closing the issue, with a link to the relevant commit.
-
Feature -
Documentation -
Covered by test cases