diff --git a/orcasong/core.py b/orcasong/core.py index 3f9985e8dccadbbcb08854462f291fe9845f38e4..621582d23d191080f30fb9a2474efd828650415d 100644 --- a/orcasong/core.py +++ b/orcasong/core.py @@ -30,18 +30,15 @@ class BaseProcessor: det_file : str, optional Path to a .detx detector geometry file, which can be used to calibrate the hits. + correct_mc_time : bool + Converts MC hit times to JTE times. center_time : bool Subtract time of first triggered hit from all hit times. Will also be done for McHits if they are in the blob [default: True]. - correct_timeslew : bool - If true, the time slewing of hits depending on their tot - will be corrected [default: False]. add_t0 : bool If true, add t0 to the time of hits and mchits. If using a - det_file, this will already have been done automatically. - Note: Mchits appear to NOT need t0 added, but its done auto- - matically by km3pipe calibration, so results might be - wrong for mchits. [default: False]. + det_file, this will already have been done automatically + [default: False]. event_skipper : func, optional Function that takes the blob as an input, and returns a bool. If the bool is true, the blob will be skipped. @@ -85,6 +82,7 @@ class BaseProcessor: """ def __init__(self, mc_info_extr=None, det_file=None, + correct_mc_time=True, center_time=True, add_t0=False, event_skipper=None, @@ -95,6 +93,7 @@ class BaseProcessor: mc_info_to_float64=True): self.mc_info_extr = mc_info_extr self.det_file = det_file + self.correct_mc_time = correct_mc_time self.center_time = center_time self.add_t0 = add_t0 self.event_skipper = event_skipper @@ -181,6 +180,8 @@ class BaseProcessor: if self.det_file: cmpts.append((modules.DetApplier, {"det_file": self.det_file})) + if self.correct_mc_time: + cmpts.append((km.mc.MCTimeCorrector, {})) if any((self.center_time, self.add_t0)): cmpts.append((modules.TimePreproc, {