ATLAS Offline Software
Loading...
Searching...
No Matches
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
13
14//
15// method implementations
16//
17
18namespace CP
19{
20
21 StatusCode JetCalibrationAlg ::
22 initialize ()
23 {
24 ANA_CHECK (m_calibrationTool.retrieve());
26 ANA_CHECK (m_systematicsList.initialize());
27 return StatusCode::SUCCESS;
28 }
29
30
31
32 StatusCode JetCalibrationAlg ::
33 execute ()
34 {
35 for (const auto& sys : m_systematicsList.systematicsVector())
36 {
37 xAOD::JetContainer *jets = nullptr;
38 ANA_CHECK (m_jetHandle.getCopy (jets, sys));
39
40 if (m_HIsetup.value())
41 {
42 for(auto jet : *jets )
43 {
44 xAOD::JetFourMom_t jet_4mom_subtracted = (*jet).jetP4("JetSubtractedScaleMomentum");
45 (*jet).setJetP4("JetConstitScaleMomentum",jet_4mom_subtracted);
46 (*jet).setJetP4("JetEMScaleMomentum",jet_4mom_subtracted);
47 }
48 }
49
50 ANA_CHECK (m_calibrationTool->applyCalibration(*jets));
51 }
52
53 return StatusCode::SUCCESS;
54 }
55}
#define ANA_CHECK(EXP)
check whether the given expression was successful
ToolHandle< IJetCalibrationTool > m_calibrationTool
the calibration tool
SysListHandle m_systematicsList
the systematics list we run
Gaudi::Property< bool > m_HIsetup
whether we run on the HIJets collection
SysCopyHandle< xAOD::JetContainer > m_jetHandle
the jet collection we run on
Select isolated Photons, Electrons and Muons.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition JetTypes.h:17