PrincipalComponentsAlg.h
Go to the documentation of this file.
1 /**
2  * @file PrincipalComponentsAlg.h
3  *
4  * @brief This header file defines the interface to a principal components analysis designed to
5  * be used within the 3D clustering
6  *
7  */
8 #ifndef PrincipalComponentsAlg_h
9 #define PrincipalComponentsAlg_h
10 
11 // Framework Includes
12 #include "fhiclcpp/fwd.h"
13 
14 // LArSoft includes
15 namespace detinfo {
16  class DetectorPropertiesData;
17 }
18 namespace geo {
19  class Geometry;
20 }
21 
22 // Algorithm includes
24 
25 // Eigen
26 #include <Eigen/Core>
27 
28 namespace lar_cluster3d {
29 
30  /**
31  * @brief Cluster3D class
32  */
33  class PrincipalComponentsAlg {
34  public:
35  /**
36  * @brief Constructor
37  *
38  * @param pset
39  */
40  PrincipalComponentsAlg(fhicl::ParameterSet const& pset);
41 
42  /**
43  * @brief Run the Principal Components Analysis
44  */
45  void PCAAnalysis(const detinfo::DetectorPropertiesData& detProp,
46  const reco::HitPairListPtr& hitPairVector,
48  float doca3DScl = 3.) const;
49 
50  void PCAAnalysis_3D(const reco::HitPairListPtr& hitPairList,
52  bool skeletonOnly = false) const;
53 
54  void PCAAnalysis_2D(const detinfo::DetectorPropertiesData& detProp,
55  const reco::HitPairListPtr& hitPairVector,
57  bool updateAvePos = false) const;
58 
59  void PCAAnalysis_calc3DDocas(const reco::HitPairListPtr& hitPairVector,
60  const reco::PrincipalComponents& pca) const;
61 
62  void PCAAnalysis_calc2DDocas(const reco::Hit2DListPtr& hit2DVector,
63  const reco::PrincipalComponents& pca) const;
64 
65  int PCAAnalysis_reject2DOutliers(const reco::HitPairListPtr& hitPairVector,
67  float aveHitDoca) const;
68 
69  int PCAAnalysis_reject3DOutliers(const reco::HitPairListPtr& hitPairVector,
70  const reco::PrincipalComponents& pca,
71  float aveHitDoca) const;
72 
73  private:
74  float m_parallel; ///< means lines are parallel
75  const geo::Geometry* m_geometry; // pointer to the Geometry service
76  };
77 
78 } // namespace lar_cluster3d
79 #endif
float m_parallel
means lines are parallel
std::list< const reco::ClusterHit2D * > Hit2DListPtr
export some data structure definitions
Definition: Cluster3D.h:334
std::list< const reco::ClusterHit3D * > HitPairListPtr
Definition: Cluster3D.h:335
General LArSoft Utilities.
The geometry of one entire detector, as served by art.
Definition: Geometry.h:196
LArSoft geometry interface.
Definition: ChannelGeo.h:16