LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
CBAlgoCenterOfMass.h
Go to the documentation of this file.
1 
14 #ifndef RECOTOOL_CBALGOCENTEROFMASS_H
15 #define RECOTOOL_CBALGOCENTEROFMASS_H
16 
17 #include <iostream>
19 #include <math.h>
20 
21 namespace cmtool {
30 
31  public:
32 
35 
37  virtual ~CBAlgoCenterOfMass(){};
38 
43  virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1,
44  const ::cluster::ClusterParamsAlg &cluster2);
45 
47  virtual void Reset(){}
48 
50  virtual void Report();
51 
53  void SetDebug(bool on) { _debug = on; }
54 
56  void SetMaxHitsSmallClus(size_t n) { _maxHits = n; }
57 
59  void SetMinHitsBigClus(size_t n) { _minHits = n; }
60 
62  void SetMaxDistance(double d) { _MaxDist = d; }
63 
65  void UseCOMInPoly(bool on) { _COMinPolyAlg = on; }
66 
68  void UseCOMInCone(bool on) { _COMinConeAlg = on; }
69 
71  void UseCOMNearClus(bool on) { _COMNearClus = on; }
72 
74  void SetLengthReach(double frac){ _lengthReach = frac; }
75 
76  double ShortestDistanceSquared(double point_x, double point_y,
77  double start_x, double start_y,
78  double end_x, double end_y ) const;
79 
80 
81  protected:
82 
83  bool _debug;
84  size_t _minHits;
85  size_t _maxHits;
86  double _MaxDist;
87  double _lengthReach;
91  };
92 }
93 
94 #endif
95  // end of doxygen group
96 
Class def header for algorithm classes for CMergeManager.
virtual ~CBAlgoCenterOfMass()
Default destructor.
void SetLengthReach(double frac)
Set Length Reach: How for out the cone extends as percent of cluster length.
void SetMaxDistance(double d)
Function to set Max Distance for COM to be from start-end.
void UseCOMInCone(bool on)
Use COM in Poly algo to decide merging.
void UseCOMNearClus(bool on)
Use COM in Poly algo to decide merging.
void UseCOMInPoly(bool on)
Use COM in Poly algo to decide merging.
CBAlgoCenterOfMass()
Default constructor.
void SetDebug(bool on)
Function to set Debug mode of output.
Float_t d
Definition: plot.C:237
virtual void Reset()
Function to reset the algorithm instance ... maybe implemented via child class.
void SetMaxHitsSmallClus(size_t n)
Function to set Max hits for small clsuters.
virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1, const ::cluster::ClusterParamsAlg &cluster2)
Char_t n[5]
double ShortestDistanceSquared(double point_x, double point_y, double start_x, double start_y, double end_x, double end_y) const
virtual void Report()
Function to report what&#39;s going on per merging iteration.
void SetMinHitsBigClus(size_t n)
Function to se Min hits for big clusters.
bool _COMinPolyAlg
How four out - as percent of cluster length - cone will extend from start point.