Closed seg188 closed 6 months ago
Before the changes in this PR, we saw that the validation code was reporting that reconstructed charge events were not ~1:1 with true events:
This issue was two fold. Firstly, due to a bug in the packet-->segment backtracking where the index of the segments was stored instead of the segment_id from edep-sim, the actual backtracking was giving the wrong event IDs. The second issue was with the sync packet logic--the packets were issue every 1e8 instead of 1e7 due to a mis-conversion of clock ticks to microseconds. The effect of this is most obvious when trying to use the sync to reconstruct the global timestamp (packet timestamp + rollover). The previous behavior is here (note duration is shorted than expected 231 seconds, and timestamps are not monotonically increasing):
Corrected behavior is here:
Finally, the corrected behavior associating events: