LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
LocalAsymmetryFeatureTool class. More...
#include "LocalAsymmetryFeatureTool.h"
Public Types | |
typedef std::vector< MvaFeatureTool< Ts... > * > | FeatureToolVector |
Public Member Functions | |
LocalAsymmetryFeatureTool () | |
Default constructor. More... | |
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 &, const float, float &) |
Run the tool. More... | |
virtual void | Run (MvaTypes::MvaFeatureVector &featureVector, Ts...args)=0 |
Run the algorithm tool. More... | |
Private Member Functions | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
float | GetLocalAsymmetryForView (const pandora::CartesianVector &vertexPosition2D, const VertexSelectionBaseAlgorithm::SlidingFitDataList &slidingFitDataList) const |
Get the local asymmetry feature in a given view. More... | |
bool | IncrementAsymmetryParameters (const float weight, const pandora::CartesianVector &clusterDirection, pandora::CartesianVector &localWeightedDirectionSum) const |
Increment the asymmetry parameters. More... | |
float | CalculateLocalAsymmetry (const bool useEnergyMetrics, const pandora::CartesianVector &vertexPosition2D, const pandora::ClusterVector &asymmetryClusters, const pandora::CartesianVector &localWeightedDirectionSum) const |
Calculate the local asymmetry feature. More... | |
Private Attributes | |
float | m_maxAsymmetryDistance |
The max distance between cluster (any hit) and vertex to calculate asymmetry score. More... | |
float | m_minAsymmetryCosAngle |
The min opening angle cosine used to determine viability of asymmetry score. More... | |
unsigned int | m_maxAsymmetryNClusters |
The max number of associated clusters to calculate the asymmetry. More... | |
LocalAsymmetryFeatureTool class.
Definition at line 19 of file LocalAsymmetryFeatureTool.h.
|
inherited |
Definition at line 30 of file LArMvaHelper.h.
lar_content::LocalAsymmetryFeatureTool::LocalAsymmetryFeatureTool | ( | ) |
Default constructor.
Definition at line 21 of file LocalAsymmetryFeatureTool.cc.
|
private |
Calculate the local asymmetry feature.
useEnergyMetrics | whether to use energy-based rather than hit-counting-based metrics |
vertexPosition2D | the vertex position |
asymmetryClusters | the clusters to use to calculate the asymmetry |
localWeightedDirectionSum | the local event axis |
Definition at line 120 of file LocalAsymmetryFeatureTool.cc.
References f, m_maxAsymmetryNClusters, and lar_content::LArClusterHelper::SortHitsByPosition().
Referenced by GetLocalAsymmetryForView().
|
private |
Get the local asymmetry feature in a given view.
vertexPosition2D | the vertex position projected into this view |
slidingFitDataList | the list of sliding fit data objects in this view |
Definition at line 53 of file LocalAsymmetryFeatureTool.cc.
References CalculateLocalAsymmetry(), f, lar_content::LArClusterHelper::GetClosestDistance(), IncrementAsymmetryParameters(), and m_maxAsymmetryDistance.
Referenced by Run().
|
private |
Increment the asymmetry parameters.
weight | the weight for the increment |
clusterDirection | the cluster direction |
localWeightedDirectionSum | the current value of the vector |
Definition at line 94 of file LocalAsymmetryFeatureTool.cc.
References f, m_minAsymmetryCosAngle, and weight.
Referenced by GetLocalAsymmetryForView().
|
private |
Definition at line 172 of file LocalAsymmetryFeatureTool.cc.
References m_maxAsymmetryDistance, m_maxAsymmetryNClusters, and m_minAsymmetryCosAngle.
void lar_content::LocalAsymmetryFeatureTool::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 & | , | ||
const float | , | ||
float & | |||
) |
Run the tool.
pAlgorithm | address of the calling algorithm |
pVertex | address of the vertex |
slidingFitDataListMap | map of the sliding fit data lists |
Definition at line 30 of file LocalAsymmetryFeatureTool.cc.
References f, GetLocalAsymmetryForView(), and lar_content::LArGeometryHelper::ProjectPosition().
|
pure virtualinherited |
Run the algorithm tool.
featureVector | the vector of features to append |
args | arguments to pass to the tool |
|
private |
The max distance between cluster (any hit) and vertex to calculate asymmetry score.
Definition at line 78 of file LocalAsymmetryFeatureTool.h.
Referenced by GetLocalAsymmetryForView(), and ReadSettings().
|
private |
The max number of associated clusters to calculate the asymmetry.
Definition at line 80 of file LocalAsymmetryFeatureTool.h.
Referenced by CalculateLocalAsymmetry(), and ReadSettings().
|
private |
The min opening angle cosine used to determine viability of asymmetry score.
Definition at line 79 of file LocalAsymmetryFeatureTool.h.
Referenced by IncrementAsymmetryParameters(), and ReadSettings().