IslandsTH2.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////
2 /// \brief Tool for finding and labeling "islands" around peaks in a Hough map
3 /// \authors messier@indiana.edu, mibaird@indiana.edu
4 /// \date Nov. 2011
5 /////////////////////////////////////////////////////////////////////////
6 #ifndef HOUGH_ISLANDSTH2_H
7 #define HOUGH_ISLANDSTH2_H
8 
9 #include "TH2S.h"
10 
11 namespace hough {
12  class IslandsTH2 : public TH2S {
13  public:
14  IslandsTH2(const char* n,
15  const char* t,
16  const TH2* h,
17  double q,
18  bool wrapx,
19  bool wrapy);
20  unsigned int Nislands() const { return fNislands; }
21  void LabelIslands(const TH2* h);
22  private:
23  void Mark(const TH2* h, int i, int j, int isl_indx, double th);
24  int Neighbor(int i, int d, int imx, bool wrap);
25  private:
26  double fPco; ///< Number of sigma above average peak height to use for peak threshold
27  bool fWrapX; ///< Wrap around the x boundaries?
28  bool fWrapY; ///< Wrap around the y boundaries?
29  int fNx; ///< Number of bins along x
30  int fNy; ///< Number of bins along y
31  unsigned int fNislands; ///< Number of islands found
32  };
33 }
34 
35 #endif
36 ////////////////////////////////////////////////////////////////////////
int Neighbor(int i, int d, int imx, bool wrap)
Definition: IslandsTH2.cxx:80
bool fWrapY
Wrap around the y boundaries?
Definition: IslandsTH2.h:28
Perform a "2 point" Hough transform on a collection of hits.
Definition: Hough2P.cxx:20
double fPco
Number of sigma above average peak height to use for peak threshold.
Definition: IslandsTH2.h:26
void Mark(const TH2 *h, int i, int j, int isl_indx, double th)
Definition: IslandsTH2.cxx:96
int fNx
Number of bins along x.
Definition: IslandsTH2.h:29
Float_t d
Definition: plot.C:236
const double j
Definition: BetheBloch.cxx:29
unsigned int fNislands
Number of islands found.
Definition: IslandsTH2.h:31
bool fWrapX
Wrap around the x boundaries?
Definition: IslandsTH2.h:27
void LabelIslands(const TH2 *h)
Definition: IslandsTH2.cxx:37
IslandsTH2(const char *n, const char *t, const TH2 *h, double q, bool wrapx, bool wrapy)
Definition: IslandsTH2.cxx:13
int fNy
Number of bins along y.
Definition: IslandsTH2.h:30
unsigned int Nislands() const
Definition: IslandsTH2.h:20