ATLAS Offline Software
JetDecoratorAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 //
9 // includes
10 //
11 
13 
14 //
15 // method implementations
16 //
17 
18 namespace CP
19 {
21  JetDecoratorAlg (const std::string& name,
22  ISvcLocator* pSvcLocator)
23  : AnaAlgorithm (name, pSvcLocator)
24  {
25  }
26 
27 
28 
30  initialize ()
31  {
32 
33  ANA_CHECK (m_decorator.retrieve());
36  return StatusCode::SUCCESS;
37  }
38 
39 
40 
42  execute ()
43  {
44  for (const auto& sys : m_systematicsList.systematicsVector())
45  {
46  const xAOD::JetContainer *jets = nullptr;
47  ANA_CHECK (m_jetHandle.getCopy(jets, sys));
48  ANA_CHECK (m_decorator->decorate(*jets));
49  }
50 
51  return StatusCode::SUCCESS;
52  }
53 }
CP::JetDecoratorAlg::m_jetHandle
SysCopyHandle< const xAOD::JetContainer > m_jetHandle
the jet collection we run on
Definition: JetDecoratorAlg.h:45
CP::JetDecoratorAlg::initialize
StatusCode initialize() override
Definition: JetDecoratorAlg.cxx:30
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
CP::SysListHandle::systematicsVector
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
Definition: SysListHandle.cxx:96
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
CP::JetDecoratorAlg::m_decorator
ToolHandle< IJetDecorator > m_decorator
the update tool
Definition: JetDecoratorAlg.h:37
JetDecoratorAlg.h
CP::SysListHandle::initialize
::StatusCode initialize()
intialize this property
Definition: SysListHandle.cxx:69
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::JetDecoratorAlg::JetDecoratorAlg
JetDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
the standard constructor
Definition: JetDecoratorAlg.cxx:21
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
CP::JetDecoratorAlg::execute
StatusCode execute() override
Definition: JetDecoratorAlg.cxx:42
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CP::JetDecoratorAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition: JetDecoratorAlg.h:41
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24