Definition at line 132 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 138 of file DBScanAlg.cxx.
std::vector< unsigned int > & fBadWireSum
const BoundingBox & fBound
Definition at line 150 of file DBScanAlg.cxx.
153 c.edges[0].first = c.edges[0].second = (b.edges[0].first + b.edges[0].second) / 2.0;
154 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 159 of file DBScanAlg.cxx.
References util::abs(), lar::util::absDiff(), and e.
163 double bCenter0 =
center(b).edges[0].first;
164 double bCenter1 =
center(b).edges[1].first;
165 double tCenter0 =
center().edges[0].first;
166 double tCenter1 =
center().edges[1].first;
168 double bWidth =
std::abs(b.edges[1].second - b.edges[1].first);
171 unsigned int wire1 = (
unsigned int)(tCenter0 /
fWireDist + 0.5);
172 unsigned int wire2 = (
unsigned int)(bCenter0 /
fWireDist + 0.5);
181 double cmtobridge = wirestobridge *
fWireDist;
183 double sim =
std::abs(tCenter0 - bCenter0) - cmtobridge;
186 if (
std::abs(tCenter0 - bCenter0) > 1
e-10) {
187 cmtobridge *=
std::abs((tCenter1 - bCenter1) / (tCenter0 - bCenter0));
189 double sim2 =
std::abs(tCenter1 - bCenter1) - cmtobridge;
193 double WFactor = (exp(4.6 * ((tWidth * tWidth) + (bWidth * bWidth)))) * k;
195 if (WFactor < 1.0) WFactor = 1.0;
196 if (WFactor > 6.25) WFactor = 6.25;
199 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 201 of file DBScanAlg.cxx.
References n.
205 for (
int i = 0; i < 2; ++i) {
208 if (b.edges[i].first > c.edges[i].second) {
210 n.edges[i].first = n.edges[i].second = b.edges[i].first;
212 else if (b.edges[0].second < c.edges[0].first) {
214 n.edges[i].first = n.edges[i].second = b.edges[i].second;
218 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 226 of file DBScanAlg.cxx.
229 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 235 of file DBScanAlg.cxx.
235 {
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: