22 const Cluster *
const pCluster,
const float tanAngle,
const float apexShift)
24 if ((VERTEX_3D != pVertex->GetVertexType()) || (tanAngle < std::numeric_limits<float>::epsilon()))
25 throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
27 const HitType hitType(LArClusterHelper::GetClusterHitType(pCluster));
28 const CartesianVector theVertex2D(LArGeometryHelper::ProjectPosition(pandora, pVertex->GetPosition(), hitType));
38 LArPointingClusterHelper::GetImpactParameters(pointingCluster.
GetInnerVertex(), theVertex2D, rLInner, rTInner);
39 LArPointingClusterHelper::GetImpactParameters(pointingCluster.
GetOuterVertex(), theVertex2D, rLOuter, rTOuter);
41 const bool innerIsVertexAssociated(rLInner > (rTInner / tanAngle) - (length * apexShift));
42 const bool outerIsVertexAssociated(rLOuter > (rTInner / tanAngle) - (length * apexShift));
44 if (innerIsVertexAssociated == outerIsVertexAssociated)
45 return DIRECTION_UNKNOWN;
47 if ((innerIsVertexAssociated && innerIsAtLowerZ) || (outerIsVertexAssociated && !innerIsAtLowerZ))
48 return DIRECTION_FORWARD_IN_Z;
50 if ((innerIsVertexAssociated && !innerIsAtLowerZ) || (outerIsVertexAssociated && innerIsAtLowerZ))
51 return DIRECTION_BACKWARD_IN_Z;
53 catch (StatusCodeException &)
55 return DIRECTION_UNKNOWN;
58 throw StatusCodeException(STATUS_CODE_FAILURE);
LArPointingCluster class.
Header file for the geometry helper class.
Header file for the cluster helper class.
const Vertex & GetOuterVertex() const
Get the outer vertex.
const Vertex & GetInnerVertex() const
Get the inner vertex.
Header file for the vertex helper class.
const pandora::CartesianVector & GetPosition() const
Get the vertex position.