ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
AsgAnalysisAlgorithms
Root
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
7
#include "
AsgAnalysisAlgorithms/VGammaORAlg.h
"
8
#include <
SystematicsHandles/SysFilterReporter.h
>
9
#include <
SystematicsHandles/SysFilterReporterCombiner.h
>
10
11
namespace
CP
{
12
13
StatusCode
VGammaORAlg::initialize
() {
14
15
ANA_CHECK
(
m_filterParams
.initialize(
m_systematicsList
));
16
ANA_CHECK
(
m_eventInfoHandle
.initialize(
m_systematicsList
));
17
ANA_CHECK
(
m_inOverlapHandle
.initialize(
m_systematicsList
,
m_eventInfoHandle
));
18
ANA_CHECK
(
m_systematicsList
.initialize());
19
20
return
StatusCode::SUCCESS;
21
}
22
23
StatusCode
VGammaORAlg::execute
(
const
EventContext& ctx) {
24
25
// the event-level filter
26
CP::SysFilterReporterCombiner
filterCombiner(
m_filterParams
,
m_noFilter
.value());
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, ctx));
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
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
SysFilterReporterCombiner.h
SysFilterReporter.h
VGammaORAlg.h
CP::SysFilterReporterCombiner
a reporter class that combines the filter decisions for all systematics
Definition
SysFilterReporterCombiner.h:34
CP::SysFilterReporter
a systematics aware filter reporter
Definition
SysFilterReporter.h:44
CP::VGammaORAlg::m_eventInfoHandle
CP::SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
the event info handle
Definition
VGammaORAlg.h:41
CP::VGammaORAlg::m_vgammaORTool
ToolHandle< IVGammaORTool > m_vgammaORTool
the overlap removal tool
Definition
VGammaORAlg.h:36
CP::VGammaORAlg::m_noFilter
Gaudi::Property< bool > m_noFilter
whether to not apply an event filter
Definition
VGammaORAlg.h:56
CP::VGammaORAlg::finalize
virtual StatusCode finalize() override
Definition
VGammaORAlg.cxx:50
CP::VGammaORAlg::m_systematicsList
CP::SysListHandle m_systematicsList
the systematics
Definition
VGammaORAlg.h:33
CP::VGammaORAlg::m_inOverlapHandle
CP::SysWriteDecorHandle< bool > m_inOverlapHandle
the decoration for the tool decision
Definition
VGammaORAlg.h:46
CP::VGammaORAlg::m_keepOverlap
Gaudi::Property< bool > m_keepOverlap
which way to run the event filter
Definition
VGammaORAlg.h:61
CP::VGammaORAlg::initialize
virtual StatusCode initialize() override
Definition
VGammaORAlg.cxx:13
CP::VGammaORAlg::m_filterParams
CP::SysFilterReporterParams m_filterParams
the event filter for the tool decision
Definition
VGammaORAlg.h:51
EL::AnaAlgorithm::execute
virtual::StatusCode execute()
execute this algorithm
Definition
AnaAlgorithm.cxx:315
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
Generated on
for ATLAS Offline Software by
1.17.0