ATLAS Offline Software
Loading...
Searching...
No Matches
JetSelectionAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8//
9// includes
10//
11
13
15
16//
17// method implementations
18//
19
20namespace CP
21{
22
23 StatusCode JetSelectionAlg ::
24 initialize ()
25 {
26 ANA_CHECK (m_selectionTool.retrieve());
30 ANA_CHECK (m_systematicsList.initialize());
31
32 return StatusCode::SUCCESS;
33 }
34
35
36
37 StatusCode JetSelectionAlg ::
38 execute ()
39 {
40 for (const auto& sys : m_systematicsList.systematicsVector())
41 {
42 const xAOD::JetContainer *jets = nullptr;
43 ANA_CHECK (m_jetHandle.retrieve (jets, sys));
44 for (const xAOD::Jet *jet : *jets)
45 {
46 if (m_preselection.getBool (*jet, sys))
47 {
48 m_selectionHandle.setBool
49 (*jet, m_selectionTool->keep(*jet), sys);
50 }
51 }
52 }
53
54 return StatusCode::SUCCESS;
55 }
56}
#define ANA_CHECK(EXP)
check whether the given expression was successful
ToolHandle< IJetSelector > m_selectionTool
the selection tool
SysReadHandle< xAOD::JetContainer > m_jetHandle
the jet collection we run on
SysReadSelectionHandle m_preselection
the preselection we apply to our input
SysListHandle m_systematicsList
the systematics list we run
SysWriteSelectionHandle m_selectionHandle
the decoration for the jet selection
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".