LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
LocalAsymmetryFeatureTool class. More...
#include "LocalAsymmetryFeatureTool.h"
Public Types | |
typedef std::vector< MvaFeatureTool< Ts... > * > | FeatureToolVector |
typedef std::map< std::string, MvaFeatureTool< Ts... > * > | FeatureToolMap |
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 &showerClusterListMap, const float, float &) |
Run the tool. More... | |
virtual void | Run (MvaTypes::MvaFeatureVector &featureVector, Ts...args)=0 |
Run the algorithm tool. More... | |
virtual void | Run (MvaTypes::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName, Ts...) |
Protected Member Functions | |
void | IncrementAsymmetryParameters (const float weight, const pandora::CartesianVector &clusterDirection, pandora::CartesianVector &localWeightedDirectionSum) const |
Increment the asymmetry parameters. More... | |
virtual float | CalculateAsymmetry (const bool useEnergyMetrics, const pandora::CartesianVector &vertexPosition2D, const pandora::ClusterVector &asymmetryClusters, const pandora::CartesianVector &localWeightedDirectionSum) const |
Calculate the asymmetry feature. More... | |
Protected Attributes | |
float | m_maxAsymmetryDistance |
The max distance between cluster (any hit) and vertex to calculate asymmetry score. More... | |
Private Member Functions | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) override |
float | GetAsymmetryForView (const pandora::CartesianVector &vertexPosition2D, const VertexSelectionBaseAlgorithm::SlidingFitDataList &slidingFitDataList, const VertexSelectionBaseAlgorithm::ShowerClusterList &) const override |
Get the local asymmetry feature in a given view. More... | |
bool | CheckAngle (const pandora::CartesianVector &weightedDirectionSum, const pandora::CartesianVector &clusterDirection) const |
Check whether a cluster's direction agrees with the current weighted direction. More... | |
Private Attributes | |
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 37 of file LArMvaHelper.h.
|
inherited |
Definition at line 36 of file LArMvaHelper.h.
lar_content::LocalAsymmetryFeatureTool::LocalAsymmetryFeatureTool | ( | ) |
Default constructor.
Definition at line 20 of file LocalAsymmetryFeatureTool.cc.
|
protectedvirtualinherited |
Calculate the asymmetry feature.
useEnergyMetrics | whether to use energy-based metrics instead of hit-counting-based metrics |
vertexPosition2D | the vertex position in this view |
asymmetryCluster | the vector of cluster objects to be used in the asymmetry calculation |
localWeightedDirectionSum | the local event axis |
Reimplemented in lar_content::EnergyDepositionAsymmetryFeatureTool.
Definition at line 70 of file AsymmetryFeatureBaseTool.cc.
References f, and lar_content::LArClusterHelper::SortHitsByPosition().
Referenced by GetAsymmetryForView(), lar_content::GlobalAsymmetryFeatureTool::GetAsymmetryForView(), and lar_content::ShowerAsymmetryFeatureTool::GetAsymmetryForView().
|
private |
Check whether a cluster's direction agrees with the current weighted direction.
weightedDirectionSum | the current weighted direction |
clusterDirection | the cluster's direction |
Definition at line 78 of file LocalAsymmetryFeatureTool.cc.
References m_minAsymmetryCosAngle.
Referenced by GetAsymmetryForView().
|
overrideprivatevirtual |
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 |
Implements lar_content::AsymmetryFeatureBaseTool.
Definition at line 29 of file LocalAsymmetryFeatureTool.cc.
References lar_content::AsymmetryFeatureBaseTool::CalculateAsymmetry(), CheckAngle(), f, lar_content::LArClusterHelper::GetClosestDistance(), lar_content::AsymmetryFeatureBaseTool::IncrementAsymmetryParameters(), lar_content::AsymmetryFeatureBaseTool::m_maxAsymmetryDistance, and m_maxAsymmetryNClusters.
|
protectedinherited |
Increment the asymmetry parameters.
weight | the weight to assign to this vector |
clusterDirection | the direction of the cluster |
localWeightedDirectionSum | the current energy-weighted local cluster direction vector |
Definition at line 53 of file AsymmetryFeatureBaseTool.cc.
Referenced by GetAsymmetryForView(), and lar_content::GlobalAsymmetryFeatureTool::GetAsymmetryForView().
|
overrideprivate |
Definition at line 89 of file LocalAsymmetryFeatureTool.cc.
References m_maxAsymmetryNClusters, m_minAsymmetryCosAngle, and lar_content::AsymmetryFeatureBaseTool::ReadSettings().
|
inherited |
Run the tool.
pAlgorithm | address of the calling algorithm |
pVertex | address of the vertex |
slidingFitDataListMap | map of the sliding fit data lists |
showerClusterListMap | map of the shower cluster lists |
Definition at line 26 of file AsymmetryFeatureBaseTool.cc.
References f, lar_content::AsymmetryFeatureBaseTool::GetAsymmetryForView(), 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 |
|
inlinevirtualinherited |
Definition at line 51 of file LArMvaHelper.h.
|
protectedinherited |
The max distance between cluster (any hit) and vertex to calculate asymmetry score.
Definition at line 81 of file AsymmetryFeatureBaseTool.h.
Referenced by GetAsymmetryForView(), lar_content::GlobalAsymmetryFeatureTool::GetAsymmetryForView(), and lar_content::AsymmetryFeatureBaseTool::ReadSettings().
|
private |
The max number of associated clusters to calculate the asymmetry.
Definition at line 52 of file LocalAsymmetryFeatureTool.h.
Referenced by GetAsymmetryForView(), and ReadSettings().
|
private |
The min opening angle cosine used to determine viability of asymmetry score.
Definition at line 51 of file LocalAsymmetryFeatureTool.h.
Referenced by CheckAngle(), and ReadSettings().