26 #include "art/Framework/Core/EDProducer.h"
27 #include "art/Framework/Core/ModuleMacros.h"
28 #include "art/Framework/Principal/Event.h"
29 #include "art/Framework/Principal/Handle.h"
30 #include "art/Framework/Services/Registry/ServiceHandle.h"
31 #include "fhiclcpp/ParameterSet.h"
32 #include "messagefacility/MessageLogger/MessageLogger.h"
35 #include "nurandom/RandomUtils/NuRandomService.h"
61 , fDBScanModuleLabel{pset.get<std::string>(
"DBScanModuleLabel")}
62 , fHoughSeed{pset.get<
unsigned int>(
"HoughSeed", 0)}
63 , fHLAlg(pset.get<fhicl::ParameterSet>(
"HoughBaseAlg"))
68 ,
fEngine(art::ServiceHandle<rndm::NuRandomService> {}->createEngine(*
this, pset,
"Seed"))
70 produces<std::vector<recob::Cluster>>();
71 produces<art::Assns<recob::Cluster, recob::Hit>>();
82 auto const clusterListHandle =
85 std::vector<art::Ptr<recob::Cluster>> clusIn;
86 clusIn.reserve(clusterListHandle->size());
87 for (
unsigned int ii = 0; ii < clusterListHandle->size(); ++ii) {
88 clusIn.emplace_back(clusterListHandle, ii);
92 auto ccol = std::make_unique<std::vector<recob::Cluster>>();
93 auto assn = std::make_unique<art::Assns<recob::Cluster, recob::Hit>>();
97 std::vector<art::PtrVector<recob::Hit>> clusHitsOut;
103 size_t const numclus =
106 MF_LOG_DEBUG(
"HoughLineClusters") <<
"found " << numclus <<
"clusters with HoughBaseAlg";
108 mf::LogVerbatim(
"Summary") << std::setfill(
'-') << std::setw(175) <<
"-" << std::setfill(
' ');
109 mf::LogVerbatim(
"Summary") <<
"HoughLineFinder Summary:";
110 for (
size_t i = 0; i < ccol->size(); ++i) {
111 mf::LogVerbatim(
"Summary") << ccol->at(i);
Declaration of signal hit object.
size_t FastTransform(const std::vector< art::Ptr< recob::Cluster >> &clusIn, std::vector< recob::Cluster > &ccol, std::vector< art::PtrVector< recob::Hit >> &clusHitsOut, CLHEP::HepRandomEngine &engine, art::Event const &evt, std::string const &label)
void produce(art::Event &evt) override
fEngine(art::ServiceHandle< rndm::NuRandomService >() ->createEngine(*this, pset,"Seed"))
Declaration of cluster object.
std::string fDBScanModuleLabel
bool CreateAssn(art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t index=UINT_MAX)
Creates a single one-to-one association.
HoughBaseAlg fHLAlg
object that does the Hough Transform
HoughLineFinder(fhicl::ParameterSet const &pset)
CLHEP::HepRandomEngine & fEngine