ATLAS Offline Software
Loading...
Searching...
No Matches
JetSelectionAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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 JetSelectionAlg ::
22 initialize ()
23 {
24 ANA_CHECK (m_selectionTool.retrieve());
28 ANA_CHECK (m_systematicsList.initialize());
29
30 return StatusCode::SUCCESS;
31 }
32
33
34
35 StatusCode JetSelectionAlg ::
36 execute (const EventContext& ctx)
37 {
38 for (const auto& sys : m_systematicsList.systematicsVector())
39 {
40 const xAOD::JetContainer *jets = nullptr;
41 ANA_CHECK (m_jetHandle.retrieve (jets, sys, ctx));
42 for (const xAOD::Jet *jet : *jets)
43 {
44 if (m_preselection.getBool (*jet, sys))
45 {
46 m_selectionHandle.setBool
47 (*jet, m_selectionTool->keep(*jet), sys);
48 }
49 else
50 {
51 m_selectionHandle.setBool (*jet, false, sys);
52 }
53 }
54 }
55
56 return StatusCode::SUCCESS;
57 }
58}
#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".