10#include <tracking/ckf/cdc/filters/pathPairs/BaseCDCPathPairFilter.h>
11#include <tracking/ckf/cdc/entities/CDCCKFPath.h>
13#include <tracking/trackFindingCDC/numerics/Weight.h>
26 const auto& lhs = *pair.first;
27 const auto& rhs = *pair.second;
30 if (lhs.size() > rhs.size() + 2) {
32 }
else if (lhs.size() + 2 < rhs.size()) {
36 auto sumOfDistances = [](
const CDCCKFPath & path) {
39 for (
auto const& state : path) {
40 double dist = (state.getHitDistance());
46 const auto lhsDist = sumOfDistances(lhs) / lhs.size();
47 const auto rhsDist = sumOfDistances(rhs) / rhs.size();
50 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.