OvershootTracksTool.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArThreeDReco/LArTransverseTrackMatching/OvershootTracksTool.h
3  *
4  * @brief Header file for the overshoot tracks tool class.
5  *
6  * $Log: $
7  */
8 #ifndef OVERSHOOT_TRACKS_TOOL_H
9 #define OVERSHOOT_TRACKS_TOOL_H 1
10 
12 
13 namespace lar_content
14 {
15 
16 /**
17  * @brief OvershootTracksTool class
18  */
20 {
21 public:
22  /**
23  * @brief Default constructor
24  */
26 
27 private:
28  /**
29  * @brief Particle class
30  */
31  class Particle
32  {
33  public:
34  /**
35  * @brief Constructor
36  *
37  * @param elementA the tensor element A
38  * @param elementB the tensor element B
39  */
40  Particle(const TensorType::Element &elementA, const TensorType::Element &elementB);
41 
42  const pandora::Cluster *m_pCommonCluster; ///< Address of the common cluster
43  const pandora::Cluster *m_pClusterA1; ///< Address of cluster in element A, view 1
44  const pandora::Cluster *m_pClusterA2; ///< Address of cluster in element A, view 2
45  const pandora::Cluster *m_pClusterB1; ///< Address of cluster in element B, view 1
46  const pandora::Cluster *m_pClusterB2; ///< Address of cluster in element B, view 2
47  pandora::CartesianVector m_splitPosition; ///< The candidate split position for the common cluster
48  pandora::CartesianVector m_splitPosition1; ///< The candidate split position in view 1
49  pandora::CartesianVector m_splitPosition2; ///< The candidate split position in view 2
50  };
51 
53  ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const IteratorList &iteratorList, ModificationList &modificationList) const;
54  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
55 
56  /**
57  * @brief Whether a pair of vertices pass longitudinal projection cuts
58  *
59  * @param vertexA vertex from cluster in tensor element a
60  * @param vertexB vertex from cluster in tensor element b
61  */
62  bool PassesVertexCuts(const LArPointingCluster::Vertex &vertexA, const LArPointingCluster::Vertex &vertexB) const;
63 
64  /**
65  * @brief Set split position for a provided particle
66  *
67  * @param vertexA1 vertex for tensor element a in view 1
68  * @param vertexA2 vertex for tensor element a in view 2
69  * @param vertexB1 vertex for tensor element b in view 1
70  * @param vertexB2 vertex for tensor element b in view 2
71  * @param particle the particle
72  */
73  void SetSplitPosition(const LArPointingCluster::Vertex &vertexA1, const LArPointingCluster::Vertex &vertexA2,
74  const LArPointingCluster::Vertex &vertexB1, const LArPointingCluster::Vertex &vertexB2, Particle &particle) const;
75 
76  /**
77  * @brief Whether the provided particle is consistent with being a kink, when examined in three dimensions at the split position
78  *
79  * @param pAlgorithm the calling algorithm
80  * @param particle the particle
81  * @param isA1LowestInX whether cluster associated with tensor element a extends to lowest x positions in view 1
82  * @param isA2LowestInX whether cluster associated with tensor element a extends to lowest x positions in view 2
83  *
84  * @return boolean
85  */
86  bool IsThreeDKink(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const Particle &particle, const bool isA1LowestInX,
87  const bool isA2LowestInX) const;
88 
89  bool m_splitMode; ///< Whether to run in cluster splitting mode, as opposed to cluster merging mode
90  float m_maxVertexXSeparation; ///< The max separation between accompanying clusters vertex x positions to make split
91  float m_cosThetaCutForKinkSearch; ///< The cos theta cut used for the kink search in three dimensions
92 };
93 
94 } // namespace lar_content
95 
96 #endif // #ifndef OVERSHOOT_TRACKS_TOOL_H
std::vector< Modification > ModificationList
pandora::CartesianVector m_splitPosition2
The candidate split position in view 2.
bool IsThreeDKink(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const Particle &particle, const bool isA1LowestInX, const bool isA2LowestInX) const
Whether the provided particle is consistent with being a kink, when examined in three dimensions at t...
std::vector< TensorType::ElementList::const_iterator > IteratorList
void GetIteratorListModifications(ThreeViewTransverseTracksAlgorithm *const pAlgorithm, const IteratorList &iteratorList, ModificationList &modificationList) const
Get modification objects for a specific elements of the tensor, identifying required splits and merge...
bool m_splitMode
Whether to run in cluster splitting mode, as opposed to cluster merging mode.
const pandora::Cluster * m_pCommonCluster
Address of the common cluster.
void SetSplitPosition(const LArPointingCluster::Vertex &vertexA1, const LArPointingCluster::Vertex &vertexA2, const LArPointingCluster::Vertex &vertexB1, const LArPointingCluster::Vertex &vertexB2, Particle &particle) const
Set split position for a provided particle.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
OvershootTracksTool class.
const pandora::Cluster * m_pClusterA1
Address of cluster in element A, view 1.
Header file for the three d kink base tool.
float m_maxVertexXSeparation
The max separation between accompanying clusters vertex x positions to make split.
const pandora::Cluster * m_pClusterB2
Address of cluster in element B, view 2.
float m_cosThetaCutForKinkSearch
The cos theta cut used for the kink search in three dimensions.
pandora::CartesianVector m_splitPosition
The candidate split position for the common cluster.
Particle(const TensorType::Element &elementA, const TensorType::Element &elementB)
Constructor.
bool PassesVertexCuts(const LArPointingCluster::Vertex &vertexA, const LArPointingCluster::Vertex &vertexB) const
Whether a pair of vertices pass longitudinal projection cuts.
pandora::CartesianVector m_splitPosition1
The candidate split position in view 1.
ThreeDKinkBaseTool class.
const pandora::Cluster * m_pClusterA2
Address of cluster in element A, view 2.
const pandora::Cluster * m_pClusterB1
Address of cluster in element B, view 1.
OvershootTracksTool()
Default constructor.