8 #ifndef LAR_POINTING_CLUSTER_HELPER_H
9 #define LAR_POINTING_CLUSTER_HELPER_H 1
11 #include "Objects/Cluster.h"
53 const float minLongitudinalDistance,
const float maxTransverseDistance);
68 const float minLongitudinalDistance,
const float maxLongitudinalDistance,
const float maxTransverseDistance,
const float angularAllowance);
80 static pandora::CartesianVector
GetProjectedPosition(
const pandora::CartesianVector &initialPosition,
81 const pandora::CartesianVector &initialDirection,
const pandora::Cluster *
const pCluster,
const float projectionAngularAllowance);
138 float &longitudinal,
float &transverse);
149 float &longitudinal,
float &transverse);
160 float &longitudinal,
float &transverse);
171 static void GetImpactParameters(
const pandora::CartesianVector &initialPosition,
const pandora::CartesianVector &initialDirection,
172 const pandora::CartesianVector &targetPosition,
float &longitudinal,
float &transverse);
184 pandora::CartesianVector &intersectPosition,
float &firstDisplacement,
float &secondDisplacement);
194 pandora::CartesianVector &averageDirection);
207 static void GetIntersection(
const pandora::CartesianVector &firstPosition,
const pandora::CartesianVector &firstDirection,
208 const pandora::CartesianVector &secondPosition,
const pandora::CartesianVector &secondDirection,
209 pandora::CartesianVector &intersectPosition,
float &firstDisplacement,
float &secondDisplacement);
221 pandora::CartesianVector &intersectPosition,
float &displacementL,
float &displacementT);
236 const LArPointingClusterList &pointingClusterList,
const float minLongitudinalDistance,
const float maxLongitudinalDistance,
237 const float maxTransverseDistance,
const float angularAllowance);
252 const float minLongitudinalDistance,
const float maxLongitudinalDistance,
const float maxTransverseDistance,
268 #endif // #ifndef LAR_POINTING_CLUSTER_HELPER_H
Header file for the lar pointing cluster class.
static bool IsEmission(const pandora::CartesianVector &parentVertex, const LArPointingCluster::Vertex &daughterVertex, const float minLongitudinalDistance, const float maxLongitudinalDistance, const float maxTransverseDistance, const float angularAllowance)
Whether pointing vertex is emitted from a given position.
static void GetClosestVerticesInYZ(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 yz-separation.
static void GetIntersection(const LArPointingCluster::Vertex &firstVertex, const LArPointingCluster::Vertex &secondVertex, pandora::CartesianVector &intersectPosition, float &firstDisplacement, float &secondDisplacement)
Get intersection of two vertices.
std::vector< LArPointingCluster > LArPointingClusterList
static void GetImpactParametersInYZ(const LArPointingCluster::Vertex &pointingVertex, const LArPointingCluster::Vertex &targetVertex, float &longitudinal, float &transverse)
Calculate impact parameters between a pair of pointing vertices using yz-coordinates.
static pandora::CartesianVector GetProjectedPosition(const pandora::CartesianVector &initialPosition, const pandora::CartesianVector &initialDirection, const pandora::Cluster *const pCluster, const float projectionAngularAllowance)
Get projected position on a cluster from a specified position and direction.
static void GetImpactParameters(const LArPointingCluster::Vertex &pointingVertex, const LArPointingCluster::Vertex &targetVertex, float &longitudinal, float &transverse)
Calculate impact parameters between a pair of pointing vertices.
static float GetLength(const LArPointingCluster &pointingCluster)
Calculate distance squared between inner and outer vertices of pointing cluster.
LArPointingCluster class.
LArPointingClusterHelper class.
static void GetClosestVertices(const bool useX, const bool useY, const bool useZ, const LArPointingCluster &pointingClusterI, const LArPointingCluster &pointingClusterJ, LArPointingCluster::Vertex &closestVertexI, LArPointingCluster::Vertex &closestVertexJ)
Given a pair of pointing clusters, receive the closest or farthest pair of vertices.
std::vector< LArPointingCluster::Vertex > LArPointingClusterVertexList
static void CollectAssociatedClusters(const LArPointingCluster::Vertex &vertex, const LArPointingClusterList &inputList, const float minLongitudinalDistance, const float maxLongitudinalDistance, const float maxTransverseDistance, const float angularAllowance, LArPointingClusterVertexList &outputList)
Collect cluster vertices, from a provided input list, associated with a specified vertex...
static float GetAssociatedEnergy(const LArPointingCluster::Vertex &vertex, const LArPointingClusterVertexList &clusterVertices)
Get an estimate of the energy associated with a specified vertex.
static void GetAverageDirection(const LArPointingCluster::Vertex &firstVertex, const LArPointingCluster::Vertex &secondVertex, pandora::CartesianVector &averageDirection)
Get average direction of two vertices.
static LArPointingCluster::Vertex GetBestVertexEstimate(const LArPointingClusterVertexList &vertexList, const LArPointingClusterList &pointingClusterList, const float minLongitudinalDistance, const float maxLongitudinalDistance, const float maxTransverseDistance, const float angularAllowance)
Simple and fast vertex selection, choosing best vertex from a specified list to represent a set of po...
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.
static float GetLengthSquared(const LArPointingCluster &pointingCluster)
Calculate distance squared between inner and outer vertices of pointing cluster.
static bool IsNode(const pandora::CartesianVector &parentVertex, const LArPointingCluster::Vertex &daughterVertex, const float minLongitudinalDistance, const float maxTransverseDistance)
Whether pointing vertex is adjacent to a given position.