LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
HoughSeedFinderAlg.h
Go to the documentation of this file.
1 
7 #ifndef HoughSeedFinderAlg_h
8 #define HoughSeedFinderAlg_h
9 
10 // Framework includes
11 namespace fhicl {
12  class ParameterSet;
13 }
14 
15 // LArSoft includes
19 namespace geo {
20  class Geometry;
21 }
22 
23 // ROOT includes
24 #include "TCanvas.h"
25 class TFrame;
26 class TVector3;
27 class TVirtualPad;
28 
29 //------------------------------------------------------------------------------------------------------------------------------------------
30 
31 namespace lar_cluster3d {
32 
37  public:
44 
48  bool findTrackSeeds(reco::HitPairListPtr& hitPairListPtr,
49  reco::PrincipalComponents& inputPCA,
50  SeedHitPairListPairVec& seedHitPairVec) const override;
51 
55  bool findTrackHits(reco::HitPairListPtr& hitPairListPtr,
56  reco::PrincipalComponents& inputPCA,
57  reco::HitPairListPtrList& hitPairListPtrList) const;
58 
59  private:
67  void findHitGaps(reco::HitPairListPtr& inputHitList, reco::HitPairListPtr& outputList) const;
68 
73  class AccumulatorBin;
76 
77  // Basic structure for holding our accumlator bins (to avoid a full array)
78  // structure will be rho bin for first key, theta bin for second key
79  typedef std::pair<int, int> BinIndex;
80  typedef std::map<BinIndex, AccumulatorBin> RhoThetaAccumulatorBinMap;
81  typedef std::list<BinIndex> HoughCluster;
82  typedef std::list<HoughCluster> HoughClusterList;
83 
84  void HoughRegionQuery(BinIndex& curBin,
85  RhoThetaAccumulatorBinMap& rhoThetaAccumulatorBinMap,
86  HoughCluster& neighborPts,
87  size_t threshold) const;
88 
89  void expandHoughCluster(BinIndex& curBin,
90  HoughCluster& neighborPts,
91  HoughCluster& houghCluster,
92  RhoThetaAccumulatorBinMap& rhoThetaAccumulatorBinMap,
93  size_t threshold) const;
94 
95  void findHoughClusters(const reco::HitPairListPtr& inputHits,
97  RhoThetaAccumulatorBinMap& rhoThetaMap,
98  HoughClusterList& clusterList) const;
99 
103  bool buildSeed(reco::HitPairListPtr& seed3DHits, SeedHitPairListPair& seedHitPair) const;
104 
105  void LineFit2DHits(std::set<const reco::ClusterHit2D*>& hitList,
106  double XOrigin,
107  TVector3& Pos,
108  TVector3& Dir,
109  double& ChiDOF) const;
110 
113  int m_rhoBins;
118  double m_numAveDocas;
121  double m_maximumGap;
122 
123  geo::Geometry const* m_geometry; // pointer to the Geometry service
124  PrincipalComponentsAlg m_pcaAlg; // For running Principal Components Analysis
125 
127  mutable std::vector<std::unique_ptr<TCanvas>> m_Canvases;
128  mutable std::vector<TVirtualPad*> m_Pads;
129  };
130 
131 } // namespace lar_cluster3d
132 #endif
std::vector< TVirtualPad * > m_Pads
View pads in current canvas.
SeedFinderAlgBase class.
HoughSeedFinderAlg class.
std::list< HitPairListPtr > HitPairListPtrList
Definition: Cluster3D.h:328
This is intended to define an interface to all Seed finder algorithms employed by the 3D clustering...
parameter set interface
std::list< HoughCluster > HoughClusterList
std::list< const reco::ClusterHit3D * > HitPairListPtr
Definition: Cluster3D.h:326
The geometry of one entire detector, as served by art.
Definition: Geometry.h:181
std::map< BinIndex, AccumulatorBin > RhoThetaAccumulatorBinMap
This header file defines the interface to a principal components analysis designed to be used within ...
std::vector< SeedHitPairListPair > SeedHitPairListPairVec
std::pair< recob::Seed, reco::HitPairListPtr > SeedHitPairListPair
std::vector< std::unique_ptr< TCanvas > > m_Canvases
Graphical trace canvases.
Namespace collecting geometry-related classes utilities.