99 verbose = pset.get<
bool>(
"Verbose");
101 produces<std::vector<recob::Cluster>>();
102 produces<art::Assns<recob::Cluster, recob::Hit>>();
123 std::vector<art::Ptr<recob::Hit>> hitlist;
127 std::cout <<
" ++++ Hitsreceived received " << HitListHandle->size() <<
" +++++ " 130 if (HitListHandle->size() == 0) {
131 if (
verbose) std::cout <<
"No hits received! Exiting." << std::endl;
134 hitlist.resize(HitListHandle->size());
137 for (
unsigned int iHit = 0; iHit < hitlist.size(); iHit++) {
152 auto assn = std::make_unique<art::Assns<recob::Cluster, recob::Hit>>();
159 for (
unsigned int iplane = 0; iplane <
fNPlanes; iplane++) {
164 if (leftoverHits.size() != 0) {
166 geo::PlaneID planeID = leftoverHits.front()->WireID().planeID();
168 std::cout <<
"Writing leftover hits to cluster ID: " << iplane * 100 << std::endl;
170 ClusterParamAlgo.ImportHits(gser, leftoverHits);
195 for (
unsigned int i = 0; i < smallClusters.size(); i++) {
198 if (!smallClusters.empty()) planeID = smallClusters[i].front()->WireID().planeID();
200 ClusterParamAlgo.ImportHits(gser, smallClusters[i]);
213 iplane * 100 + i + 1,
226 evt.
put(std::move(assn));
Class managing the creation of a new recob::Cluster object.
void produce(art::Event &evt) override
SmallClusterFinderAlg fSmallClusterFinderAlg
Declaration of signal hit object.
EDProducer(fhicl::ParameterSet const &pset)
The data type to uniquely identify a Plane.
SmallClusterFinder(fhicl::ParameterSet const &pset)
void FindSmallClusters(util::GeometryUtilities const &gser, detinfo::DetectorClocksData const &dataClocks, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> allHits)
Cluster finding and building.
static const SentryArgument_t Sentry
An instance of the sentry object.
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
PlaneGeo const & Plane(PlaneID const &planeid) const
Returns the specified wire.
View_t View() const
Which coordinate does this plane measure.
#define DEFINE_ART_MODULE(klass)
Helper functions to create a cluster.
Wrapper for ClusterParamsAlgBase objects to accept diverse input.
std::vector< art::Ptr< recob::Hit > > GetLeftoversByPlane(unsigned int iPlane)
Wrapper for ClusterParamsAlgBase objects to accept arbitrary input.
Declaration of cluster object.
std::string fHitFinderModuleLabel
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.
int GetPlaneAndTPC(art::Ptr< recob::Hit > a, unsigned int &p, unsigned int &cs, unsigned int &t, unsigned int &w)
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Utility object to perform functions of association.
Encapsulate the construction of a single detector plane.
std::vector< std::vector< art::Ptr< recob::Hit > > > GetSmallClustersByPlane(unsigned int iPlane)
art::ServiceHandle< geo::Geometry const > geom
unsigned int Nplanes(TPCID const &tpcid=tpc_zero) const
Returns the total number of planes in the specified TPC.
Interface to class computing cluster parameters.