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 #include "fhiclcpp/fwd.h"
13 
14 #include "SimpleClustering.h"
15 
16 namespace tss
17 {
18  class Segmentation2D;
19 }
20 
22 {
23 public:
24 
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
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
int mergeClusters(std::vector< tss::Cluster2D > &group, const std::vector< size_t > &idxs) const
static QCString result
Trivial, collect hits "touching" each other (next wire or consecutive ticks), plus Cluster2D class to...
void mergeDenseParts(std::vector< tss::Cluster2D > &group) const
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
p
Definition: test.py:223
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
def center(depos, point)
Definition: depos.py:117
tss::SimpleClustering fSimpleClustering
void splitHits(const std::vector< tss::Cluster2D > &inp, std::vector< const tss::Hit2D * > &trackHits, std::vector< const tss::Hit2D * > &emHits) const