CBAlgoProhibitBigClusters.h
Go to the documentation of this file.
1 /**
2  * \file CBAlgoProhibitBigClusters.h
3  *
4  * \ingroup CMTool
5  *
6  * \brief Class def header for a class CBAlgoProhibitBigClusters
7  *
8  * @author davidkaleko
9  */
10 
11 /** \addtogroup CMTool
12 
13  @{*/
14 #ifndef RECOTOOL_CBALGOPROHIBITBIGCLUSTERS_H
15 #define RECOTOOL_CBALGOPROHIBITBIGCLUSTERS_H
16 
19 
20 namespace cmtool {
21  /**
22  \class CBAlgoProhibitBigClusters
23  User implementation for CBoolAlgoBase class
24  doxygen documentation!
25  */
27 
28  public:
29 
30  /// Default constructor
32 
33  /// Default destructor
35 
36  //
37  // Author should be aware of 3 functions at least: Bool, Report, and Reset.
38  // More possibly-useful functions can be later part but commented out.
39  // All of these functions are virtual and defined in the base class.
40  //
41 
42  /**
43  Core function: given the CPAN input, return whether a cluster should be
44  merged or not.
45  */
46  virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1,
47  const ::cluster::ClusterParamsAlg &cluster2);
48 
49  /**
50  Optional function: called after each Merge() function call by CMergeManager IFF
51  CMergeManager is run with verbosity level kPerMerging. Maybe useful for debugging.
52  */
53  virtual void Report();
54 
55  /// Function to reset the algorithm instance ... maybe implemented via child class
56  virtual void Reset();
57 
58 
59 
60  /**
61  Optional function: called at the beginning of 1st iteration. This is called per event.
62  */
63  //virtual void EventBegin(const std::vector<cluster::ClusterParamsAlg> &clusters);
64 
65  /**
66  Optional function: called at the end of event ... after the last merging iteration is over.
67  */
68  //virtual void EventEnd();
69 
70  /**
71  Optional function: called at the beggining of each iteration over all pairs of clusters.
72  This provides all clusters' information in case the algorithm need them. Note this
73  is called per iteration which may be more than once per event.
74  */
75  //virtual void IterationBegin(const std::vector<cluster::ClusterParamsAlg> &clusters);
76 
77  /**
78  Optional function: called at the end of each iteration over all pairs of clusters.
79  */
80  //virtual void IterationEnd();
81 
82  void SetMinHits(size_t nhits) { _min_hits = nhits; }
83 
84  protected:
85 
86  size_t _min_hits;
87 
88  };
89 }
90 #endif
91 /** @} */ // end of doxygen group
Class def header for algorithm classes for CMergeManager.
virtual void Reset()
Function to reset the algorithm instance ... maybe implemented via child class.
virtual ~CBAlgoProhibitBigClusters()
Default destructor.
virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1, const ::cluster::ClusterParamsAlg &cluster2)