LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
CBAlgoShortestDist.h
Go to the documentation of this file.
1 
14 #ifndef RECOTOOL_CBALGOSHORTESTDIST_H
15 #define RECOTOOL_CBALGOSHORTESTDIST_H
16 
17 #include <iostream>
19 //#include "Utilities/GeometryUtilities.h"
21 
22 namespace cmtool {
29 
30  public:
31 
34 
36  virtual ~CBAlgoShortestDist(){};
37 
39  virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1,
40  const ::cluster::ClusterParamsAlg &cluster2);
41 
42 
44  void SetSquaredDistanceCut(double d) { _max_2D_dist2 = d; }
45 
47  void SetDebug(bool on) { _debug = on; }
48 
50  void SetMinHits(size_t n) { _minHits = n; }
51 
56  double ShortestDistanceSquared(double point_x, double point_y,
57  double start_x, double start_y,
58  double end_x, double end_y ) const;
59 
60 
61 
62  protected:
63 
64  bool _debug;
65 
66  size_t _minHits;
67 
69 
71 
72  double _max_2D_dist2;
73 
74  };
75 
76 
77 } //end namespace cmtool
78 
79 #endif
80  // end of doxygen group
81 
Class def header for algorithm classes for CMergeManager.
void SetDebug(bool on)
Method to set debug mode.
double ShortestDistanceSquared(double point_x, double point_y, double start_x, double start_y, double end_x, double end_y) const
void SetSquaredDistanceCut(double d)
Method to set cut value in cm^2 for distance compatibility test.
CBAlgoShortestDist()
Default constructor.
double _wire_2_cm
Min Number of hits for cluster to be considered.
virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1, const ::cluster::ClusterParamsAlg &cluster2)
Overloaded (from CBoolAlgoBase) Bool function.
virtual ~CBAlgoShortestDist()
Default destructor.
Float_t d
Definition: plot.C:237
double _min_distance_unit
Conversion factors ogtten from GeometryUtilities.
void SetMinHits(size_t n)
Set Minimum Number of Hits to consider Cluster.
double _max_2D_dist2
minimum distance b/t start and end point of cluster to use it
Char_t n[5]
size_t _minHits
bool to suppress lots of output if you want