LArSoft  v10_06_00
Liquid Argon Software toolkit - https://larsoft.org/
ThreeDMultiReclusteringAlgorithm.h
Go to the documentation of this file.
1 
12 #ifndef LAR_THREE_D_MULTI_RECLUSTERING_ALGORITHM_H
13 #define LAR_THREE_D_MULTI_RECLUSTERING_ALGORITHM_H 1
14 
15 #include "Pandora/Algorithm.h"
16 #include "Pandora/PandoraInternal.h"
17 
19 
20 namespace lar_content
21 {
22 
26 class ThreeDMultiReclusteringAlgorithm : public pandora::Algorithm
27 {
28 public:
33 
38 
39 private:
40  pandora::StatusCode Run();
41 
49  pandora::StatusCode FreeClustersFromPfos(const pandora::PfoList &pfos, std::map<pandora::HitType, pandora::ClusterList> &viewToFreeClusters,
50  std::map<const pandora::Pfo *const, pandora::ClusterList> &pfoToFreeClusters) const;
56  pandora::StatusCode RelinkClustersToOriginalPfos(std::map<const pandora::Pfo *const, pandora::ClusterList> &pfoToClusters) const;
57 
65  pandora::StatusCode FreeCaloHitsFromClusters(
66  const pandora::ClusterList &clusters, const pandora::HitType &view, pandora::CaloHitList &freeCaloHits) const;
74  pandora::StatusCode BuildNewPfos(const pandora::ClusterList &clusters3D, std::map<pandora::HitType, pandora::CaloHitList> &viewToFreeCaloHits2D) const;
75 
83  pandora::StatusCode Build2DClustersFrom3D(const pandora::Cluster *const pCluster3D,
84  std::map<pandora::HitType, pandora::CaloHitList> &viewToFreeCaloHits2D, pandora::ClusterList &newClusters2D) const;
85 
93  pandora::StatusCode MopUpCaloHits(const pandora::CaloHitList &caloHits, const pandora::ClusterList &clusters, bool addAsIso) const;
94 
100  pandora::StatusCode CreatePfoFromClusters(const pandora::ClusterList &clusters) const;
101 
102  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
103 
104  std::string m_pfoListName;
105  std::map<pandora::HitType, std::string> m_clusterListNames;
107  std::vector<std::string> m_clusteringAlgs;
109 };
110 
111 } // namespace lar_content
112 
113 #endif // #ifndef LAR_THREE_D_MULTI_RECLUSTERING_ALGORITHM_H
ThreeDReclusteringFigureOfMeritBaseTool * m_pFomAlgTool
The address of the figure of merit algorithm tool to use.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
pandora::StatusCode FreeCaloHitsFromClusters(const pandora::ClusterList &clusters, const pandora::HitType &view, pandora::CaloHitList &freeCaloHits) const
Delete clusters of a single hit type and store the associated hits in a list.
pandora::StatusCode RelinkClustersToOriginalPfos(std::map< const pandora::Pfo *const, pandora::ClusterList > &pfoToClusters) const
Remake the original pfos by adding back their removed clusters.
pandora::StatusCode CreatePfoFromClusters(const pandora::ClusterList &clusters) const
Create a new pfo from a list of clusters.
std::string m_pfoListName
Name of list of pfos to consider for reclustering.
pandora::StatusCode Build2DClustersFrom3D(const pandora::Cluster *const pCluster3D, std::map< pandora::HitType, pandora::CaloHitList > &viewToFreeCaloHits2D, pandora::ClusterList &newClusters2D) const
Create 2D clusters following a 3D cluster.
bool m_mopUp2DCaloHits
Add hits from reclustered 2D clusters without an associated 3D hit to the nearest new 2D cluster in t...
pandora::StatusCode MopUpCaloHits(const pandora::CaloHitList &caloHits, const pandora::ClusterList &clusters, bool addAsIso) const
Add hits to their nearest cluster.
std::map< pandora::HitType, std::string > m_clusterListNames
Map of list names for 3D clusters that comprise the pfos and 2D U, V, W clusters that may need reclus...
HitType
Definition: HitType.h:12
std::vector< std::string > m_clusteringAlgs
The ordered list of clustering algorithms to use.
pandora::StatusCode BuildNewPfos(const pandora::ClusterList &clusters3D, std::map< pandora::HitType, pandora::CaloHitList > &viewToFreeCaloHits2D) const
Create new pfos from the reclustered 3D clusters and original 2D hits. The original 2D hits are put i...
Header file for the reclustering figure of merit algorithm tool base class.
pandora::StatusCode FreeClustersFromPfos(const pandora::PfoList &pfos, std::map< pandora::HitType, pandora::ClusterList > &viewToFreeClusters, std::map< const pandora::Pfo *const, pandora::ClusterList > &pfoToFreeClusters) const
Remove clusters from the pfos and store them them in maps.
~ThreeDMultiReclusteringAlgorithm()=default
Default destructor.