but when tallying deposited energy in a volume, the PreStepPoint and PostStepPoint should all be constrained in the volume?
if only the PreStepPoint is constrained in the volume, it include this case the PreStepPoint is on the volume boundary and the PostStepPoint in the other volume, the deposited energy is tallied.
is it right?
No, it’s the other way around. In the LHS of you nice figure, that step was limited by G4Transportation. The PreStepPoint will be associated with “The Scoring Volume” (specifically, the Touchable will point to “The Scoring Volume”), while the PostStepPoint will be associated with “Other Volume” – the PostStepPoint is exactly on the boundary between the two, and this is how G4 deals with it.
For the next step, the preceding PostStepPoint is copied to become the new PreStepPoint, so it will also be associated with “Other Volume,” along with the new PostStepPoint.