ClearShowersTool.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArThreeDReco/LArShowerMatching/ClearShowersTool.h
3  *
4  * @brief Header file for the clear showers tool class.
5  *
6  * $Log: $
7  */
8 #ifndef CLEAR_SHOWERS_TOOL_H
9 #define CLEAR_SHOWERS_TOOL_H 1
10 
12 
13 namespace lar_content
14 {
15 
16 /**
17  * @brief ClearShowersTool class
18  */
20 {
21 public:
22  /**
23  * @brief Default constructor
24  */
26 
27  /**
28  * @brief Whether a large shower-like element shares clusters with any other long elements
29  *
30  * @param iIter specifies the large element under consideration
31  * @param iteratorList list of iterators to other large elements
32  *
33  * @return boolean
34  */
35  static bool HasLargeDirectConnections(IteratorList::const_iterator iIter, const IteratorList &iteratorList);
36 
37  /**
38  * @brief Whether a large shower-like element is significantly larger that other elements with which it shares a cluster
39  *
40  * @param iIter specifies the large element under consideration
41  * @param elementList the full list of connected tensor elements
42  * @param minMatchedSamplingPointRatio the min ratio between 1st and 2nd highest msps for simple ambiguity resolution
43  * @param minMatchedSamplingPointRatio the min ratio between 1st and 2nd highest x-overlap spans for simple ambiguity resolution
44  * @param usedClusters the list of clusters already marked as to be added to a pfo
45  */
47  const unsigned int minMatchedSamplingPointRatio, const float minXOverlapSpanRatio, const pandora::ClusterSet &usedClusters);
48 
49  bool Run(ThreeViewShowersAlgorithm *const pAlgorithm, TensorType &overlapTensor);
50 
51 private:
52  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
53 
54  /**
55  * @brief Find clear shower matches, hidden by simple ambiguities in the tensor
56  *
57  * @param overlapTensor the overlap tensor
58  * @param protoParticleVector to receive the list of proto particles
59  */
60  void FindClearShowers(const TensorType &overlapTensor, ProtoParticleVector &protoParticleVector) const;
61 
62  /**
63  * @brief Select a list of large shower-like elements from a set of connected tensor elements
64  *
65  * @param elementList the full list of connected tensor elements
66  * @param usedClusters the list of clusters already marked as to be added to a pfo
67  * @param iteratorList to receive a list of iterators to large shower-like elements
68  */
69  void SelectLargeShowerElements(const TensorType::ElementList &elementList, const pandora::ClusterSet &usedClusters, IteratorList &iteratorList) const;
70 
71  float m_minMatchedFraction; ///< The min matched sampling point fraction 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  float m_minXOverlapSpanRatio; ///< The min ratio between 1st and 2nd highest x-overlap spans for simple ambiguity resolution
76  bool m_visualize; ///< Visualize cluster split locations
77 };
78 
79 } // namespace lar_content
80 
81 #endif // #ifndef CLEAR_SHOWERS_TOOL_H
std::vector< ProtoParticle > ProtoParticleVector
void FindClearShowers(const TensorType &overlapTensor, ProtoParticleVector &protoParticleVector) const
Find clear shower matches, hidden by simple ambiguities in the tensor.
static bool IsLargerThanDirectConnections(IteratorList::const_iterator iIter, const TensorType::ElementList &elementList, const unsigned int minMatchedSamplingPointRatio, const float minXOverlapSpanRatio, const pandora::ClusterSet &usedClusters)
Whether a large shower-like element is significantly larger that other elements with which it shares ...
void SelectLargeShowerElements(const TensorType::ElementList &elementList, const pandora::ClusterSet &usedClusters, IteratorList &iteratorList) const
Select a list of large shower-like elements from a set of connected tensor elements.
float m_minMatchedFraction
The min matched sampling point fraction for particle creation.
float m_minXOverlapSpanRatio
The min ratio between 1st and 2nd highest x-overlap spans for simple ambiguity resolution.
intermediate_table::const_iterator const_iterator
ClearShowersTool()
Default constructor.
ClearShowersTool class.
std::vector< TensorType::ElementList::const_iterator > IteratorList
static bool HasLargeDirectConnections(IteratorList::const_iterator iIter, const IteratorList &iteratorList)
Whether a large shower-like element shares clusters with any other long elements. ...
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
bool Run(ThreeViewShowersAlgorithm *const pAlgorithm, TensorType &overlapTensor)
Run the algorithm tool.
unsigned int m_minMatchedSamplingPoints
The min number of matched sampling points for particle creation.
float m_minXOverlapFraction
The min x overlap fraction (in each view) for particle creation.
bool m_visualize
Visualize cluster split locations.
Header file for the three view showers algorithm class.
unsigned int m_minMatchedSamplingPointRatio
The min ratio between 1st and 2nd highest msps for simple ambiguity resolution.