ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigSteer
HLTSeeding
src
cTauRoIThresholdsTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
cTauRoIThresholdsTool.h
"
5
#include "
StoreGate/ReadDecorHandle.h
"
6
#include "
StoreGate/exceptions.h
"
7
#include "
L1TopoAlgorithms/cTauMultiplicity.h
"
8
#include "
utilities.h
"
9
using namespace
HLTSeedingNs
;
10
11
12
StatusCode
cTauRoIThresholdsTool::initialize
() {
13
ATH_CHECK
(
RoIThresholdsTool::initialize
());
14
ATH_CHECK
(
m_jTauLinkKey
.initialize());
15
return
StatusCode::SUCCESS;
16
}
17
18
uint64_t
cTauRoIThresholdsTool::getPattern
(
const
EventContext& ctx,
19
const
xAOD::eFexTauRoI
& eTau,
20
const
RoIThresholdsTool::ThrVec
& menuThresholds,
21
const
TrigConf::L1ThrExtraInfoBase
&
/*menuExtraInfo*/
)
const
{
22
23
// Get the jTau matched to the eTau
24
using
jTauLink_t =
ElementLink<xAOD::jFexTauRoIContainer>
;
25
SG::ReadDecorHandle<xAOD::eFexTauRoIContainer, jTauLink_t>
jTauLinkAcc{
m_jTauLinkKey
, ctx};
26
if
(not jTauLinkAcc.
isPresent
()) {
27
ATH_MSG_ERROR
(
"Decoration "
<<
m_jTauLinkKey
.key() <<
" is missing, cannot create cTau threshold pattern"
);
28
throw
SG::ExcNullReadHandle
(
m_jTauLinkKey
.clid(),
m_jTauLinkKey
.key(),
m_jTauLinkKey
.storeHandle().name());
29
}
30
jTauLink_t jTauLink = jTauLinkAcc(eTau);
31
bool
matched{jTauLink.isValid()};
32
33
if
(matched) {
34
const
xAOD::jFexTauRoI
* jTau = *jTauLink;
35
36
ATH_MSG_DEBUG
(
"eFex tau eta,phi = "
<< eTau.
iEta
() <<
", "
<< eTau.
iPhi
()
37
<<
", jFex tau eta,phi = "
<< jTau->
globalEta
() <<
", "
<< jTau->
globalPhi
()
38
<<
", eFex et (100 MeV/counts) = "
<< eTau.
etTOB
() <<
", jFex et (200 MeV/counts) = "
<< jTau->
tobEt
() <<
", jFex iso (200 MeV/counts) = "
<< jTau->
tobIso
()
39
<<
", eFex rCore/BDT = "
<< eTau.
tauOneThresholds
() <<
", eFex rHad = "
<< eTau.
tauTwoThresholds
());
40
}
else
{
41
ATH_MSG_DEBUG
(
"eFex tau eta,phi = "
<< eTau.
iEta
() <<
", "
<< eTau.
iPhi
()
42
<<
", eFex et (100 MeV/counts) = "
<< eTau.
etTOB
() <<
", no matching jTau found"
43
<<
", eFex rCore/BDT = "
<< eTau.
tauOneThresholds
() <<
", eFex rHad = "
<< eTau.
tauTwoThresholds
());
44
}
45
46
47
uint64_t thresholdMask{0};
48
49
// Iterate through thresholds and see which ones are passed
50
for
(
const
std::shared_ptr<TrigConf::L1Threshold>& thrBase : menuThresholds) {
51
auto
thr =
static_cast<
TrigConf::L1Threshold_cTAU
*
>
(thrBase.get());
52
53
// Check isolation threshold - unmatched eTau treated as perfectly isolated, ATR-25927
54
// The core and isolation E_T values are multiplied by 2 to normalise to 100 MeV/counts units
55
bool
passIso = matched ?
TCS::cTauMultiplicity::checkIsolationWP
(eTau, **jTauLink, *thr) :
true
;
56
57
// Check eTAU rCore/BDT and rHad thresholds
58
bool
passeTAUWP =
TCS::cTauMultiplicity::checkeTAUWP
(eTau, *thr);
59
60
// Check et threshold - using iEta coordinate for the eFEX ensures a 0.1 granularity of the eta coordinate,
61
// as expected from the menu method thrValue100MeV
62
bool
passEt = eTau.
etTOB
() > thr->thrValue100MeV(eTau.
iEta
());
63
64
if
(passIso && passeTAUWP && passEt) {
65
thresholdMask |= (1_u64<<thr->mapping());
66
}
67
68
}
// loop over thr
69
70
return
thresholdMask;
71
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
exceptions.h
Exceptions that can be thrown from StoreGate.
ReadDecorHandle.h
Handle class for reading a decoration on an object.
cTauMultiplicity.h
cTauRoIThresholdsTool.h
ElementLink
ElementLink implementation for ROOT usage.
Definition
A/AthLinks/ElementLink.h:40
RoIThresholdsTool::ThrVec
std::vector< std::shared_ptr< TrigConf::L1Threshold > > ThrVec
Definition
IRoIThresholdsTool.h:24
RoIThresholdsTool::initialize
virtual StatusCode initialize() override
Definition
IRoIThresholdsTool.h:31
SG::ExcNullReadHandle
Exception — Deference of read handle failed.
Definition
Control/StoreGate/StoreGate/exceptions.h:184
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition
StoreGate/StoreGate/ReadDecorHandle.h:94
SG::ReadDecorHandle::isPresent
bool isPresent() const
Is the referenced container present in SG?
TCS::cTauMultiplicity::checkeTAUWP
static bool checkeTAUWP(const xAOD::eFexTauRoI &eTau, const TrigConf::L1Threshold_cTAU &thr)
Definition
cTauMultiplicity.cxx:249
TCS::cTauMultiplicity::checkIsolationWP
static bool checkIsolationWP(const xAOD::eFexTauRoI &eTau, const xAOD::jFexTauRoI &jTau, const TrigConf::L1Threshold_cTAU &thr)
Definition
cTauMultiplicity.cxx:242
TrigConf::L1ThrExtraInfoBase
L1 extra information for certain threshold types.
Definition
L1ThresholdBase.h:72
TrigConf::L1Threshold_cTAU
Definition
L1Threshold.h:260
cTauRoIThresholdsTool::m_jTauLinkKey
SG::ReadDecorHandleKey< xAOD::eFexTauRoIContainer > m_jTauLinkKey
Definition
cTauRoIThresholdsTool.h:26
cTauRoIThresholdsTool::initialize
virtual StatusCode initialize() override
Definition
cTauRoIThresholdsTool.cxx:12
cTauRoIThresholdsTool::getPattern
virtual uint64_t getPattern(const EventContext &ctx, const xAOD::eFexTauRoI &eTau, const ThrVec &menuThresholds, const TrigConf::L1ThrExtraInfoBase &menuExtraInfo) const override
Definition
cTauRoIThresholdsTool.cxx:18
xAOD::eFexTauRoI_v1::iPhi
int iPhi() const
Setter for the above.
Definition
eFexTauRoI_v1.cxx:249
xAOD::eFexTauRoI_v1::iEta
int iEta() const
setter for the above
Definition
eFexTauRoI_v1.cxx:267
xAOD::eFexTauRoI_v1::tauOneThresholds
unsigned int tauOneThresholds() const
Tau Condition 1 (generic) results.
Definition
eFexTauRoI_v1.cxx:205
xAOD::eFexTauRoI_v1::etTOB
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count).
Definition
eFexTauRoI_v1.cxx:159
xAOD::eFexTauRoI_v1::tauTwoThresholds
unsigned int tauTwoThresholds() const
Tau Condition 2 (generic) results.
Definition
eFexTauRoI_v1.cxx:209
xAOD::jFexTauRoI_v1::globalPhi
uint globalPhi() const
xAOD::jFexTauRoI_v1::globalEta
int globalEta() const
xAOD::jFexTauRoI_v1::tobIso
uint16_t tobIso() const
xAOD::jFexTauRoI_v1::tobEt
uint16_t tobEt() const
HLTSeedingNs
Definition
utilities.h:8
xAOD::jFexTauRoI
jFexTauRoI_v1 jFexTauRoI
Define the latest version of the jFexSRJetRoI class.
Definition
jFexTauRoI.h:13
xAOD::eFexTauRoI
eFexTauRoI_v1 eFexTauRoI
Define the latest version of the eFexTauRoI class.
Definition
eFexTauRoI.h:16
utilities.h
Generated on
for ATLAS Offline Software by
1.17.0