LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TwoViewMatchingControl.h
Go to the documentation of this file.
1 
8 #ifndef LAR_TWO_VIEW_MATCHING_CONTROL_H
9 #define LAR_TWO_VIEW_MATCHING_CONTROL_H 1
10 
12 
14 
15 #include <unordered_map>
16 
17 namespace lar_content
18 {
19 
23 template <typename T>
25 {
26 public:
28 
35 
39  virtual ~TwoViewMatchingControl();
40 
46  MatrixType &GetOverlapMatrix();
47 
53  unsigned int GetHitTypeIndex(const pandora::HitType hitType);
54 
55 private:
56  void UpdateForNewCluster(const pandora::Cluster *const pNewCluster);
57  void UpdateUponDeletion(const pandora::Cluster *const pDeletedCluster);
58  const std::string &GetClusterListName(const pandora::HitType hitType) const;
59  const pandora::ClusterList &GetInputClusterList(const pandora::HitType hitType) const;
60  const pandora::ClusterList &GetSelectedClusterList(const pandora::HitType hitType) const;
63  void PerformMainLoop();
64  void TidyUp();
65  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
66 
67  const pandora::ClusterList *m_pInputClusterList1;
68  const pandora::ClusterList *m_pInputClusterList2;
69 
70  pandora::ClusterList m_clusterList1;
71  pandora::ClusterList m_clusterList2;
72 
73  MatrixType m_overlapMatrix;
74 
75  typedef std::unordered_map<pandora::HitType, unsigned int, std::hash<int>> HitTypeToIndexMap;
76  HitTypeToIndexMap m_hitTypeToIndexMap;
77 
80 
81  template <typename U>
82  friend class NViewMatchingAlgorithm;
83 };
84 
85 } // namespace lar_content
86 
87 #endif // #ifndef LAR_TWO_VIEW_MATCHING_CONTROL_H
void UpdateForNewCluster(const pandora::Cluster *const pNewCluster)
Update to reflect addition of a new cluster to the problem space.
NViewMatchingAlgorithm class.
TwoViewMatchingControl class.
const std::string & GetClusterListName(const pandora::HitType hitType) const
Get the cluster list name corresponding to a specified hit type.
NViewMatchingControl class.
pandora::ClusterList m_clusterList1
The selected modified cluster list 1.
void TidyUp()
Tidy member variables.
MatrixType & GetOverlapMatrix()
Get the overlap matrix.
void UpdateUponDeletion(const pandora::Cluster *const pDeletedCluster)
Update to reflect cluster deletion.
MatchingBaseAlgorithm class.
void SelectAllInputClusters()
Select a subset of input clusters for processing in this algorithm.
std::string m_inputClusterListName2
The name of the view 2 cluster list.
Header file for the matching control class.
const pandora::ClusterList & GetInputClusterList(const pandora::HitType hitType) const
Get the input cluster list corresponding to a specified hit type.
std::unordered_map< pandora::HitType, unsigned int, std::hash< int > > HitTypeToIndexMap
MatrixType m_overlapMatrix
The overlap matrix.
const pandora::ClusterList * m_pInputClusterList1
Address of the input cluster list 1.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read settings from xml.
pandora::ClusterList m_clusterList2
The selected modified cluster list 2.
HitTypeToIndexMap m_hitTypeToIndexMap
The hit type to index map.
Header file for the lar overlap matrix class.
TwoViewMatchingControl(MatchingBaseAlgorithm *const pAlgorithm)
Constructor.
void PrepareAllInputClusters()
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results...
unsigned int GetHitTypeIndex(const pandora::HitType hitType)
Get the index of an input hit type returning 0 if not found in map.
HitType
Definition: HitType.h:12
const pandora::ClusterList & GetSelectedClusterList(const pandora::HitType hitType) const
Get the selected cluster list corresponding to a specified hit type.
std::string m_inputClusterListName1
The name of the view 1 cluster list.
void PerformMainLoop()
Main loop over cluster combinations in order to populate the overlap container. Responsible for calli...
const pandora::ClusterList * m_pInputClusterList2
Address of the input cluster list 2.
OverlapMatrix class.