LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ThreeViewTransverseTracksAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_THREE_VIEW_TRANSVERSE_TRACKS_ALGORITHM_H
9 #define LAR_THREE_VIEW_TRANSVERSE_TRACKS_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 #include "Pandora/AlgorithmTool.h"
13 
15 
18 
19 namespace lar_content
20 {
21 
22 class TransverseTensorTool;
23 
24 //------------------------------------------------------------------------------------------------------------------------------------------
25 
29 class ThreeViewTransverseTracksAlgorithm : public NViewTrackMatchingAlgorithm<ThreeViewMatchingControl<TransverseOverlapResult>>
30 {
31 public:
33 
38 
39 private:
40  typedef std::map<unsigned int, TransverseOverlapResult> FitSegmentToOverlapResultMap;
41  typedef std::map<unsigned int, FitSegmentToOverlapResultMap> FitSegmentMatrix;
42  typedef std::map<unsigned int, FitSegmentMatrix> FitSegmentTensor;
43 
44  void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW);
45 
56  pandora::StatusCode CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV,
57  const pandora::Cluster *const pClusterW, TransverseOverlapResult &overlapResult);
58 
67  void GetFitSegmentTensor(const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV,
68  const TwoDSlidingFitResult &slidingFitResultW, FitSegmentTensor &fitSegmentTensor) const;
69 
83  pandora::StatusCode GetSegmentOverlap(const FitSegment &fitSegmentU, const FitSegment &fitSegmentV, const FitSegment &fitSegmentW,
84  const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV,
85  const TwoDSlidingFitResult &slidingFitResultW, TransverseOverlapResult &transverseOverlapResult) const;
86 
93  void GetBestOverlapResult(const FitSegmentTensor &fitSegmentTensor, TransverseOverlapResult &bestTransverseOverlapResult) const;
94 
103  void GetPreviousOverlapResults(const unsigned int indexU, const unsigned int indexV, const unsigned int indexW,
104  FitSegmentTensor &fitSegmentSumTensor, TransverseOverlapResultVector &transverseOverlapResultVector) const;
105 
107  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
108 
109  typedef std::vector<TransverseTensorTool *> TensorToolVector;
110  TensorToolVector m_algorithmToolVector;
111 
112  unsigned int m_nMaxTensorToolRepeats;
113  unsigned int m_maxFitSegmentIndex;
120 };
121 
122 //------------------------------------------------------------------------------------------------------------------------------------------
123 
127 class TransverseTensorTool : public pandora::AlgorithmTool
128 {
129 public:
131  typedef std::vector<TensorType::ElementList::const_iterator> IteratorList;
132 
141  virtual bool Run(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, TensorType &overlapTensor) = 0;
142 };
143 
144 } // namespace lar_content
145 
146 #endif // #ifndef LAR_THREE_VIEW_TRANSVERSE_TRACKS_ALGORITHM_H
NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< TransverseOverlapResult > > BaseAlgorithm
Header file for the n view track matching algorithm class.
std::vector< TensorType::ElementList::const_iterator > IteratorList
std::map< unsigned int, FitSegmentMatrix > FitSegmentTensor
ThreeViewTransverseTracksAlgorithm::MatchingType::TensorType TensorType
float m_minSegmentMatchedFraction
The minimum segment matched sampling fraction to allow segment grouping.
float m_minOverallMatchedFraction
The minimum matched sampling fraction to allow particle creation.
std::map< unsigned int, FitSegmentToOverlapResultMap > FitSegmentMatrix
float m_pseudoChi2Cut
The pseudo chi2 cut to identify matched sampling points.
std::vector< TransverseOverlapResult > TransverseOverlapResultVector
void GetPreviousOverlapResults(const unsigned int indexU, const unsigned int indexV, const unsigned int indexW, FitSegmentTensor &fitSegmentSumTensor, TransverseOverlapResultVector &transverseOverlapResultVector) const
Get track overlap results for possible connected segments.
float m_minSamplingPointsPerLayer
The minimum number of sampling points per layer to allow particle creation.
void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW)
Calculate cluster overlap result and store in container.
std::map< unsigned int, TransverseOverlapResult > FitSegmentToOverlapResultMap
TransverseOverlapResult class.
unsigned int m_minSegmentMatchedPoints
The minimum number of matched segment sampling points to allow segment grouping.
TensorToolVector m_algorithmToolVector
The algorithm tool vector.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Header file for the lar track overlap result class.
unsigned int m_maxFitSegmentIndex
The maximum number of fit segments used when identifying best overlap result.
Header file for the three view matching control class.
unsigned int m_minOverallMatchedPoints
The minimum number of matched segment sampling points to allow particle creation. ...
unsigned int m_nMaxTensorToolRepeats
The maximum number of repeat loops over tensor tools.
void GetFitSegmentTensor(const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV, const TwoDSlidingFitResult &slidingFitResultW, FitSegmentTensor &fitSegmentTensor) const
Get the number of matched points for three fit segments and accompanying sliding fit results...
void ExamineOverlapContainer()
Examine contents of overlap container, collect together best-matching 2D particles and modify cluster...
pandora::StatusCode GetSegmentOverlap(const FitSegment &fitSegmentU, const FitSegment &fitSegmentV, const FitSegment &fitSegmentW, const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV, const TwoDSlidingFitResult &slidingFitResultW, TransverseOverlapResult &transverseOverlapResult) const
Get the overlap result for three fit segments and the accompanying sliding fit results.
void GetBestOverlapResult(const FitSegmentTensor &fitSegmentTensor, TransverseOverlapResult &bestTransverseOverlapResult) const
Get the best overlap result, by examining the fit segment tensor.