All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 flashmatch {
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)...
static NPtFilterFactory __global_NPtFilterFactory__
Definition: NPtFilter.cxx:8
size_t _min_num_pt
mininum number of QPoint_t to pass the filter
Definition: NPtFilter.h:49
NPtFilter(const std::string name="NPtFilter")
Default constructor.
Definition: NPtFilter.cxx:10
fhicl::ParameterSet Config_t
Configuration object.
Definition: FMWKInterface.h:31
IDArray_t Filter(const QClusterArray_t &)
Implementation of virtualfunction.
Definition: NPtFilter.cxx:19
void _Configure_(const Config_t &pset)
Definition: NPtFilter.cxx:14
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