LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
VertexBasedPfoRecoveryAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_VERTEX_BASED_PFO_RECOVERY_ALGORITHM_H
9 #define LAR_VERTEX_BASED_PFO_RECOVERY_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
15 
16 namespace lar_content
17 {
18 
22 class VertexBasedPfoRecoveryAlgorithm : public pandora::Algorithm
23 {
24 public:
29 
30 private:
31  pandora::StatusCode Run();
32 
36  class Particle
37  {
38  public:
46  Particle(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW);
47 
48  const pandora::Cluster *m_pClusterU;
49  const pandora::Cluster *m_pClusterV;
50  const pandora::Cluster *m_pClusterW;
51  };
52 
53  typedef std::vector<Particle> ParticleList;
54 
61  pandora::StatusCode GetAvailableClusters(const pandora::StringVector inputClusterListName, pandora::ClusterVector &clusterVector) const;
62 
70  void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const;
71 
80  void SelectVertexClusters(const pandora::Vertex *const pVertex, const TwoDSlidingFitResultMap &slidingFitResultMap,
81  const pandora::ClusterVector &inputClusters, pandora::ClusterVector &outputClusters) const;
82 
92  void MatchThreeViews(const pandora::Vertex *const pVertex, const TwoDSlidingFitResultMap &slidingFitResultMap,
93  const pandora::ClusterVector &selectedClusters, pandora::ClusterSet &vetoList, ParticleList &particleList) const;
94 
104  void MatchTwoViews(const pandora::Vertex *const pVertex, const TwoDSlidingFitResultMap &slidingFitResultMap,
105  const pandora::ClusterVector &selectedClusters, pandora::ClusterSet &vetoList, ParticleList &particleList) const;
106 
120  void GetBestChi2(const pandora::Vertex *const pVertex, const TwoDSlidingFitResultMap &slidingFitResultMap,
121  const pandora::ClusterVector &clusters1, const pandora::ClusterVector &clusters2, const pandora::ClusterVector &clusters3,
122  const pandora::Cluster *&pBestCluster1, const pandora::Cluster *&pBestCluster2, const pandora::Cluster *&pBestCluster3,
123  float &chi2) const;
124 
136  void GetBestChi2(const pandora::Vertex *const pVertex, const TwoDSlidingFitResultMap &slidingFitResultMap,
137  const pandora::ClusterVector &clusters1, const pandora::ClusterVector &clusters2,
138  const pandora::Cluster *&pBestCluster1, const pandora::Cluster *&pBestCluster2, float &chi2) const;
139 
147  float GetChi2(const pandora::Vertex *const pVertex, const LArPointingCluster &pointingCluster1,
148  const LArPointingCluster &pointingCluster2) const;
149 
158  float GetChi2(const pandora::Vertex *const pVertex, const LArPointingCluster &pointingCluster1,
159  const LArPointingCluster &pointingCluster2, const LArPointingCluster &pointingCluster3) const;
160 
168  void SelectAvailableClusters(const pandora::ClusterSet &vetoList, const pandora::ClusterVector &inputVector,
169  pandora::ClusterVector &outputVector) const;
170 
178  void SelectClusters(const pandora::HitType hitType, const pandora::ClusterVector &inputVector,
179  pandora::ClusterVector &outputVector) const;
180 
187  const LArPointingCluster::Vertex &GetInnerVertex(const pandora::CartesianVector &vertex, const LArPointingCluster &cluster) const;
188 
195  const LArPointingCluster::Vertex &GetOuterVertex(const pandora::CartesianVector &vertex, const LArPointingCluster &cluster) const;
196 
202  void BuildParticles(const ParticleList &particleList);
203 
204  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
205 
206  pandora::StringVector m_inputClusterListNames;
207  std::string m_outputPfoListName;
208 
209  unsigned int m_slidingFitHalfWindow;
214 };
215 
216 } // namespace lar_content
217 
218 #endif // #ifndef LAR_VERTEX_BASED_PFO_RECOVERY_ALGORITHM_H
std::string m_outputPfoListName
The name of the output pfo list.
const LArPointingCluster::Vertex & GetInnerVertex(const pandora::CartesianVector &vertex, const LArPointingCluster &cluster) const
Find nearest end of pointing cluster to a specified position vector.
void GetBestChi2(const pandora::Vertex *const pVertex, const TwoDSlidingFitResultMap &slidingFitResultMap, const pandora::ClusterVector &clusters1, const pandora::ClusterVector &clusters2, const pandora::ClusterVector &clusters3, const pandora::Cluster *&pBestCluster1, const pandora::Cluster *&pBestCluster2, const pandora::Cluster *&pBestCluster3, float &chi2) const
Get best-matched triplet of clusters from a set of input cluster vectors.
Header file for the lar pointing cluster class.
Particle(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW)
Constructor.
void SelectVertexClusters(const pandora::Vertex *const pVertex, const TwoDSlidingFitResultMap &slidingFitResultMap, const pandora::ClusterVector &inputClusters, pandora::ClusterVector &outputClusters) const
Select clusters in proximity to reconstructed vertex.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
void MatchTwoViews(const pandora::Vertex *const pVertex, const TwoDSlidingFitResultMap &slidingFitResultMap, const pandora::ClusterVector &selectedClusters, pandora::ClusterSet &vetoList, ParticleList &particleList) const
Match clusters from two views.
LArPointingCluster class.
Cluster finding and building.
void MatchThreeViews(const pandora::Vertex *const pVertex, const TwoDSlidingFitResultMap &slidingFitResultMap, const pandora::ClusterVector &selectedClusters, pandora::ClusterSet &vetoList, ParticleList &particleList) const
Match clusters from three views.
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
pandora::StringVector m_inputClusterListNames
The list of input cluster list names.
Header file for the lar two dimensional sliding fit result class.
float GetChi2(const pandora::Vertex *const pVertex, const LArPointingCluster &pointingCluster1, const LArPointingCluster &pointingCluster2) const
Merge two pointing clusters and return chi-squared metric giving consistency of matching.
pandora::StatusCode GetAvailableClusters(const pandora::StringVector inputClusterListName, pandora::ClusterVector &clusterVector) const
Get a vector of available clusters.
void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const
Build the map of sliding fit results.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
const LArPointingCluster::Vertex & GetOuterVertex(const pandora::CartesianVector &vertex, const LArPointingCluster &cluster) const
Find furthest end of pointing cluster from a specified position vector.
void SelectAvailableClusters(const pandora::ClusterSet &vetoList, const pandora::ClusterVector &inputVector, pandora::ClusterVector &outputVector) const
Select cluster which haven&#39;t been vetoed.
const pandora::Cluster * m_pClusterV
Address of cluster in V view.
void SelectClusters(const pandora::HitType hitType, const pandora::ClusterVector &inputVector, pandora::ClusterVector &outputVector) const
Select clusters of a specified hit type.
const pandora::Cluster * m_pClusterW
Address of cluster in W view.
void BuildParticles(const ParticleList &particleList)
Build particle flow objects from matched clusters.
const pandora::Cluster * m_pClusterU
Address of cluster in U view.
vertex reconstruction