LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
AsymmetryFeatureBaseTool.h
Go to the documentation of this file.
1 
8 #ifndef LAR_ASYMMETRY_FEATURE_BASE_TOOL_H
9 #define LAR_ASYMMETRY_FEATURE_BASE_TOOL_H 1
10 
12 
13 namespace lar_content
14 {
15 
20 {
21 public:
26 
37  void Run(LArMvaHelper::MvaFeatureVector &featureVector, const VertexSelectionBaseAlgorithm *const pAlgorithm,
38  const pandora::Vertex *const pVertex, const VertexSelectionBaseAlgorithm::SlidingFitDataListMap &slidingFitDataListMap,
40  const VertexSelectionBaseAlgorithm::ShowerClusterListMap &showerClusterListMap, const float, float &);
41 
42 protected:
43  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
44 
54  virtual float GetAsymmetryForView(const pandora::CartesianVector &vertexPosition2D,
55  const VertexSelectionBaseAlgorithm::SlidingFitDataList &slidingFitDataList,
56  const VertexSelectionBaseAlgorithm::ShowerClusterList &showerClusterList) const = 0;
57 
66  const float weight, const pandora::CartesianVector &clusterDirection, pandora::CartesianVector &localWeightedDirectionSum) const;
67 
78  virtual float CalculateAsymmetry(const bool useEnergyMetrics, const pandora::CartesianVector &vertexPosition2D,
79  const pandora::ClusterVector &asymmetryClusters, const pandora::CartesianVector &localWeightedDirectionSum) const;
80 
82 };
83 
84 } // namespace lar_content
85 
86 #endif // #ifndef LAR_ASYMMETRY_FEATURE_BASE_TOOL_H
MvaTypes::MvaFeatureVector MvaFeatureVector
Definition: LArMvaHelper.h:75
virtual float CalculateAsymmetry(const bool useEnergyMetrics, const pandora::CartesianVector &vertexPosition2D, const pandora::ClusterVector &asymmetryClusters, const pandora::CartesianVector &localWeightedDirectionSum) const
Calculate the asymmetry feature.
virtual float GetAsymmetryForView(const pandora::CartesianVector &vertexPosition2D, const VertexSelectionBaseAlgorithm::SlidingFitDataList &slidingFitDataList, const VertexSelectionBaseAlgorithm::ShowerClusterList &showerClusterList) const =0
Get the asymmetry feature for a given view.
float m_maxAsymmetryDistance
The max distance between cluster (any hit) and vertex to calculate asymmetry score.
std::map< pandora::HitType, const ShowerClusterList > ShowerClusterListMap
Map of shower cluster lists for passing to tools.
std::map< pandora::HitType, const pandora::ClusterList & > ClusterListMap
Map array of cluster lists for passing to tools.
Header file for the vertex selection base algorithm class.
double weight
Definition: plottest35.C:25
AsymmetryFeatureBaseTool class.
void Run(LArMvaHelper::MvaFeatureVector &featureVector, const VertexSelectionBaseAlgorithm *const pAlgorithm, const pandora::Vertex *const pVertex, const VertexSelectionBaseAlgorithm::SlidingFitDataListMap &slidingFitDataListMap, const VertexSelectionBaseAlgorithm::ClusterListMap &, const VertexSelectionBaseAlgorithm::KDTreeMap &, const VertexSelectionBaseAlgorithm::ShowerClusterListMap &showerClusterListMap, const float, float &)
Run the tool.
std::map< pandora::HitType, const SlidingFitDataList > SlidingFitDataListMap
Map of sliding fit data lists for passing to tools.
void IncrementAsymmetryParameters(const float weight, const pandora::CartesianVector &clusterDirection, pandora::CartesianVector &localWeightedDirectionSum) const
Increment the asymmetry parameters.
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.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
MvaFeatureTool class template.
Definition: LArMvaHelper.h:33
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)