I am trying to figure out the meaning of the G4bool returned by G4VSensitiveDetector::ProcessHits, but I cannot find answers in the source code, the documentation, nor searching on the web. It seems that it is not really used anywhere?
It is actually not used by any Geant4 kernel class. In the past, there was a user’s use-case where one sensitive detector dispatches ProcessHits() to some subsequent (i.e. child) sensitive detectors, and to avoid double-counting, one of these child detector may return true or false. We don’t know whether such a use-case is still valid, but once we change the return type of this method from G4bool to void, it affects basically all users. Thus we are reluctant to make this change.
Thank you for your clarification!
Yes, I agree, such a breaking interface change should not be done lightly. Maybe a note could be added to the manual, and a comment to the header file?