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;
29 auto sumOfDistances = [](
const CDCCKFPath & path) {
32 for (
auto const& state : path) {
33 double dist = (state.getHitDistance());
39 const auto lhsDistSum = sumOfDistances(lhs);
40 const auto rhsDistSum = sumOfDistances(rhs);
43 if (lhs.size() != rhs.size()) {
44 return lhs.size() > rhs.size();
48 return lhsDistSum < rhsDistSum;
For the two paths with the same number of hits prefers one with smallest sum dist^2.
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.