ATLAS Offline Software
EventSelectionByObjectFlagAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 //
8 // includes
9 //
10 
14 
15 //
16 // method implementations
17 //
18 
19 namespace CP {
20 
22  const std::string &name, ISvcLocator *pSvcLocator)
23  : AnaAlgorithm(name, pSvcLocator) {}
24 
26 
32 
33  return StatusCode::SUCCESS;
34 }
35 
37 
38  SysFilterReporterCombiner filterCombiner (m_filterParams, true);
39 
40  // loop over systematics
41  for (const auto& sys : m_systematicsList.systematicsVector())
42  {
43  SysFilterReporter filter (filterCombiner, sys);
44 
45  // particle container
46  const xAOD::IParticleContainer *particles = nullptr;
48 
49  // reject events with any particle passing the input selection
50  for (const xAOD::IParticle *particle : *particles) {
52  if (m_veto.getBool (*particle, sys)) {
53  ATH_MSG_VERBOSE("Event failed.");
54  filter.setPassed (false);
55  break;
56  }
57  }
58  }
59  }
60 
61  return StatusCode::SUCCESS;
62 }
63 
66  return StatusCode::SUCCESS;
67 }
68 
69 } // namespace CP
CP::SysFilterReporterCombiner
a reporter class that combines the filter decisions for all systematics
Definition: SysFilterReporterCombiner.h:34
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
CP::EventSelectionByObjectFlagAlg::m_particleHandle
SysReadHandle< xAOD::IParticleContainer > m_particleHandle
the particle collection we run on
Definition: EventSelectionByObjectFlagAlg.h:46
CP::EventSelectionByObjectFlagAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition: EventSelectionByObjectFlagAlg.h:38
CP::EventSelectionByObjectFlagAlg::initialize
StatusCode initialize() override
Definition: EventSelectionByObjectFlagAlg.cxx:25
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
CP::SysListHandle::systematicsVector
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
Definition: SysListHandle.cxx:96
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
CP::EventSelectionByObjectFlagAlg::m_filterParams
SysFilterReporterParams m_filterParams
the filter reporter
Definition: EventSelectionByObjectFlagAlg.h:42
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::SysFilterReporterParams::finalize
StatusCode finalize()
do anything we need to do in finalize
Definition: SysFilterReporterParams.cxx:63
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
SysFilterReporter.h
covarianceTool.filter
filter
Definition: covarianceTool.py:514
CP::EventSelectionByObjectFlagAlg::execute
StatusCode execute() override
Definition: EventSelectionByObjectFlagAlg.cxx:36
CP::EventSelectionByObjectFlagAlg::m_veto
SysReadSelectionHandle m_veto
the preselection we apply to our input
Definition: EventSelectionByObjectFlagAlg.h:55
CP::EventSelectionByObjectFlagAlg::finalize
StatusCode finalize() override
Definition: EventSelectionByObjectFlagAlg.cxx:64
CP::SysListHandle::initialize
::StatusCode initialize()
intialize this property
Definition: SysListHandle.cxx:69
CP::SysReadSelectionHandle::getBool
bool getBool(const SG::AuxElement &element, const CP::SystematicSet &sys) const
get the selection as a bool
CP::EventSelectionByObjectFlagAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition: EventSelectionByObjectFlagAlg.h:51
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::SysFilterReporter
a systematics aware filter reporter
Definition: SysFilterReporter.h:44
SysFilterReporterCombiner.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
EventSelectionByObjectFlagAlg.h
CP::SysFilterReporterParams::initialize
StatusCode initialize(SysListHandle &sysListHandle)
do anything we need to do in initialize
Definition: SysFilterReporterParams.cxx:25
CP::SysReadSelectionHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
Definition: SysReadSelectionHandle.cxx:34
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
CP::EventSelectionByObjectFlagAlg::EventSelectionByObjectFlagAlg
EventSelectionByObjectFlagAlg(const std::string &name, ISvcLocator *svcLoc=nullptr)
Definition: EventSelectionByObjectFlagAlg.cxx:21
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30