Belle II Software  release-08-01-10
PeakFinder.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 //-----------------------------------------------------------------------------
10 // Description : A class to find peaks in Hough Plane
11 //-----------------------------------------------------------------------------
12 
13 #ifndef TRGCDCPeakFinder_FLAG_
14 #define TRGCDCPeakFinder_FLAG_
15 
16 #include <string>
17 #include <vector>
18 
19 #ifdef TRGCDC_SHORT_NAMES
20 #define TCPeakFinder TRGCDCPeakFinder
21 #endif
22 
23 namespace Belle2 {
29  class TRGCDCCircle;
30  class TRGCDCHoughPlaneMulti2;
31 
34 
35  public:
36 
38  explicit TRGCDCPeakFinder(const std::string& name);
39 
41  virtual ~TRGCDCPeakFinder();
42 
43  public:
44 
46  std::string name(void) const;
47 
49  std::string version(void) const;
50 
53  const unsigned threshold,
54  const bool centerIsPeak,
55  std::vector<unsigned>& peakSerialIds) const;
56 
58  void findPeaks(const TRGCDCHoughPlaneMulti2& hp,
59  const unsigned threshold,
60  std::vector<std::vector<unsigned>>& peaks) const;
61 
62  private:
63 
65  void regions(TRGCDCHoughPlane& hp, const unsigned threshold) const;
66 
68  void p1p2Methode(const TRGCDCHoughPlane& hp,
69  const unsigned threshold,
70  std::vector<std::vector<unsigned>>& peaks) const;
71 
72  private:
73 
75  const std::string _name;
76  };
77 
78 //-----------------------------------------------------------------------------
79 
80  inline
81  std::string
83  {
84  return _name;
85  }
86 
88 } // namespace Belle2
89 
90 #endif
A class to represent a Hough parameter plane.
A class to represent a Hough parameter plane.
Definition: HoughPlane.h:30
A class to find peaks in Hough Plane.
Definition: PeakFinder.h:33
const std::string _name
Name.
Definition: PeakFinder.h:75
void regions(TRGCDCHoughPlane &hp, const unsigned threshold) const
Makes regions.
Definition: PeakFinder.cc:53
virtual ~TRGCDCPeakFinder()
Destructor.
Definition: PeakFinder.cc:48
TRGCDCPeakFinder(const std::string &name)
Contructor.
Definition: PeakFinder.cc:43
void findPeaksTrasan(TRGCDCHoughPlaneMulti2 &hp, const unsigned threshold, const bool centerIsPeak, std::vector< unsigned > &peakSerialIds) const
do peak finding. This is a copy from "trasan".
Definition: PeakFinder.cc:359
std::string name(void) const
returns name.
Definition: PeakFinder.h:82
void findPeaks(const TRGCDCHoughPlaneMulti2 &hp, const unsigned threshold, std::vector< std::vector< unsigned >> &peaks) const
do peak finding. Kaiyu's version using p1p2Methode.
Definition: PeakFinder.cc:477
std::string version(void) const
returns version.
Definition: PeakFinder.cc:38
void p1p2Methode(const TRGCDCHoughPlane &hp, const unsigned threshold, std::vector< std::vector< unsigned >> &peaks) const
Kaiyu's logic. Finds peaks from nested patterns.
Definition: PeakFinder.cc:498
Abstract base class for different kinds of events.