ATLAS Offline Software
Trigger
TrigHypothesis
TrigHLTJetHypoUnitTests
tests
JetGroupRegisterTest.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 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
, 0
u
);
33
34
idx
= jg_register.
record
(
jets
);
35
36
EXPECT_EQ(
idx
, 0
u
);
37
38
HypoJetVector
jets2 =
jets
;
39
40
jets2.push_back(hjet);
41
42
idx
= jg_register.
record
(jets2);
43
44
EXPECT_EQ(
idx
, 1
u
);
45
46
idx
= jg_register.
record
(
jets
);
47
EXPECT_EQ(
idx
, 0
u
);
48
}
49
50
51
TLorentzVectorFactory
Definition:
TLorentzVectorFactory.h:13
et
Extra patterns decribing particle interation process.
HypoJetDefs.h
eta
Scalar eta() const
pseudorapidity method
Definition:
AmgMatrixBasePlugin.h:83
defineDB.jets
jets
Definition:
JetTagCalibration/share/defineDB.py:24
vec
std::vector< size_t > vec
Definition:
CombinationsGeneratorTest.cxx:9
Trk::u
@ u
Enums for curvilinear frames.
Definition:
ParamDefs.h:77
pHypoJet
std::shared_ptr< const HypoJet::IJet > pHypoJet
Definition:
HypoJetDefs.h:25
DebugInfoCollector.h
res
std::pair< std::vector< unsigned int >, bool > res
Definition:
JetGroupProductTest.cxx:11
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition:
HypoJetDefs.h:27
TLorentzVectorFactory::make
virtual TLorentzVector make(double eta, double et) const override
Definition:
TLorentzVectorFactory.h:15
JetGroupRegister
Definition:
JetGroupRegister.h:35
TLorentzVectorAsIJet
Definition:
TLorentzVectorAsIJet.h:12
TEST
TEST(JetGroupRegisterTester, empty)
Definition:
JetGroupRegisterTest.cxx:18
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition:
LArNewCalib_DelayDump_OFC_Cali.py:69
JetGroupRegister::record
std::size_t record(HypoJetVector v)
Definition:
JetGroupRegister.cxx:7
JetGroupRegister.h
Generated on Mon Sep 1 2025 21:12:46 for ATLAS Offline Software by
1.8.18