4#ifndef ANALYSISTREE_TEST_CORE_HIT_TEST_HPP_
5#define ANALYSISTREE_TEST_CORE_HIT_TEST_HPP_
7#include <gtest/gtest.h>
15TEST(Test_AnalysisTreeCore, Test_Hit) {
19 EXPECT_EQ(hit.GetSize<
int>(), 0);
20 EXPECT_EQ(hit.GetSize<
float>(), 0);
21 EXPECT_EQ(hit.GetSize<
bool>(), 0);
23 hit.SetPosition({1., 2., 3.});
26 EXPECT_EQ(hit.GetSize<
int>(), 0);
27 EXPECT_EQ(hit.GetSize<
float>(), 0);
28 EXPECT_EQ(hit.GetSize<
bool>(), 0);
30 EXPECT_FLOAT_EQ(hit.GetX(), 1.);
31 EXPECT_FLOAT_EQ(hit.GetY(), 2.);
32 EXPECT_FLOAT_EQ(hit.GetZ(), 3.);
33 EXPECT_FLOAT_EQ(hit.GetPhi(), atan2(2., 1.));
34 EXPECT_FLOAT_EQ(hit.GetSignal(), 10.);
36 EXPECT_FLOAT_EQ(hit.GetX(), hit.GetField<
float>(HitFields::kX));
37 EXPECT_FLOAT_EQ(hit.GetY(), hit.GetField<
float>(HitFields::kY));
38 EXPECT_FLOAT_EQ(hit.GetZ(), hit.GetField<
float>(HitFields::kZ));
39 EXPECT_FLOAT_EQ(hit.GetPhi(), hit.GetField<
float>(HitFields::kPhi));
40 EXPECT_FLOAT_EQ(hit.GetSignal(), hit.GetField<
float>(HitFields::kSignal));
Cuts keep list of SimpleCuts. Logical AND is applied for all SimpleCut in the Cuts object.
Definition BranchConfig.cpp:10