ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
JetAnalysisAlgorithms
Root
JetFFSmearingAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
//
8
// includes
9
//
10
11
#include <
JetAnalysisAlgorithms/JetFFSmearingAlg.h
>
12
13
//
14
// method implementations
15
//
16
17
namespace
CP
{
18
19
StatusCode JetFFSmearingAlg ::initialize() {
20
ANA_CHECK
(
m_FFSmearingTool
.retrieve());
21
ANA_CHECK
(
m_jetHandle
.initialize(
m_systematicsList
));
22
ANA_CHECK
(
m_preselection
.initialize(
m_systematicsList
,
m_jetHandle
,
23
SG::AllowEmpty
));
24
25
ANA_CHECK
(
m_systematicsList
.addSystematics(*
m_FFSmearingTool
));
26
ANA_CHECK
(
m_systematicsList
.initialize());
27
ANA_CHECK
(
m_outOfValidity
.initialize());
28
29
// FIXME: while the FFJetSmearingTool is unable to accept external systematics,
30
// we make our own set of systematics names
31
const
CP::SystematicSet
& recommendedSysts =
m_FFSmearingTool
->recommendedSystematics();
32
for
(
const
auto
&sys : recommendedSysts)
m_systematicsNames
.insert(
CP::SystematicSet
({sys}).
name
());
33
34
return
StatusCode::SUCCESS;
35
}
36
37
StatusCode JetFFSmearingAlg ::execute(
const
EventContext& ctx) {
38
for
(
const
auto
&sys :
m_systematicsList
.systematicsVector()) {
39
xAOD::JetContainer
*jets =
nullptr
;
40
ANA_CHECK
(
m_jetHandle
.getCopy(jets, sys, ctx));
41
42
// FIXME: while the FFJetSmearingTool is unable to accept external systematics,
43
// only run over the internal ones
44
if
( !
m_systematicsNames
.contains(sys.name()) )
continue
;
45
46
ANA_CHECK
(
m_FFSmearingTool
->applySystematicVariation(sys));
47
48
for
(
xAOD::Jet
*
jet
: *jets) {
49
if
(
m_preselection
.getBool(*
jet
, sys)) {
50
ANA_CHECK_CORRECTION
(
m_outOfValidity
, *
jet
,
51
m_FFSmearingTool
->applyCorrection(*
jet
));
52
}
53
}
54
}
55
return
StatusCode::SUCCESS;
56
}
57
}
// namespace CP
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:325
JetFFSmearingAlg.h
ANA_CHECK_CORRECTION
#define ANA_CHECK_CORRECTION(helper, object, expr)
a helper check macro to work with OutOfValidityHelper
Definition
OutOfValidityHelper.h:131
CP::JetFFSmearingAlg::m_FFSmearingTool
ToolHandle< ICPJetCorrectionTool > m_FFSmearingTool
the large-R jet FF smearing tool
Definition
JetFFSmearingAlg.h:31
CP::JetFFSmearingAlg::m_systematicsNames
std::unordered_set< std::string > m_systematicsNames
FIXME: names of FFJetSmearingTool systematics, while the tool is unable to handle external systematic...
Definition
JetFFSmearingAlg.h:40
CP::JetFFSmearingAlg::m_jetHandle
SysCopyHandle< xAOD::JetContainer > m_jetHandle
the large-R jet collection we run on
Definition
JetFFSmearingAlg.h:44
CP::JetFFSmearingAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition
JetFFSmearingAlg.h:49
CP::JetFFSmearingAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition
JetFFSmearingAlg.h:36
CP::JetFFSmearingAlg::m_outOfValidity
OutOfValidityHelper m_outOfValidity
the helper for OutOfValidity results
Definition
JetFFSmearingAlg.h:54
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition
SystematicSet.h:31
CP::SystematicSet::name
std::string name() const
returns: the systematics joined into a single string.
Definition
SystematicSet.cxx:277
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
SG::AllowEmpty
@ AllowEmpty
Definition
StoreGate/StoreGate/VarHandleKey.h:29
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition
JetContainer.h:17
Generated on
for ATLAS Offline Software by
1.17.0