LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
AsymmetryFeatureBaseTool class. More...
#include "AsymmetryFeatureBaseTool.h"
Public Types | |
typedef std::vector< MvaFeatureTool< Ts... > * > | FeatureToolVector |
typedef std::map< std::string, MvaFeatureTool< Ts... > * > | FeatureToolMap |
Public Member Functions | |
AsymmetryFeatureBaseTool () | |
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 | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
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. More... | |
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... | |
AsymmetryFeatureBaseTool class.
Definition at line 19 of file AsymmetryFeatureBaseTool.h.
|
inherited |
Definition at line 37 of file LArMvaHelper.h.
|
inherited |
Definition at line 36 of file LArMvaHelper.h.
lar_content::AsymmetryFeatureBaseTool::AsymmetryFeatureBaseTool | ( | ) |
Default constructor.
Definition at line 19 of file AsymmetryFeatureBaseTool.cc.
|
protectedvirtual |
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 lar_content::LocalAsymmetryFeatureTool::GetAsymmetryForView(), lar_content::GlobalAsymmetryFeatureTool::GetAsymmetryForView(), and lar_content::ShowerAsymmetryFeatureTool::GetAsymmetryForView().
|
protectedpure virtual |
Get the asymmetry feature for a given view.
vertexPosition2D | the vertex position projected into this view |
slidingFitDataList | the list of sliding fit data objects for this view |
showerClusterList | the list of shower cluster objects for this view |
Implemented in lar_content::ShowerAsymmetryFeatureTool, lar_content::GlobalAsymmetryFeatureTool, and lar_content::LocalAsymmetryFeatureTool.
Referenced by Run().
|
protected |
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 lar_content::LocalAsymmetryFeatureTool::GetAsymmetryForView(), and lar_content::GlobalAsymmetryFeatureTool::GetAsymmetryForView().
|
protected |
Definition at line 118 of file AsymmetryFeatureBaseTool.cc.
References m_maxAsymmetryDistance.
Referenced by lar_content::GlobalAsymmetryFeatureTool::ReadSettings(), lar_content::LocalAsymmetryFeatureTool::ReadSettings(), and lar_content::ShowerAsymmetryFeatureTool::ReadSettings().
void lar_content::AsymmetryFeatureBaseTool::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.
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, 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.
|
protected |
The max distance between cluster (any hit) and vertex to calculate asymmetry score.
Definition at line 81 of file AsymmetryFeatureBaseTool.h.
Referenced by lar_content::LocalAsymmetryFeatureTool::GetAsymmetryForView(), lar_content::GlobalAsymmetryFeatureTool::GetAsymmetryForView(), and ReadSettings().