LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Segmentation2D.h
Go to the documentation of this file.
1 
9 #ifndef Segmentation2D_h
10 #define Segmentation2D_h
11 
12 #include "SimpleClustering.h"
13 
14 namespace tss
15 {
16  class Segmentation2D;
17 }
18 
20 {
21 public:
22 
24  fRadiusMin(0.5), fRadiusMax(1.0),
25  fMaxLineDist(0.2),
27  fDenseMinN(5), fDenseMinH(100)
28  { reconfigure(p); }
29 
30  void reconfigure(const fhicl::ParameterSet& p);
31 
32  std::vector< tss::Cluster2D > run(tss::Cluster2D & inp) const;
33 
34  void splitHits(
35  const std::vector< tss::Cluster2D > & inp,
36  std::vector< const tss::Hit2D* > & trackHits,
37  std::vector< const tss::Hit2D* > & emHits) const;
38 
39  void splitHitsNaive(
40  const tss::Cluster2D & inp,
41  std::vector< const tss::Hit2D* > & trackHits,
42  std::vector< const tss::Hit2D* > & emHits) const;
43 
44  void splitHitsNaive(
45  const std::vector< tss::Cluster2D > & inp,
46  std::vector< const tss::Hit2D* > & trackHits,
47  std::vector< const tss::Hit2D* > & emHits) const;
48 
49  int mergeClusters(
50  std::vector< tss::Cluster2D > & group,
51  const std::vector< size_t > & idxs) const;
52 
53 private:
54 
55  void run(
56  tss::Cluster2D & inp,
57  std::vector< tss::Cluster2D > & result,
58  std::vector< TVector2 > & centers) const;
59 
60  tss::Cluster2D buildSegment(tss::Cluster2D & inp, TVector2 center, TVector2 end) const;
61  tss::Cluster2D selectRing(const tss::Cluster2D & inp, TVector2 center) const;
62 
63  void tagDenseEnds(std::vector< tss::Cluster2D > & group) const;
64  void mergeDenseParts(std::vector< tss::Cluster2D > & group) const;
65 
66  bool Cl2InsideCl1(tss::Cluster2D& cl1, tss::Cluster2D& cl2) const;
67 
69 
71  double fMaxLineDist;
72 
75 };
76 
77 #endif
78 
int mergeClusters(std::vector< tss::Cluster2D > &group, const std::vector< size_t > &idxs) const
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
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
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
void splitHits(const std::vector< tss::Cluster2D > &inp, std::vector< const tss::Hit2D * > &trackHits, std::vector< const tss::Hit2D * > &emHits) const