All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
arxiv/NPtFilter.cxx
Go to the documentation of this file.
1 #ifndef OPT0FINDER_NPTFILTER_CXX
2 #define OPT0FINDER_NPTFILTER_CXX
3 
4 #include "NPtFilter.h"
5 
6 namespace flashana {
7 
9 
10  NPtFilter::NPtFilter(const std::string name)
11  : BaseTPCFilter(name)
12  { _min_num_pt = 2; }
13 
14  void NPtFilter::_Configure_(const Config_t &pset)
15  {
16  _min_num_pt = pset.get<double>("MinNumPoint");
17  }
18 
20 
21  IDArray_t res;
22 
23  // Loop over QCluster_t array
24  for(ID_t id=0; id<tpc_obj_v.size(); ++id) {
25 
26  auto const& tpc_obj = tpc_obj_v[id]; // retrieve
27 
28  // if more # of QPoint_t than threshold, accept
29  if(tpc_obj.size() >= _min_num_pt) res.push_back(id);
30 
31  }
32 
33  return res;
34  }
35 
36 
37 }
38 
39 #endif
std::vector< flashmatch::QCluster_t > QClusterArray_t
Collection of 3D point clusters (one use case is TPC object representation for track(s) and shower(s)...
IDArray_t Filter(const QClusterArray_t &)
Implementation of virtualfunction.
NPtFilter(const std::string name="NPtFilter")
Default constructor.
std::vector< flashmatch::ID_t > IDArray_t
Index collection.
size_t ID_t
Index used to identify Flash_t/QPointCollection_t uniquely in an event.
then echo fcl name
size_t _min_num_pt
mininum number of QPoint_t to pass the filter
static NPtFilterFactory __global_NPtFilterFactory__
void _Configure_(const Config_t &pset)