1 #ifndef __OPT0FINDERTYPES_CXX__
2 #define __OPT0FINDERTYPES_CXX__
10 {
double sum=0;
for(
auto const& pt : (*
this)) sum += pt.q;
return sum; }
16 auto const& pt0 = (*this)[
idx-1];
17 auto const& pt1 = (*this)[
idx];
18 len += sqrt(pow(pt0.x - pt1.x,2)+pow(pt0.y - pt1.y,2)+pow(pt0.z - pt1.z,2));
26 another.reserve(this->
size());
27 for(
auto const& pt : (*
this)) {
28 if(pt.x < x_min)
continue;
29 if(pt.x > x_max)
continue;
30 another.push_back(pt);
37 out <<
"QCluster_t " << obj.size() <<
" points length=" << obj.
length() <<
" qsum=" << obj.
sum() << std::endl;
double sum() const
returns the sum of "q" from QPoint_t
std::size_t size(FixedBins< T, C > const &) noexcept
Collection of charge deposition 3D point (cluster)
double length() const
returns the total trajectory length
std::ostream & operator<<(std::ostream &out, const flashmatch::QCluster_t &obj)
streamer override
ID_t idx
index from original larlite vector
void drop(double xmin, double xmax)
drop points outside the x range specified