14 #include "canvas/Persistency/Common/FindManyP.h" 51 produces<std::vector<recob::SpacePoint>>();
52 produces<art::Assns<recob::SpacePoint, recob::Hit>>();
63 art::FindManyP<recob::Cluster> pfp_cls(pfpHandle, evt,
fPFPtag);
64 art::FindManyP<recob::Hit> cls_hit(clsHandle, evt,
fPFPtag);
66 auto sphitassn = std::make_unique<art::Assns<recob::SpacePoint, recob::Hit>>();
67 auto spts = std::make_unique<std::vector<recob::SpacePoint>>();
74 for (
unsigned short ipfp = 0; ipfp < pfpHandle->size(); ++ipfp) {
76 std::vector<art::Ptr<recob::Cluster>> clsList;
77 pfp_cls.get(ipfp, clsList);
79 std::cout <<
"PFP " << ipfp <<
"\n";
80 for (
unsigned short icl = 0; icl < clsList.size(); ++icl) {
81 std::vector<art::Ptr<recob::Hit>> hitList;
82 unsigned int clsIndex = clsList[icl]->ID() - 1;
83 cls_hit.get(clsIndex, hitList);
84 std::cout <<
" cls index " << clsIndex <<
" hits size " << hitList.size() <<
" " 85 << (
int)clsList[icl]->StartWire() <<
":" << (
int)clsList[icl]->StartTick()
86 <<
" EndWire " << (
int)clsList[icl]->EndWire() <<
":" 87 << (
int)clsList[icl]->EndTick() <<
"\n";
89 hits.
insert(hits.
end(), hitList.begin(), hitList.end());
92 std::vector<recob::SpacePoint> new_spts;
94 if (new_spts.empty())
continue;
96 int nspt = spts->size();
97 spts->insert(spts->end(), new_spts.begin(), new_spts.end());
100 for (
unsigned int ispt = nspt; ispt < spts->size(); ++ispt) {
void reserve(size_type n)
void produce(art::Event &evt) override
EDProducer(fhicl::ParameterSet const &pset)
const art::PtrVector< recob::Hit > & getAssociatedHits(const recob::SpacePoint &spt) const
#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
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
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.
iterator insert(iterator position, Ptr< U > const &p)
Declaration of signal hit object.
Algorithm for generating space points from hits.
TCTrack(fhicl::ParameterSet const &pset)