CFAlgoQRatio.h
Go to the documentation of this file.
1 /**
2  * \file CFAlgoQRatio.h
3  *
4  * \ingroup CMTool
5  *
6  * \brief Class def header for a class CFAlgoQRatio
7  *
8  * @author kazuhiro
9  */
10 
11 /** \addtogroup CMTool
12 
13  @{*/
14 #ifndef RECOTOOL_CFALGOQRATIO_H
15 #define RECOTOOL_CFALGOQRATIO_H
16 
18 
19 namespace cmtool {
20  /**
21  \class CFAlgoQRatio
22  User implementation for CFloatAlgoBase class
23  This algorithm compares charge ratio of clusters to find a match
24  */
25  class CFAlgoQRatio : public CFloatAlgoBase {
26 
27  public:
28  /// Default constructor
29  CFAlgoQRatio();
30 
31  //
32  // Author should be aware of 3 functions at least: Float, Report,
33  // and Reset. More possibly-useful functions can be found in the later
34  // part but commented out. All of these functions are virtual and defined
35  // in the base class.
36 
37  /**
38  Core function: given a set of CPANs, return a float which indicates
39  the compatibility the cluster combination.
40  */
41  float Float(util::GeometryUtilities const&,
42  const std::vector<const cluster::ClusterParamsAlg*>& clusters) override;
43 
44  /**
45  Optional function: called after each iterative approach if a manager class is
46  run with verbosity level <= kPerIteration. Maybe useful for debugging.
47  */
48  void Report() override;
49 
50  /// Function to reset the algorithm instance, called together with manager's Reset()
51  void Reset() override;
52 
53  /// Setter for the minimum value for charge ratio (below this value Float() returns -1)
54  void
55  SetQRatioCut(float cut)
56  {
57  _qratio_cut = cut;
58  }
59 
60  protected:
61  float _qratio_cut;
62  };
63 }
64 #endif
65 /** @} */ // end of doxygen group
Class def header for a class CFloatAlgoBase.
void SetQRatioCut(float cut)
Setter for the minimum value for charge ratio (below this value Float() returns -1) ...
Definition: CFAlgoQRatio.h:55
void Report() override
CFAlgoQRatio()
Default constructor.
Definition: CFAlgoQRatio.cxx:6
float Float(util::GeometryUtilities const &, const std::vector< const cluster::ClusterParamsAlg * > &clusters) override
void Reset() override
Function to reset the algorithm instance, called together with manager&#39;s Reset()