Definition at line 135 of file DBScanAlg.cxx.
AcceptFindNeighbors::AcceptFindNeighbors |
( |
const BoundingBox & |
b, |
|
|
double |
eps, |
|
|
double |
eps2, |
|
|
double |
maxWidth, |
|
|
double |
wireDist, |
|
|
std::vector< unsigned int > & |
badWireSum |
|
) |
| |
|
inline |
Definition at line 141 of file DBScanAlg.cxx.
std::vector< unsigned int > & fBadWireSum
const BoundingBox & fBound
Definition at line 154 of file DBScanAlg.cxx.
157 c.edges[0].first = c.edges[0].second = (b.edges[0].first + b.edges[0].second) / 2.0;
158 c.edges[1].first = c.edges[1].second = (b.edges[1].first + b.edges[1].second) / 2.0;
RTree::BoundingBox BoundingBox
Definition at line 162 of file DBScanAlg.cxx.
const BoundingBox & fBound
BoundingBox center() const
bool AcceptFindNeighbors::isNear |
( |
const BoundingBox & |
b | ) |
const |
|
inline |
- Todo:
- activating these should throw a warning or something
Definition at line 168 of file DBScanAlg.cxx.
172 double bCenter0 =
center(b).edges[0].first;
173 double bCenter1 =
center(b).edges[1].first;
174 double tCenter0 =
center().edges[0].first;
175 double tCenter1 =
center().edges[1].first;
177 double bWidth =
std::abs(b.edges[1].second - b.edges[1].first);
180 unsigned int wire1 = (
unsigned int)(tCenter0 /
fWireDist + 0.5);
181 unsigned int wire2 = (
unsigned int)(bCenter0 /
fWireDist + 0.5);
190 double cmtobridge = wirestobridge *
fWireDist;
192 double sim =
std::abs(tCenter0 - bCenter0) - cmtobridge;
195 if (
std::abs(tCenter0 - bCenter0) > 1
e-10) {
196 cmtobridge *=
std::abs((tCenter1 - bCenter1) / (tCenter0 - bCenter0));
198 double sim2 =
std::abs(tCenter1 - bCenter1) - cmtobridge;
202 double WFactor = (
exp(4.6 * ((tWidth * tWidth) + (bWidth * bWidth)))) * k;
204 if (WFactor < 1.0) WFactor = 1.0;
205 if (WFactor > 6.25) WFactor = 6.25;
208 return (((sim) / (
fEps[0] *
fEps[0])) + ((sim2) / (fEps[1] * fEps[1] * (WFactor))) <= 1);
std::vector< unsigned int > & fBadWireSum
const BoundingBox & fBound
constexpr auto absDiff(A const &a, B const &b)
Returns the absolute value of the difference between two values.
BoundingBox center() const
Definition at line 211 of file DBScanAlg.cxx.
215 for (
int i = 0; i < 2; ++i) {
218 if (b.edges[i].first > c.edges[i].second) {
220 n.edges[i].first = n.edges[i].second = b.edges[i].first;
222 else if (b.edges[0].second < c.edges[0].first) {
224 n.edges[i].first = n.edges[i].second = b.edges[i].second;
228 n.edges[i].first = n.edges[i].second = c.edges[i].first;
RTree::BoundingBox BoundingBox
BoundingBox center() const
bool AcceptFindNeighbors::operator() |
( |
const RTree::Node *const |
node | ) |
const |
|
inline |
Definition at line 237 of file DBScanAlg.cxx.
240 if (
fBound.overlaps(node->bound))
return true;
bool isNear(const BoundingBox &b) const
const BoundingBox & fBound
BoundingBox nearestPoint(const BoundingBox &b) const
bool AcceptFindNeighbors::operator() |
( |
const RTree::Leaf *const |
leaf | ) |
const |
|
inline |
Definition at line 247 of file DBScanAlg.cxx.
249 return isNear(leaf->bound);
bool isNear(const BoundingBox &b) const
std::vector<unsigned int>& AcceptFindNeighbors::fBadWireSum |
double AcceptFindNeighbors::fEps[2] |
double AcceptFindNeighbors::fMaxWidth |
double AcceptFindNeighbors::fWireDist |
The documentation for this struct was generated from the following file: