9#include <tracking/trackFindingCDC/geometry/Vector2D.h>
10#include <tracking/trackFindingCDC/fitting/CDCObservations2D.h>
12#include <gtest/gtest.h>
16using namespace TrackFindingCDC;
19TEST(TrackFindingCDCTest, fitting_CDCObservations2D_centralize)
29 EXPECT_EQ(
Vector2D(1, 2), centralPoint) <<
30 "Central point of observation (0,0) , (1,1) and (2,2) is not (1,1)" ;
32 EXPECT_EQ(-1, observations.
getX(0));
33 EXPECT_EQ(-2, observations.
getY(0));
35 EXPECT_EQ(0, observations.
getX(1));
36 EXPECT_EQ(0, observations.
getY(1));
38 EXPECT_EQ(1, observations.
getX(2));
39 EXPECT_EQ(2, observations.
getY(2));
Class serving as a storage of observed drift circles to present to the Riemann fitter.
double getX(int iObservation) const
Getter for the x value of the observation at the given index.
Vector2D centralize()
Picks one observation as a reference point and transform all observations to that new origin.
double getY(int iObservation) const
Getter for the y value of the observation at the given index.
std::size_t fill(double x, double y, double signedRadius=0.0, double weight=1.0)
Appends the observed position.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
Abstract base class for different kinds of events.