#include <SimpleClustering.h>
Definition at line 37 of file SimpleClustering.h.
tss::Cluster2D::Cluster2D |
( |
void |
| ) |
|
|
inline |
Definition at line 11 of file SimpleClustering.cxx.
14 fHits.reserve(hits.size());
15 for (
size_t h = 0;
h < hits.size(); ++
h)
fHits.push_back(hits[
h]);
std::vector< const tss::Hit2D * > fHits
const tss::Hit2D * tss::Cluster2D::closest |
( |
const TVector2 & |
p2d, |
|
|
size_t & |
idx |
|
) |
| const |
Definition at line 41 of file SimpleClustering.cxx.
44 if (!
fHits.size())
return 0;
48 for (
size_t h = 1;
h <
fHits.size(); ++
h)
51 if (d < dmin) { dmin =
d; hout =
fHits[
h]; idx =
h; }
TVector2 const & Point2D() const
double Dist2(const TVector2 &v1, const TVector2 &v2)
std::vector< const tss::Hit2D * > fHits
double tss::Cluster2D::dist2 |
( |
const TVector2 & |
p2d | ) |
const |
Definition at line 124 of file SimpleClustering.cxx.
129 for (
size_t i = 1; i <
fHits.size(); ++i)
132 if (d2 < min_d2) { min_d2 = d2; }
double Dist2(const TVector2 &v1, const TVector2 &v2)
std::vector< const tss::Hit2D * > fHits
double tss::Cluster2D::dist2 |
( |
const TVector2 & |
p2d, |
|
|
size_t & |
hIdx |
|
) |
| const |
Definition at line 140 of file SimpleClustering.cxx.
146 for (
size_t i = 1; i <
fHits.size(); ++i)
149 if (d2 < min_d2) { min_d2 = d2; hIdx = i; }
double Dist2(const TVector2 &v1, const TVector2 &v2)
std::vector< const tss::Hit2D * > fHits
Definition at line 157 of file SimpleClustering.cxx.
161 double d2, min_d2 = clu.
dist2(
fHits.front()->Point2D());
162 for (
size_t i = 1; i <
fHits.size(); ++i)
165 if (d2 < min_d2) { min_d2 = d2; }
std::vector< const tss::Hit2D * > fHits
double dist2(const TVector2 &p2d) const
const tss::Hit2D* tss::Cluster2D::end |
( |
void |
| ) |
const |
|
inline |
Definition at line 116 of file SimpleClustering.cxx.
118 for (
size_t i = 0; i <
fHits.size(); ++i)
119 if (
fHits[i] == hit)
return true;
std::vector< const tss::Hit2D * > fHits
bool tss::Cluster2D::isDenseEnd |
( |
void |
| ) |
const |
|
inline |
bool tss::Cluster2D::isDenseStart |
( |
void |
| ) |
const |
|
inline |
bool tss::Cluster2D::isEM |
( |
void |
| ) |
const |
|
inline |
bool tss::Cluster2D::isTagged |
( |
void |
| ) |
const |
|
inline |
double tss::Cluster2D::length2 |
( |
void |
| ) |
const |
|
inline |
Definition at line 53 of file SimpleClustering.h.
double Dist2(const TVector2 &v1, const TVector2 &v2)
std::vector< const tss::Hit2D * > fHits
const TVector2 tss::Cluster2D::max |
( |
void |
| ) |
const |
Definition at line 98 of file SimpleClustering.cxx.
103 for (
size_t i = 1; i <
size(); ++i)
105 const TVector2
h =
fHits[i]->Point2D();
107 if (h.X() > maximum.X()) maximum.Set(h.X(), h.Y());
108 if (h.Y() > maximum.Y()) maximum.Set(maximum.X(), h.Y());
std::vector< const tss::Hit2D * > fHits
Definition at line 72 of file SimpleClustering.h.
std::vector< const tss::Hit2D * > fHits
const std::vector< const tss::Hit2D * > & hits(void) const
const TVector2 tss::Cluster2D::min |
( |
void |
| ) |
const |
Definition at line 80 of file SimpleClustering.cxx.
85 for (
size_t i = 1; i <
size(); ++i)
87 const TVector2
h =
fHits[i]->Point2D();
89 if (h.X() < minimum.X()) minimum.Set(h.X(), h.Y());
90 if (h.Y() < minimum.Y()) minimum.Set(minimum.X(), h.Y());
std::vector< const tss::Hit2D * > fHits
const Hit2D& tss::Cluster2D::operator[] |
( |
size_t |
index | ) |
const |
|
inline |
const tss::Hit2D * tss::Cluster2D::outermost |
( |
size_t & |
idx | ) |
const |
Definition at line 57 of file SimpleClustering.cxx.
60 if (!
fHits.size())
return 0;
62 TVector2
mean(0., 0.);
63 for (
size_t h = 0;
h <
fHits.size(); ++
h)
71 for (
size_t h = 1;
h <
fHits.size(); ++
h)
74 if (d > dmax) { dmax =
d; hout =
fHits[
h]; idx =
h; }
TVector2 const & Point2D() const
double Dist2(const TVector2 &v1, const TVector2 &v2)
std::vector< const tss::Hit2D * > fHits
double mean(sqlite3 *db, std::string const &table_name, std::string const &column_name)
void tss::Cluster2D::push_back |
( |
const tss::Hit2D * |
hit | ) |
|
|
inline |
const tss::Hit2D * tss::Cluster2D::release_at |
( |
size_t |
idx | ) |
|
Definition at line 19 of file SimpleClustering.cxx.
22 if (idx <
fHits.size())
std::vector< const tss::Hit2D * > fHits
Detector simulation of raw signals on wires.
void tss::Cluster2D::setTag |
( |
bool |
b | ) |
|
|
inline |
size_t tss::Cluster2D::size |
( |
void |
| ) |
const |
|
inline |
void tss::Cluster2D::sort |
( |
void |
| ) |
|
|
inline |
const tss::Hit2D* tss::Cluster2D::start |
( |
void |
| ) |
const |
|
inline |
void tss::Cluster2D::tagDenseEnd |
( |
bool |
b | ) |
|
|
inline |
void tss::Cluster2D::tagDenseStart |
( |
bool |
b | ) |
|
|
inline |
void tss::Cluster2D::tagEM |
( |
bool |
b | ) |
|
|
inline |
Definition at line 67 of file SimpleClustering.h.
void push_back(const tss::Hit2D *hit)
const Hit2D * release_at(size_t idx)
Detector simulation of raw signals on wires.
bool tss::Cluster2D::fDenseEnd |
|
private |
bool tss::Cluster2D::fDenseStart |
|
private |
bool tss::Cluster2D::fIsEM |
|
private |
bool tss::Cluster2D::fTag |
|
private |
The documentation for this class was generated from the following files: