-
Notifications
You must be signed in to change notification settings - Fork 6
Description
While analysing events from simulations at the level of TRestDetectorHits and TRestDetectorSignal from long decays —such as those from K40 or U238 decays—I encountered a precision issue when accessing hit times. The GetTime() method returns extremely large absolute time values (on the order of ~10²³), which causes small physical differences (such as those arising from drift in a TPC) between hits to be completely lost due to the limitations of Double_t precision.
I think the issue originates in restG4 (and Geant4), where hit times are stored as global times in a Double_t variable https://github.com/rest-for-physics/restG4/blob/master/src/DataModel.cxx#L204C5-L204C80.
Since Geant4 tracks time continuously from the beginning of the event (accumulating large absolute values), the precision of the stored times drops over long time spans.
By the time these values are passed from TRestDetectorHits to construct the TRestDetectorSignal https://github.com/rest-for-physics/detectorlib/blob/master/src/TRestDetectorHitsToSignalProcess.cxx#L277 their small-scale resolution has already been lost due to the limits of double-precision representation.