LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
CosmicRayTrackRecoveryAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_COSMIC_RAY_TRACK_RECOVERY_ALGORITHM_H
9 #define LAR_COSMIC_RAY_TRACK_RECOVERY_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
15 namespace lar_content
16 {
17 
21 class CosmicRayTrackRecoveryAlgorithm : public pandora::Algorithm
22 
23 {
24 public:
29 
30 private:
31  pandora::StatusCode Run();
32  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
33 
37  class Particle
38  {
39  public:
40  pandora::ClusterList m_clusterList;
41  };
42 
43  typedef std::vector<Particle> ParticleList;
44  typedef std::unordered_map<const pandora::Cluster*, pandora::ClusterList> ClusterAssociationMap;
45 
52  pandora::StatusCode GetAvailableClusters(const std::string &inputClusterListName, pandora::ClusterVector &clusterVector) const;
53 
60  void SelectCleanClusters(const pandora::ClusterVector &inputVector, pandora::ClusterVector &outputVector) const;
61 
68  void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const;
69 
78  void MatchViews(const pandora::ClusterVector &clusterVector1, const pandora::ClusterVector &clusterVector2,
79  const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterAssociationMap &clusterAssociationMap) const;
80 
89  void MatchClusters(const pandora::Cluster* const pSeedCluster, const pandora::ClusterVector &targetClusters,
90  const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterAssociationMap &clusterAssociationMap) const;
91 
103  void MatchThreeViews(const pandora::ClusterVector &clusterVectorU, const pandora::ClusterVector &clusterVectorV,
104  const pandora::ClusterVector &clusterVectorW, const ClusterAssociationMap &clusterAssociationMapUV,
105  const ClusterAssociationMap &clusterAssociationMapVW, const ClusterAssociationMap &clusterAssociationMapWU,
106  ParticleList &particleList) const;
107 
119  void MatchTwoViews(const pandora::ClusterVector &clusterVectorU, const pandora::ClusterVector &clusterVectorV,
120  const pandora::ClusterVector &clusterVectorW, const ClusterAssociationMap &clusterAssociationMapUV,
121  const ClusterAssociationMap &clusterAssociationMapVW, const ClusterAssociationMap &clusterAssociationMapWU,
122  ParticleList &particleList) const;
123 
135  void MatchOneView(const pandora::ClusterVector &clusterVectorU, const pandora::ClusterVector &clusterVectorV,
136  const pandora::ClusterVector &clusterVectorW, const ClusterAssociationMap &clusterAssociationMapUV,
137  const ClusterAssociationMap &clusterAssociationMapVW, const ClusterAssociationMap &clusterAssociationMapWU,
138  ParticleList &particleList) const;
139 
146  void BuildVetoList(const ParticleList &particleList, pandora::ClusterSet &vetoList) const;
147 
154  void RemoveAmbiguities(const ParticleList &inputParticleList, ParticleList &outputParticleList) const;
155 
162  void MergeClusters(const pandora::ClusterList &inputClusterList, pandora::ClusterList &outputClusterList) const;
163 
169  void BuildParticles(const ParticleList &particleList);
170 
175 
179  std::string m_outputPfoListName;
180 };
181 
182 } // namespace lar_content
183 
184 #endif // #ifndef LAR_COSMIC_RAY_TRACK_RECOVERY_ALGORITHM_H
void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const
Build the map of sliding fit results.
void RemoveAmbiguities(const ParticleList &inputParticleList, ParticleList &outputParticleList) const
Remove particles with duplicate clusters.
void MatchTwoViews(const pandora::ClusterVector &clusterVectorU, const pandora::ClusterVector &clusterVectorV, const pandora::ClusterVector &clusterVectorW, const ClusterAssociationMap &clusterAssociationMapUV, const ClusterAssociationMap &clusterAssociationMapVW, const ClusterAssociationMap &clusterAssociationMapWU, ParticleList &particleList) const
Create candidate particles using two primary clusters and one pair of broken clusters.
void BuildParticles(const ParticleList &particleList)
Build particle flow objects.
void MatchOneView(const pandora::ClusterVector &clusterVectorU, const pandora::ClusterVector &clusterVectorV, const pandora::ClusterVector &clusterVectorW, const ClusterAssociationMap &clusterAssociationMapUV, const ClusterAssociationMap &clusterAssociationMapVW, const ClusterAssociationMap &clusterAssociationMapWU, ParticleList &particleList) const
Create candidate particles using one primary cluster and one pair of broken clusters.
std::unordered_map< const pandora::Cluster *, pandora::ClusterList > ClusterAssociationMap
void MatchClusters(const pandora::Cluster *const pSeedCluster, const pandora::ClusterVector &targetClusters, const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterAssociationMap &clusterAssociationMap) const
Match a seed cluster with a list of target clusters and populate the cluster association map...
void BuildVetoList(const ParticleList &particleList, pandora::ClusterSet &vetoList) const
Build the list of clusters already used to create particles.
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
void MatchThreeViews(const pandora::ClusterVector &clusterVectorU, const pandora::ClusterVector &clusterVectorV, const pandora::ClusterVector &clusterVectorW, const ClusterAssociationMap &clusterAssociationMapUV, const ClusterAssociationMap &clusterAssociationMapVW, const ClusterAssociationMap &clusterAssociationMapWU, ParticleList &particleList) const
Create candidate particles using three primary clusters.
pandora::StatusCode GetAvailableClusters(const std::string &inputClusterListName, pandora::ClusterVector &clusterVector) const
Get a vector of available clusters.
Header file for the lar two dimensional sliding fit result class.
void SelectCleanClusters(const pandora::ClusterVector &inputVector, pandora::ClusterVector &outputVector) const
Select a set of clusters judged to be clean.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
void MatchViews(const pandora::ClusterVector &clusterVector1, const pandora::ClusterVector &clusterVector2, const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterAssociationMap &clusterAssociationMap) const
Match a pair of cluster vectors and populate the cluster association map.
void MergeClusters(const pandora::ClusterList &inputClusterList, pandora::ClusterList &outputClusterList) const
Merge broken clusters into a single cluster.