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-2026 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
}
26
27
StatusCode JetCalibrationAlg ::
28
initialize ()
29
{
30
ANA_CHECK
(
m_calibrationTool
.retrieve());
31
ANA_CHECK
(
m_jetHandle
.initialize (
m_systematicsList
));
32
ANA_CHECK
(
m_systematicsList
.initialize());
33
return
StatusCode::SUCCESS;
34
}
35
36
37
38
StatusCode JetCalibrationAlg ::
39
execute (
const
EventContext& ctx)
40
{
41
static
const
std::string subtractedStr{
"JetSubtractedScaleMomentum"
};
42
static
const
std::string constitStr{
"JetConstitScaleMomentum"
};
43
static
const
std::string emScaleStr{
"JetEMScaleMomentum"
};
44
for
(
const
auto
& sys :
m_systematicsList
.systematicsVector())
45
{
46
xAOD::JetContainer
*jets =
nullptr
;
47
ANA_CHECK
(
m_jetHandle
.getCopy (jets, sys, ctx));
48
49
if
(
m_HIsetup
.value())
50
{
51
for
(
auto
jet
: *jets )
52
{
53
xAOD::JetFourMom_t
jet_4mom_subtracted = (*jet).jetP4(subtractedStr);
54
(*jet).setJetP4(constitStr,jet_4mom_subtracted);
55
(*jet).setJetP4(emScaleStr,jet_4mom_subtracted);
56
}
57
}
58
59
ANA_CHECK
(
m_calibrationTool
->applyCalibration(*jets));
60
}
61
62
return
StatusCode::SUCCESS;
63
}
64
}
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:325
JetCalibrationAlg.h
CP::JetCalibrationAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition
JetCalibrationAlg.h:37
CP::JetCalibrationAlg::m_calibrationTool
PublicToolHandle< IJetCalibrationTool > m_calibrationTool
the calibration tool
Definition
JetCalibrationAlg.h:33
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