All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TwoViewLongTracksTool.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArThreeDReco/LArTwoViewMatching/TwoViewLongTracksTool.h
3  *
4  * @brief Header file for the long tracks tool class.
5  *
6  * $Log: $
7  */
8 #ifndef TWO_VIEW_LONG_TRACKS_TOOL_H
9 #define TWO_VIEW_LONG_TRACKS_TOOL_H 1
10 
12 
13 namespace lar_content
14 {
15 
16 /**
17  * @brief TwoViewLongTracksTool class
18  */
20 {
21 public:
22  /**
23  * @brief Default constructor
24  */
26 
27  /**
28  * @brief Whether a long element shares clusters with any other long elements
29  *
30  * @param iIter specifies the long element under consideration
31  * @param iteratorList list of iterators to other long elements
32  *
33  * @return boolean
34  */
35  static bool HasLongDirectConnections(IteratorList::const_iterator iIter, const IteratorList &iteratorList);
36 
37  /**
38  * @brief Whether a long element is significantly longer that other elements with which it shares a cluster
39  *
40  * @param iIter specifies the long element under consideration
41  * @param elementList the full list of connected matrix elements
42  * @param minMatchedSamplingPointRatio the min ratio between 1st and 2nd highest msps for simple ambiguity resolution
43  * @param usedClusters the list of clusters already marked as to be added to a pfo
44  */
45  static bool IsLongerThanDirectConnections(IteratorList::const_iterator iIter, const MatrixType::ElementList &elementList,
46  const unsigned int minMatchedSamplingPointRatio, const pandora::ClusterSet &usedClusters);
47 
48  bool Run(TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix);
49 
50 private:
51  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
52 
53  /**
54  * @brief Find long tracks, hidden by simple ambiguities in the matrix
55  *
56  * @param overlapMatrix the overlap matrix
57  * @param protoParticleVector to receive the list of proto particles
58  */
59  void FindLongTracks(const MatrixType &overlapMatrix, ProtoParticleVector &protoParticleVector) const;
60 
61  /**
62  * @brief Select a list of long track-like elements from a set of connected matrix elements
63  *
64  * @param elementList the full list of connected matrix elements
65  * @param usedClusters the list of clusters already marked as to be added to a pfo
66  * @param iteratorList to receive a list of iterators to long track-like elements
67  */
68  void SelectLongElements(const MatrixType::ElementList &elementList, const pandora::ClusterSet &usedClusters, IteratorList &iteratorList) const;
69 
70  float m_minMatchedFraction; ///< The min matched sampling point fraction for particle creation
71  float m_minMatchingScore; ///< The min global matching score for particle creation
72  unsigned int m_minMatchedSamplingPoints; ///< The min number of matched sampling points for particle creation
73  float m_minXOverlapFraction; ///< The min x overlap fraction (in each view) for particle creation
74  unsigned int m_minMatchedSamplingPointRatio; ///< The min ratio between 1st and 2nd highest msps for simple ambiguity resolution
75 };
76 
77 } // namespace lar_content
78 
79 #endif // #ifndef TWO_VIEW_LONG_TRACKS_TOOL_H
std::vector< ProtoParticle > ProtoParticleVector
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
float m_minMatchingScore
The min global matching score for particle creation.
static bool HasLongDirectConnections(IteratorList::const_iterator iIter, const IteratorList &iteratorList)
Whether a long element shares clusters with any other long elements.
static bool IsLongerThanDirectConnections(IteratorList::const_iterator iIter, const MatrixType::ElementList &elementList, const unsigned int minMatchedSamplingPointRatio, const pandora::ClusterSet &usedClusters)
Whether a long element is significantly longer that other elements with which it shares a cluster...
bool Run(TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix)
Run the algorithm tool.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for particle creation.
Header file for the two view transverse tracks algorithm class.
unsigned int m_minMatchedSamplingPointRatio
The min ratio between 1st and 2nd highest msps for simple ambiguity resolution.
TwoViewLongTracksTool class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
void SelectLongElements(const MatrixType::ElementList &elementList, const pandora::ClusterSet &usedClusters, IteratorList &iteratorList) const
Select a list of long track-like elements from a set of connected matrix elements.
void FindLongTracks(const MatrixType &overlapMatrix, ProtoParticleVector &protoParticleVector) const
Find long tracks, hidden by simple ambiguities in the matrix.
std::vector< MatrixType::ElementList::const_iterator > IteratorList
TwoViewLongTracksTool()
Default constructor.