All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 namespace fhicl { class ParameterSet; }
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
bool getHitsAtEnd(reco::HitPairListPtr &hit3DList, reco::PrincipalComponents &seedPca) const
Separate function to find hits at the ends of the input hits.
geo::Geometry const * m_geometry
SeedFinderAlgBase class.
PrincipalComponentsAlg m_pcaAlg
bool findTrackSeeds(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, SeedHitPairListPairVec &seedHitMap) const override
Given the list of hits this will search for candidate Seed objects and return them.
This is intended to define an interface to all Seed finder algorithms employed by the 3D clustering...
std::list< const reco::ClusterHit3D * > HitPairListPtr
Definition: Cluster3D.h:334
The geometry of one entire detector, as served by art.
Definition: Geometry.h:181
This header file defines the interface to a principal components analysis designed to be used within ...
double m_minAllowedCosAng
The minimum cos(ang) between input and seed axes.
PCASeedFinderAlg(fhicl::ParameterSet const &pset)
Constructor.
std::vector< SeedHitPairListPair > SeedHitPairListPairVec
PCASeedFinderAlg class.
void LineFit2DHits(const reco::HitPairListPtr &hitList, double XOrigin, TVector3 &Pos, TVector3 &Dir, double &ChiDOF) const