6 #include "art/Utilities/ToolMacros.h"
7 #include "cetlib/cpu_timer.h"
8 #include "fhiclcpp/ParameterSet.h"
9 #include "messagefacility/MessageLogger/MessageLogger.h"
34 std::vector<sbn::StubInfo>
Merge(
const std::vector<sbn::StubInfo> &stubs,
45 fStubDotCut(pset.
get<double>(
"StubDotCut"))
55 std::vector<bool> toerase(stubs.size(),
false);
56 for (
unsigned i_stub = 0; i_stub < stubs.size(); i_stub++) {
57 for (
unsigned j_stub = 0; j_stub < stubs.size(); j_stub++) {
58 if (i_stub == j_stub)
continue;
59 if (toerase[j_stub])
continue;
62 toerase[j_stub] =
true;
68 std::vector<sbn::StubInfo> ret;
70 for (
unsigned i = 0; i < stubs.size(); i++) {
71 if (!toerase[i]) ret.push_back(stubs[i]);
Abstract interface intended for art tools which take a list of stubs and return a new list with some ...
float StubDirectionDot(const sbn::StubInfo &A, const sbn::StubInfo &B, const geo::GeometryCore *geo, const detinfo::DetectorPropertiesData &dprop)
Computes the dot product of two stubs.
PlaneStubMerge(fhicl::ParameterSet const &pset)
Constructor.
Art tool for merging stubs on the same plane.
std::vector< sbn::StubInfo > Merge(const std::vector< sbn::StubInfo > &stubs, const geo::GeometryCore *geo, const spacecharge::SpaceCharge *sce, const detinfo::DetectorClocksData &dclock, const detinfo::DetectorPropertiesData &dprop) override
Access the description of detector geometry.
bool StubContains(const sbn::StubInfo &A, const sbn::StubInfo &B)
Returns whether stub A contains stub B.
Description of geometry of one entire detector.
Contains all timing reference information for the detector.