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-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
//
8
// includes
9
//
10
11
#include <
JetAnalysisAlgorithms/JetFFSmearingAlg.h
>
12
#include <algorithm>
13
14
//
15
// method implementations
16
//
17
18
namespace
CP
{
19
20
StatusCode JetFFSmearingAlg ::initialize() {
21
ANA_CHECK
(
m_FFSmearingTool
.retrieve());
22
ANA_CHECK
(
m_jetHandle
.initialize(
m_systematicsList
));
23
ANA_CHECK
(
m_preselection
.initialize(
m_systematicsList
,
m_jetHandle
,
24
SG::AllowEmpty
));
25
26
ANA_CHECK
(
m_systematicsList
.addSystematics(*
m_FFSmearingTool
));
27
ANA_CHECK
(
m_systematicsList
.initialize());
28
ANA_CHECK
(
m_outOfValidity
.initialize());
29
30
// FIXME: while the FFJetSmearingTool is unable to accept external systematics,
31
// we make our own vector of systematics
32
const
CP::SystematicSet
& recommendedSysts =
m_FFSmearingTool
->recommendedSystematics();
33
for
(
const
auto
&sys : recommendedSysts)
m_systematicsVector
.push_back(
CP::SystematicSet
({sys}));
34
35
return
StatusCode::SUCCESS;
36
}
37
38
StatusCode JetFFSmearingAlg ::execute(
const
EventContext& ctx) {
39
for
(
const
auto
&sys :
m_systematicsList
.systematicsVector()) {
40
xAOD::JetContainer
*jets =
nullptr
;
41
ANA_CHECK
(
m_jetHandle
.getCopy(jets, sys, ctx));
42
43
// FIXME: while the FFJetSmearingTool is unable to accept external systematics,
44
// only run over the internal ones
45
if
( std::find(
m_systematicsVector
.begin(),
m_systematicsVector
.end(), sys) ==
m_systematicsVector
.end() )
continue
;
46
47
ANA_CHECK
(
m_FFSmearingTool
->applySystematicVariation(sys));
48
49
for
(
xAOD::Jet
*
jet
: *jets) {
50
if
(
m_preselection
.getBool(*
jet
, sys)) {
51
ANA_CHECK_CORRECTION
(
m_outOfValidity
, *
jet
,
52
m_FFSmearingTool
->applyCorrection(*
jet
));
53
}
54
}
55
}
56
return
StatusCode::SUCCESS;
57
}
58
}
// namespace CP
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
JetFFSmearingAlg.h
ANA_CHECK_CORRECTION
#define ANA_CHECK_CORRECTION(helper, object, expr)
a helper check macro to work with OutOfValidityHelper
Definition
OutOfValidityHelper.h:132
CP::JetFFSmearingAlg::m_FFSmearingTool
ToolHandle< ICPJetCorrectionTool > m_FFSmearingTool
the large-R jet FF smearing tool
Definition
JetFFSmearingAlg.h:29
CP::JetFFSmearingAlg::m_jetHandle
SysCopyHandle< xAOD::JetContainer > m_jetHandle
the large-R jet collection we run on
Definition
JetFFSmearingAlg.h:42
CP::JetFFSmearingAlg::m_systematicsVector
std::vector< CP::SystematicSet > m_systematicsVector
FIXME: vector of FFJetSmearingTool systematics, while the tool is unable to handle external systemati...
Definition
JetFFSmearingAlg.h:38
CP::JetFFSmearingAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition
JetFFSmearingAlg.h:47
CP::JetFFSmearingAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition
JetFFSmearingAlg.h:34
CP::JetFFSmearingAlg::m_outOfValidity
OutOfValidityHelper m_outOfValidity
the helper for OutOfValidity results
Definition
JetFFSmearingAlg.h:52
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition
SystematicSet.h:31
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
SG::AllowEmpty
@ AllowEmpty
Definition
StoreGate/StoreGate/VarHandleKey.h:27
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