All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
flashmatch::QCluster_t Class Reference

Collection of charge deposition 3D point (cluster) More...

#include <OpT0FinderTypes.h>

Inheritance diagram for flashmatch::QCluster_t:

Public Member Functions

 QCluster_t ()
 Default constructor. More...
 
 ~QCluster_t ()
 
double sum () const
 returns the sum of "q" from QPoint_t More...
 
double length () const
 returns the total trajectory length More...
 
void drop (double xmin, double xmax)
 drop points outside the x range specified More...
 
double min_x () const
 minimum x More...
 
double max_x () const
 maximum x More...
 
QCluster_toperator+= (const double shift)
 
QCluster_t operator+ (const double shift)
 
QCluster_toperator+= (const QCluster_t &rhs)
 
QCluster_t operator+ (const QCluster_t &rhs) const
 

Public Attributes

ID_t idx
 index from original larlite vector More...
 
double time
 assumed time w.r.t. trigger for reconstruction More...
 
- Public Attributes inherited from std::vector< T >
elements
 STL member. More...
 

Detailed Description

Collection of charge deposition 3D point (cluster)

Definition at line 92 of file OpT0FinderTypes.h.

Constructor & Destructor Documentation

flashmatch::QCluster_t::QCluster_t ( )
inline

Default constructor.

Definition at line 98 of file OpT0FinderTypes.h.

98 : idx(kINVALID_ID), time(0) {}
double time
assumed time w.r.t. trigger for reconstruction
const ID_t kINVALID_ID
Invalid ID.
ID_t idx
index from original larlite vector
flashmatch::QCluster_t::~QCluster_t ( )
inline

Definition at line 99 of file OpT0FinderTypes.h.

99 {}

Member Function Documentation

void flashmatch::QCluster_t::drop ( double  xmin,
double  xmax 
)

drop points outside the x range specified

Definition at line 23 of file OpT0FinderTypes.cxx.

24  {
25  QCluster_t another;
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);
31  }
32  (*this) = another;
33  }
std::size_t size(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:561
QCluster_t()
Default constructor.
double flashmatch::QCluster_t::length ( ) const

returns the total trajectory length

Definition at line 12 of file OpT0FinderTypes.cxx.

13  {
14  double len=0.;
15  for(size_t idx=1; idx<this->size(); ++idx) {
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));
19  }
20  return len;
21  }
std::size_t size(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:561
ID_t idx
index from original larlite vector
double flashmatch::QCluster_t::max_x ( ) const
inline

maximum x

Definition at line 115 of file OpT0FinderTypes.h.

116  { double x=flashmatch::kINVALID_DOUBLE; for(auto const& pt : (*this)) x = std::max(x,pt.x); return x; }
process_name opflash particleana ie x
const double kINVALID_DOUBLE
Utility: invalid value for double.
double flashmatch::QCluster_t::min_x ( ) const
inline

minimum x

Definition at line 111 of file OpT0FinderTypes.h.

112  { double x=flashmatch::kINVALID_DOUBLE; for(auto const& pt : (*this)) x = std::min(x,pt.x); return x; }
process_name opflash particleana ie x
const double kINVALID_DOUBLE
Utility: invalid value for double.
QCluster_t flashmatch::QCluster_t::operator+ ( const double  shift)
inline

Definition at line 121 of file OpT0FinderTypes.h.

122  { auto result = (*this); result += shift; return result; }
shift
Definition: fcl_checks.sh:26
QCluster_t flashmatch::QCluster_t::operator+ ( const QCluster_t rhs) const
inline

Definition at line 130 of file OpT0FinderTypes.h.

130  {
131  QCluster_t res((*this));
132  res += rhs;
133  return res;
134  }
QCluster_t()
Default constructor.
QCluster_t& flashmatch::QCluster_t::operator+= ( const double  shift)
inline

Definition at line 118 of file OpT0FinderTypes.h.

119  { for(auto& pt : (*this)) pt.x += shift; return (*this); }
shift
Definition: fcl_checks.sh:26
QCluster_t& flashmatch::QCluster_t::operator+= ( const QCluster_t rhs)
inline

Definition at line 124 of file OpT0FinderTypes.h.

124  {
125  this->reserve(rhs.size() + this->size());
126  for(auto const& pt : rhs) this->push_back(pt);
127  return (*this);
128  }
std::size_t size(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:561
double flashmatch::QCluster_t::sum ( ) const

returns the sum of "q" from QPoint_t

Definition at line 9 of file OpT0FinderTypes.cxx.

10  { double sum=0; for(auto const& pt : (*this)) sum += pt.q; return sum; }
double sum() const
returns the sum of &quot;q&quot; from QPoint_t

Member Data Documentation

ID_t flashmatch::QCluster_t::idx

index from original larlite vector

Definition at line 94 of file OpT0FinderTypes.h.

double flashmatch::QCluster_t::time

assumed time w.r.t. trigger for reconstruction

Definition at line 95 of file OpT0FinderTypes.h.


The documentation for this class was generated from the following files: