All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
flashmatch::NPtFilter Class Reference

#include <NPtFilter.h>

Inheritance diagram for flashmatch::NPtFilter:
flashmatch::BaseTPCFilter flashmatch::BaseAlgorithm flashmatch::LoggerFeature

Public Member Functions

 NPtFilter (const std::string name="NPtFilter")
 Default constructor. More...
 
 ~NPtFilter ()
 Default destructor. More...
 
IDArray_t Filter (const QClusterArray_t &)
 Implementation of virtualfunction. More...
 
void SetMinNumPoints (size_t n)
 set minimum number of point in TPC track More...
 
- Public Member Functions inherited from flashmatch::BaseTPCFilter
 BaseTPCFilter (const std::string name="noname")
 Default constructor. More...
 
virtual ~BaseTPCFilter ()
 Default destructor. More...
 
- Public Member Functions inherited from flashmatch::BaseAlgorithm
 BaseAlgorithm (const Algorithm_t type, const std::string name)
 Default constructor. More...
 
 ~BaseAlgorithm ()
 Default destructor. More...
 
void Configure (const Config_t &pset)
 Function to accept configuration. More...
 
Algorithm_t AlgorithmType () const
 Algorithm type. More...
 
const std::string & AlgorithmName () const
 Algorithm name. More...
 
- Public Member Functions inherited from flashmatch::LoggerFeature
 LoggerFeature (const std::string logger_name="LoggerFeature")
 Default constructor. More...
 
 LoggerFeature (const LoggerFeature &original)
 Default copy constructor. More...
 
virtual ~LoggerFeature ()
 Default destructor. More...
 
const flashmatch::loggerlogger () const
 Logger getter. More...
 
void set_verbosity (::flashmatch::msg::Level_t level)
 Verbosity level. More...
 
const std::string & name () const
 Name getter, defined in a logger instance attribute. More...
 

Protected Member Functions

void _Configure_ (const Config_t &pset)
 

Private Attributes

size_t _min_num_pt
 mininum number of QPoint_t to pass the filter More...
 

Detailed Description

Implementation of flashana::BaseTPCFilter abstract algorithm class.
It applies a very simple filtering: excludes TPC objects (flashana::QCluster_t)
that contains less than specified number of points.

Definition at line 27 of file NPtFilter.h.

Constructor & Destructor Documentation

flashmatch::NPtFilter::NPtFilter ( const std::string  name = "NPtFilter")

Default constructor.

Definition at line 10 of file NPtFilter.cxx.

12  { _min_num_pt = 2; }
size_t _min_num_pt
mininum number of QPoint_t to pass the filter
Definition: NPtFilter.h:49
BaseTPCFilter(const std::string name="noname")
Default constructor.
Definition: BaseTPCFilter.h:30
const std::string & name() const
Name getter, defined in a logger instance attribute.
Definition: LoggerFeature.h:51
flashmatch::NPtFilter::~NPtFilter ( )
inline

Default destructor.

Definition at line 35 of file NPtFilter.h.

35 {}

Member Function Documentation

void flashmatch::NPtFilter::_Configure_ ( const Config_t pset)
protectedvirtual

Implements flashmatch::BaseAlgorithm.

Definition at line 14 of file NPtFilter.cxx.

15  {
16  _min_num_pt = pset.get<double>("MinNumPoint");
17  }
size_t _min_num_pt
mininum number of QPoint_t to pass the filter
Definition: NPtFilter.h:49
IDArray_t flashmatch::NPtFilter::Filter ( const QClusterArray_t tpc_obj_v)
virtual

Implementation of virtualfunction.

Implements flashmatch::BaseTPCFilter.

Definition at line 19 of file NPtFilter.cxx.

19  {
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  }
size_t _min_num_pt
mininum number of QPoint_t to pass the filter
Definition: NPtFilter.h:49
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.
void flashmatch::NPtFilter::SetMinNumPoints ( size_t  n)
inline

set minimum number of point in TPC track

Definition at line 41 of file NPtFilter.h.

41 { _min_num_pt = n; }
size_t _min_num_pt
mininum number of QPoint_t to pass the filter
Definition: NPtFilter.h:49

Member Data Documentation

size_t flashmatch::NPtFilter::_min_num_pt
private

mininum number of QPoint_t to pass the filter

Definition at line 49 of file NPtFilter.h.


The documentation for this class was generated from the following files: