121 art::Handle<std::vector<recob::Hit>> HitListHandle;
125 std::vector<art::Ptr<recob::Hit>> hitlist;
129 std::cout <<
" ++++ Hitsreceived received " << HitListHandle->size() <<
" +++++ "
132 if (HitListHandle->size() == 0) {
136 hitlist.resize(HitListHandle->size());
139 for (
unsigned int iHit = 0; iHit < hitlist.size(); iHit++) {
140 hitlist[iHit] = art::Ptr<recob::Hit>(HitListHandle, iHit);
146 auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(
evt);
148 art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(
evt, clockData);
154 auto assn = std::make_unique<art::Assns<recob::Cluster, recob::Hit>>();
159 ClusterParamsImportWrapper<StandardClusterParamsAlg> ClusterParamAlgo;
161 for (
unsigned int iplane = 0; iplane <
fNPlanes; iplane++) {
166 if (leftoverHits.size() != 0) {
168 geo::PlaneID planeID = leftoverHits.front()->WireID().planeID();
170 std::cout <<
"Writing leftover hits to cluster ID: " << iplane * 100 << std::endl;
172 ClusterParamAlgo.ImportHits(gser, leftoverHits);
175 ClusterCreator leftover(gser,
197 for (
unsigned int i = 0; i < smallClusters.size(); i++) {
200 if (!smallClusters.empty()) planeID = smallClusters[i].
front()->WireID().planeID();
202 ClusterParamAlgo.ImportHits(gser, smallClusters[i]);
205 ClusterCreator clust(gser,
215 iplane * 100 + i + 1,
228 evt.put(std::move(assn));
SmallClusterFinderAlg fSmallClusterFinderAlg
The data type to uniquely identify a Plane.
SmallClusterFinder(fhicl::ParameterSet const &pset)
CryostatID_t Cryostat
Index of cryostat.
void FindSmallClusters(util::GeometryUtilities const &gser, detinfo::DetectorClocksData const &dataClocks, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> allHits)
static const SentryArgument_t Sentry
An instance of the sentry object.
std::vector< art::Ptr< recob::Hit > > GetLeftoversByPlane(unsigned int iPlane)
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.
std::vector< std::vector< art::Ptr< recob::Hit > > > GetSmallClustersByPlane(unsigned int iPlane)
art::ServiceHandle< geo::Geometry const > geom
TPCID_t TPC
Index of the TPC within its cryostat.
BEGIN_PROLOG could also be cout