LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
ThreeDTransverseTracksAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_THREE_D_TRANSVERSE_TRACKS_ALGORITHM_H
9 #define LAR_THREE_D_TRANSVERSE_TRACKS_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 #include "Pandora/AlgorithmTool.h"
13 
15 
17 
18 namespace lar_content
19 {
20 
21 class TransverseTensorTool;
22 
23 //------------------------------------------------------------------------------------------------------------------------------------------
24 
28 class ThreeDTransverseTracksAlgorithm : public ThreeDTracksBaseAlgorithm<TransverseOverlapResult>
29 {
30 public:
35 
36 private:
37  typedef std::map<unsigned int, TransverseOverlapResult> FitSegmentToOverlapResultMap;
38  typedef std::map<unsigned int, FitSegmentToOverlapResultMap> FitSegmentMatrix;
39  typedef std::map<unsigned int, FitSegmentMatrix> FitSegmentTensor;
40 
41  void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW);
42 
53  pandora::StatusCode CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW,
54  TransverseOverlapResult &overlapResult);
55 
64  void GetFitSegmentTensor(const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV,
65  const TwoDSlidingFitResult &slidingFitResultW, FitSegmentTensor &fitSegmentTensor) const;
66 
80  pandora::StatusCode GetSegmentOverlap(const FitSegment &fitSegmentU, const FitSegment &fitSegmentV, const FitSegment &fitSegmentW,
81  const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV, const TwoDSlidingFitResult &slidingFitResultW,
82  TransverseOverlapResult &transverseOverlapResult) const;
83 
90  void GetBestOverlapResult(const FitSegmentTensor &fitSegmentTensor, TransverseOverlapResult &bestTransverseOverlapResult) const;
91 
100  void GetPreviousOverlapResults(const unsigned int indexU, const unsigned int indexV, const unsigned int indexW,
101  FitSegmentTensor &fitSegmentSumTensor, TransverseOverlapResultVector &transverseOverlapResultVector) const;
102 
103  void ExamineTensor();
104  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
105 
106  typedef std::vector<TransverseTensorTool*> TensorToolVector;
107  TensorToolVector m_algorithmToolVector;
108 
109  unsigned int m_nMaxTensorToolRepeats;
110  unsigned int m_maxFitSegmentIndex;
117 };
118 
119 //------------------------------------------------------------------------------------------------------------------------------------------
120 
124 class TransverseTensorTool : public pandora::AlgorithmTool
125 {
126 public:
128  typedef std::vector<TensorType::ElementList::const_iterator> IteratorList;
129 
138  virtual bool Run(ThreeDTransverseTracksAlgorithm *const pAlgorithm, TensorType &overlapTensor) = 0;
139 };
140 
141 } // namespace lar_content
142 
143 #endif // #ifndef LAR_THREE_D_TRANSVERSE_TRACKS_ALGORITHM_H
float m_minSegmentMatchedFraction
The minimum segment matched sampling fraction to allow segment grouping.
float m_pseudoChi2Cut
The pseudo chi2 cut to identify matched sampling points.
void GetBestOverlapResult(const FitSegmentTensor &fitSegmentTensor, TransverseOverlapResult &bestTransverseOverlapResult) const
Get the best overlap result, by examining the fit segment tensor.
unsigned int m_maxFitSegmentIndex
The maximum number of fit segments used when identifying best overlap result.
std::vector< TensorType::ElementList::const_iterator > IteratorList
std::map< unsigned int, FitSegmentToOverlapResultMap > FitSegmentMatrix
unsigned int m_minOverallMatchedPoints
The minimum number of matched segment sampling points to allow particle creation. ...
TensorToolVector m_algorithmToolVector
The algorithm tool vector.
std::vector< TransverseOverlapResult > TransverseOverlapResultVector
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
ThreeDTransverseTracksAlgorithm class.
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...
TransverseOverlapResult class.
void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW)
Calculate cluster overlap result and store in tensor.
unsigned int m_nMaxTensorToolRepeats
The maximum number of repeat loops over tensor tools.
Header file for the lar track overlap result class.
std::map< unsigned int, TransverseOverlapResult > FitSegmentToOverlapResultMap
ThreeDTransverseTracksAlgorithm::TensorType TensorType
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_minOverallMatchedFraction
The minimum matched sampling fraction to allow particle creation.
void ExamineTensor()
Examine contents of tensor, collect together best-matching 2D particles and modify clusters as requir...
float m_minSamplingPointsPerLayer
The minimum number of sampling points per layer to allow particle creation.
Header file for the three dimensional tracks algorithm base class.
std::vector< TransverseTensorTool * > TensorToolVector
std::map< unsigned int, FitSegmentMatrix > FitSegmentTensor
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.
unsigned int m_minSegmentMatchedPoints
The minimum number of matched segment sampling points to allow segment grouping.