All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
arxiv/NPtFilter.h
Go to the documentation of this file.
1 /**
2  * \file NPtFilter.h
3  *
4  * \ingroup Algorithms
5  *
6  * \brief Class def header for a class NPtFilter
7  *
8  * @author kazuhiro
9  */
10 
11 /** \addtogroup Algorithms
12 
13  @{*/
14 #ifndef OPT0FINDER_NPTFILTER_H
15 #define OPT0FINDER_NPTFILTER_H
16 
17 #include "OpT0Finder/Base/BaseTPCFilter.h"
18 #include "OpT0Finder/Base/TPCFilterFactory.h"
19 
20 namespace flashana {
21  /**
22  \class NPtFilter
23  Implementation of flashana::BaseTPCFilter abstract algorithm class. \n
24  It applies a _very_ simple filtering: excludes TPC objects (flashana::QCluster_t) \n
25  that contains less than specified number of points. \n
26  */
27  class NPtFilter : public BaseTPCFilter{
28 
29  public:
30 
31  /// Default constructor
32  NPtFilter(const std::string name="NPtFilter");
33 
34  /// Default destructor
36 
37  /// Implementation of virtualfunction
39 
40  /// set minimum number of point in TPC track
41  void SetMinNumPoints(size_t n) { _min_num_pt = n; }
42 
43  protected:
44 
45  void _Configure_(const Config_t &pset);
46 
47  private:
48 
49  size_t _min_num_pt; ///< mininum number of QPoint_t to pass the filter
50 
51  };
52 
53  /**
54  \class flashana::NPtFilterFactory
55  */
56  class NPtFilterFactory : public TPCFilterFactoryBase {
57  public:
58  /// ctor
59  NPtFilterFactory() { TPCFilterFactory::get().add_factory("NPtFilter",this); }
60  /// dtor
62  /// creation method
63  BaseTPCFilter* create(const std::string instance_name) { return new NPtFilter(instance_name); }
64  };
65 
66 }
67 
68 #endif
69 /** @} */ // end of doxygen group
70 
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)...
~NPtFilter()
Default destructor.
void SetMinNumPoints(size_t n)
set minimum number of point in TPC track
IDArray_t Filter(const QClusterArray_t &)
Implementation of virtualfunction.
BaseTPCFilter * create(const std::string instance_name)
creation method
NPtFilter(const std::string name="NPtFilter")
Default constructor.
std::vector< flashmatch::ID_t > IDArray_t
Index collection.
then echo fcl name
size_t _min_num_pt
mininum number of QPoint_t to pass the filter
void _Configure_(const Config_t &pset)