1#ifndef __JDETECTOR__JCALIBRATION__
2#define __JDETECTOR__JCALIBRATION__
165 out << format << cal.
t0;
210 template<class T, bool is_primitive = JLANG::JClass<T>::is_primitive>
285 return t1 + cal.
getT0();
298 return t1 - cal.
getT0();
338 template<
class JHit_t>
JFormat_t & getFormat()
Get format for given type.
Data structure for time calibration.
double getT0() const
Get time offset.
JCalibration()
Default constructor.
const JCalibration & getCalibration() const
Get calibration.
friend JReader & operator>>(JReader &in, JCalibration &cal)
Read calibration from input.
void subT0(const double t0)
Subtract time offset.
friend JWriter & operator<<(JWriter &out, const JCalibration &cal)
Write calibration to output.
void setCalibration(const JCalibration &cal)
Set calibration.
JCalibration & getCalibration()
Get calibration.
void setT0(const double t0)
Set time offset.
JCalibration(const double __t0)
Constructor.
friend std::ostream & operator<<(std::ostream &out, const JCalibration &cal)
Write calibration to output.
void addT0(const double t0)
Add time offset.
friend std::istream & operator>>(std::istream &in, JCalibration &cal)
Read calibration from input.
Interface for binary input.
Interface for binary output.
file Auxiliary data structures and methods for detector calibration.
double getToT(const T &tot, const JCalibration &cal)
Get calibrated time-over-threshold of hit.
double getTime(const T &t1, const JCalibration &cal)
Get calibrated time.
const double TIME_OVER_THRESHOLD_NS
Specification for time-over-threshold corresponding to a one photo-electron pulse.
double putToT(const T &tot, const JCalibration &cal)
Get de-calibrated time-over-threshold of hit.
const double NOMINAL_GAIN
Specification for normalized gain corresponding to a one photo-electron pulse.
double putTime(const T &t1, const JCalibration &cal)
Get de-calibrated time.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static double getTime(const JHit_t &hit, const JCalibration &cal)
Get calibrated time of hit.
static double getToT(const JHit_t &hit, const JCalibration &cal)
Get calibrated time-over-threshold of hit.
static double putTime(const JHit_t &hit, const JCalibration &cal)
Get de-calibrated time of hit.
double putToT(const JHit_t &hit, const JCalibration &cal)
Get de-calibrated time-over-threshold of hit.
static double getTime(const T t1, const JCalibration &cal)
Get calibrated time.
static double getToT(const T tot, const JCalibration &cal)
Get calibrated time-over-threshold of hit.
static double putTime(const T t1, const JCalibration &cal)
Get de-calibrated time.
static double putToT(const T tot, const JCalibration &cal)
Get de-calibrated time-over-threshold of hit.
Auxiliary class to apply (de-)calibration to template hit.