LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
CBAlgoCenterOfMassSmall.h
Go to the documentation of this file.
1 
14 #ifndef RECOTOOL_CBALGOCENTEROFMASSSMALL_H
15 #define RECOTOOL_CBALGOCENTEROFMASSSMALL_H
16 
19 
20 namespace cmtool {
29 
30  public:
33 
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 SetMaxDistance(double d) { _MaxDist = d; }
58 
61 
63  void UseCOMInPoly(bool on) { _COMinPolyAlg = on; }
64 
66  void UseCOMClose(bool on) { _COMsClose = 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 _maxHits;
84  double _MaxDist; //Max distance between COM and start-end line of cluster
85  double _MaxCOMDistSquared; //Max distance^2 between COMs in cm^2
86  double
89  bool _COMsClose;
91  };
92 }
93 
94 #endif
95  // end of doxygen group
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'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:235
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.