Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
NViewTrackMatchingAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_N_VIEW_TRACK_MATCHING_ALGORITHM_H
9#define LAR_N_VIEW_TRACK_MATCHING_ALGORITHM_H 1
10
12
14
15namespace lar_content
16{
17
18typedef std::unordered_map<const pandora::Cluster *, pandora::CartesianPointVector> SplitPositionMap;
19
20//------------------------------------------------------------------------------------------------------------------------------------------
21
25template <typename T>
27{
28public:
33
38
44 const TwoDSlidingFitResult &GetCachedSlidingFitResult(const pandora::Cluster *const pCluster) const;
45
51 unsigned int GetSlidingFitWindow() const;
52
60 virtual bool MakeClusterSplits(const SplitPositionMap &splitPositionMap);
61
72 virtual bool MakeClusterSplit(const pandora::CartesianVector &splitPosition, const pandora::Cluster *&pCurrentCluster,
73 const pandora::Cluster *&pLowXCluster, const pandora::Cluster *&pHighXCluster) const;
74
82
83 virtual void UpdateForNewCluster(const pandora::Cluster *const pNewCluster);
84 virtual void UpdateUponDeletion(const pandora::Cluster *const pDeletedCluster);
85 virtual void SelectInputClusters(const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const;
86 virtual void PrepareInputClusters(pandora::ClusterList &preparedClusterList);
87 virtual void SetPfoParticleId(PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const;
88
89protected:
95 void AddToSlidingFitCache(const pandora::Cluster *const pCluster);
96
102 void RemoveFromSlidingFitCache(const pandora::Cluster *const pCluster);
103
104 virtual void TidyUp();
106
107private:
108 unsigned int m_slidingFitWindow;
110
111 unsigned int m_minClusterCaloHits;
113};
114
115//------------------------------------------------------------------------------------------------------------------------------------------
116
117template <typename T>
119{
120 return m_slidingFitWindow;
121}
122
123} // namespace lar_content
124
125#endif // #ifndef LAR_N_VIEW_TRACK_MATCHING_ALGORITHM_H
Header file for the lar two dimensional sliding fit result class.
Header file for the n view matching algorithm class.
virtual void SetPfoParticleId(PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const
Set pfo particle id.
TwoDSlidingFitResultMap m_slidingFitResultMap
The sliding fit result map.
virtual void UpdateForNewCluster(const pandora::Cluster *const pNewCluster)
Update to reflect addition of a new cluster to the problem space.
virtual bool MakeClusterSplits(const SplitPositionMap &splitPositionMap)
Make cluster splits.
void AddToSlidingFitCache(const pandora::Cluster *const pCluster)
Add a new sliding fit result, for the specified cluster, to the algorithm cache.
virtual void UpdateUponDeletion(const pandora::Cluster *const pDeletedCluster)
Update to reflect cluster deletion.
unsigned int GetSlidingFitWindow() const
Get the layer window for the sliding linear fits.
virtual void TidyUp()
Tidy member variables in derived class.
static bool SortSplitPositions(const pandora::CartesianVector &lhs, const pandora::CartesianVector &rhs)
Sort split position cartesian vectors by increasing x coordinate.
virtual bool MakeClusterSplit(const pandora::CartesianVector &splitPosition, const pandora::Cluster *&pCurrentCluster, const pandora::Cluster *&pLowXCluster, const pandora::Cluster *&pHighXCluster) const
Make a cluster split.
unsigned int m_minClusterCaloHits
The min number of hits in base cluster selection method.
void RemoveFromSlidingFitCache(const pandora::Cluster *const pCluster)
Remova an existing sliding fit result, for the specified cluster, from the algorithm cache.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float m_minClusterLengthSquared
The min length (squared) in base cluster selection method.
unsigned int m_slidingFitWindow
The layer window for the sliding linear fits.
const TwoDSlidingFitResult & GetCachedSlidingFitResult(const pandora::Cluster *const pCluster) const
Get a sliding fit result from the algorithm cache.
virtual void PrepareInputClusters(pandora::ClusterList &preparedClusterList)
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results.
virtual void SelectInputClusters(const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const
Select a subset of input clusters for processing in this algorithm.
CartesianVector class.
Cluster class.
Definition Cluster.h:31
std::unordered_map< const pandora::Cluster *, pandora::CartesianPointVector > SplitPositionMap
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
MANAGED_CONTAINER< const Cluster * > ClusterList
StatusCode
The StatusCode enum.