ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
JetAnalysisAlgorithms
Root
JetCalibrationAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
//
9
// includes
10
//
11
12
#include <
JetAnalysisAlgorithms/JetCalibrationAlg.h
>
13
14
//
15
// method implementations
16
//
17
18
namespace
CP
19
{
20
21
JetCalibrationAlg ::
22
JetCalibrationAlg (
const
std::string&
name
, ISvcLocator* pSvcLocator)
23
:
EL
::
AnaAlgorithm
(
name
, pSvcLocator)
24
{
25
declareProperty
(
"calibrationTool"
,
m_calibrationTool
,
"The calibration tool we apply"
);
26
}
27
28
StatusCode JetCalibrationAlg ::
29
initialize ()
30
{
31
ANA_CHECK
(
m_calibrationTool
.retrieve());
32
ANA_CHECK
(
m_jetHandle
.initialize (
m_systematicsList
));
33
ANA_CHECK
(
m_systematicsList
.initialize());
34
return
StatusCode::SUCCESS;
35
}
36
37
38
39
StatusCode JetCalibrationAlg ::
40
execute (
const
EventContext& ctx)
41
{
42
for
(
const
auto
& sys :
m_systematicsList
.systematicsVector())
43
{
44
xAOD::JetContainer
*jets =
nullptr
;
45
ANA_CHECK
(
m_jetHandle
.getCopy (jets, sys, ctx));
46
47
if
(
m_HIsetup
.value())
48
{
49
for
(
auto
jet
: *jets )
50
{
51
xAOD::JetFourMom_t
jet_4mom_subtracted = (*jet).jetP4(
"JetSubtractedScaleMomentum"
);
52
(*jet).setJetP4(
"JetConstitScaleMomentum"
,jet_4mom_subtracted);
53
(*jet).setJetP4(
"JetEMScaleMomentum"
,jet_4mom_subtracted);
54
}
55
}
56
57
ANA_CHECK
(
m_calibrationTool
->applyCalibration(*jets));
58
}
59
60
return
StatusCode::SUCCESS;
61
}
62
}
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
JetCalibrationAlg.h
AthCommonAlgorithm< Gaudi::Algorithm >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
CP::JetCalibrationAlg::m_calibrationTool
ToolHandle< IJetCalibrationTool > m_calibrationTool
the calibration tool
Definition
JetCalibrationAlg.h:33
CP::JetCalibrationAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition
JetCalibrationAlg.h:37
CP::JetCalibrationAlg::m_HIsetup
Gaudi::Property< bool > m_HIsetup
whether we run on the HIJets collection
Definition
JetCalibrationAlg.h:46
CP::JetCalibrationAlg::m_jetHandle
SysCopyHandle< xAOD::JetContainer > m_jetHandle
the jet collection we run on
Definition
JetCalibrationAlg.h:41
EL::AnaAlgorithm::AnaAlgorithm
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Definition
AnaAlgorithm.cxx:40
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition
JetContainer.h:17
xAOD::JetFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition
JetTypes.h:17
Generated on
for ATLAS Offline Software by
1.17.0