ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
JetAnalysisAlgorithms
Root
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
12
#include <
JetAnalysisAlgorithms/JetSelectionAlg.h
>
13
14
#include <
SelectionHelpers/SelectionHelpers.h
>
15
16
//
17
// method implementations
18
//
19
20
namespace
CP
21
{
22
23
StatusCode JetSelectionAlg ::
24
initialize ()
25
{
26
ANA_CHECK
(
m_selectionTool
.retrieve());
27
ANA_CHECK
(
m_jetHandle
.initialize (
m_systematicsList
));
28
ANA_CHECK
(
m_preselection
.initialize (
m_systematicsList
,
m_jetHandle
,
SG::AllowEmpty
));
29
ANA_CHECK
(
m_selectionHandle
.initialize (
m_systematicsList
,
m_jetHandle
));
30
ANA_CHECK
(
m_systematicsList
.initialize());
31
32
return
StatusCode::SUCCESS;
33
}
34
35
36
37
StatusCode JetSelectionAlg ::
38
execute (
const
EventContext& ctx)
39
{
40
for
(
const
auto
& sys :
m_systematicsList
.systematicsVector())
41
{
42
const
xAOD::JetContainer
*jets =
nullptr
;
43
ANA_CHECK
(
m_jetHandle
.retrieve (jets, sys, ctx));
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
}
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
JetSelectionAlg.h
SelectionHelpers.h
CP::JetSelectionAlg::m_selectionTool
ToolHandle< IJetSelector > m_selectionTool
the selection tool
Definition
JetSelectionAlg.h:35
CP::JetSelectionAlg::m_jetHandle
SysReadHandle< xAOD::JetContainer > m_jetHandle
the jet collection we run on
Definition
JetSelectionAlg.h:43
CP::JetSelectionAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition
JetSelectionAlg.h:48
CP::JetSelectionAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition
JetSelectionAlg.h:39
CP::JetSelectionAlg::m_selectionHandle
SysWriteSelectionHandle m_selectionHandle
the decoration for the jet selection
Definition
JetSelectionAlg.h:53
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
SG::AllowEmpty
@ AllowEmpty
Definition
StoreGate/StoreGate/VarHandleKey.h:27
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition
JetContainer.h:17
Generated on
for ATLAS Offline Software by
1.17.0