Hi,
So I was trying to find the intersection of a particle moving along a particular direction with the volume boundary. I figured that the ComputeStep function from the G4Navigator would be useful for that purpose.
Looking at the ComputeStep function definition (from http://www.apc.univ-paris7.fr/~franco/g4doxy4.10/html/class_g4_navigator.html#a9a78e5db374334d93ca5af69c029ee0b ),
ComputeStep (const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety)
the first variable is the point (the particle), second the direction (the velocity) and third is sort of any proposed length which might make the particle end up in the next volume.
I’m not quite sure what the 4th variable does/mean. I went through the code and the book for application developers as well, but couldn’t exactly figure out what the “pNewSafety” variable does. I’ve seen the safety variable used in a lot of other functions as well. Could anyone please let me know what exactly is the use of the safety variable??