ThreeViewLongitudinalTracksAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArThreeDReco/LArLongitudinalTrackMatching/ThreeViewLongitudinalTracksAlgorithm.h
3  *
4  * @brief Header file for the three view longitudinal tracks algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_THREE_VIEW_LONGITUDINAL_TRACKS_ALGORITHM_H
9 #define LAR_THREE_VIEW_LONGITUDINAL_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 LongitudinalTensorTool;
23 
24 //------------------------------------------------------------------------------------------------------------------------------------------
25 
26 /**
27  * @brief ThreeViewLongitudinalTracksAlgorithm class
28  */
29 class ThreeViewLongitudinalTracksAlgorithm : public NViewTrackMatchingAlgorithm<ThreeViewMatchingControl<LongitudinalOverlapResult>>
30 {
31 public:
33 
34  /**
35  * @brief Default constructor
36  */
38 
39 private:
40  void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW);
41 
42  /**
43  * @brief Calculate the overlap result for given group of clusters
44  *
45  * @param pClusterU the cluster from the U view
46  * @param pClusterV the cluster from the V view
47  * @param pClusterW the cluster from the W view
48  * @param overlapResult to receive the overlap result
49  */
50  void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV,
51  const pandora::Cluster *const pClusterW, LongitudinalOverlapResult &overlapResult);
52 
53  /**
54  * @brief Calculate the overlap result for given 3D vertex and end positions
55  *
56  * @param slidingFitResultU the sliding fit result u
57  * @param slidingFitResultV the sliding fit result v
58  * @param slidingFitResultW the sliding fit result w
59  * @param vtxMerged3D the 3D vertex position
60  * @param endMerged3D the 3D end position
61  * @param overlapResult to receive the overlap result
62  */
63  void CalculateOverlapResult(const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV,
64  const TwoDSlidingFitResult &slidingFitResultW, const pandora::CartesianVector &vtxMerged3D,
65  const pandora::CartesianVector &endMerged3D, TrackOverlapResult &overlapResult) const;
66 
68 
69  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
70 
71  typedef std::vector<LongitudinalTensorTool *> TensorToolVector;
72  TensorToolVector m_algorithmToolVector; ///< The algorithm tool vector
73 
74  unsigned int m_nMaxTensorToolRepeats; ///< The maximum number of repeat loops over tensor tools
75  float m_vertexChi2Cut; ///< The maximum allowed chi2 for associating end points from three views
76  float m_reducedChi2Cut; ///< The maximum allowed chi2 for associating hit positions from three views
77  float m_samplingPitch; ///< Pitch used to generate sampling points along tracks
78 };
79 
80 //------------------------------------------------------------------------------------------------------------------------------------------
81 
82 /**
83  * @brief LongitudinalTensorTool class
84  */
85 class LongitudinalTensorTool : public pandora::AlgorithmTool
86 {
87 public:
89  typedef std::vector<TensorType::ElementList::const_iterator> IteratorList;
90 
91  /**
92  * @brief Run the algorithm tool
93  *
94  * @param pAlgorithm address of the calling algorithm
95  * @param overlapTensor the overlap tensor
96  *
97  * @return whether changes have been made by the tool
98  */
99  virtual bool Run(ThreeViewLongitudinalTracksAlgorithm *const pAlgorithm, TensorType &overlapTensor) = 0;
100 };
101 
102 } // namespace lar_content
103 
104 #endif // #ifndef LAR_THREE_VIEW_LONGITUDINAL_TRACKS_ALGORITHM_H
LongitudinalOverlapResult class.
std::vector< TensorType::ElementList::const_iterator > IteratorList
Header file for the n view track matching algorithm class.
void ExamineOverlapContainer()
Examine contents of overlap container, collect together best-matching 2D particles and modify cluster...
unsigned int m_nMaxTensorToolRepeats
The maximum number of repeat loops over tensor tools.
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.
float m_samplingPitch
Pitch used to generate sampling points along tracks.
TensorToolVector m_algorithmToolVector
The algorithm tool vector.
NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< LongitudinalOverlapResult > > BaseAlgorithm
ThreeViewLongitudinalTracksAlgorithm::MatchingType::TensorType TensorType
TrackOverlapResult class.
Header file for the lar track overlap result class.
float m_vertexChi2Cut
The maximum allowed chi2 for associating end points from three views.
Header file for the three view matching control class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float m_reducedChi2Cut
The maximum allowed chi2 for associating hit positions from three views.