Commit 421227a7 authored by Paul Schuetze's avatar Paul Schuetze Committed by Jens Kroeger
Browse files

Bugfix in Tracking4D, accepting tracks with an angle

(cherry picked from commit 8ae4ab87)
parent a4c7596d
......@@ -256,14 +256,20 @@ StatusCode Tracking4D::run(std::shared_ptr<Clipboard> clipboard) {
double norm = (distanceX * distanceX) / (spatial_cuts_[det].x() * spatial_cuts_[det].x()) +
(distanceY * distanceY) / (spatial_cuts_[det].y() * spatial_cuts_[det].y());
if(norm > 1) {
continue;
}
// If this is the closest keep it
if(distance < closestClusterDistance) {
// If this is the second cluster of the track, keep it for now
if(refTrack->nClusters() == 1 && ne == 0) {
closestClusterDistance = distance;
closestCluster = newCluster;
} else {
if(norm > 1) {
continue;
}
// If this is the closest keep it
if(distance < closestClusterDistance) {
closestClusterDistance = distance;
closestCluster = newCluster;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment