CBAlgoAngleCompat.h
Go to the documentation of this file.
1 /**
2  * \file CBAlgoAngleCompat.h
3  *
4  * \ingroup CMTool
5  *
6  * \brief Class def header for a class CBAlgoAngleCompat
7  *
8  * @author davidkaleko
9  */
10 
11 /** \addtogroup CMTool
12 
13  @{*/
14 #ifndef RECOTOOL_CBALGOANGLECOMPAT_H
15 #define RECOTOOL_CBALGOANGLECOMPAT_H
16 
19 
20 class TH1F;
21 
22 namespace cmtool {
23  /**
24  \class CBAlgoAngleCompat
25  User defined class CBAlgoAngleCompat ... these comments are used to generate
26  doxygen documentation!
27  */
29 
30  public:
31 
32  /// Default constructor
34 
35  /// Default destructor
36  virtual ~CBAlgoAngleCompat(){};
37 
38  /// Overloaded (from CBoolAlgoBase) Bool function
39  virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1,
40  const ::cluster::ClusterParamsAlg &cluster2);
41 
42  /// Method to set debug mode
43  void SetDebug(bool on) { _debug = on; }
44 
45  /// Method to set whether you allow angles to match with +/- 180 deg difference
46  void SetAllow180Ambig(bool on) { _allow_180_ambig = on; }
47 
48  /// Method to set cut value in degrees for angle compatibility test
49  void SetAngleCut(double angle) { _max_allowed_2D_angle_diff = angle; }
50 
51  /// Method to set angle cut value to be based on opening angle
52  void SetUseOpeningAngle(bool on) { _use_opening_angle = on; }
53 
54  /// Set Minimum Number of Hits to consider Cluster
55  void SetMinHits(size_t n) { _minHits = n; }
56 
57  // TH1F* GetAngleDistHisto() const{ return angle_dist_histo; };
58 
59  protected:
60 
61  bool _debug; /// bool to suppress lots of output if you want
62 
63  ///bool to allow "backwards" clusters (swapped start/end points)
64  ///to still match in angle, even though they are 180 degrees apart
65  ///only valid for _use_opening_angle==false
67 
68  /// hard shower-axis angle cutoff (only valid for _use_opening_angle==false)
69  double _max_allowed_2D_angle_diff; //in degrees
70 
71  /// bool set to true if you want to use opening angle as the cutoff
72  /// angle instead of whatever you set with SetAngleCut
74 
75  size_t _minHits; /// Min Number of hits for cluster to be considered
76 
77  /// Histogram used for debugging/cut value settings
79 
80 
81  };
82 
83 } // end namespace cmtool
84 
85 #endif
86  /** @} */ // end of doxygen group
Class def header for algorithm classes for CMergeManager.
virtual bool Bool(const ::cluster::ClusterParamsAlg &cluster1, const ::cluster::ClusterParamsAlg &cluster2)
Overloaded (from CBoolAlgoBase) Bool function.
void SetDebug(bool on)
Method to set debug mode.
TH1F * angle_dist_histo
Min Number of hits for cluster to be considered.
void SetUseOpeningAngle(bool on)
Method to set angle cut value to be based on opening angle.
void SetAllow180Ambig(bool on)
Method to set whether you allow angles to match with +/- 180 deg difference.
void SetAngleCut(double angle)
Method to set cut value in degrees for angle compatibility test.
std::void_t< T > n
virtual ~CBAlgoAngleCompat()
Default destructor.
CBAlgoAngleCompat()
Default constructor.
bool _allow_180_ambig
bool to suppress lots of output if you want
double _max_allowed_2D_angle_diff
hard shower-axis angle cutoff (only valid for _use_opening_angle==false)
void SetMinHits(size_t n)
Set Minimum Number of Hits to consider Cluster.