9#include <tracking/trackFindingCDC/collectors/selectors/CutSelector.h>
11#include <tracking/trackFindingCDC/numerics/WeightComperator.h>
13#include <gtest/gtest.h>
16using namespace TrackFindingCDC;
20 TEST(TrackFindingCDCTest, cut_selector)
25 double b = 2, c = 3, d = 4, e = 5;
27 std::vector<WeightedRelation<int, const double>> relations = {
34 selector.setCutValue(1.0);
36 std::sort(relations.begin(), relations.end());
37 selector.apply(relations);
39 std::sort(relations.begin(), relations.end(),
GreaterWeight());
41 ASSERT_EQ(relations.size(), 2);
42 ASSERT_EQ(relations[0].getWeight(), 1.1);
43 ASSERT_EQ(relations[1].getWeight(), 1.0);
Selector to remove all weighted relations with a weight below a certain cut value.
Type for two related objects with a weight.
Abstract base class for different kinds of events.
Functor factory turning a binary functor and two functors into a new functor which executes the binar...