8#ifndef LAR_VERTEX_BASED_PFO_MOP_UP_ALGORITHM_H
9#define LAR_VERTEX_BASED_PFO_MOP_UP_ALGORITHM_H 1
13#include <unordered_map>
50 const float boundedFraction,
const bool isConsistentDirection);
203 const float coneAngleCentile,
const float maxConeCosHalfAngle);
380 return m_pDaughterCluster;
387 return m_boundedFraction;
394 return m_isConsistentDirection;
409 return m_pDaughterPfo;
416 return m_clusterAssociationU;
423 return m_clusterAssociationV;
430 return m_clusterAssociationW;
Header file for the pfo mop up algorithm base class.
LArPointingCluster class.
PfoMopUpBaseAlgorithm class.
ClusterAssociation class.
const pandora::Cluster * m_pVertexCluster
The address of the vertex cluster.
const pandora::Cluster * m_pDaughterCluster
The address of the daughter cluster.
float m_boundedFraction
The fraction of daughter hits bounded by the cone defined by the vertex cluster.
const pandora::Cluster * GetDaughterCluster() const
Get the address of the daughter cluster.
const pandora::Cluster * GetVertexCluster() const
Get the address of the vertex cluster.
bool IsConsistentDirection() const
Whether the vertex and daughter clusters have consistent directions.
float GetBoundedFraction() const
Get the fraction of daughter hits bounded by the cone defined by the vertex cluster.
bool m_isConsistentDirection
Whether the vertex and daughter clusters have consistent directions.
ClusterAssociation()
Default constructor.
float GetBoundedFraction(const pandora::Cluster *const pDaughterCluster, const float coneLengthMultiplier) const
Get the fraction of hits in a candidate daughter cluster bounded by the cone.
pandora::CartesianVector m_apex
The cone apex.
float GetSignedConeLength() const
Get the cone length (signed, by projections of hits onto initial direction estimate)
const pandora::Cluster * m_pCluster
The parent cluster.
float GetCosHalfAngleEstimate(const float coneAngleCentile) const
Get the cone cos half angle estimate.
float m_coneLength
The cone length.
pandora::CartesianVector m_direction
The cone direction.
pandora::CartesianVector GetDirectionEstimate() const
Get the cone direction estimate, with apex fixed at the 2d vertex position.
float m_coneCosHalfAngle
The cone cos half angle.
const pandora::Pfo * m_pVertexPfo
The address of the vertex-associated pfo.
ClusterAssociation m_clusterAssociationU
The cluster association in the u view.
const ClusterAssociation & GetClusterAssociationU() const
Get the cluster association in the u view.
ClusterAssociation m_clusterAssociationW
The cluster association in the w view.
const pandora::Pfo * GetVertexPfo() const
Get the address of the vertex-associated pfo.
unsigned int GetNConsistentDirections() const
Get the number of views for which the vertex and daughter cluster directions are consistent.
const pandora::Pfo * GetDaughterPfo() const
Get the address of the non-vertex-associated candidate daughter pfo.
float GetMeanBoundedFraction() const
Get the mean bounded fraction, averaging over the u, v and w views.
bool operator<(const PfoAssociation &rhs) const
operator<
const ClusterAssociation & GetClusterAssociationW() const
Get the cluster association in the w view.
ClusterAssociation m_clusterAssociationV
The cluster association in the v view.
float GetMinBoundedFraction() const
Get the minimum bounded fraction from the u, v and w views.
const pandora::Pfo * m_pDaughterPfo
The address of the non-vertex-associated candidate daughter pfo.
float GetMaxBoundedFraction() const
Get the maximum bounded fraction from the u, v and w views.
const ClusterAssociation & GetClusterAssociationV() const
Get the cluster association in the v view.
VertexBasedPfoMopUpAlgorithm class.
void GetPfoAssociations(const pandora::Vertex *const pVertex, const pandora::PfoList &vertexPfos, const pandora::PfoList &nonVertexPfos, PfoAssociationList &pfoAssociationList) const
Get the list of associations between vertex-associated pfos and non-vertex-associated pfos.
std::map< pandora::HitType, ClusterAssociation > HitTypeToAssociationMap
std::set< pandora::HitType > HitTypeSet
ClusterAssociation GetClusterAssociation(const pandora::Vertex *const pVertex, const pandora::Cluster *const pVertexCluster, const pandora::Cluster *const pDaughterCluster) const
Get cluster association details between a vertex-associated cluster and a non-vertex associated daugh...
float m_maxBoundedFractionCut
Cut on association info (max bounded fraction) for determining pfo merges.
float m_directionApexShift
Direction determination, look for vertex inside triangle with apex shifted along the cluster length.
virtual bool IsVertexAssociated(const pandora::CartesianVector &vertex2D, const LArPointingCluster &pointingCluster) const
Whether a specified pfo is associated with a specified vertex.
virtual PfoAssociation GetPfoAssociation(const pandora::Pfo *const pVertexPfo, const pandora::Pfo *const pDaughterPfo, HitTypeToAssociationMap &hitTypeToAssociationMap) const
Get pfo association details between a vertex-associated pfo and a non-vertex associated daughter cand...
float m_maxConeCosHalfAngle
Maximum value for cosine of cone half angle.
unsigned int m_minVertexAssociatedHitTypes
The min number of vertex associated hit types for a vertex associated pfo.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
unsigned int m_minConsistentDirectionsTrack
The minimum number of consistent cluster directions to allow a merge involving a track pfo.
std::vector< PfoAssociation > PfoAssociationList
void GetInputPfos(const pandora::Vertex *const pVertex, pandora::PfoList &vertexPfos, pandora::PfoList &nonVertexPfos) const
Get the list of input pfos and divide them into vertex-associated and non-vertex-associated lists.
bool ProcessPfoAssociations(const PfoAssociationList &pfoAssociationList) const
Process the list of pfo associations, merging the best-matching pfo.
float m_directionTanAngle
Direction determination, look for vertex inside triangle with apex shifted along the cluster length.
unsigned int m_minConsistentDirections
The minimum number of consistent cluster directions to allow a pfo merge.
float m_maxConeLengthMultiplier
Consider hits as bound if inside cone, with projected distance less than N times cone length.
pandora::StatusCode Run()
Run the algorithm.
float m_coneAngleCentile
Cluster cone angle is defined using specified centile of distribution of hit half angles.
std::string m_showerPfoListName
The input shower pfo list name.
void MergePfos(const PfoAssociation &pfoAssociation) const
Merge the vertex and daughter pfos (deleting daughter pfo, merging clusters, etc.) described in the s...
float m_minBoundedFractionCut
Cut on association info (min bounded fraction) for determining pfo merges.
float m_meanBoundedFractionCut
Cut on association info (mean bounded fraction) for determining pfo merges.
float m_maxVertexTransverseDistance
Vertex association check: max transverse distance cut.
std::string m_trackPfoListName
The input track pfo list name.
float m_minVertexLongitudinalDistance
Vertex association check: min longitudinal distance cut.
std::map< pandora::HitType, const pandora::Cluster * > HitTypeToClusterMap
VertexBasedPfoMopUpAlgorithm()
Default constructor.
ParticleFlowObject class.
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList