1 #ifndef __JDETECTOR__JPMTSIGNALPROCESSORINTERFACE__
2 #define __JDETECTOR__JPMTSIGNALPROCESSORINTERFACE__
16 namespace JDETECTOR {}
17 namespace JPP {
using namespace JDETECTOR; }
99 for (
int i = 0;
i != hit->npe; ++
i) {
107 if (!buffer.empty()) {
199 return (fabs(npe - NPE) <= 0.5 *
getQmin() ? 1.0 /
getQmin() : 0.0);
277 virtual double getNPE(
const double tot_ns)
const
302 double t2 =
i->t_ns +
i->tot_ns;
304 while (++
i != data.end() &&
i->t_ns < t2 +
getTmin()) {
305 t2 = max(t2,
i->t_ns +
i->tot_ns);
309 out->tot_ns = t2 - t1;
314 data.resize(
distance(data.begin(), out));
353 const double precision = 1.0e-4)
355 int i = (int) (NPE - 5.0 * sqrt(NPE));
361 double p = NPE *
exp(-NPE) / (double) 1;
363 for (
int __i = 1; __i !=
i; ++__i) {
369 for (
double p0 = 0.0; (p >= p0 || p > precision); ++
i, p0 = p, p *= NPE / (double) i) {
Data structure for PMT digital pulse.
static double getQmin()
Get width of charge distribution.
Time calibration (including definition of sign of time offset).
virtual double getRandomCharge(const int NPE) const
Get randomised charge according to 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.
const double TIME_OVER_THRESHOLD_NS
Specification for time-over-threshold corresponding to a one photo-electron pulse.
virtual void merge(JPMTData< JPMTPulse > &data) const
Merging of PMT hits.
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 reach threshold.
virtual double getSurvivalProbability(const int NPE) const
Probability that a hit survives the simulation of the PMT.
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.
virtual double getNPE(const double tot_ns) const
Get number of photo-electrons.
PMT signal processor interface.
JPMTSignalProcessorInterface()
Default constructor.
virtual double getChargeProbability(const double npe, const int NPE) const
Get probability density for given charge.
static JPhotoElectron getEndMarker()
Get end marker.
virtual double getRandomTime(const double t_ns) const
Get randomised time according transition time distribution.
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.
std::vector< JElement_t >::const_iterator const_iterator
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN