1#ifndef __JDETECTOR__JPMTSIGNALPROCESSORINTERFACE__
2#define __JDETECTOR__JPMTSIGNALPROCESSORINTERFACE__
101 for (
int i = 0; i < hit->npe; ++i) {
107 for (
int i = 0; i > hit->npe; --i) {
112 if (!buffer.empty()) {
204 return (fabs(npe - NPE) <= 0.5 *
getQmin() ? 1.0 /
getQmin() : 0.0);
295 virtual double getNPE(
const double tot_ns)
const
320 double t2 = i->t_ns + i->tot_ns;
322 while (++i != data.end() && i->t_ns < t2 +
getTmin()) {
323 t2 = max(t2, i->t_ns + i->tot_ns);
327 out->tot_ns = t2 - t1;
332 data.resize(
distance(data.begin(), out));
371 const double precision = 1.0e-4)
373 int i = (int) (NPE - 5.0 * sqrt(NPE));
379 double p = NPE * exp(-NPE) / (double) 1;
381 for (
int __i = 1; __i != i; ++__i) {
387 for (
double p0 = 0.0; (p >= p0 || p > precision); ++i, p0 = p, p *= NPE / (double) i) {
Time calibration (including definition of sign of time offset).
Data structure for time calibration.
Template data structure for PMT I/O.
std::vector< JElement_t >::iterator iterator
std::vector< JElement_t >::const_iterator const_iterator
PMT signal processor interface.
virtual bool applyQE() const
Apply relative QE.
virtual double getChargeProbability(const double npe, const int NPE) const
Get probability density for given charge.
virtual double getDerivative(const double npe) const
Get derivative of number of photo-electrons to time-over-threshold.
virtual ~JPMTSignalProcessorInterface()
Virtual destructor.
virtual double getTimeOverThreshold(const double npe) const
Get time-over-threshold (ToT).
virtual double getRandomCharge(const int NPE) const
Get randomised charge according to gain and gain spread.
static double getQmin()
Get width of charge distribution.
virtual bool applyThreshold(const double npe) const
Apply threshold.
virtual bool compare(const JPhotoElectron &first, const JPhotoElectron &second) const
Compare arrival times of photo-electrons.
virtual double getRiseTime(const double npe) const
Get time to reach threshold.
virtual double getSurvivalProbability(const int NPE) const
Probability that a hit survives the simulation of the PMT.
static double getTmin()
Get two photo-electron resolution for time-over-threshold.
JPMTSignalProcessorInterface()
Default constructor.
virtual double getNPE(const double tot_ns) const
Get number of photo-electrons.
void operator()(const JCalibration &calibration, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const
Process hits.
virtual double getRandomTime(const double t_ns) const
Get randomised time according transition time distribution.
virtual double getThresholdProbability(const int NPE) const
Probability that a hit survives the threshold of the PMT.
virtual void merge(JPMTData< JPMTPulse > &data) const
Merging of PMT hits.
file Auxiliary data structures and methods for detector calibration.
const double TIME_OVER_THRESHOLD_NS
Specification for time-over-threshold corresponding to a one photo-electron pulse.
double getChargeProbability(const JPMTSignalProcessorInterface &pmt, const double npe, const double NPE, const double precision=1.0e-4)
Get charge probability.
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).
Data structure for PMT digital pulse.
Data structure for single photo-electron.
static JPhotoElectron getEndMarker()
Get end marker.