All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QWeightPoint.h
Go to the documentation of this file.
1 /**
2  * \file QWeightPoint.h
3  *
4  * \ingroup Algorithms
5  *
6  * \brief Class def header for a class QWeightPoint
7  *
8  * @author kazuhiro
9  */
10 
11 /** \addtogroup Algorithms
12 
13  @{*/
14 #ifndef OPT0FINDER_QWEIGHTPOINT_H
15 #define OPT0FINDER_QWEIGHTPOINT_H
16 
17 #ifndef USING_LARSOFT
18 #define USING_LARSOFT 1
19 #endif
20 
21 #if USING_LARSOFT == 0
26 #else
31 #endif
32 
33 #include <cmath>
34 #include <sstream>
35 #include <numeric>
36 
37 
38 namespace flashmatch {
39 
40  /**
41  \class QWeightPoint
42  Implementation of flashmatch::BaseFlashHypothesis algorithm class. \n
43  Given a TPC object (flashmatch::QCluster_t), it calcultes a list of flash hypothesis \n
44  points based on charge deposition and its geometrical position. Each energy deposition \n
45  point is weighted by its charge and inverse-squared-x position. As the absolute \n
46  x-position is not known by a TPC object, it uses a relative position for each point \n
47  w.r.t. the closest point to the wire plane (x=0). The algorithm then assigns an overall \n
48  absolute x-position offset in a successive step of _x_step_size value, assigned by a user, \n
49  to compute possible flash hypothesis points.\n
50  */
51  class QWeightPoint : public BaseFlashMatch {
52 
53  public:
54 
55  /// Default constructor
56  QWeightPoint(const std::string name="QWeightPoint");
57 
58  /// Default destructor
60 
61  FlashMatch_t Match(const QCluster_t&, const Flash_t&);
62 
63  void SetTPCCryo(int tpc, int cryo) {};
64 
65  protected:
66 
67  void _Configure_(const Config_t &pset);
68 
69  private:
70  double _x_step_size; ///< step size in x-direction
71  double _zdiff_max; ///< allowed diff in z-direction to be considered as a match
74  };
75 
76  /**
77  \class flashmatch::QWeightPointFactory
78  */
80  public:
81  /// ctor
83  /// dtor
85  /// creation method
86  BaseFlashMatch* create(const std::string instance_name) { return new QWeightPoint(instance_name); }
87  };
88 
89 }
90 #endif
91 /** @} */ // end of doxygen group
92 
flashmatch::Flash_t _vis_array
Definition: QWeightPoint.h:73
double _x_step_size
step size in x-direction
Definition: QWeightPoint.h:70
Abstract base class for factory (to be implemented per flash)
static FlashMatchFactory & get()
Static sharable instance getter.
void add_factory(const std::string name, flashmatch::FlashMatchFactoryBase *factory)
Factory registration method (should be called by global factory instance in algorithm header) ...
QWeightPoint(const std::string name="QWeightPoint")
Default constructor.
fhicl::ParameterSet Config_t
Configuration object.
Definition: FMWKInterface.h:31
Struct to represent an optical flash.
BaseFlashMatch * create(const std::string instance_name)
creation method
Definition: QWeightPoint.h:86
Class def header for a class BaseFlashFilter.
Class def header for a class FlashMatchFactory.
~QWeightPoint()
Default destructor.
Definition: QWeightPoint.h:59
Collection of charge deposition 3D point (cluster)
Class def header for exception classes in OpT0Finder package.
flashmatch::QCluster_t _tpc_qcluster
Definition: QWeightPoint.h:72
void _Configure_(const Config_t &pset)
Flash-TPC match info.
FlashMatch_t Match(const QCluster_t &, const Flash_t &)
const std::string & name() const
Name getter, defined in a logger instance attribute.
Definition: LoggerFeature.h:51
double _zdiff_max
allowed diff in z-direction to be considered as a match
Definition: QWeightPoint.h:71
void SetTPCCryo(int tpc, int cryo)
Sets the TPC and Cryo numbers.
Definition: QWeightPoint.h:63