Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ParticleRecoveryAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_PARTICLE_RECOVERY_ALGORITHM_H
9#define LAR_PARTICLE_RECOVERY_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
12
13#include <unordered_map>
14
15namespace lar_content
16{
17
22{
23public:
28
29private:
34 {
35 public:
42 void AddAssociation(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2);
43
53 void GetConnectedElements(const pandora::Cluster *const pCluster, const bool ignoreUnavailable, pandora::ClusterList &clusterListU,
54 pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const;
55
62
63 private:
64 typedef std::unordered_map<const pandora::Cluster *, pandora::ClusterList> ClusterNavigationMap;
65
70 };
71
73
81 void GetInputClusters(pandora::ClusterList &inputClusterListU, pandora::ClusterList &inputClusterListV, pandora::ClusterList &inputClusterListW) const;
82
89 void SelectInputClusters(const pandora::ClusterList &inputClusterList, pandora::ClusterList &selectedClusterList) const;
90
97 void StandardClusterSelection(const pandora::ClusterList &inputClusterList, pandora::ClusterList &selectedClusterList) const;
98
105 void VertexClusterSelection(const pandora::ClusterList &inputClusterList, pandora::ClusterList &selectedClusterList) const;
106
114 void FindOverlaps(const pandora::ClusterList &clusterList1, const pandora::ClusterList &clusterList2, SimpleOverlapTensor &overlapTensor) const;
115
122 bool IsOverlap(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2) const;
123
136 void CalculateEffectiveOverlapFractions(const pandora::Cluster *const pCluster1, const float xMin1, const float xMax1,
137 const pandora::Cluster *const pCluster2, const float xMin2, const float xMax2, float &xOverlapFraction1, float &xOverlapFraction2) const;
138
148 void CalculateEffectiveSpan(const pandora::Cluster *const pCluster, const float xMin, const float xMax, float &xMinEff, float &xMaxEff) const;
149
155 void ExamineTensor(const SimpleOverlapTensor &overlapTensor) const;
156
166 bool CheckConsistency(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW) const;
167
173 void CreateTrackParticle(const pandora::ClusterList &clusterList) const;
174
176
179
181
182 unsigned int m_minClusterCaloHits;
185
189
195};
196
197//------------------------------------------------------------------------------------------------------------------------------------------
198
203
204} // namespace lar_content
205
206#endif // #ifndef LAR_PARTICLE_RECOVERY_ALGORITHM_H
Header file for the algorithm class.
ClusterNavigationMap m_clusterNavigationMapUV
The cluster navigation map U->V.
void GetConnectedElements(const pandora::Cluster *const pCluster, const bool ignoreUnavailable, pandora::ClusterList &clusterListU, pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const
Get elements connected to a specified cluster.
ClusterNavigationMap m_clusterNavigationMapWU
The cluster navigation map W->U.
std::unordered_map< const pandora::Cluster *, pandora::ClusterList > ClusterNavigationMap
void AddAssociation(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2)
Add an association between two clusters to the simple overlap tensor.
ClusterNavigationMap m_clusterNavigationMapVW
The cluster navigation map V->W.
const pandora::ClusterList & GetKeyClusters() const
Get the list of key clusters.
pandora::ClusterList m_keyClusters
The list of key clusters.
float m_minClusterXSpan
The min x span required in order to consider a cluster.
std::string m_outputPfoListName
The output pfo list name.
unsigned int m_minClusterCaloHits
The min number of hits in base cluster selection method.
bool m_vertexClusterMode
Whether to demand clusters are associated with vertices of existing particles.
void CreateTrackParticle(const pandora::ClusterList &clusterList) const
Create and save a track particle containing the provided clusters.
pandora::StringVector m_inputClusterListNames
The list of cluster list names.
float m_minClusterLengthSquared
The min length (squared) in base cluster selection method.
void ExamineTensor(const SimpleOverlapTensor &overlapTensor) const
Identify unambiguous cluster overlaps and resolve ambiguous overlaps, creating new track particles.
unsigned int m_slidingFitHalfWindow
The half window for the fit sliding result constructor.
void GetInputClusters(pandora::ClusterList &inputClusterListU, pandora::ClusterList &inputClusterListV, pandora::ClusterList &inputClusterListW) const
Get the input cluster lists for processing in this algorithm.
void VertexClusterSelection(const pandora::ClusterList &inputClusterList, pandora::ClusterList &selectedClusterList) const
Select a subset of input clusters nodally associated with the vertices of existing particles.
float m_minXOverlapFractionGaps
The min x overlap fraction when there are gaps involved.
void StandardClusterSelection(const pandora::ClusterList &inputClusterList, pandora::ClusterList &selectedClusterList) const
Select a subset of input clusters for processing in this algorithm.
bool m_checkGaps
Whether to check for gaps in the calculation of the overlap.
float m_maxVertexTransverseDistance
Vertex association check: max transverse distance cut.
float m_sampleStepSize
The sampling step size used in association checks, units cm.
float m_pseudoChi2Cut
The selection cut on the matched chi2.
void CalculateEffectiveOverlapFractions(const pandora::Cluster *const pCluster1, const float xMin1, const float xMax1, const pandora::Cluster *const pCluster2, const float xMin2, const float xMax2, float &xOverlapFraction1, float &xOverlapFraction2) const
Calculate effective overlap fractions taking into account gaps.
pandora::StatusCode Run()
Run the algorithm.
bool CheckConsistency(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW) const
Whether a trio of clusters are consistent with representing projections of the same 3d trajectory.
void SelectInputClusters(const pandora::ClusterList &inputClusterList, pandora::ClusterList &selectedClusterList) const
Select a subset of input clusters for processing in this algorithm.
void FindOverlaps(const pandora::ClusterList &clusterList1, const pandora::ClusterList &clusterList2, SimpleOverlapTensor &overlapTensor) const
Find cluster overlaps and record these in the overlap tensor.
bool IsOverlap(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2) const
Whether two clusters overlap convincingly in x.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float m_minXOverlapFraction
The min x overlap fraction required in order to id overlapping clusters.
float m_minVertexLongitudinalDistance
Vertex association check: min longitudinal distance cut.
void CalculateEffectiveSpan(const pandora::Cluster *const pCluster, const float xMin, const float xMax, float &xMinEff, float &xMaxEff) const
Calculate effective span for a given clsuter taking gaps into account.
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
Cluster class.
Definition Cluster.h:31
MANAGED_CONTAINER< const Cluster * > ClusterList
std::vector< std::string > StringVector
StatusCode
The StatusCode enum.