All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Segmentation2D.h
Go to the documentation of this file.
1 /**
2  * @file Segmentation2D.h
3  *
4  * @author D.Stefan and R.Sulej
5  *
6  * @brief Split into linear clusters.
7  */
8 
9 #ifndef Segmentation2D_h
10 #define Segmentation2D_h
11 
12 namespace fhicl { class ParameterSet; }
13 
15 
16 namespace tss
17 {
18  class Segmentation2D;
19 }
20 
22 {
23 public:
24 
25  Segmentation2D(const fhicl::ParameterSet& p) :
26  fRadiusMin(0.5), fRadiusMax(1.0),
27  fMaxLineDist(0.2),
29  fDenseMinN(5), fDenseMinH(100)
30  { reconfigure(p); }
31 
32  void reconfigure(const fhicl::ParameterSet& p);
33 
34  std::vector< tss::Cluster2D > run(tss::Cluster2D & inp) const;
35 
36  void splitHits(
37  const std::vector< tss::Cluster2D > & inp,
38  std::vector< const tss::Hit2D* > & trackHits,
39  std::vector< const tss::Hit2D* > & emHits) const;
40 
41  void splitHitsNaive(
42  const tss::Cluster2D & inp,
43  std::vector< const tss::Hit2D* > & trackHits,
44  std::vector< const tss::Hit2D* > & emHits) const;
45 
46  void splitHitsNaive(
47  const std::vector< tss::Cluster2D > & inp,
48  std::vector< const tss::Hit2D* > & trackHits,
49  std::vector< const tss::Hit2D* > & emHits) const;
50 
51  int mergeClusters(
52  std::vector< tss::Cluster2D > & group,
53  const std::vector< size_t > & idxs) const;
54 
55 private:
56 
57  void run(
58  tss::Cluster2D & inp,
59  std::vector< tss::Cluster2D > & result,
60  std::vector< TVector2 > & centers) const;
61 
62  tss::Cluster2D buildSegment(tss::Cluster2D & inp, TVector2 center, TVector2 end) const;
63  tss::Cluster2D selectRing(const tss::Cluster2D & inp, TVector2 center) const;
64 
65  void tagDenseEnds(std::vector< tss::Cluster2D > & group) const;
66  void mergeDenseParts(std::vector< tss::Cluster2D > & group) const;
67 
68  bool Cl2InsideCl1(tss::Cluster2D& cl1, tss::Cluster2D& cl2) const;
69 
71 
73  double fMaxLineDist;
74 
77 };
78 
79 #endif
int mergeClusters(std::vector< tss::Cluster2D > &group, const std::vector< size_t > &idxs) const
void mergeDenseParts(std::vector< tss::Cluster2D > &group) const
pdgs p
Definition: selectors.fcl:22
void splitHitsNaive(const tss::Cluster2D &inp, std::vector< const tss::Hit2D * > &trackHits, std::vector< const tss::Hit2D * > &emHits) const
tss::Cluster2D selectRing(const tss::Cluster2D &inp, TVector2 center) const
void reconfigure(const fhicl::ParameterSet &p)
bool Cl2InsideCl1(tss::Cluster2D &cl1, tss::Cluster2D &cl2) const
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
std::vector< tss::Cluster2D > run(tss::Cluster2D &inp) const
tss::Cluster2D buildSegment(tss::Cluster2D &inp, TVector2 center, TVector2 end) const
Segmentation2D(const fhicl::ParameterSet &p)
void tagDenseEnds(std::vector< tss::Cluster2D > &group) const
tss::SimpleClustering fSimpleClustering
void splitHits(const std::vector< tss::Cluster2D > &inp, std::vector< const tss::Hit2D * > &trackHits, std::vector< const tss::Hit2D * > &emHits) const