LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
VertexRefinementAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_VERTEX_REFINEMENT_ALGORITHM_H
9 #define LAR_VERTEX_REFINEMENT_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
13 namespace lar_content
14 {
15 
19 class VertexRefinementAlgorithm : public pandora::Algorithm
20 {
21 public:
26 
27 private:
28  pandora::StatusCode Run();
29 
38  void GetClusterLists(const pandora::StringVector &inputClusterListNames, pandora::ClusterList &clusterListU,
39  pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const;
40 
49  void RefineVertices(const pandora::VertexList *const pVertexList, const pandora::ClusterList &clusterListU,
50  const pandora::ClusterList &clusterListV, const pandora::ClusterList &clusterListW) const;
51 
60  pandora::CartesianVector RefineVertexTwoD(const pandora::ClusterList &clusterList, const pandora::CartesianVector &originalVtxPos) const;
61 
70  void GetBestFitPoint(const pandora::CartesianPointVector &intercepts, const pandora::CartesianPointVector &directions,
71  const pandora::FloatVector &weights, pandora::CartesianVector &bestFitPoint) const;
72 
73  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
74 
75  pandora::StringVector m_inputClusterListNames;
76  std::string m_inputVertexListName;
77  std::string m_outputVertexListName;
78 
80  float m_distanceCut;
81  unsigned int m_minimumHitsCut;
83 };
84 
85 } // namespace lar_content
86 
87 #endif // #ifndef LAR_VERTEX_REFINEMENT_ALGORITHM_H
float m_chiSquaredCut
The maximum chi2 value a refined vertex can have to be kept.
unsigned int m_minimumHitsCut
The minimum size of a cluster to be used in refinement.
pandora::CartesianVector RefineVertexTwoD(const pandora::ClusterList &clusterList, const pandora::CartesianVector &originalVtxPos) const
Refine the position of a two dimensional projection of a vertex using the clusters in that view...
std::string m_outputVertexListName
The refined vertex list to be outputted.
float m_twoDDistanceCut
The maximum distance a cluster can be from the original position to be used in refinement.
void GetClusterLists(const pandora::StringVector &inputClusterListNames, pandora::ClusterList &clusterListU, pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const
Get the input cluster lists.
void GetBestFitPoint(const pandora::CartesianPointVector &intercepts, const pandora::CartesianPointVector &directions, const pandora::FloatVector &weights, pandora::CartesianVector &bestFitPoint) const
Calculate the best fit point of a set of lines using a matrix equation.
float m_distanceCut
The maximum distance a refined vertex can be from the original position to be kept.
void RefineVertices(const pandora::VertexList *const pVertexList, const pandora::ClusterList &clusterListU, const pandora::ClusterList &clusterListV, const pandora::ClusterList &clusterListW) const
Perform the refinement proceduce on a list of vertices.
std::string m_inputVertexListName
The initial vertex list.
pandora::StringVector m_inputClusterListNames
The list of input cluster list names.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::list< Vertex > VertexList
Definition: DCEL.h:169