From 26b07e31f0b0cd708c3aa4de11c9d375bca5a276 Mon Sep 17 00:00:00 2001 From: GilbertRdzP Date: Tue, 15 Jul 2025 04:36:56 -0400 Subject: [PATCH] Corrected the hit time information adding the trigger time and resting the trigger shift. --- root_utils/root_file_utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/root_utils/root_file_utils.py b/root_utils/root_file_utils.py index c7805b8..6c43cdf 100644 --- a/root_utils/root_file_utils.py +++ b/root_utils/root_file_utils.py @@ -139,11 +139,17 @@ def get_digitized_hits(self): trigger = [] for t in range(self.ntrigger): self.get_trigger(t) + trig_type = self.trigger.GetTriggerType() + triggerInfo = self.trigger.GetTriggerInfo() + if (trig_type != 3) and (len(triggerInfo) >= 3): + triggerShift = triggerInfo[1] + triggerTime = triggerInfo[2] + for hit in self.trigger.GetCherenkovDigiHits(): pmt_id = hit.GetTubeId() - 1 position.append([self.geo.GetPMT(pmt_id).GetPosition(j) for j in range(3)]) charge.append(hit.GetQ()) - time.append(hit.GetT()) + time.append(hit.GetT() + triggerTime - triggerShift) ## Correct the hit time adding the trigger time and resting the trigger shift. pmt.append(pmt_id) trigger.append(t) hits = {