10 #include <tracking/ckf/cdc/filters/pathPairs/BaseCDCPathPairFilter.h>
11 #include <tracking/ckf/cdc/entities/CDCCKFPath.h>
13 #include <tracking/trackFindingCDC/numerics/Weight.h>
25 const auto& lhs = *pair.first;
26 const auto& rhs = *pair.second;
29 if (lhs.size() > rhs.size() + 2)
32 }
else if (lhs.size() + 2 < rhs.size())
37 auto sumOfDistances = [](
const CDCCKFPath & path)
41 for (
auto const& state : path) {
42 double dist = (state.getHitDistance());
48 const auto lhsDist = sumOfDistances(lhs) / lhs.size();
49 const auto rhsDist = sumOfDistances(rhs) / rhs.size();
52 return lhsDist < rhsDist;
Prefers path with smallest sum dist^2 / length of path.
TrackFindingCDC::Weight operator()(const BaseCDCPathPairFilter::Object &pair) final
Input: pair of paths, returns 1 if pair.first to be selected, 0 otherwise.
Base class for filters on a generic object type.
AObject Object
Type of the object to be analysed.
std::vector< CDCCKFState > CDCCKFPath
Shortcut for the collection of CDC CKF-algorithm states.
Abstract base class for different kinds of events.