LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
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 
21 namespace lar_content
22 {
23 
28 {
29 public:
34 
35 protected:
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;
55  mutable ClusterDirectionMap m_clusterDirectionMap;
56 
57 private:
58  pandora::StatusCode Run();
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 
87  void GetAllVertexSeedCandidates(const pandora::ClusterList *const pClusterList, const pandora::Vertex *const pVertex,
88  pandora::ClusterVector &seedClusters) const;
89 
97  void GetSeedAssociationList(const pandora::ClusterVector &particleSeedVector, const pandora::ClusterList *const pClusterList,
98  SeedAssociationList &seedAssociationList) const;
99 
108  void ProcessSeedAssociationDetails(const SeedAssociationList &seedAssociationList, const std::string &clusterListName,
109  pandora::ClusterSet &usedClusters) const;
110 
119  void ProcessBranchClusters(const pandora::Cluster *const pParentCluster, const pandora::ClusterVector &branchClusters,
120  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 
143  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
144 
145  pandora::StringVector m_inputClusterListNames;
146 
147  unsigned int m_minCaloHitsPerCluster;
150 
153 
158 };
159 
160 } // namespace lar_content
161 
162 #endif // #ifndef LAR_SHOWER_GROWING_ALGORITHM_H
pandora::StringVector m_inputClusterListNames
The names of the input cluster lists.
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.
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.
std::unordered_map< const pandora::Cluster *, LArVertexHelper::ClusterDirection > ClusterDirectionMap
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.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
float m_nearbyClusterDistance
The nearby cluster distance, used for determining cluster associations.
float m_maxVertexTransverseDistance
Vertex association check: max transverse distance cut.
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.
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.