84 produces<std::vector<art::PtrVector<recob::SpacePoint> > >();
85 produces<std::vector<recob::SpacePoint> >();
86 produces<art::Assns<recob::SpacePoint, recob::Hit> >();
88 produces<art::Assns<recob::SpacePoint, recob::Cluster> >();
93 <<
"SpacePointFinder configured with the following parameters:\n" 95 <<
" Minimum Hits per Cluster = " << fMinHits <<
"\n" 151 std::unique_ptr<std::vector<recob::SpacePoint> > spts(
new std::vector<recob::SpacePoint>);
163 int nclus = clusterh->size();
164 for(
int iclus = 0; iclus < nclus; ++iclus) {
168 std::vector< art::Ptr<recob::Hit> > ihits = fm.at(iclus);
179 unsigned int nihits = ihits.size();
183 i != ihits.end(); ++i)
188 for(
int jclus = 0; jclus < iclus; ++jclus) {
192 std::vector< art::Ptr<recob::Hit> > jhits = fm.at(jclus);
204 unsigned int njhits = jhits.size();
205 assert(hits.
size() >= nihits);
207 while(hits.
size() > nihits)
209 assert(hits.
size() == nihits);
212 j != jhits.end(); ++j)
218 std::vector<recob::SpacePoint> new_spts;
223 if(new_spts.size() > 0) {
232 int nspt = spts->size();
233 spts->insert(spts->end(), new_spts.begin(), new_spts.end());
238 for(
unsigned int ispt = nspt; ispt < spts->size(); ++ispt) {
248 art::ProductID spid = this->getProductID< std::vector<recob::SpacePoint> >();
252 sptvecs->push_back(sptvec);
258 for(
int kclus = 0; kclus < jclus; ++kclus) {
262 std::vector< art::Ptr<recob::Hit> > khits = fm.at(kclus);
270 && kview != iview && kview != jview) {
274 unsigned int nkhits = khits.size();
275 assert(hits.
size() >= nihits + njhits);
277 while(hits.
size() > nihits + njhits)
279 assert(hits.
size() == nihits + njhits);
280 hits.
reserve(nihits + njhits + nkhits);
282 k != khits.end(); ++k)
287 std::vector<recob::SpacePoint> new_spts;
292 if(new_spts.size() > 0) {
302 int nspt = spts->size();
303 spts->insert(spts->end(), new_spts.begin(), new_spts.end());
308 for(
unsigned int ispt = nspt; ispt < spts->size(); ++ispt) {
318 art::ProductID spid = this->getProductID< std::vector<recob::SpacePoint> >();
322 sptvecs->push_back(sptvec);
333 evt.
put(std::move(spts));
334 evt.
put(std::move(sptvecs));
335 evt.
put(std::move(sphitassn));
337 evt.
put(std::move(spclassn));
348 <<
"SpacePointFinder statistics:\n" 349 <<
" Number of events = " <<
fNumEvent <<
"\n" 350 <<
" Number of 2-view space points created = " <<
fNumSpt2 <<
"\n" 351 <<
" Number of 3-view space points created = " <<
fNumSpt3;
void reconfigure(fhicl::ParameterSet const &pset)
SpacePointFinder(fhicl::ParameterSet const &pset)
void reserve(size_type n)
void produce(art::Event &evt)
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
Declaration of signal hit object.
virtual ~SpacePointFinder()
Planes which measure Z direction.
EDProductGetter const * productGetter(ProductID const) const
const art::PtrVector< recob::Hit > & getAssociatedHits(const recob::SpacePoint &spt) const
ProductID put(std::unique_ptr< PROD > &&product)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
#define DEFINE_ART_MODULE(klass)
void push_back(Ptr< U > const &p)
T get(std::string const &key) const
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.
void reconfigure(const fhicl::ParameterSet &pset)
void makeSpacePoints(const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) const
geo::View_t View() const
Returns the view for this cluster.
Utility object to perform functions of association.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Algorithm for generating space points from hits.
std::string fClusterModuleLabel
art framework interface to geometry description