Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
SlidingConeClusterMopUpAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_SLIDING_CONE_CLUSTER_MOP_UP_ALGORITHM_H
9#define LAR_SLIDING_CONE_CLUSTER_MOP_UP_ALGORITHM_H 1
10
12
13#include <unordered_map>
14
15namespace lar_content
16{
17
22{
23public:
28
29private:
34 {
35 public:
43 ClusterMerge(const pandora::Cluster *const pParentCluster, const float boundedFraction, const float meanRT);
44
51
57 float GetBoundedFraction() const;
58
64 float GetMeanRT() const;
65
73 bool operator<(const ClusterMerge &rhs) const;
74
75 private:
78 float m_meanRT;
79 };
80
81 typedef std::vector<ClusterMerge> ClusterMergeList;
82
84
90 void GetInteractionVertex(const pandora::Vertex *&pVertex) const;
91
92 typedef std::unordered_map<const pandora::Cluster *, const pandora::ParticleFlowObject *> ClusterToPfoMap;
93
100 void GetThreeDClusters(pandora::ClusterVector &clusters3D, ClusterToPfoMap &clusterToPfoMap) const;
101
107 void GetAvailableTwoDClusters(pandora::ClusterVector &availableClusters2D) const;
108
109 typedef std::unordered_map<const pandora::Cluster *, ClusterMergeList> ClusterMergeMap;
110
119 void GetClusterMergeMap(const pandora::Vertex *const pVertex, const pandora::ClusterVector &clusters3D,
120 const pandora::ClusterVector &availableClusters2D, ClusterMergeMap &clusterMergeMap) const;
121
128 void MakeClusterMerges(const ClusterToPfoMap &clusterToPfoMap, const ClusterMergeMap &clusterMergeMap) const;
129
131
134 unsigned int m_maxIterations;
138 unsigned int m_halfWindowLayers;
139 unsigned int m_nConeFitLayers;
140 unsigned int m_nConeFits;
145};
146
147//------------------------------------------------------------------------------------------------------------------------------------------
148
150 const pandora::Cluster *const pParentCluster, const float boundedFraction, const float meanRT) :
151 m_pParentCluster(pParentCluster),
152 m_boundedFraction(boundedFraction),
153 m_meanRT(meanRT)
154{
155}
156
157//------------------------------------------------------------------------------------------------------------------------------------------
158
160{
161 return m_pParentCluster;
162}
163
164//------------------------------------------------------------------------------------------------------------------------------------------
165
167{
168 return m_boundedFraction;
169}
170
171//------------------------------------------------------------------------------------------------------------------------------------------
172
174{
175 return m_meanRT;
176}
177
178} // namespace lar_content
179
180#endif // #ifndef LAR_SLIDING_CONE_CLUSTER_MOP_UP_ALGORITHM_H
Header file for the pfo mop up algorithm base class.
float m_boundedFraction
The bounded fraction for algorithm-specified cone angle.
const pandora::Cluster * m_pParentCluster
The address of the candidate parent (shower) cluster.
float m_meanRT
The mean transverse distance of all hits (whether contained or not)
float GetMeanRT() const
Get the mean transverse distance of all hits (whether contained or not)
ClusterMerge(const pandora::Cluster *const pParentCluster, const float boundedFraction, const float meanRT)
Constructor.
float GetBoundedFraction() const
Get the bounded fraction for algorithm-specified cone angle.
const pandora::Cluster * GetParentCluster() const
Get the address of the candidate parent (shower) cluster.
void GetThreeDClusters(pandora::ClusterVector &clusters3D, ClusterToPfoMap &clusterToPfoMap) const
Get all 3d clusters contained in the input pfo lists and a mapping from clusters to pfos.
unsigned int m_halfWindowLayers
The number of layers to use for half-window of sliding fit.
void GetAvailableTwoDClusters(pandora::ClusterVector &availableClusters2D) const
Get all available 2d clusters contained in the input cluster lists.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float m_coneBoundedFraction
The minimum cluster bounded fraction for association.
float m_coneLengthMultiplier
The cone length multiplier to use when calculating bounded cluster fractions.
void GetInteractionVertex(const pandora::Vertex *&pVertex) const
Get the neutrino interaction vertex if it is available and if the algorithm is configured to do so.
bool m_useVertex
Whether to use the interaction vertex to select useful cone directions.
float m_maxConeLength
The maximum allowed cone length to use when calculating bounded cluster fractions.
unsigned int m_maxHitsToConsider2DCluster
The maximum number of hits in a 2d cluster to allow pick-up via sliding cone fits.
pandora::StringVector m_inputPfoListNames
The input pfo list names.
unsigned int m_maxIterations
The maximum allowed number of algorithm iterations.
std::unordered_map< const pandora::Cluster *, const pandora::ParticleFlowObject * > ClusterToPfoMap
unsigned int m_nConeFits
The number of cone fits to perform, spread roughly uniformly along the shower length.
float m_coneTanHalfAngle
The cone tan half angle to use when calculating bounded cluster fractions.
unsigned int m_minHitsToConsider3DShower
The minimum number of hits in a 3d shower cluster to attempt cone fits.
std::unordered_map< const pandora::Cluster *, ClusterMergeList > ClusterMergeMap
void GetClusterMergeMap(const pandora::Vertex *const pVertex, const pandora::ClusterVector &clusters3D, const pandora::ClusterVector &availableClusters2D, ClusterMergeMap &clusterMergeMap) const
Get the cluster merge map describing all potential 3d cluster merges.
unsigned int m_maxHitsToConsider3DTrack
The maximum number of hits in a 3d track cluster to warrant inclusion in algorithm.
unsigned int m_nConeFitLayers
The number of layers over which to sum fitted direction to obtain cone fit.
void MakeClusterMerges(const ClusterToPfoMap &clusterToPfoMap, const ClusterMergeMap &clusterMergeMap) const
Make cluster merges based on the provided cluster merge map.
Cluster class.
Definition Cluster.h:31
Vertex class.
Definition Vertex.h:26
std::vector< const Cluster * > ClusterVector
std::vector< std::string > StringVector
StatusCode
The StatusCode enum.