2 #ifndef __JDETECTOR__JPMTSIGNALPROCESSORINTERFACE__
3 #define __JDETECTOR__JPMTSIGNALPROCESSORINTERFACE__
19 namespace JDETECTOR {}
20 namespace JPP {
using namespace JDETECTOR; }
112 for (
int i = 0; i != hit->npe; ++i) {
264 return std::numeric_limits<double>::max();
303 double t2 = i->t_ns + i->tot_ns;
305 while (++i != data.end() && i->t_ns < t2 +
getTmin()) {
306 t2 = max(t2, i->t_ns + i->tot_ns);
310 out->tot_ns = t2 - t1;
315 data.resize(
distance(data.begin(), out));
327 virtual double getNPE(
const double tot_ns,
328 const double eps = 1.0e-3)
const
330 static const int N = 100;
337 for (
int i = 0; i !=
N; ++i) {
339 const double x = 0.5 * (xmin + xmax);
342 if (fabs(y - tot_ns) < eps) {
352 return 0.5 * (xmin + xmax);
359 for (
int i = 0; i !=
N; ++i) {
361 const double x = 0.5 * (xmin + xmax);
370 return 0.5 * (xmin + xmax);
double MAX_CHARGE
Maximum charge [npe].
Data structure for PMT digital pulse.
static double getQmin()
Get minimal width of charge distribution.
virtual double getRandomCharge(const int NPE) const
Get randomised charge in accordance with gain and gain spread.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Data structure for single photo-electron.
JThresholdDomains
Threshold domain specifiers.
JPMTSignalProcessorInterface(const double max_charge=100.0)
Default constructor.
virtual void merge(JPMTData< JPMTPulse > &data) const
Merging of PMT hits.
virtual double getNPE(const double tot_ns, const double eps=1.0e-3) const
Get number of photo-electrons.
Data structure for time 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.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
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.
std::vector< JElement_t >::iterator iterator
virtual ~JPMTSignalProcessorInterface()
Virtual destructor.
virtual JThresholdDomains applyThreshold(const double npe) const
Apply threshold.
virtual bool compare(const JPhotoElectron &first, const JPhotoElectron &second) const
Compare arrival times of photo-electrons.
PMT signal processor interface.
virtual double getChargeProbability(const double npe, const int NPE) const
Get probability for given charge.
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
then usage $script[input file[working directory[option]]] nWhere option can be N