Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ThreeDKinkBaseTool.h
Go to the documentation of this file.
1
8#ifndef THREE_D_KINK_BASE_TOOL_H
9#define THREE_D_KINK_BASE_TOOL_H 1
10
12
14
15namespace lar_content
16{
17
22{
23public:
29 ThreeDKinkBaseTool(const unsigned int nCommonClusters);
30
34 virtual ~ThreeDKinkBaseTool();
35
36 bool Run(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, TensorType &overlapTensor);
37
38protected:
49
50 typedef std::vector<Modification> ModificationList;
51
58 virtual bool PassesElementCuts(TensorType::ElementList::const_iterator eIter, const pandora::ClusterSet &usedClusters) const;
59
67 virtual void GetIteratorListModifications(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const IteratorList &iteratorList,
68 ModificationList &modificationList) const = 0;
69
81 float GetXSamplingPoint(const pandora::CartesianVector &splitPosition1, const bool isForwardInX, const TwoDSlidingFitResult &fitResult1,
82 const TwoDSlidingFitResult &fitResult2, const TwoDSlidingFitResult &fitResult3) const;
83
90 static bool IsALowestInX(const LArPointingCluster &pointingClusterA, const LArPointingCluster &pointingClusterB);
91
93
94 unsigned int m_nCommonClusters;
101
102private:
110 void GetModifications(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const TensorType &overlapTensor, ModificationList &modificationList) const;
111
120 void SelectTensorElements(TensorType::ElementList::const_iterator eIter, const TensorType::ElementList &elementList,
121 const pandora::ClusterSet &usedClusters, IteratorList &iteratorList) const;
122
131 bool ApplyChanges(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const ModificationList &modificationList) const;
132};
133
134} // namespace lar_content
135
136#endif // #ifndef THREE_D_KINK_BASE_TOOL_H
Header file for the lar pointing cluster class.
Header file for the three view transverse tracks algorithm class.
LArPointingCluster class.
ThreeDKinkBaseTool class.
virtual ~ThreeDKinkBaseTool()
Destructor.
void GetModifications(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const TensorType &overlapTensor, ModificationList &modificationList) const
Get modification objects, identifying required splits and merges for clusters.
static bool IsALowestInX(const LArPointingCluster &pointingClusterA, const LArPointingCluster &pointingClusterB)
Whether pointing cluster labelled A extends to lowest x positions (as opposed to that labelled B)
float GetXSamplingPoint(const pandora::CartesianVector &splitPosition1, const bool isForwardInX, const TwoDSlidingFitResult &fitResult1, const TwoDSlidingFitResult &fitResult2, const TwoDSlidingFitResult &fitResult3) const
Get a sampling point in x that is common to sliding linear fit objects in three views.
float m_minMatchedFraction
The min matched sampling point fraction for use as a key tensor element.
bool Run(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, TensorType &overlapTensor)
Run the algorithm tool.
void SelectTensorElements(TensorType::ElementList::const_iterator eIter, const TensorType::ElementList &elementList, const pandora::ClusterSet &usedClusters, IteratorList &iteratorList) const
Select elements representing possible components of interest due to overshoots or undershoots in clus...
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
virtual bool PassesElementCuts(TensorType::ElementList::const_iterator eIter, const pandora::ClusterSet &usedClusters) const
Whether a provided (iterator to a) tensor element passes the selection cuts for overshoot identificat...
virtual void GetIteratorListModifications(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const IteratorList &iteratorList, ModificationList &modificationList) const =0
Get modification objects for a specific elements of the tensor, identifying required splits and merge...
unsigned int m_nCommonClusters
The number of common clusters.
bool ApplyChanges(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const ModificationList &modificationList) const
Apply the changes cached in a modification list and update the tensor accordingly.
pandora::ClusterList m_affectedClusters
The list of affected clusters.
float m_additionalXStepForKinkSearch
An additional (safety) step to tack-on when choosing x sampling points.
float m_minLongitudinalImpactParameter
The min longitudinal impact parameter for connecting accompanying clusters.
int m_nLayersForKinkSearch
The number of sliding fit layers to step in the kink search.
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for use as a key tensor element.
bool m_majorityRulesMode
Whether to run in majority rules mode (always split overshoots, always merge undershoots)
std::vector< Modification > ModificationList
ClusterMergeMap m_clusterMergeMap
The cluster merge map.
SplitPositionMap m_splitPositionMap
The split position map.
ThreeViewTransverseTracksAlgorithm::MatchingType::TensorType TensorType
std::vector< TensorType::ElementList::const_iterator > IteratorList
CartesianVector class.
std::unordered_map< const pandora::Cluster *, pandora::ClusterList > ClusterMergeMap
std::unordered_map< const pandora::Cluster *, pandora::CartesianPointVector > SplitPositionMap
MANAGED_CONTAINER< const Cluster * > ClusterList
std::unordered_set< const Cluster * > ClusterSet
StatusCode
The StatusCode enum.