CFAlgoStartPointMatch.h
Go to the documentation of this file.
1 /**
2  * \file CFAlgoStartPointMatch.h
3  *
4  * \ingroup CMTool
5  *
6  * \brief Class def header for a class CFAlgoStartPointMatch
7  *
8  * @author david
9  */
10 
11 /** \addtogroup CMTool
12 
13  @{*/
14 #ifndef RECOTOOL_CFALGOSTARTPOINTMATCH_H
15 #define RECOTOOL_CFALGOSTARTPOINTMATCH_H
16 
18 
19 namespace cmtool {
20  /**
21  \class CFAlgoStartPointMatch
22  User implementation for CFloatAlgoBase class
23  doxygen documentation!
24  */
26 
27  public:
28 
29  /// Default constructor
31 
32  /// Default destructor
34 
35  //
36  // Author should be aware of 3 functions at least: Float, Report,
37  // and Reset. More possibly-useful functions can be found in the later
38  // part but commented out. All of these functions are virtual and defined
39  // in the base class.
40 
41  /**
42  Core function: given a set of CPANs, return a float which indicates
43  the compatibility the cluster combination.
44  */
45  virtual float Float(const std::vector<const cluster::ClusterParamsAlg*> &clusters);
46 
47  /**
48  Optional function: called after each iterative approach if a manager class is
49  run with verbosity level <= kPerIteration. Maybe useful for debugging.
50  */
51  virtual void Report();
52 
53  /// Function to reset the algorithm instance, called together with manager's Reset()
54  virtual void Reset();
55 
56  double Area2D( double Ax, double Ay,
57  double Bx, double By,
58  double Cx, double Cy);
59 
60  double Area3D( double Ax, double Ay, double Az,
61  double Bx, double By, double Bz,
62  double Cx, double Cy, double Cz);
63 
64  void UseTime( bool on ) { _time = on; }
65 
66  void SetMaxArea( double area ) { _MaxArea = area; }
67 
68  /**
69  Optional function: called at the beginning of 1st iteration. This is called per event.
70  */
71  //virtual void EventBegin(const std::vector<cluster::ClusterParamsAlg> &clusters);
72 
73  /**
74  Optional function: called at the end of event ... after the last merging iteration is over.
75  */
76  //virtual void EventEnd();
77 
78  /**
79  Optional function: called at the beggining of each iterative loop.
80  This provides all clusters' information in case the algorithm need them. Note this
81  is called per iteration which may be more than once per event.
82  */
83  //virtual void IterationBegin(const std::vector<cluster::ClusterParamsAlg> &clusters);
84 
85  /**
86  Optional function: called at the end of each iterative loop.
87  */
88  //virtual void IterationEnd();
89 
90  private:
91 
92  double _w2cm, _t2cm;
93  double _MaxArea;
94  bool _time; /// Use Time to compute intersection and trinagle area
95 
96  };
97 
98 
99 }
100 #endif
101 /** @} */ // end of doxygen group
Class def header for a class CFloatAlgoBase.
CFAlgoStartPointMatch()
Default constructor.
double Area2D(double Ax, double Ay, double Bx, double By, double Cx, double Cy)
double Area3D(double Ax, double Ay, double Az, double Bx, double By, double Bz, double Cx, double Cy, double Cz)
virtual float Float(const std::vector< const cluster::ClusterParamsAlg * > &clusters)
virtual ~CFAlgoStartPointMatch()
Default destructor.
virtual void Reset()
Function to reset the algorithm instance, called together with manager&#39;s Reset()
Definition: cfalgo.cc:3