Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
TwoDSlidingFitConsolidationAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_TWO_D_SLIDING_FIT_CONSOLIDATION_ALGORITHM_H
9#define LAR_TWO_D_SLIDING_FIT_CONSOLIDATION_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
12
14
15#include <unordered_map>
16
17namespace lar_content
18{
19
24{
25public:
30
31protected:
34
35 typedef std::unordered_map<const pandora::Cluster *, pandora::CaloHitList> ClusterToHitMap;
36
45 virtual void GetReclusteredHits(const TwoDSlidingFitResultList &slidingFitResultList, const pandora::ClusterVector &showerClusters,
46 ClusterToHitMap &caloHitsToAdd, ClusterToHitMap &caloHitsToRemove) const = 0;
47
48private:
57 const pandora::ClusterList *const pClusterList, pandora::ClusterVector &trackClusters, pandora::ClusterVector &showerClusters) const;
58
65 void BuildSlidingLinearFits(const pandora::ClusterVector &trackClusters, TwoDSlidingFitResultList &slidingFitResultList) const;
66
73 pandora::StatusCode RemoveHitsFromClusters(const ClusterToHitMap &clustersToRebuild, pandora::ClusterSet &unavailableClusters) const;
74
81 pandora::StatusCode AddHitsToClusters(const ClusterToHitMap &clustersToRebuild, pandora::ClusterSet &unavailableClusters) const;
82
89 pandora::StatusCode RebuildClusters(const ClusterToHitMap &clustersAtStart, const pandora::ClusterSet &unavailableClusters) const;
90
94 unsigned int m_halfWindowLayers;
95};
96
97} // namespace lar_content
98
99#endif // #ifndef LAR_TWO_D_SLIDING_FIT_CONSOLIDATION_ALGORITHM_H
Header file for the algorithm class.
Header file for the lar two dimensional sliding fit result class.
pandora::StatusCode RemoveHitsFromClusters(const ClusterToHitMap &clustersToRebuild, pandora::ClusterSet &unavailableClusters) const
Remove hits from clusters.
float m_maxClusterLength
Maximum length of shower clusters to use in re-building.
std::string m_reclusteringAlgorithmName
Name of daughter algorithm to use for cluster re-building.
unsigned int m_halfWindowLayers
Size of layer window for sliding fit results.
pandora::StatusCode AddHitsToClusters(const ClusterToHitMap &clustersToRebuild, pandora::ClusterSet &unavailableClusters) const
Add hits to clusters.
void SortInputClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &trackClusters, pandora::ClusterVector &showerClusters) const
Sort input cluster list into track-like clusters and shower-like clusters.
virtual void GetReclusteredHits(const TwoDSlidingFitResultList &slidingFitResultList, const pandora::ClusterVector &showerClusters, ClusterToHitMap &caloHitsToAdd, ClusterToHitMap &caloHitsToRemove) const =0
Get the list of hits to be added or removed from clusters.
float m_minTrackLength
Minimum length of track clusters to consolidate.
std::unordered_map< const pandora::Cluster *, pandora::CaloHitList > ClusterToHitMap
void BuildSlidingLinearFits(const pandora::ClusterVector &trackClusters, TwoDSlidingFitResultList &slidingFitResultList) const
Apply sliding linear fits to track clusters.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
pandora::StatusCode RebuildClusters(const ClusterToHitMap &clustersAtStart, const pandora::ClusterSet &unavailableClusters) const
Re-build clusters.
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
std::vector< TwoDSlidingFitResult > TwoDSlidingFitResultList
std::vector< const Cluster * > ClusterVector
MANAGED_CONTAINER< const Cluster * > ClusterList
std::unordered_set< const Cluster * > ClusterSet
StatusCode
The StatusCode enum.