ATLAS Offline Software
Loading...
Searching...
No Matches
VGammaORAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
10
11namespace CP {
12
14
18 ANA_CHECK(m_systematicsList.initialize());
19
20 return StatusCode::SUCCESS;
21 }
22
23 StatusCode VGammaORAlg::execute() {
24
25 // the event-level filter
27
28 for (const auto &sys : m_systematicsList.systematicsVector()) {
29 // the per-systematic filter
30 CP::SysFilterReporter filter(filterCombiner, sys);
31
32 const xAOD::EventInfo *evtInfo = nullptr;
33 ANA_CHECK(m_eventInfoHandle.retrieve(evtInfo, sys));
34
35 bool in_vgamma_overlap;
36 ANA_CHECK(m_vgammaORTool->inOverlap(in_vgamma_overlap));
37 m_inOverlapHandle.set(*evtInfo, in_vgamma_overlap, sys);
38
39 if (!m_noFilter.value()) {
40 if (m_keepOverlap)
41 filter.setPassed( in_vgamma_overlap );
42 else
43 filter.setPassed( !in_vgamma_overlap );
44 }
45 }
46
47 return StatusCode::SUCCESS;
48 }
49
50 StatusCode VGammaORAlg::finalize() {
51
52 ANA_CHECK(m_filterParams.finalize());
53 return StatusCode::SUCCESS;
54 }
55} // namespace
#define ANA_CHECK(EXP)
check whether the given expression was successful
a reporter class that combines the filter decisions for all systematics
a systematics aware filter reporter
CP::SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
the event info handle
Definition VGammaORAlg.h:41
ToolHandle< IVGammaORTool > m_vgammaORTool
the overlap removal tool
Definition VGammaORAlg.h:36
Gaudi::Property< bool > m_noFilter
whether to not apply an event filter
Definition VGammaORAlg.h:56
virtual StatusCode finalize() override
CP::SysListHandle m_systematicsList
the systematics
Definition VGammaORAlg.h:33
CP::SysWriteDecorHandle< bool > m_inOverlapHandle
the decoration for the tool decision
Definition VGammaORAlg.h:46
Gaudi::Property< bool > m_keepOverlap
which way to run the event filter
Definition VGammaORAlg.h:61
virtual StatusCode initialize() override
virtual StatusCode execute() override
CP::SysFilterReporterParams m_filterParams
the event filter for the tool decision
Definition VGammaORAlg.h:51
Select isolated Photons, Electrons and Muons.
EventInfo_v1 EventInfo
Definition of the latest event info version.