ATLAS Offline Software
SysFilterReporter.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 //
9 // includes
10 //
11 
13 
17 
18 //
19 // method implementations
20 //
21 
22 namespace CP
23 {
26  const SystematicSet& val_sys)
27  : AsgMessagingForward (&val_combiner)
28  , m_combiner (val_combiner)
29  , m_sys (val_sys)
30  , m_passed (val_combiner.m_passedDefault)
31  {
32  ANA_CHECK_THROW (val_combiner.m_params.m_eventInfoHandle.retrieve (m_eventInfo, m_sys));
33  }
34 
35 
36 
39  {
40  ANA_MSG_DEBUG ("setting systematics-filter-passed flag to " << m_passed << " for " << m_sys.name());
41  if (m_passed)
42  m_combiner.m_passedOne = true;
43  else
44  m_combiner.m_passedAll = false;
45  // decorate event info
47 
48  // only recording nominal event selection for now
49  if (m_passed && m_sys.empty())
51 
52 #ifndef XAOD_STANDALONE
53  // only recording nominal event selection for now
54  if (m_passed && m_sys.empty() && m_combiner.m_params.m_cutID != 0)
55  {
56  // FIX ME: this is passing an event weight of 1, which is
57  // probably not the correct thing to do.
59  }
60 #endif
61  }
62 
63 
64 
66  setPassed (bool val_passed) noexcept
67  {
68  ANA_MSG_DEBUG ("change systematics-filter-passed flag to " << m_passed << " for " << m_sys.name());
69  m_passed = val_passed;
70  }
71 }
CP::SysFilterReporterCombiner
a reporter class that combines the filter decisions for all systematics
Definition: SysFilterReporterCombiner.h:34
CP::SysWriteDecorHandle::set
void set(const SG::AuxElement &object, const T &value, const CP::SystematicSet &sys) const
set the object decoration for the given systematic
CP::SysFilterReporter::SysFilterReporter
SysFilterReporter(SysFilterReporterCombiner &val_combiner, const SystematicSet &val_sys)
standard constructor
Definition: SysFilterReporter.cxx:25
CP::SystematicSet::empty
bool empty() const
returns: whether the set is empty
Definition: SystematicSet.h:67
CP::SysFilterReporterParams::m_passedNominal
unsigned m_passedNominal
Definition: SysFilterReporterParams.h:99
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
CP::SystematicSet::name
std::string name() const
returns: the systematics joined into a single string.
Definition: SystematicSet.cxx:278
CP::SysFilterReporterParams::m_eventInfoHandle
SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
the event info we run on
Definition: SysFilterReporterParams.h:90
CP::SysFilterReporter::m_sys
const SystematicSet & m_sys
the SystematicSet object we use
Definition: SysFilterReporter.h:82
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
SysFilterReporter.h
CP::SysFilterReporterParams::m_cutFlowSvc
ServiceHandle< ICutFlowSvc > m_cutFlowSvc
the handle to the service holding tables of cut-flows for filtering algs.
Definition: SysFilterReporterParams.h:124
ANA_CHECK_THROW
#define ANA_CHECK_THROW(EXP)
check whether the given expression was successful, throwing an exception on failure
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:339
CP::SysFilterReporterCombiner::m_params
SysFilterReporterParams & m_params
the SysFilterReporterParams object
Definition: SysFilterReporterCombiner.h:67
MessageCheck.h
macros for messaging and checking status codes
CP::SysFilterReporter::m_passed
bool m_passed
the value of passed we will set
Definition: SysFilterReporter.h:90
SysFilterReporterCombiner.h
CP::SysFilterReporterCombiner::m_passedAll
bool m_passedAll
Definition: SysFilterReporterCombiner.h:76
SysFilterReporterParams.h
CP::SysFilterReporterCombiner::m_passedOne
bool m_passedOne
whether we passed for at least one/all systematics
Definition: SysFilterReporterCombiner.h:75
CP::SysFilterReporterParams::m_eventDecisionOutputDecoration
SysWriteDecorHandle< char > m_eventDecisionOutputDecoration
the decoration for writing the event decision
Definition: SysFilterReporterParams.h:94
CP::SysFilterReporterParams::m_cutID
CutIdentifier m_cutID
the CutIdentifier for this filter algorithm
Definition: SysFilterReporterParams.h:119
CP::SysFilterReporter::m_combiner
SysFilterReporterCombiner & m_combiner
the SysFilterReporterParams object
Definition: SysFilterReporter.h:78
CP::SysFilterReporter::~SysFilterReporter
~SysFilterReporter()
standard destructor
Definition: SysFilterReporter.cxx:38
CP::SysFilterReporter::setPassed
void setPassed(bool val_passed=true) noexcept
report the filter decision
Definition: SysFilterReporter.cxx:66
CP::SysFilterReporter::m_eventInfo
const xAOD::EventInfo * m_eventInfo
the event info object we are decorating
Definition: SysFilterReporter.h:86
ANA_MSG_DEBUG
#define ANA_MSG_DEBUG(xmsg)
Macro printing debug messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:288