Definition at line 131 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 137 of file DBScanAlg.cxx.
std::vector< unsigned int > & fBadWireSum
const BoundingBox & fBound
Definition at line 149 of file DBScanAlg.cxx.
152 c.edges[0].first = c.edges[0].second = (b.edges[0].first + b.edges[0].second) / 2.0;
153 c.edges[1].first = c.edges[1].second = (b.edges[1].first + b.edges[1].second) / 2.0;
RTree::BoundingBox BoundingBox
bool AcceptFindNeighbors::isNear |
( |
const BoundingBox & |
b | ) |
const |
|
inline |
- Todo:
- activating these should throw a warning or something
Definition at line 158 of file DBScanAlg.cxx.
References util::abs(), lar::util::absDiff(), and e.
162 double bCenter0 =
center(b).edges[0].first;
163 double bCenter1 =
center(b).edges[1].first;
164 double tCenter0 =
center().edges[0].first;
165 double tCenter1 =
center().edges[1].first;
167 double bWidth =
std::abs(b.edges[1].second - b.edges[1].first);
170 unsigned int wire1 = (
unsigned int)(tCenter0 /
fWireDist + 0.5);
171 unsigned int wire2 = (
unsigned int)(bCenter0 /
fWireDist + 0.5);
180 double cmtobridge = wirestobridge *
fWireDist;
182 double sim =
std::abs(tCenter0 - bCenter0) - cmtobridge;
185 if (
std::abs(tCenter0 - bCenter0) > 1
e-10) {
186 cmtobridge *=
std::abs((tCenter1 - bCenter1) / (tCenter0 - bCenter0));
188 double sim2 =
std::abs(tCenter1 - bCenter1) - cmtobridge;
192 double WFactor = (exp(4.6 * ((tWidth * tWidth) + (bWidth * bWidth)))) * k;
194 if (WFactor < 1.0) WFactor = 1.0;
195 if (WFactor > 6.25) WFactor = 6.25;
198 return (((sim) / (
fEps[0] *
fEps[0])) + ((sim2) / (fEps[1] * fEps[1] * (WFactor))) <= 1);
std::vector< unsigned int > & fBadWireSum
constexpr auto abs(T v)
Returns the absolute value of the argument.
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 200 of file DBScanAlg.cxx.
References n.
204 for (
int i = 0; i < 2; ++i) {
207 if (b.edges[i].first > c.edges[i].second) {
209 n.edges[i].first = n.edges[i].second = b.edges[i].first;
211 else if (b.edges[0].second < c.edges[0].first) {
213 n.edges[i].first = n.edges[i].second = b.edges[i].second;
217 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 225 of file DBScanAlg.cxx.
228 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 234 of file DBScanAlg.cxx.
234 {
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: