Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ShowerGrowingAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_SHOWER_GROWING_ALGORITHM_H
9#define LAR_SHOWER_GROWING_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
12
14
16
18
19#include <unordered_map>
20
21namespace lar_content
22{
23
28{
29public:
34
35protected:
44 bool IsVertexAssociated(const LArPointingCluster &pointingCluster, const pandora::CartesianVector &vertexPosition2D) const;
45
52 static bool SortClusters(const pandora::Cluster *const pLhs, const pandora::Cluster *const pRhs);
53
54 typedef std::unordered_map<const pandora::Cluster *, LArVertexHelper::ClusterDirection> ClusterDirectionMap;
56
57private:
59
66 void SimpleModeShowerGrowing(const pandora::ClusterList *const pClusterList, const std::string &clusterListName) const;
67
77 bool GetNextSeedCandidate(const pandora::ClusterList *const pClusterList, const pandora::ClusterSet &usedClusters,
78 const pandora::Cluster *&pSeedCluster) const;
79
88 const pandora::ClusterList *const pClusterList, const pandora::Vertex *const pVertex, pandora::ClusterVector &seedClusters) const;
89
97 void GetSeedAssociationList(const pandora::ClusterVector &particleSeedVector, const pandora::ClusterList *const pClusterList,
98 SeedAssociationList &seedAssociationList) const;
99
109 const SeedAssociationList &seedAssociationList, const std::string &clusterListName, pandora::ClusterSet &usedClusters) const;
110
120 const pandora::Cluster *const pParentCluster, const pandora::ClusterVector &branchClusters, const std::string &listName) const;
121
122 AssociationType AreClustersAssociated(const pandora::Cluster *const pClusterSeed, const pandora::Cluster *const pCluster) const;
123
131 float GetFigureOfMerit(const SeedAssociationList &seedAssociationList) const;
132
141 unsigned int GetNVertexConnections(const pandora::CartesianVector &vertexPosition2D, const LArPointingClusterList &pointingClusterList) const;
142
144
146
150
153
158};
159
160} // namespace lar_content
161
162#endif // #ifndef LAR_SHOWER_GROWING_ALGORITHM_H
Header file for the algorithm class.
Header file for the branch growing algorithm base class.
Header file for the lar pointing cluster class.
Header file for the vertex helper class.
std::unordered_map< const pandora::Cluster *, pandora::ClusterVector > SeedAssociationList
LArPointingCluster class.
std::unordered_map< const pandora::Cluster *, LArVertexHelper::ClusterDirection > ClusterDirectionMap
AssociationType AreClustersAssociated(const pandora::Cluster *const pClusterSeed, const pandora::Cluster *const pCluster) const
Determine whether two clusters are associated.
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...
float m_vertexAngularAllowance
Vertex association check: pointing angular allowance in degrees.
pandora::StringVector m_inputClusterListNames
The names of the input cluster lists.
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.
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 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.
float m_nearbyClusterDistance
The nearby cluster distance, used for determining cluster associations.
bool IsVertexAssociated(const LArPointingCluster &pointingCluster, const pandora::CartesianVector &vertexPosition2D) const
Whether a pointing cluster is assciated with a provided 2D vertex projection.
void SimpleModeShowerGrowing(const pandora::ClusterList *const pClusterList, const std::string &clusterListName) const
Simple single-pass shower growing mode.
float m_directionApexShift
Direction determination, look for vertex inside triangle with apex shifted along the cluster length.
ClusterDirectionMap m_clusterDirectionMap
The cluster direction map.
unsigned int m_minCaloHitsPerCluster
The minimum number of calo hits per (seed or branch) cluster.
pandora::StatusCode Run()
Run the algorithm.
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.
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.
float GetFigureOfMerit(const SeedAssociationList &seedAssociationList) const
Get a figure of merit representing the consistency of the provided seed associated list.
float m_directionTanAngle
Direction determination, look for vertex inside triangle with apex shifted along the cluster length.
float m_remoteClusterDistance
The remote cluster distance, used for determining cluster associations.
float m_minVertexLongitudinalDistance
Vertex association check: min longitudinal distance cut.
float m_maxVertexLongitudinalDistance
Vertex association check: max longitudinal distance cut.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float m_maxVertexTransverseDistance
Vertex association check: max transverse distance cut.
CartesianVector class.
Cluster class.
Definition Cluster.h:31
Vertex class.
Definition Vertex.h:26
std::vector< LArPointingCluster > LArPointingClusterList
std::vector< const Cluster * > ClusterVector
MANAGED_CONTAINER< const Cluster * > ClusterList
std::vector< std::string > StringVector
std::unordered_set< const Cluster * > ClusterSet
StatusCode
The StatusCode enum.