2 #ifndef __JDETECTOR__JPMTSIGNALPROCESSORINTERFACE__
3 #define __JDETECTOR__JPMTSIGNALPROCESSORINTERFACE__
19 namespace JDETECTOR {}
20 namespace JPP {
using namespace JDETECTOR; }
101 for (
int i = 0; i != hit->npe; ++i) {
254 return std::numeric_limits<double>::max();
293 double t2 = i->t_ns + i->tot_ns;
295 while (++i != data.end() && i->t_ns < t2 +
getTmin()) {
296 t2 = max(t2, i->t_ns + i->tot_ns);
300 out->tot_ns = t2 - t1;
305 data.resize(distance(data.begin(), out));
316 inline double getNPE(
const double tot_ns,
317 const double eps = 1.0e-3)
const
319 static const int N = 100;
326 for (
int i = 0; i != N; ++i) {
328 const double x = 0.5 * (xmin + xmax);
331 if (fabs(y - tot_ns) < eps) {
341 return 0.5 * (xmin + xmax);
348 for (
int i = 0; i != N; ++i) {
350 const double x = 0.5 * (xmin + xmax);
359 return 0.5 * (xmin + xmax);
virtual double getProbability(const double npe, const int NPE) const
Get probability for given charge.
Data structure for PMT digital pulse.
static double getQmin()
Get minimal width of charge distribution.
virtual double getRandomAmplitude(const int NPE) const
Get randomised amplitude according gain and gain spread.
Data structure for single photo-electron.
double getNPE(const double tot_ns, const double eps=1.0e-3) const
Get number of photo-electrons.
virtual void merge(JPMTData< JPMTPulse > &data) const
Merging of PMT hits.
Data structure for PMT calibration.
virtual bool applyQE() const
Apply relative QE.
static double getTmin()
Get two photo-electron resolution for time-over-threshold.
void operator()(const JCalibration &calibration, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const
Process hits.
virtual double getRiseTime(const double npe) const
Get time to pass threshold.
virtual double getSurvivalProbability(const int NPE) const
Probability that a hit survives the simulation of the PMT.
Compiler version dependent expressions, macros, etc.
double putTime(const T &t1, const JCalibration &cal)
Get de-calibrated time.
virtual bool applyThreshold(const double npe) const
Apply threshold.
std::vector< JElement_t >::iterator iterator
virtual ~JPMTSignalProcessorInterface()
Virtual destructor.
virtual bool compare(const JPhotoElectron &first, const JPhotoElectron &second) const
Compare arrival times of photo-electrons.
PMT signal processor interface.
JPMTSignalProcessorInterface()
Default constructor.
static JPhotoElectron getEndMarker()
Get end marker.
virtual double getRandomTime(const double t_ns) const
Get randomised time according transition time distribution.
JPMTData< JPhotoElectron > buffer
virtual double getTimeOverThreshold(const double npe) const
Get time over threshold (ToT).
Template data structure for PMT I/O.
virtual double getDerivative(const double npe) const
Get derivative of number of photo-electrons to time over threshold.
Exception for accessing a value in a collection that is outside of its range.
std::vector< JElement_t >::const_iterator const_iterator