PCASeedFinderAlg.h
Go to the documentation of this file.
1 /**
2  * @file PCASeedFinderAlg.h
3  *
4  * @brief This is an algorithm for finding recob::Seed objects in 3D clusters
5  *
6  */
7 #ifndef PCASeedFinderAlg_h
8 #define PCASeedFinderAlg_h
9 
10 // Framework Includes
11 #include "fhiclcpp/fwd.h"
12 
13 // LArSoft includes
17 namespace geo {
18  class Geometry;
19 }
20 
21 // ROOT includes
22 class TVector3;
23 
24 //------------------------------------------------------------------------------------------------------------------------------------------
25 
26 namespace lar_cluster3d {
27 
28  /**
29  * @brief PCASeedFinderAlg class
30  */
31  class PCASeedFinderAlg final : public SeedFinderAlgBase {
32  public:
33  /**
34  * @brief Constructor
35  *
36  * @param pset
37  */
38  PCASeedFinderAlg(fhicl::ParameterSet const& pset);
39 
40  /**
41  * @brief Given the list of hits this will search for candidate Seed objects and return them
42  */
43  bool findTrackSeeds(reco::HitPairListPtr& hitPairListPtr,
44  reco::PrincipalComponents& inputPCA,
45  SeedHitPairListPairVec& seedHitMap) const override;
46 
47  private:
48  /**
49  * @brief Separate function to find hits at the ends of the input hits
50  */
51  bool getHitsAtEnd(reco::HitPairListPtr& hit3DList, reco::PrincipalComponents& seedPca) const;
52 
53  void LineFit2DHits(const reco::HitPairListPtr& hitList,
54  double XOrigin,
55  TVector3& Pos,
56  TVector3& Dir,
57  double& ChiDOF) const;
58 
59  geo::Geometry const* m_geometry; // pointer to the Geometry service
60 
61  double m_gapDistance; ///<
62  size_t m_numSeed2DHits; ///<
63  double m_minAllowedCosAng; ///< The minimum cos(ang) between input and seed axes
64 
65  PrincipalComponentsAlg m_pcaAlg; // For running Principal Components Analysis
66  };
67 
68 } // namespace lar_cluster3d
69 #endif
geo::Geometry const * m_geometry
std::list< const reco::ClusterHit3D * > HitPairListPtr
Definition: Cluster3D.h:335
The geometry of one entire detector, as served by art.
Definition: Geometry.h:196
std::vector< SeedHitPairListPair > SeedHitPairListPairVec
LArSoft geometry interface.
Definition: ChannelGeo.h:16