14 #ifndef OPT0FINDER_TIMERANGE_H
15 #define OPT0FINDER_TIMERANGE_H
22 namespace flashmatch {
43 if(start >= end)
throw std::exception();
59 if(
_end < rhs)
return true;
60 if(rhs <
_start )
return false;
92 if(range.
End() >= (*low).Start())
return true;
101 return ((*low).Start() <= time && time <= (*low).End());
116 if(range.
End() < (*low).Start()){
120 double start=range.
Start();
123 next_start = (*low).Start();
124 next_end = (*low).End();
125 (*low).SetRange(start,end);
133 if((*low).Start() <= range.
End()) {
135 (*low).SetRange(std::min((*low).Start(),range.
Start()),
136 std::max((*low).End(),range.
End()));
142 if((*prev).End() > (*low).Start()) (*low).SetRange((*prev).End(),(*low).End());
148 if((*low).End() > (*next).Start()) (*low).SetRange((*low).Start(),(*next).Start());
163 class less<flashmatch::TimeRange*>
167 {
return (*lhs) < (*rhs); }
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
void SetRange(double start, double end)
bool operator<(const double &rhs) const
standard_dbscan3dalg useful for diagnostics hits not in a line will not be clustered on on only for track like only for track like on on the smaller the less shower like tracks low
double distance(geo::Point_t const &point, CathodeDesc_t const &cathode)
Returns the distance of a point from the cathode.
auto end(FixedBins< T, C > const &) noexcept
std::vector< flashmatch::TimeRange > _time_range_v
void Insert(const flashmatch::TimeRange &range)
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
bool operator<(const TimeRange &rhs) const
TimeRange(double start=0, double end=0)
Default constructor.
bool Overlap(const flashmatch::TimeRange &range) const
bool Overlap(double time) const
BEGIN_PROLOG could also be cout
~TimeRange()
Default destructor.
bool operator()(const flashmatch::TimeRange *lhs, const flashmatch::TimeRange *rhs)