49 ,
fPFPtag{pset.get<std::string>(
"PFPModuleLabel")}
51 produces<std::vector<recob::SpacePoint>>();
52 produces<art::Assns<recob::SpacePoint, recob::Hit>>();
65 auto sphitassn = std::make_unique<art::Assns<recob::SpacePoint, recob::Hit>>();
66 auto spts = std::make_unique<std::vector<recob::SpacePoint>>();
73 for (
unsigned short ipfp = 0; ipfp < pfpHandle->size(); ++ipfp) {
75 std::vector<art::Ptr<recob::Cluster>> clsList;
76 pfp_cls.get(ipfp, clsList);
78 std::cout <<
"PFP " << ipfp <<
"\n";
79 for (
unsigned short icl = 0; icl < clsList.size(); ++icl) {
80 std::vector<art::Ptr<recob::Hit>> hitList;
81 unsigned int clsIndex = clsList[icl]->ID() - 1;
82 cls_hit.
get(clsIndex, hitList);
83 std::cout <<
" cls index " << clsIndex <<
" hits size " << hitList.size() <<
" " 84 << (int)clsList[icl]->StartWire() <<
":" << (int)clsList[icl]->StartTick()
85 <<
" EndWire " << (int)clsList[icl]->EndWire() <<
":" 86 << (int)clsList[icl]->EndTick() <<
"\n";
88 hits.
insert(hits.
end(), hitList.begin(), hitList.end());
91 std::vector<recob::SpacePoint> new_spts;
93 if (new_spts.empty())
continue;
95 int nspt = spts->size();
96 spts->insert(spts->end(), new_spts.begin(), new_spts.end());
99 for (
unsigned int ispt = nspt; ispt < spts->size(); ++ispt) {
106 evt.
put(std::move(spts));
107 evt.
put(std::move(sphitassn));
void reserve(size_type n)
void produce(art::Event &evt) override
Declaration of signal hit object.
EDProducer(fhicl::ParameterSet const &pset)
const art::PtrVector< recob::Hit > & getAssociatedHits(const recob::SpacePoint &spt) const
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
#define DEFINE_ART_MODULE(klass)
void makeSpacePoints(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) const
Declaration of cluster object.
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.
iterator insert(iterator position, Ptr< U > const &p)
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Utility object to perform functions of association.
size_type get(size_type i, reference item, data_reference data) const
Algorithm for generating space points from hits.
TCTrack(fhicl::ParameterSet const &pset)