8#include <tracking/trackFindingCDC/hough/baseelements/LinearDivision.h>
9#include <tracking/trackFindingCDC/hough/boxes/Box.h>
10#include <tracking/trackFindingCDC/numerics/Weight.h>
12#include <framework/logging/Logger.h>
14#include <gtest/gtest.h>
19using namespace TrackFindingCDC;
22TEST(TrackFindingCDCTest, SumInfinities)
24 EXPECT_EQ(INFINITY, INFINITY + INFINITY);
26 std::array<Weight, 4> infinities{{INFINITY, INFINITY, INFINITY, INFINITY}};
27 Weight weightSum = std::accumulate(std::begin(infinities), std::end(infinities), Weight(0));
28 EXPECT_EQ(INFINITY, weightSum);
32TEST(TrackFindingCDCTest, LinearDivision_createBoxes)
37 EXPECT_EQ(9, nSubNodes);
41 std::array<Box<float, float>, 6 > subBoxes = subBoxFactory(box);
45 B2INFO(
"Lower bounds: " << subBox.getLowerBound<0>() <<
", " << subBox.getLowerBound<1>());
46 B2INFO(
"Upper bounds: " << subBox.getUpperBound<0>() <<
", " << subBox.getUpperBound<1>());
48 EXPECT_EQ(i % 3 , subBox.getLowerBound<0>());
49 EXPECT_EQ(i / 3, subBox.getLowerBound<1>());
51 EXPECT_EQ(i % 3 + 1, subBox.getUpperBound<0>());
52 EXPECT_EQ(i / 3 + 1, subBox.getUpperBound<1>());
The base class for all boxes.
Factory object that constructs sub boxes from a given box with optional overlaps.
Abstract base class for different kinds of events.