9#include <top/reconstruction_cpp/SignalPDF.h>
25 for (
const auto& gaus : tts.
getTTS()) {
26 m_maxSigmaSq = std::max(m_maxSigmaSq, static_cast<double>(gaus.sigma * gaus.sigma));
27 m_maxAbsPos = std::max(m_maxAbsPos, std::abs(static_cast<double>(gaus.position)));
33 double wid0 = timeErr * timeErr + sigt * sigt;
35 for (
const auto& peak :
m_peaks) {
38 double t = time - peak.t0;
40 if (d > 0 and d * d > 101 * (peak.wid +
m_maxSigmaSq + wid0))
continue;
41 for (
const auto& gaus :
m_tts->getTTS()) {
42 double sigma = peak.wid + gaus.sigma * gaus.sigma + wid0;
43 double dt = t - gaus.position;
44 double x = dt * dt / sigma;
45 if (x > 100)
continue;
46 sigma =
sqrt(2 * M_PI * sigma);
47 f += peak.nph * gaus.fraction / sigma * exp(-x / 2);
Nominal time transition spread of PMT.
const std::vector< Gauss > & getTTS() const
Returns TTS.
double m_maxAbsPos
the largest of the TTS component offsets in absolute value [ns]
std::vector< PDFPeak > m_peaks
PDF peaks.
const TOPNominalTTS * m_tts
nominal TTS
double m_maxSigmaSq
the largest of the TTS component widths squared [ns^2]
double getPDFValue(double time, double timeErr, double sigt=0) const
Returns PDF value at given time.
SignalPDF(int pixelID, const TOPNominalTTS &tts)
Class constructor.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.