32 const ClusterList *pClusterList = NULL;
33 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetCurrentList(*
this, pClusterList));
45 this->
GetReclusteredHits(slidingFitResultList, showerClusters, clustersToExpand, clustersToContract);
48 ClusterSet unavailableClusters;
49 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->
RemoveHitsFromClusters(clustersToContract, unavailableClusters));
50 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->
AddHitsToClusters(clustersToExpand, unavailableClusters));
51 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->
RebuildClusters(clustersToContract, unavailableClusters));
53 return STATUS_CODE_SUCCESS;
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.
std::vector< TwoDSlidingFitResult > TwoDSlidingFitResultList
std::vector< art::Ptr< recob::Cluster > > ClusterVector
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.
pandora::StatusCode AddHitsToClusters(const ClusterToHitMap &clustersToRebuild, pandora::ClusterSet &unavailableClusters) const
Add hits to clusters.
pandora::StatusCode RemoveHitsFromClusters(const ClusterToHitMap &clustersToRebuild, pandora::ClusterSet &unavailableClusters) const
Remove hits from clusters.
pandora::StatusCode RebuildClusters(const ClusterToHitMap &clustersAtStart, const pandora::ClusterSet &unavailableClusters) const
Re-build clusters.