Skip to content
Snippets Groups Projects
Commit 8aa3605c authored by Stefan Reck's avatar Stefan Reck
Browse files

add mc to jte time converter (used to be part of tohdf5)

parent 3acece82
No related branches found
No related tags found
No related merge requests found
......@@ -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, {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment