Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
CosmicRayBaseMatchingAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_COSMIC_RAY_BASE_MATCHING_ALGORITHM_H
9#define LAR_COSMIC_RAY_BASE_MATCHING_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
13
14#include <unordered_map>
15
16namespace lar_content
17{
18
23{
24protected:
27
32 {
33 public:
41 Particle(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW);
42
46 };
47
48 typedef std::vector<Particle> ParticleList;
49 typedef std::unordered_map<const pandora::Cluster *, pandora::ClusterList> ClusterAssociationMap;
50 typedef std::set<unsigned int> UIntSet;
51
58 virtual void SelectCleanClusters(const pandora::ClusterVector &inputVector, pandora::ClusterVector &outputVector) const = 0;
59
68 virtual bool MatchClusters(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2) const = 0;
69
80 const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3) const = 0;
81
89 PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const = 0;
90
91private:
98 pandora::StatusCode GetAvailableClusters(const std::string inputClusterListName, pandora::ClusterVector &clusterVector) const;
106 void MatchClusters(const pandora::ClusterVector &clusterVector1, const pandora::ClusterVector &clusterVector2,
108
119 const CosmicRayBaseMatchingAlgorithm::ClusterAssociationMap &matchedClusters31, ParticleList &particleList) const;
120
131 const CosmicRayBaseMatchingAlgorithm::ClusterAssociationMap &matchedClusters31, ParticleList &particleList) const;
132
139 void MatchTwoViews(const CosmicRayBaseMatchingAlgorithm::ClusterAssociationMap &matchedClusters12, ParticleList &particleList) const;
140
147 void ResolveAmbiguities(const ParticleList &inputList, ParticleList &outputList) const;
148
154 void BuildParticles(const ParticleList &particleList);
155
160};
161
162} // namespace lar_content
163
164#endif // #ifndef LAR_COSMIC_RAY_BASE_MATCHING_ALGORITHM_H
Header file for the algorithm class.
Grouping of header files for many classes of use in particle flow algorithms.
const pandora::Cluster * m_pClusterW
Address of cluster in W view.
const pandora::Cluster * m_pClusterU
Address of cluster in U view.
const pandora::Cluster * m_pClusterV
Address of cluster in V view.
std::unordered_map< const pandora::Cluster *, pandora::ClusterList > ClusterAssociationMap
virtual void SelectCleanClusters(const pandora::ClusterVector &inputVector, pandora::ClusterVector &outputVector) const =0
Select a set of clusters judged to be clean.
void ResolveAmbiguities(const ParticleList &inputList, ParticleList &outputList) const
Remove ambiguities between candidate particles.
pandora::StatusCode GetAvailableClusters(const std::string inputClusterListName, pandora::ClusterVector &clusterVector) const
Get a vector of available clusters.
virtual bool CheckMatchedClusters3D(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3) const =0
Check that three clusters have a consistent 3D position.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
std::string m_inputClusterListNameW
The name of the view W cluster list.
virtual void SetPfoParameters(const CosmicRayBaseMatchingAlgorithm::Particle &protoParticle, PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const =0
Calculate Pfo properties from proto particle.
virtual bool MatchClusters(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2) const =0
Match a pair of clusters from two views.
void MatchTwoViews(const CosmicRayBaseMatchingAlgorithm::ClusterAssociationMap &matchedClusters12, const CosmicRayBaseMatchingAlgorithm::ClusterAssociationMap &matchedClusters23, const CosmicRayBaseMatchingAlgorithm::ClusterAssociationMap &matchedClusters31, ParticleList &particleList) const
Match clusters from two views and form into particles.
void MatchThreeViews(const CosmicRayBaseMatchingAlgorithm::ClusterAssociationMap &matchedClusters12, const CosmicRayBaseMatchingAlgorithm::ClusterAssociationMap &matchedClusters23, const CosmicRayBaseMatchingAlgorithm::ClusterAssociationMap &matchedClusters31, ParticleList &particleList) const
Match clusters from three views and form into particles.
std::string m_inputClusterListNameV
The name of the view V cluster list.
void BuildParticles(const ParticleList &particleList)
Build PFO objects from candidate particles.
std::string m_inputClusterListNameU
The name of the view U cluster list.
std::string m_outputPfoListName
The name of the output PFO list.
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
std::vector< const Cluster * > ClusterVector
StatusCode
The StatusCode enum.