LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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  typedef std::set<unsigned int> UIntSet;
46 
53  pandora::StatusCode GetAvailableClusters(const std::string &inputClusterListName, pandora::ClusterVector &clusterVector) const;
54 
61  void SelectCleanClusters(const pandora::ClusterVector &inputVector, pandora::ClusterVector &outputVector) const;
62 
69  void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const;
70 
79  void MatchViews(const pandora::ClusterVector &clusterVector1, const pandora::ClusterVector &clusterVector2,
80  const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterAssociationMap &clusterAssociationMap) const;
81 
90  void MatchClusters(const pandora::Cluster *const pSeedCluster, const pandora::ClusterVector &targetClusters,
91  const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterAssociationMap &clusterAssociationMap) const;
92 
104  void MatchThreeViews(const pandora::ClusterVector &clusterVectorU, const pandora::ClusterVector &clusterVectorV,
105  const pandora::ClusterVector &clusterVectorW, const ClusterAssociationMap &clusterAssociationMapUV,
106  const ClusterAssociationMap &clusterAssociationMapVW, const ClusterAssociationMap &clusterAssociationMapWU, 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, ParticleList &particleList) const;
122 
134  void MatchOneView(const pandora::ClusterVector &clusterVectorU, const pandora::ClusterVector &clusterVectorV,
135  const pandora::ClusterVector &clusterVectorW, const ClusterAssociationMap &clusterAssociationMapUV,
136  const ClusterAssociationMap &clusterAssociationMapVW, const ClusterAssociationMap &clusterAssociationMapWU, ParticleList &particleList) const;
137 
144  void BuildVetoList(const ParticleList &particleList, pandora::ClusterSet &vetoList) const;
145 
152  void RemoveAmbiguities(const ParticleList &inputParticleList, ParticleList &outputParticleList) const;
153 
160  void MergeClusters(const pandora::ClusterList &inputClusterList, pandora::ClusterList &outputClusterList) const;
161 
167  void BuildParticles(const ParticleList &particleList);
168 
173  unsigned int m_clusterMinHits;
174 
178  std::string m_outputPfoListName;
179 };
180 
181 } // namespace lar_content
182 
183 #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.
std::unordered_map< const pandora::Cluster *, pandora::ClusterList > ClusterAssociationMap
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.
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.
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::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::vector< art::Ptr< recob::Cluster > > ClusterVector
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.