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
11
12namespace CP {
13
15
16 ANA_CHECK(m_vgammaORTool.retrieve());
17 ANA_CHECK(m_filterParams.initialize());
18 ANA_CHECK(m_eventInfoKey.initialize());
19 ANA_CHECK(m_inOverlapKey.initialize());
20
21 return StatusCode::SUCCESS;
22 }
23
24 StatusCode VGammaORAlg::execute(const EventContext& ctx) const {
25
26 FilterReporter filter(m_filterParams, m_noFilter.value(), ctx);
27
29 ANA_CHECK(evtInfo.isValid());
30
31 bool in_vgamma_overlap;
32 ANA_CHECK(m_vgammaORTool->inOverlap(in_vgamma_overlap));
33
35 dec(*evtInfo) = in_vgamma_overlap;
36
37 if (!m_noFilter.value()) {
38 if (m_keepOverlap)
39 filter.setPassed( in_vgamma_overlap );
40 else
41 filter.setPassed( !in_vgamma_overlap );
42 }
43
44 return StatusCode::SUCCESS;
45 }
46
47 StatusCode VGammaORAlg::finalize() {
48
50 return StatusCode::SUCCESS;
51 }
52} // namespace
Handle class for reading from StoreGate.
Handle class for adding a decoration to an object.
#define ANA_MSG_INFO(xmsg,...)
Macro printing info messages.
#define ANA_CHECK(EXP)
check whether the given expression was successful
ToolHandle< IVGammaORTool > m_vgammaORTool
the overlap removal tool
Definition VGammaORAlg.h:32
Gaudi::Property< bool > m_noFilter
whether to not apply an event filter
Definition VGammaORAlg.h:52
virtual StatusCode execute(const EventContext &ctx) const override
virtual StatusCode finalize() override
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
the event info key
Definition VGammaORAlg.h:37
SG::WriteDecorHandleKey< xAOD::EventInfo > m_inOverlapKey
the decoration for the tool decision
Definition VGammaORAlg.h:42
Gaudi::Property< bool > m_keepOverlap
which way to run the event filter
Definition VGammaORAlg.h:57
virtual StatusCode initialize() override
FilterReporterParams m_filterParams
the event filter for the tool decision
Definition VGammaORAlg.h:47
a guard class for use with ref FilterReporterParams
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Handle class for adding a decoration to an object.
Select isolated Photons, Electrons and Muons.