km3pipe.calib
¶
Calibration.
Module Contents¶
Classes¶
A module which applies time, position and rotation corrections to hits. |
|
A service which provides calibration routines for hits |
Functions¶
|
Apply t0s using a lookup table of tuples (dom_id, calib) |
|
Calculate the time slewing of a PMT response for a given ToT |
Attributes¶
- class km3pipe.calib.Calibration(name=None, **parameters)[source]¶
A module which applies time, position and rotation corrections to hits.
This module also calibrates MC hits, but be aware, t0s are not appended to the MC hit times. Additionally, the global PMT ID is added to regular hits as
pmt_id
and in case of MC hits, thedom_id
andchannel_id
(DAQ) are set.- Parameters:
- apply: bool, optional [default=True]
Apply the calibration to the hits (add position/direction/t0)?
- filename: str, optional [default=None]
DetX file with detector description.
- det_id: int, optional
.detx ID of detector (when retrieving from database).
- t0set: optional
t0set (when retrieving from database).
- calibset: optional
calibset (when retrieving from database).
- key: str, optional [default=”Hits”]
the blob key of the hits
- outkey: str, optional [default=”CalibHits”]
the output blob key of the calibrated hits
- key_mc: str, optional [default=”McHits”]
the blob key of the MC hits (if present)
- outkey_mc: str, optional [default=”CalibMcHits”]
the output blob key of the calibrated MC hits
- km3pipe.calib.apply_t0_nb(times, dom_ids, channel_ids, lookup_tables)[source]¶
Apply t0s using a lookup table of tuples (dom_id, calib)
- class km3pipe.calib.CalibrationService(name=None, **parameters)[source]¶
A service which provides calibration routines for hits
- Parameters:
- filename: str, optional [default=None]
DetX file with detector description.
- det_id: int, optional
.detx ID of detector (when retrieving from database).
- t0set: optional
t0set (when retrieving from database).
- calibset: optional
calibset (when retrieving from database).
- detector: kp.hardware.Detector, optional
- km3pipe.calib.slew(tot, variant=3)[source]¶
Calculate the time slewing of a PMT response for a given ToT
- Parameters:
- tot: int or np.array(int)
Time over threshold value of a hit
- variant: int, optional
The variant of the slew calculation. 1: The first parametrisation approach 2: Jannik’s improvement of the parametrisation 3: The latest lookup table approach based on lab measurements.
- Returns:
- time: int
Time slewing, which has to be subtracted from the original hit time.