102 produces< std::vector<recob::Cluster> >();
103 produces< art::Assns<recob::Cluster, recob::Hit> >();
153 std::vector< art::Ptr<recob::Hit> > hitlist;
156 if (
verbose) std::cout <<
" ++++ Hitsreceived received " << HitListHandle->size() <<
" +++++ " << std::endl;
158 if(HitListHandle->size() ==0 )
160 if (
verbose) std::cout <<
"No hits received! Exiting." << std::endl;
163 hitlist.resize(HitListHandle->size());
166 for (
unsigned int iHit = 0; iHit < hitlist.size(); iHit++){
179 std::unique_ptr< std::vector<recob::Cluster> >
SmallClusterFinder(
new std::vector<recob::Cluster>);
188 for(
unsigned int iplane=0;iplane<
fNPlanes;iplane++){
194 if (leftoverHits.size() != 0){
196 geo::PlaneID planeID = leftoverHits.front()->WireID().planeID();
197 if (
verbose) std::cout <<
"Writing leftover hits to cluster ID: " << iplane*100 << std::endl;
219 SmallClusterFinder->emplace_back(leftover.move());
225 std::vector< std::vector<art::Ptr<recob::Hit> > > smallClusters;
228 for (
unsigned int i = 0; i < smallClusters.size(); i++){
231 if (!smallClusters.empty()) planeID = smallClusters[i].front()->WireID().planeID();
233 ClusterParamAlgo.
ImportHits(smallClusters[i]);
253 SmallClusterFinder->emplace_back(clust.move());
283 evt.
put(std::move(SmallClusterFinder));
284 evt.
put(std::move(assn));
Class managing the creation of a new recob::Cluster object.
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
void beginRun(art::Run &run)
SmallClusterFinderAlg fSmallClusterFinderAlg
Declaration of signal hit object.
The data type to uniquely identify a Plane.
SmallClusterFinder(fhicl::ParameterSet const &pset)
void FindSmallClusters(std::vector< art::Ptr< recob::Hit > > allHits)
CryostatID_t Cryostat
Index of cryostat.
Cluster finding and building.
static const SentryArgument_t Sentry
An instance of the sentry object.
void reconfigure(fhicl::ParameterSet const &pset)
ProductID put(std::unique_ptr< PROD > &&product)
View_t View() const
Which coordinate does this plane measure.
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
#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)
T get(std::string const &key) const
Wrapper for ClusterParamsAlgBase objects to accept arbitrary input.
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
Declaration of cluster object.
std::string fHitFinderModuleLabel
int GetPlaneAndTPC(art::Ptr< recob::Hit > a, unsigned int &p, unsigned int &cs, unsigned int &t, unsigned int &w)
Utility object to perform functions of association.
Encapsulate the construction of a single detector plane.
void reconfigure(fhicl::ParameterSet const &pset)
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
std::vector< std::vector< art::Ptr< recob::Hit > > > GetSmallClustersByPlane(unsigned int iPlane)
art::ServiceHandle< geo::Geometry > geom
void ImportHits(Iter begin, Iter end)
Calls SetHits() with the hits in the sequence.
void produce(art::Event &evt)
Interface to class computing cluster parameters.
TPCID_t TPC
Index of the TPC within its cryostat.
virtual ~SmallClusterFinder()