Whether cluster is identified as a clear track.
94 float straightLineLength(-1.f), integratedPathLength(-1.f);
95 float rTMin(+std::numeric_limits<float>::max()), rTMax(-std::numeric_limits<float>::max());
100 const CartesianVector globalMinLayerPosition(slidingFitResult.GetGlobalMinLayerPosition());
101 straightLineLength = (slidingFitResult.GetGlobalMaxLayerPosition() - globalMinLayerPosition).GetMagnitude();
103 integratedPathLength = 0.f;
104 CartesianVector previousFitPosition(globalMinLayerPosition);
106 for (
const auto &mapEntry : slidingFitResult.GetLayerFitResultMap())
108 rTMin = std::min(rTMin, static_cast<float>(mapEntry.second.GetFitT()));
109 rTMax = std::max(rTMax, static_cast<float>(mapEntry.second.GetFitT()));
111 CartesianVector thisFitPosition(0.f, 0.f, 0.f);
112 slidingFitResult.GetGlobalPosition(mapEntry.second.GetL(), mapEntry.second.GetFitT(), thisFitPosition);
113 integratedPathLength += (thisFitPosition - previousFitPosition).GetMagnitude();
114 previousFitPosition = thisFitPosition;
117 catch (
const StatusCodeException &)
121 if (straightLineLength < std::numeric_limits<float>::epsilon())
127 if ((integratedPathLength < std::numeric_limits<float>::epsilon()) || (integratedPathLength / straightLineLength >
m_pathLengthRatioCut))
135 if ((vertexDistance > std::numeric_limits<float>::epsilon()) && ((vertexDistance / straightLineLength) >
m_vertexDistanceRatioCut))
140 if ((showerFitWidth < std::numeric_limits<float>::epsilon()) || ((showerFitWidth / straightLineLength) >
m_showerWidthRatioCut))
static float GetVertexDistance(const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster)
Get the distance between the interaction vertex (if present in the current vertex list) and a provide...
static float GetWireZPitch(const pandora::Pandora &pandora, const float maxWirePitchDiscrepancy=0.01)
Return the wire pitch.
float m_rTWidthRatioCut
The maximum ratio of transverse fit position width to straight line length to qualify as a track...
float m_vertexDistanceRatioCut
The maximum ratio of vertex separation to straight line length to qualify as a track.
float m_maxShowerLengthCut
The maximum cluster length to qualify as a shower.
unsigned int m_minCaloHitsCut
The minimum number of calo hits to qualify as a track.
unsigned int m_slidingShowerFitWindow
The layer window for the sliding shower fits.
unsigned int m_slidingFitWindow
The layer window for the sliding linear fits.
float m_showerWidthRatioCut
The maximum ratio of shower fit width to straight line length to qualify as a track.
static float GetShowerFitWidth(const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster, const unsigned int showerFitWindow)
Get a measure of the width of a cluster, using a sliding shower fit result.
float m_pathLengthRatioCut
The maximum ratio of path length to straight line length to qualify as a track.