ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypoUnitTests
tests
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"
6
#include "
TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h
"
7
#include "
TrigHLTJetHypo/../src/JetGroupRegister.h
"
8
#include "
TrigHLTJetHypo/../src/DebugInfoCollector.h
"
9
#include "
../src/TLorentzVectorFactory.h
"
10
#include "
../src/TLorentzVectorAsIJet.h
"
11
12
#include <vector>
13
#include <map>
14
15
using
res
= std::pair<std::vector<unsigned int>,
bool
>;
16
using
vec
= std::vector<unsigned int>;
17
18
TEST
(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
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
vec
std::vector< size_t > vec
Definition
CombinationsGeneratorTest.cxx:9
DebugInfoCollector.h
HypoJetDefs.h
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition
HypoJetDefs.h:27
pHypoJet
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition
HypoJetDefs.h:25
res
std::pair< std::vector< unsigned int >, bool > res
Definition
JetGroupProductTest.cxx:11
TEST
TEST(JetGroupRegisterTester, empty)
Definition
JetGroupRegisterTest.cxx:18
JetGroupRegister.h
TLorentzVectorAsIJet.h
TLorentzVectorFactory.h
empty
static const Attributes_t empty
Definition
XmlStreamer.cxx:16
JetGroupRegister
Definition
JetGroupRegister.h:35
JetGroupRegister::record
std::size_t record(HypoJetVector v)
Definition
JetGroupRegister.cxx:7
TLorentzVectorAsIJet
Definition
TLorentzVectorAsIJet.h:12
TLorentzVectorFactory
Definition
TLorentzVectorFactory.h:13
TLorentzVectorFactory::make
virtual TLorentzVector make(double eta, double et) const override
Definition
TLorentzVectorFactory.h:15
et
Extra patterns decribing particle interation process.
Generated on
for ATLAS Offline Software by
1.17.0