8#ifndef LAR_THREE_VIEW_TRACK_FRAGMENTS_ALGORITHM_H
9#define LAR_THREE_VIEW_TRACK_FRAGMENTS_ALGORITHM_H 1
19#include <unordered_map>
24class FragmentTensorTool;
69 typedef std::unordered_map<const pandora::CaloHit *, const pandora::Cluster *>
HitToClusterMap;
166 typedef ThreeViewTrackFragmentsAlgorithm::MatchingType::TensorType
TensorType;
167 typedef std::vector<TensorType::ElementList::const_iterator>
IteratorList;
Header file for the algorithm class.
Header file for the lar track overlap result class.
Header file for the n view track matching algorithm class.
Header file for the three view matching control class.
FragmentOverlapResult class.
FragmentTensorTool class.
ThreeViewTrackFragmentsAlgorithm::MatchingType::TensorType TensorType
virtual bool Run(ThreeViewTrackFragmentsAlgorithm *const pAlgorithm, TensorType &overlapTensor)=0
Run the algorithm tool.
std::vector< TensorType::ElementList::const_iterator > IteratorList
NViewTrackMatchingAlgorithm class.
ThreeViewTrackFragmentsAlgorithm class.
void PerformMainLoop()
Main loop over cluster combinations in order to populate the overlap container. Responsible for calli...
TensorToolVector m_algorithmToolVector
The algorithm tool list.
std::unordered_map< const pandora::CaloHit *, const pandora::Cluster * > HitToClusterMap
void GetFragmentOverlapResult(const pandora::CartesianPointVector &projectedPositions, const pandora::CaloHitList &matchedHits, const pandora::ClusterList &matchedClusters, FragmentOverlapResult &fragmentOverlapResult) const
Get the populated fragment overlap result.
void UpdateForNewCluster(const pandora::Cluster *const pNewCluster)
Update to reflect addition of a new cluster to the problem space.
void ExamineOverlapContainer()
Examine contents of overlap container, collect together best-matching 2D particles and modify cluster...
void RebuildClusters(const pandora::ClusterList &rebuildList, pandora::ClusterList &newClusters) const
Rebuild clusters after fragmentation.
float m_maxPointDisplacementSquared
maximum allowed distance (squared) between projected points and associated hits
unsigned int m_nMaxTensorToolRepeats
The maximum number of repeat loops over tensor tools.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
std::vector< FragmentTensorTool * > TensorToolVector
pandora::StatusCode GetMatchedClusters(const pandora::CaloHitList &matchedHits, const HitToClusterMap &hitToClusterMap, pandora::ClusterList &matchedClusters, const pandora::Cluster *&pBestMatchedCluster) const
Get the list of the relevant clusters and the address of the single best matched cluster.
void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW)
Calculate cluster overlap result and store in container.
bool CheckMatchedClusters(const pandora::CartesianPointVector &projectedPositions, const pandora::ClusterList &matchedClusters) const
Whether the matched clusters are consistent with the projected positions.
NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< FragmentOverlapResult > > BaseAlgorithm
float m_minMatchedSamplingPointFraction
minimum fraction of matched sampling points
float m_minXOverlap
requirement on minimum X overlap for associated clusters
bool CheckOverlapResult(const FragmentOverlapResult &overlapResult) const
Whether the matched clusters and hits pass the algorithm quality cuts.
std::string m_reclusteringAlgorithmName
Name of daughter algorithm to use for cluster re-building.
unsigned int m_minMatchedHits
minimum number of matched calo hits
float m_minXOverlapFraction
requirement on minimum X overlap fraction for associated clusters
std::unordered_map< const pandora::Cluster *, unsigned int > ClusterToMatchedHitsMap
pandora::StatusCode GetMatchedHits(const pandora::ClusterList &inputClusterList, const pandora::CartesianPointVector &projectedPositions, HitToClusterMap &hitToClusterMap, pandora::CaloHitList &matchedCaloHits) const
Get the list of hits associated with the projected positions and a useful hit to cluster map.
pandora::StatusCode GetProjectedPositions(const TwoDSlidingFitResult &fitResult1, const TwoDSlidingFitResult &fitResult2, pandora::CartesianPointVector &projectedPositions) const
Get the list of projected positions, in the third view, corresponding to a pair of sliding fit result...
ThreeViewTrackFragmentsAlgorithm()
Default constructor.
TwoDSlidingFitResult class.
MANAGED_CONTAINER< const Cluster * > ClusterList
std::vector< CartesianVector > CartesianPointVector
MANAGED_CONTAINER< const CaloHit * > CaloHitList
StatusCode
The StatusCode enum.