LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
CBAlgoCenterOfMassSmall.h
Go to the documentation of this file.
1 
14 #ifndef RECOTOOL_CBALGOCENTEROFMASSSMALL_H
15 #define RECOTOOL_CBALGOCENTEROFMASSSMALL_H
16 
17 #include <iostream>
19 #include <math.h>
20 
21 namespace cmtool {
30 
31  public:
32 
35 
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 SetMaxDistance(double d) { _MaxDist = d; }
60 
63 
65  void UseCOMInPoly(bool on) { _COMinPolyAlg = on; }
66 
68  void UseCOMClose(bool on) { _COMsClose = 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 _maxHits;
85  double _MaxDist; //Max distance between COM and start-end line of cluster
86  double _MaxCOMDistSquared; //Max distance^2 between COMs in cm^2
87  double _lengthReach;
89  bool _COMsClose;
91  };
92 }
93 
94 #endif
95  // end of doxygen group
96 
Class def header for algorithm classes for CMergeManager.
bool _COMinPolyAlg
How four out - as percent of cluster length - cone will extend from start point.
virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1, const ::cluster::ClusterParamsAlg &cluster2)
void SetMaxCOMDistance(double d)
Function to set Max Distance between COMs.
virtual void Report()
Function to report what&#39;s going on per merging iteration.
virtual void Reset()
Function to reset the algorithm instance ... maybe implemented via child class.
double ShortestDistanceSquared(double point_x, double point_y, double start_x, double start_y, double end_x, double end_y) const
void UseCOMClose(bool on)
Use COM in Poly algo to decide merging.
Float_t d
Definition: plot.C:237
CBAlgoCenterOfMassSmall()
Default constructor.
void SetMaxDistance(double d)
Function to set Max Distance for COM to be from start-end.
void UseCOMInPoly(bool on)
Use COM in Poly algo to decide merging.
void SetDebug(bool on)
Function to set Debug mode of output.
void UseCOMNearClus(bool on)
Use COM in Poly algo to decide merging.
Char_t n[5]
void SetMaxHitsSmallClus(size_t n)
Function to set Max hits for small clsuters.
void SetLengthReach(double frac)
Set Length Reach: How for out the cone extends as percent of cluster length.
virtual ~CBAlgoCenterOfMassSmall()
Default destructor.