VertexRefinementAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArVertex/VertexRefinementAlgorithm.h
3  *
4  * @brief Header file for the vertex refinement algorithm class.
5  *
6  * $Log: $
7  */
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 
16 /**
17  * @brief VertexRefinementAlgorithm class
18  */
19 class VertexRefinementAlgorithm : public pandora::Algorithm
20 {
21 public:
22  /**
23  * @brief Default constructor
24  */
26 
27 private:
28  pandora::StatusCode Run();
29 
30  /**
31  * @brief Get the input cluster lists
32  *
33  * @param inputClusterListNames the input cluster list names
34  * @param clusterListU the U-view cluster list to populate
35  * @param clusterListV the V-view cluster list to populate
36  * @param clusterListW the W-view cluster list to populate
37  */
38  void GetClusterLists(const pandora::StringVector &inputClusterListNames, pandora::ClusterList &clusterListU,
39  pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const;
40 
41  /**
42  * @brief Perform the refinement proceduce on a list of vertices
43  *
44  * @param pVertexList address of the vertex list
45  * @param clusterListU the list of U-view clusters
46  * @param clusterListV the list of V-view clusters
47  * @param clusterListW the list of W-view clusters
48  */
49  void RefineVertices(const pandora::VertexList *const pVertexList, const pandora::ClusterList &clusterListU,
50  const pandora::ClusterList &clusterListV, const pandora::ClusterList &clusterListW) const;
51 
52  /**
53  * @brief Refine the position of a two dimensional projection of a vertex using the clusters in that view
54  *
55  * @param clusterList the list of two dimensional clusters
56  * @param originalVtxPos the original vertex position projected into two dimensions
57  *
58  * @return the new refined position
59  */
60  pandora::CartesianVector RefineVertexTwoD(const pandora::ClusterList &clusterList, const pandora::CartesianVector &originalVtxPos) const;
61 
62  /**
63  * @brief Calculate the best fit point of a set of lines using a matrix equation
64  *
65  * @param intercepts the vector of the defining points of the lines
66  * @param directions the vector of line directions
67  * @param weights the vector of weights for each line
68  * @param bestFitPoint the resulting best fit point
69  */
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; ///< The list of input cluster list names
76  std::string m_inputVertexListName; ///< The initial vertex list
77  std::string m_outputVertexListName; ///< The refined vertex list to be outputted
78 
79  float m_chiSquaredCut; ///< The maximum chi2 value a refined vertex can have to be kept
80  float m_distanceCut; ///< The maximum distance a refined vertex can be from the original position to be kept
81  unsigned int m_minimumHitsCut; ///< The minimum size of a cluster to be used in refinement
82  float m_twoDDistanceCut; ///< The maximum distance a cluster can be from the original position to be used in refinement
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.
std::string string
Definition: nybbler.cc:12
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.
std::vector< string > StringVector
Definition: fcldump.cxx:29
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Dft::FloatVector FloatVector
std::list< Vertex > VertexList
Definition: DCEL.h:182