Get modification objects for a specific elements of the tensor, identifying required splits and merges for clusters.
44 const unsigned int nMatchedSamplingPoints1((*iIter1)->GetOverlapResult().GetNMatchedSamplingPoints());
45 const unsigned int nMatchedSamplingPoints2((*iIter2)->GetOverlapResult().GetNMatchedSamplingPoints());
49 Particle particle(*(*iIterA), *(*iIterB));
50 const LArPointingCluster pointingClusterA1(pAlgorithm->GetCachedSlidingFitResult(particle.m_pClusterA1));
51 const LArPointingCluster pointingClusterB1(pAlgorithm->GetCachedSlidingFitResult(particle.m_pClusterB1));
52 const LArPointingCluster pointingClusterA2(pAlgorithm->GetCachedSlidingFitResult(particle.m_pClusterA2));
53 const LArPointingCluster pointingClusterB2(pAlgorithm->GetCachedSlidingFitResult(particle.m_pClusterB2));
64 const bool isA1LowestInX(this->
IsALowestInX(pointingClusterA1, pointingClusterB1));
65 const bool isA2LowestInX(this->
IsALowestInX(pointingClusterA2, pointingClusterB2));
72 Modification modification;
76 modification.m_splitPositionMap[particle.m_pCommonCluster].push_back(particle.m_splitPosition);
80 const bool vertex1AIsLowX(vertexA1.GetPosition().GetX() < vertexB1.GetPosition().GetX());
81 const Cluster *
const pLowXCluster1(vertex1AIsLowX ? particle.m_pClusterA1 : particle.m_pClusterB1);
82 const Cluster *
const pHighXCluster1(vertex1AIsLowX ? particle.m_pClusterB1 : particle.m_pClusterA1);
83 modification.m_clusterMergeMap[pLowXCluster1].push_back(pHighXCluster1);
85 const bool vertex2AIsLowX(vertexA2.GetPosition().GetX() < vertexB2.GetPosition().GetX());
86 const Cluster *
const pLowXCluster2(vertex2AIsLowX ? particle.m_pClusterA2 : particle.m_pClusterB2);
87 const Cluster *
const pHighXCluster2(vertex2AIsLowX ? particle.m_pClusterB2 : particle.m_pClusterA2);
88 modification.m_clusterMergeMap[pLowXCluster2].push_back(pHighXCluster2);
91 modification.m_affectedClusters.push_back(particle.m_pCommonCluster);
92 modification.m_affectedClusters.push_back(particle.m_pClusterA1);
93 modification.m_affectedClusters.push_back(particle.m_pClusterA2);
94 modification.m_affectedClusters.push_back(particle.m_pClusterB1);
95 modification.m_affectedClusters.push_back(particle.m_pClusterB2);
97 modificationList.push_back(modification);
99 catch (StatusCodeException &statusCodeException)
101 if (STATUS_CODE_FAILURE == statusCodeException.GetStatusCode())
102 throw statusCodeException;
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...
bool m_splitMode
Whether to run in cluster splitting mode, as opposed to cluster merging mode.
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.
static bool IsALowestInX(const LArPointingCluster &pointingClusterA, const LArPointingCluster &pointingClusterB)
Whether pointing cluster labelled A extends to lowest x positions (as opposed to that labelled B) ...
bool PassesVertexCuts(const LArPointingCluster::Vertex &vertexA, const LArPointingCluster::Vertex &vertexB) const
Whether a pair of vertices pass longitudinal projection cuts.
static void GetClosestVerticesInX(const LArPointingCluster &pointingClusterI, const LArPointingCluster &pointingClusterJ, LArPointingCluster::Vertex &closestVertexI, LArPointingCluster::Vertex &closestVertexJ)
Given a pair of pointing clusters, find the pair of vertices with smallest x-separation.
bool m_majorityRulesMode
Whether to run in majority rules mode (always split overshoots, always merge undershoots) ...
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex