10 #include "Pandora/AlgorithmHeaders.h"
28 float showerAsymmetry(1.f);
36 float rL(0.f), rT(0.f);
39 CartesianVector showerDirection(0.f, 0.f, 0.f);
44 std::copy(showerCluster.GetClusters().begin(), showerCluster.GetClusters().end(), std::back_inserter(asymmetryClusters));
46 showerAsymmetry = this->
CalculateAsymmetry(
true, vertexPosition2D, asymmetryClusters, showerDirection);
52 return showerAsymmetry;
60 for (
const Cluster *
const pCluster : showerCluster.
GetClusters())
74 PANDORA_RETURN_RESULT_IF_AND_IF(
75 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"VertexClusterDistance",
m_vertexClusterDistance));
virtual float CalculateAsymmetry(const bool useEnergyMetrics, const pandora::CartesianVector &vertexPosition2D, const pandora::ClusterVector &asymmetryClusters, const pandora::CartesianVector &localWeightedDirectionSum) const
Calculate the asymmetry feature.
std::vector< ShowerCluster > ShowerClusterList
const pandora::ClusterList & GetClusters() const
Get the cluster list.
std::vector< SlidingFitData > SlidingFitDataList
Header file for the geometry helper class.
float m_vertexClusterDistance
The distance around the vertex to look for shower clusters.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle) override
Header file for the cluster helper class.
required by fuzzyCluster table::sbnd_g4_services gaushitTruthMatch pandora
AsymmetryFeatureBaseTool class.
pandora::StatusCode GetGlobalFitDirection(const float rL, pandora::CartesianVector &direction) const
Get global fit direction for a given longitudinal coordinate.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
bool ShouldUseShowerCluster(const pandora::CartesianVector &vertexPosition, const VertexSelectionBaseAlgorithm::ShowerCluster &showerCluster) const
Get whether we should use a given shower cluster for asymmetry calculation.
void GetLocalPosition(const pandora::CartesianVector &position, float &rL, float &rT) const
Get local sliding fit coordinates for a given global position.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float GetAsymmetryForView(const pandora::CartesianVector &vertexPosition2D, const VertexSelectionBaseAlgorithm::SlidingFitDataList &, const VertexSelectionBaseAlgorithm::ShowerClusterList &showerClusterList) const override
Get the shower asymmetry feature for a given view.
TwoDSlidingFitResult class.
static float GetClosestDistance(const pandora::ClusterList &clusterList1, const pandora::ClusterList &clusterList2)
Get closest distance between clusters in a pair of cluster lists.