ATLAS Offline Software
Loading...
Searching...
No Matches
JetPartonTruthLabelAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6//
7// includes
8//
9
11
12//
13// method implementations
14//
15
16namespace CP
17{
18 JetPartonTruthLabelAlg ::
19 JetPartonTruthLabelAlg (const std::string& name,
20 ISvcLocator* pSvcLocator)
21 : AnaAlgorithm (name, pSvcLocator)
22 {
23 }
24
25
26 StatusCode JetPartonTruthLabelAlg ::
27 initialize ()
28 {
29 ANA_CHECK(m_labelTool.retrieve());
31 ANA_CHECK (m_systematicsList.initialize());
32
33 return StatusCode::SUCCESS;
34 }
35
36
37 StatusCode JetPartonTruthLabelAlg ::
38 execute ()
39 {
40
41 for (const auto& sys : m_systematicsList.systematicsVector())
42 {
43 xAOD::JetContainer *jets = nullptr;
44 ANA_CHECK (m_jetHandle.getCopy (jets, sys));
45
46 for(xAOD::Jet* jet : *jets) {
47
48 m_labelTool->modifyJet(*jet);
49
50
51 }
52 }
53
54 return StatusCode::SUCCESS;
55 }
56}
#define ANA_CHECK(EXP)
check whether the given expression was successful
ToolHandle< Analysis::JetPartonTruthLabel > m_labelTool
SysListHandle m_systematicsList
the systematics list we run
SysCopyHandle< xAOD::JetContainer > m_jetHandle
the jet collection we run on
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Select isolated Photons, Electrons and Muons.
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".