LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
CBAlgoCenterOfMass.h
Go to the documentation of this file.
1 
14 #ifndef RECOTOOL_CBALGOCENTEROFMASS_H
15 #define RECOTOOL_CBALGOCENTEROFMASS_H
16 
19 
20 namespace cmtool {
29 
30  public:
33 
35  virtual ~CBAlgoCenterOfMass(){};
36 
41  virtual bool Bool(const ::cluster::ClusterParamsAlg& cluster1,
42  const ::cluster::ClusterParamsAlg& cluster2);
43 
45  virtual void Reset() {}
46 
48  virtual void Report();
49 
51  void SetDebug(bool on) { _debug = on; }
52 
54  void SetMaxHitsSmallClus(size_t n) { _maxHits = n; }
55 
57  void SetMinHitsBigClus(size_t n) { _minHits = n; }
58 
60  void SetMaxDistance(double d) { _MaxDist = d; }
61 
63  void UseCOMInPoly(bool on) { _COMinPolyAlg = on; }
64 
66  void UseCOMInCone(bool on) { _COMinConeAlg = on; }
67 
69  void UseCOMNearClus(bool on) { _COMNearClus = on; }
70 
72  void SetLengthReach(double frac) { _lengthReach = frac; }
73 
74  double ShortestDistanceSquared(double point_x,
75  double point_y,
76  double start_x,
77  double start_y,
78  double end_x,
79  double end_y) const;
80 
81  protected:
82  bool _debug;
83  size_t _minHits;
84  size_t _maxHits;
85  double _MaxDist;
86  double
91  };
92 }
93 
94 #endif
95  // end of doxygen group
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:235
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'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.