MvaVertexSelectionAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArVertex/MvaVertexSelectionAlgorithm.h
3  *
4  * @brief Header file for the mva vertex selection algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_MVA_VERTEX_SELECTION_ALGORITHM_H
9 #define LAR_MVA_VERTEX_SELECTION_ALGORITHM_H 1
10 
11 #include "Api/PandoraContentApi.h"
12 
16 
18 
20 
21 #include <random>
22 
23 namespace lar_content
24 {
25 
26 template <typename, unsigned int>
27 class KDTreeLinkerAlgo;
28 template <typename, unsigned int>
29 class KDTreeNodeInfoT;
30 
31 //------------------------------------------------------------------------------------------------------------------------------------------
32 
33 /**
34  * @brief MvaVertexSelectionAlgorithm class
35  */
36 template <typename T>
38 {
39 public:
40  /**
41  * @brief Default constructor
42  */
44 
45 protected:
46  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
47 
48 private:
49  /**
50  * @brief Get the vertex score list
51  *
52  * @param vertexVector the vector of vertices
53  * @param beamConstants the beam constants
54  * @param kdTreeU the hit kd tree for the U view
55  * @param kdTreeV the hit kd tree for the V view
56  * @param kdTreeW the hit kd tree for the W view
57  * @param vertexScoreList the vertex score list to fill
58  */
59  void GetVertexScoreList(const pandora::VertexVector &vertexVector, const BeamConstants &beamConstants, HitKDTree2D &kdTreeU,
60  HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW, VertexScoreList &vertexScoreList) const;
61 
62  /**
63  * @brief Used a binary classifier to compare a set of vertices and pick the best one
64  *
65  * @param vertexVector the vector of vertices
66  * @param vertexFeatureInfoMap the vertex feature info map
67  * @param eventFeatureList the event feature list
68  * @param kdTreeMap the map of 2D hit kd trees
69  * @param t the mva
70  * @param useRPhi whether to include the r/phi feature
71  *
72  * @return address of the best vertex
73  */
74  const pandora::Vertex *CompareVertices(const pandora::VertexVector &vertexVector, const VertexFeatureInfoMap &vertexFeatureInfoMap,
75  const LArMvaHelper::MvaFeatureVector &eventFeatureList, const KDTreeMap &kdTreeMap, const T &t, const bool useRPhi) const;
76 
77  std::string m_filePathEnvironmentVariable; ///< The environment variable providing a list of paths to mva files
78  std::string m_mvaFileName; ///< The mva file name
79  std::string m_regionMvaName; ///< The name of the region mva to find
80  std::string m_vertexMvaName; ///< The name of the vertex mva to find
81  T m_mvaRegion; ///< The region mva
82  T m_mvaVertex; ///< The vertex mva
83 };
84 
87 
88 } // namespace lar_content
89 
90 #endif // #ifndef LAR_MVA_VERTEX_SELECTION_ALGORITHM_H
MvaTypes::MvaFeatureVector MvaFeatureVector
Definition: LArMvaHelper.h:58
std::string string
Definition: nybbler.cc:12
std::string m_filePathEnvironmentVariable
The environment variable providing a list of paths to mva files.
MvaVertexSelectionAlgorithm< AdaBoostDecisionTree > BdtVertexSelectionAlgorithm
const pandora::Vertex * CompareVertices(const pandora::VertexVector &vertexVector, const VertexFeatureInfoMap &vertexFeatureInfoMap, const LArMvaHelper::MvaFeatureVector &eventFeatureList, const KDTreeMap &kdTreeMap, const T &t, const bool useRPhi) const
Used a binary classifier to compare a set of vertices and pick the best one.
Header file for the trained vertex selection algorithm class.
void GetVertexScoreList(const pandora::VertexVector &vertexVector, const BeamConstants &beamConstants, HitKDTree2D &kdTreeU, HitKDTree2D &kdTreeV, HitKDTree2D &kdTreeW, VertexScoreList &vertexScoreList) const
Get the vertex score list.
Header file for the lar adaptive boosted decision tree class.
Header file for the lar monte carlo particle helper helper class.
Header file for the lar support vector machine class.
Header file for the lar two dimensional sliding fit result class.
std::string m_regionMvaName
The name of the region mva to find.
MvaVertexSelectionAlgorithm< SupportVectorMachine > SvmVertexSelectionAlgorithm
std::string m_vertexMvaName
The name of the vertex mva to find.
std::vector< art::Ptr< recob::Vertex > > VertexVector
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
Definition: ModuleGraph.h:25
std::map< pandora::HitType, const std::reference_wrapper< HitKDTree2D > > KDTreeMap
Map array of hit kd trees for passing to tools.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::map< const pandora::Vertex *const, VertexFeatureInfo > VertexFeatureInfoMap