8 #ifndef LAR_SHOWER_GROWING_ALGORITHM_H
9 #define LAR_SHOWER_GROWING_ALGORITHM_H 1
11 #include "Pandora/Algorithm.h"
19 #include <unordered_map>
52 static bool SortClusters(
const pandora::Cluster *
const pLhs,
const pandora::Cluster *
const pRhs);
54 typedef std::unordered_map<const pandora::Cluster *, LArVertexHelper::ClusterDirection>
ClusterDirectionMap;
58 pandora::StatusCode
Run();
66 void SimpleModeShowerGrowing(
const pandora::ClusterList *
const pClusterList,
const std::string &clusterListName)
const;
77 bool GetNextSeedCandidate(
const pandora::ClusterList *
const pClusterList,
const pandora::ClusterSet &usedClusters,
78 const pandora::Cluster *&pSeedCluster)
const;
88 const pandora::ClusterList *
const pClusterList,
const pandora::Vertex *
const pVertex,
pandora::ClusterVector &seedClusters)
const;
109 const SeedAssociationList &seedAssociationList,
const std::string &clusterListName, pandora::ClusterSet &usedClusters)
const;
120 const pandora::Cluster *
const pParentCluster,
const pandora::ClusterVector &branchClusters,
const std::string &listName)
const;
143 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
162 #endif // #ifndef LAR_SHOWER_GROWING_ALGORITHM_H
pandora::StringVector m_inputClusterListNames
The names of the input cluster lists.
std::unordered_map< const pandora::Cluster *, LArVertexHelper::ClusterDirection > ClusterDirectionMap
BranchGrowingAlgorithm class.
Header file for the lar pointing cluster class.
std::vector< LArPointingCluster > LArPointingClusterList
float m_directionApexShift
Direction determination, look for vertex inside triangle with apex shifted along the cluster length...
float m_maxVertexLongitudinalDistance
Vertex association check: max longitudinal distance cut.
ShowerGrowingAlgorithm()
Default constructor.
AssociationType
AssociationType enum.
LArPointingCluster class.
void GetSeedAssociationList(const pandora::ClusterVector &particleSeedVector, const pandora::ClusterList *const pClusterList, SeedAssociationList &seedAssociationList) const
Get the seed association list for a given vector of particle seed candidates.
void GetAllVertexSeedCandidates(const pandora::ClusterList *const pClusterList, const pandora::Vertex *const pVertex, pandora::ClusterVector &seedClusters) const
Get all seed candidates associated with a provided vertex.
bool GetNextSeedCandidate(const pandora::ClusterList *const pClusterList, const pandora::ClusterSet &usedClusters, const pandora::Cluster *&pSeedCluster) const
Get the next seed candidate, using a list of available candidates and a list of those already used...
std::unordered_map< const pandora::Cluster *, pandora::ClusterVector > SeedAssociationList
float m_directionTanAngle
Direction determination, look for vertex inside triangle with apex shifted along the cluster length...
unsigned int GetNVertexConnections(const pandora::CartesianVector &vertexPosition2D, const LArPointingClusterList &pointingClusterList) const
Get the number of clusters associated with the vertex.
void ProcessSeedAssociationDetails(const SeedAssociationList &seedAssociationList, const std::string &clusterListName, pandora::ClusterSet &usedClusters) const
Process the details stored in a specified seed association list.
float m_minVertexLongitudinalDistance
Vertex association check: min longitudinal distance cut.
static bool SortClusters(const pandora::Cluster *const pLhs, const pandora::Cluster *const pRhs)
Sorting for clusters to determine order in which seeds are considered.
void SimpleModeShowerGrowing(const pandora::ClusterList *const pClusterList, const std::string &clusterListName) const
Simple single-pass shower growing mode.
void ProcessBranchClusters(const pandora::Cluster *const pParentCluster, const pandora::ClusterVector &branchClusters, const std::string &listName) const
Process the list of branch clusters, merging with specified parent cluster, dealing with any existing...
Header file for the vertex helper class.
float m_nearbyClusterDistance
The nearby cluster distance, used for determining cluster associations.
float m_maxVertexTransverseDistance
Vertex association check: max transverse distance cut.
pandora::StatusCode Run()
ShowerGrowingAlgorithm class.
unsigned int m_minCaloHitsPerCluster
The minimum number of calo hits per (seed or branch) cluster.
bool IsVertexAssociated(const LArPointingCluster &pointingCluster, const pandora::CartesianVector &vertexPosition2D) const
Whether a pointing cluster is assciated with a provided 2D vertex projection.
AssociationType AreClustersAssociated(const pandora::Cluster *const pClusterSeed, const pandora::Cluster *const pCluster) const
Determine whether two clusters are associated.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
float GetFigureOfMerit(const SeedAssociationList &seedAssociationList) const
Get a figure of merit representing the consistency of the provided seed associated list...
ClusterDirectionMap m_clusterDirectionMap
The cluster direction map.
float m_vertexAngularAllowance
Vertex association check: pointing angular allowance in degrees.
Header file for the branch growing algorithm base class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float m_remoteClusterDistance
The remote cluster distance, used for determining cluster associations.