ATLAS Offline Software
PassThroughFilterTest.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 #include "gtest/gtest.h"
11 
12 
13 #include "../src/TLorentzVectorFactory.h"
14 #include "../src/TLorentzVectorAsIJet.h"
15 #include "../src/makeHypoJets.h"
16 
17 #include <vector>
18 #include <memory>
19 
20 TEST(PassThroughFilterTester, construction) {
21  // constructor throws id begin index > end index
22  EXPECT_NO_THROW({PassThroughFilter();});
23 }
24 
25 TEST(PassThroughFilterTester, zerojets) {
26  auto rf = PassThroughFilter();
27  HypoJetVector tv{};
28 
29  std::unique_ptr<ITrigJetHypoInfoCollector> deb(nullptr);
30 
31  auto fj = rf.filter(tv, deb);
32  EXPECT_EQ(fj.size(), 0u);
33 }
34 
35 TEST(PassThroughFilterTester, twojets) {
36 
37  auto rf = PassThroughFilter();
38  std::unique_ptr<ITrigJetHypoInfoCollector> deb(nullptr);
39 
40  std::vector<double> eta{2., 1.};
42 
43  auto fj = rf.filter(tv, deb);
44  EXPECT_EQ(fj.size(), 2u);
45 
46  EXPECT_EQ(fj.front()->eta(), tv.front()->eta());
47  EXPECT_EQ(fj.back()->eta(), tv.back()->eta());
48 
49 
50 }
makeHypoJets
HypoJetVector makeHypoJets(const std::vector< double > &etas)
Definition: makeHypoJets.cxx:11
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
Definition: PassThroughFilterTest.cxx:6
PassThroughFilter.h
TEST
TEST(PassThroughFilterTester, construction)
Definition: PassThroughFilterTest.cxx:20
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
PassThroughFilter
Definition: PassThroughFilter.h:12
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition: HypoJetDefs.h:27
ITrigJetHypoInfoCollector.h
checker_macros.h
Define macros for attributes used to control the static checker.