1#include "Recon/Event/CompositePulse.h"
8 auto imerge{
hits_.begin()};
9 for (; imerge !=
hits_.end(); imerge++)
10 if (fabs(imerge->second - hit.second) < hit_merge_ns)
break;
11 if (imerge ==
hits_.end()) {
14 imerge->second = (imerge->second * imerge->first + hit.first * hit.second);
15 imerge->first += hit.first;
16 imerge->second /= imerge->first;
23 double step = high - low;
24 double pt = (high + low) / 2;
33 pt = (high + low) / 2;
std::vector< std::pair< double, double > > hits_
pulses entering the chip
double at(double time) const
Measure the voltage at the input time.
void addOrMerge(const std::pair< double, double > &hit, double hit_merge_ns)
Put another hit into this composite pulse.
double findCrossing(double low, double high, double level, double prec=0.01)
Find the time at which we cross the input level.