LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 
15 namespace lar_content
16 {
17 
18 typedef std::unordered_map<const pandora::Cluster *, pandora::CartesianPointVector> SplitPositionMap;
19 
20 //------------------------------------------------------------------------------------------------------------------------------------------
21 
25 template <typename T>
27 {
28 public:
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 
81  static bool SortSplitPositions(const pandora::CartesianVector &lhs, const pandora::CartesianVector &rhs);
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 
89 protected:
95  void AddToSlidingFitCache(const pandora::Cluster *const pCluster);
96 
102  void RemoveFromSlidingFitCache(const pandora::Cluster *const pCluster);
103 
104  virtual void TidyUp();
105  virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
106 
107 private:
108  unsigned int m_slidingFitWindow;
110 
111  unsigned int m_minClusterCaloHits;
113 };
114 
115 //------------------------------------------------------------------------------------------------------------------------------------------
116 
117 template <typename T>
119 {
120  return m_slidingFitWindow;
121 }
122 
123 } // namespace lar_content
124 
125 #endif // #ifndef LAR_N_VIEW_TRACK_MATCHING_ALGORITHM_H
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
static bool SortSplitPositions(const pandora::CartesianVector &lhs, const pandora::CartesianVector &rhs)
Sort split position cartesian vectors by increasing x coordinate.
void AddToSlidingFitCache(const pandora::Cluster *const pCluster)
Add a new sliding fit result, for the specified cluster, to the algorithm cache.
NViewMatchingAlgorithm class.
virtual bool MakeClusterSplits(const SplitPositionMap &splitPositionMap)
Make cluster splits.
virtual void PrepareInputClusters(pandora::ClusterList &preparedClusterList)
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results...
virtual void UpdateUponDeletion(const pandora::Cluster *const pDeletedCluster)
Update to reflect cluster deletion.
const TwoDSlidingFitResult & GetCachedSlidingFitResult(const pandora::Cluster *const pCluster) const
Get a sliding fit result from the algorithm cache.
virtual void TidyUp()
Tidy member variables in derived class.
float m_minClusterLengthSquared
The min length (squared) in base cluster selection method.
Header file for the n view matching algorithm class.
std::unordered_map< const pandora::Cluster *, pandora::CartesianPointVector > SplitPositionMap
Header file for the lar two dimensional sliding fit result class.
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
void RemoveFromSlidingFitCache(const pandora::Cluster *const pCluster)
Remova an existing sliding fit result, for the specified cluster, from the algorithm cache...
virtual void SetPfoParticleId(PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const
Set pfo particle id.
unsigned int m_minClusterCaloHits
The min number of hits in base cluster selection method.
virtual bool MakeClusterSplit(const pandora::CartesianVector &splitPosition, const pandora::Cluster *&pCurrentCluster, const pandora::Cluster *&pLowXCluster, const pandora::Cluster *&pHighXCluster) const
Make a cluster split.
virtual void SelectInputClusters(const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const
Select a subset of input clusters for processing in this algorithm.
unsigned int m_slidingFitWindow
The layer window for the sliding linear fits.
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.
unsigned int GetSlidingFitWindow() const
Get the layer window for the sliding linear fits.