ATLAS Offline Software
Loading...
Searching...
No Matches
JetGroupRegisterTest.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "gtest/gtest.h"
11
12#include <vector>
13#include <map>
14
15using res = std::pair<std::vector<unsigned int>, bool>;
16using vec = std::vector<unsigned int>;
17
18TEST(JetGroupRegisterTester, empty) {
19
20 double eta = 2.1;
21 double et = 101.;
22
23 TLorentzVector tlv = TLorentzVectorFactory().make(eta, et);
24 pHypoJet hjet(nullptr);
25 hjet.reset(new TLorentzVectorAsIJet(tlv));
26 HypoJetVector jets {hjet};
27
28 JetGroupRegister jg_register;
29
30 std::size_t idx = jg_register.record(jets);
31
32 EXPECT_EQ(idx, 0u);
33
34 idx = jg_register.record(jets);
35
36 EXPECT_EQ(idx, 0u);
37
38 HypoJetVector jets2 = jets;
39
40 jets2.push_back(std::move(hjet));
41
42 idx = jg_register.record(std::move(jets2));
43
44 EXPECT_EQ(idx, 1u);
45
46 idx = jg_register.record(jets);
47 EXPECT_EQ(idx, 0u);
48}
49
50
51
Scalar eta() const
pseudorapidity method
std::vector< size_t > vec
std::vector< pHypoJet > HypoJetVector
Definition HypoJetDefs.h:27
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition HypoJetDefs.h:25
std::pair< std::vector< unsigned int >, bool > res
TEST(JetGroupRegisterTester, empty)
static const Attributes_t empty
std::size_t record(HypoJetVector v)
virtual TLorentzVector make(double eta, double et) const override
Extra patterns decribing particle interation process.