ConnectedRemnantsTool.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArThreeDReco/LArShowerFragments/ConnectedRemnantsTool.h
3  *
4  * @brief Header file for the connected remnants tool class.
5  *
6  * $Log: $
7  */
8 #ifndef CONNECTED_REMNANTS_TOOL_H
9 #define CONNECTED_REMNANTS_TOOL_H 1
10 
12 
13 namespace lar_content
14 {
15 
16 /**
17  * @brief ConnectedRemnantsTool class
18  */
20 {
21 public:
22  /**
23  * @brief Default constructor
24  */
26 
27  bool Run(ThreeViewRemnantsAlgorithm *const pAlgorithm, TensorType &overlapTensor);
28 
29 private:
30  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
31 
32  /**
33  * @brief Identify candidate particles
34  *
35  * @param overlapTensor the input overlap tensor
36  * @param protoParticleVector the output vector of candidate particles
37  * @param clusterMergeMap the output map of clusters to be merged
38  */
39  void FindConnectedShowers(const TensorType &overlapTensor, ProtoParticleVector &protoParticleVector, ClusterMergeMap &clusterMergeMap) const;
40 
41  /**
42  * @brief Separate connected clusters into cluster lists by view
43  *
44  * @param connectedElements the input list of connected elements
45  * @param usedClusters the list of clusters already analysed
46  * @param clusterVectorU the output vector of clusters for the U view
47  * @param clusterVectorV the output vector of clusters for the V view
48  * @param clusterVectorW the output vector of clusters for the W view
49  */
50  void GetClusters(const TensorType::ElementList &connectedElements, const pandora::ClusterSet &usedClusters,
51  pandora::ClusterVector &clusterVectorU, pandora::ClusterVector &clusterVectorV, pandora::ClusterVector &clusterVectorW) const;
52 
53  /**
54  * @brief Fill map of clusters to be merged
55  *
56  * @param clusterVector the input vector of clusters
57  * @param clusterMergeMap the output map of cluster merges
58  */
59  void FillMergeMap(const pandora::Cluster *const pCluster, const pandora::ClusterVector &clusterVector, ClusterMergeMap &clusterMergeMap) const;
60 
61  /**
62  * @brief Check whether all clusters in a list are spatially connected
63  *
64  * @param clusterVector the input cluster vector
65  */
66  bool IsConnected(const pandora::ClusterVector &clusterVector) const;
67 
69 };
70 
71 } // namespace lar_content
72 
73 #endif // #ifndef CONNECTED_REMNANTS_TOOL_H
std::vector< ProtoParticle > ProtoParticleVector
void FindConnectedShowers(const TensorType &overlapTensor, ProtoParticleVector &protoParticleVector, ClusterMergeMap &clusterMergeMap) const
Identify candidate particles.
ConnectedRemnantsTool class.
void FillMergeMap(const pandora::Cluster *const pCluster, const pandora::ClusterVector &clusterVector, ClusterMergeMap &clusterMergeMap) const
Fill map of clusters to be merged.
std::vector< Element > ElementList
void GetClusters(const TensorType::ElementList &connectedElements, const pandora::ClusterSet &usedClusters, pandora::ClusterVector &clusterVectorU, pandora::ClusterVector &clusterVectorV, pandora::ClusterVector &clusterVectorW) const
Separate connected clusters into cluster lists by view.
bool IsConnected(const pandora::ClusterVector &clusterVector) const
Check whether all clusters in a list are spatially connected.
bool Run(ThreeViewRemnantsAlgorithm *const pAlgorithm, TensorType &overlapTensor)
Run the algorithm tool.
ConnectedRemnantsTool()
Default constructor.
std::unordered_map< const pandora::Cluster *, pandora::ClusterList > ClusterMergeMap
std::vector< art::Ptr< recob::Cluster > > ClusterVector
Header file for the three view remnants algorithm class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)