Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
TwoViewThreeDKinkTool.h
Go to the documentation of this file.
1
8#ifndef TWO_VIEW_THREE_D_KINK_TOOL_H
9#define TWO_VIEW_THREE_D_KINK_TOOL_H 1
10
12
14
15namespace lar_content
16{
17
22{
23public:
30
34 virtual ~TwoViewThreeDKinkTool();
35
36 bool Run(TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix);
37
38private:
49
50 typedef std::vector<Modification> ModificationList;
51
56 {
57 public:
64 Particle(const MatrixType::Element &elementA, const MatrixType::Element &elementB);
65
69 };
70
79 void GetModifications(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const MatrixType &overlapMatrix, ModificationList &modificationList) const;
80
88 bool PassesElementCuts(MatrixType::ElementList::const_iterator eIter, const pandora::ClusterSet &usedClusters) const;
89
99 void SelectMatrixElements(MatrixType::ElementList::const_iterator eIter, const MatrixType::ElementList &elementList,
100 const pandora::ClusterSet &usedClusters, IteratorList &iteratorList) const;
101
110 TwoViewTransverseTracksAlgorithm *const pAlgorithm, const IteratorList &iteratorList, ModificationList &modificationList) const;
111
119 static bool IsALowestInX(const LArPointingCluster &pointingClusterA, const LArPointingCluster &pointingClusterB);
120
133 bool IsThreeDKink(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const Particle &particle,
134 const pandora::CartesianVector &splitPosition, const bool isALowestInX) const;
135
147 float GetXSamplingPoint(const pandora::CartesianVector &splitPosition1, const bool isForwardInX, const TwoDSlidingFitResult &fitResult1,
148 const TwoDSlidingFitResult &fitResult2) const;
149
159 bool ApplyChanges(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const ModificationList &modificationList) const;
160
162
172};
173
174} // namespace lar_content
175
176#endif // #ifndef TWO_VIEW_THREE_D_KINK_TOOL_H
Header file for the lar pointing cluster class.
Header file for the two view transverse tracks algorithm class.
LArPointingCluster class.
TwoViewTransverseTracksAlgorithm::MatchingType::MatrixType MatrixType
std::vector< MatrixType::ElementList::const_iterator > IteratorList
const pandora::Cluster * m_pClusterA
Address of non-shared cluster in element A.
const pandora::Cluster * m_pCommonCluster
Address of the common cluster.
const pandora::Cluster * m_pClusterB
Address of non-shared cluster in element B.
float GetXSamplingPoint(const pandora::CartesianVector &splitPosition1, const bool isForwardInX, const TwoDSlidingFitResult &fitResult1, const TwoDSlidingFitResult &fitResult2) const
Get a sampling point in x that is common to sliding linear fit objects in two views.
SplitPositionMap m_splitPositionMap
The split position map.
bool IsThreeDKink(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const Particle &particle, const pandora::CartesianVector &splitPosition, const bool isALowestInX) const
Whether the provided particle is consistent with being a kink, when examined in three dimensions at t...
bool PassesElementCuts(MatrixType::ElementList::const_iterator eIter, const pandora::ClusterSet &usedClusters) const
Whether a provided (iterator to a) matrix element passes the selection cuts for overshoot identificat...
float m_additionalXStepForKinkSearch
An additional (safety) step to tack-on when choosing x sampling.
std::vector< Modification > ModificationList
int m_nLayersForKinkSearch
The number of sliding fit layers to step in the kink search.
void GetIteratorListModifications(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const IteratorList &iteratorList, ModificationList &modificationList) const
Get modification objects for specific elements of the matrix, identifying required splits and merges ...
ClusterMergeMap m_clusterMergeMap
The cluster merge map.
float m_minMatchingScore
The min global matching score for particle creation.
float m_maxTransverseImpactParameter
The maximum transverse impact parameter for connecting broken clusters.
float m_minXOverlapFraction
The min x overlap fraction value for particle creation.
void SelectMatrixElements(MatrixType::ElementList::const_iterator eIter, const MatrixType::ElementList &elementList, const pandora::ClusterSet &usedClusters, IteratorList &iteratorList) const
Select elements representing possible components of interest due to overshoots or undershoots in clus...
bool Run(TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix)
Run the algorithm tool.
float m_minLongitudinalImpactParameter
The min longitudinal impact parameter for connecting accompanying 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 m_minLocallyMatchedFraction
The min locally matched fraction for particle creation.
pandora::ClusterList m_affectedClusters
The list of affected clusters.
float m_minImpactParameterCosTheta
The minimum cos theta (angle between vertex directions) for connecting broken clusters.
float m_cosThetaCutForKinkSearch
The cos theta cut used for the kink search in three dimensions.
bool ApplyChanges(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const ModificationList &modificationList) const
Apply the changes cached in a modification list and update the matrix accordingly.
void GetModifications(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const MatrixType &overlapMatrix, ModificationList &modificationList) const
Get modification objects, identifying required splits and merges for clusters.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
CartesianVector class.
Cluster class.
Definition Cluster.h:31
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.