LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 
15 namespace lar_content
16 {
17 
22 {
23 public:
30 
34  virtual ~TwoViewThreeDKinkTool();
35 
36  bool Run(TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix);
37 
38 private:
43  {
44  public:
47  pandora::ClusterList m_affectedClusters;
48  };
49 
50  typedef std::vector<Modification> ModificationList;
51 
55  class Particle
56  {
57  public:
64  Particle(const MatrixType::Element &elementA, const MatrixType::Element &elementB);
65 
66  const pandora::Cluster *m_pClusterA;
67  const pandora::Cluster *m_pClusterB;
68  const pandora::Cluster *m_pCommonCluster;
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 
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 
161  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
162 
172 };
173 
174 } // namespace lar_content
175 
176 #endif // #ifndef TWO_VIEW_THREE_D_KINK_TOOL_H
float m_minLocallyMatchedFraction
The min locally matched fraction for particle creation.
Header file for the lar pointing cluster class.
const pandora::Cluster * m_pClusterB
Address of non-shared cluster in element B.
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) ...
SplitPositionMap m_splitPositionMap
The split position map.
LArPointingCluster class.
std::vector< Modification > ModificationList
float m_minMatchingScore
The min global matching score for particle creation.
const pandora::Cluster * m_pClusterA
Address of non-shared cluster in element A.
float m_minXOverlapFraction
The min x overlap fraction value for particle creation.
float m_additionalXStepForKinkSearch
An additional (safety) step to tack-on when choosing x sampling.
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...
TwoViewThreeDKinkTool class.
void GetModifications(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const MatrixType &overlapMatrix, ModificationList &modificationList) const
Get modification objects, identifying required splits and merges for clusters.
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...
std::unordered_map< const pandora::Cluster *, pandora::CartesianPointVector > SplitPositionMap
float m_maxTransverseImpactParameter
The maximum transverse impact parameter for connecting broken clusters.
int m_nLayersForKinkSearch
The number of sliding fit layers to step in the kink search.
Header file for the two view transverse tracks algorithm class.
bool Run(TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix)
Run the algorithm tool.
float m_cosThetaCutForKinkSearch
The cos theta cut used for the kink search in three dimensions.
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...
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float m_minImpactParameterCosTheta
The minimum cos theta (angle between vertex directions) for connecting broken clusters.
pandora::ClusterList m_affectedClusters
The list of affected clusters.
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 ...
bool ApplyChanges(TwoViewTransverseTracksAlgorithm *const pAlgorithm, const ModificationList &modificationList) const
Apply the changes cached in a modification list and update the matrix accordingly.
std::unordered_map< const pandora::Cluster *, pandora::ClusterList > ClusterMergeMap
ClusterMergeMap m_clusterMergeMap
The cluster merge map.
float m_minLongitudinalImpactParameter
The min longitudinal impact parameter for connecting accompanying clusters.
std::vector< MatrixType::ElementList::const_iterator > IteratorList
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.
const pandora::Cluster * m_pCommonCluster
Address of the common cluster.