ATLAS Offline Software
METSelector.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3  */
4 
6 #include "TopEvent/EventTools.h"
7 
8 namespace top {
9  METSelector::METSelector(const std::string& params) :
10  SignValueSelector("MET", params) {
11  }
12 
13  bool METSelector::apply(const top::Event& event) const {
14  return checkFloat(event.m_met->met(), value());
15  }
16 
18  // If any of the required collections is a nullptr (i.e. has not been
19  // loaded) return false.
20  if (not event.m_met) {
21  return false;
22  }
23 
24  return checkFloat(event.m_met->met(), value());
25  }
26 }
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::METSelector::METSelector
METSelector(const std::string &params)
Definition: METSelector.cxx:9
top::SignValueSelector
Many of the tools need a sign (>=) and a value (2).
Definition: SignValueSelector.h:16
EventTools.h
A few functions for doing operations on particles / events. Currently holds code for dR,...
top::SignValueSelector::checkFloat
bool checkFloat(double value, double cut) const
Compare a cut supplied by the user with the value calculated in the event.
Definition: SignValueSelector.cxx:133
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
top::METSelector::applyParticleLevel
bool applyParticleLevel(const top::ParticleLevelEvent &event) const override
This does stuff based on the information in a particle level event.
Definition: METSelector.cxx:17
top::ParticleLevelEvent
Definition: ParticleLevelEvent.h:24
top::METSelector::apply
bool apply(const top::Event &event) const override
This does stuff based on the information in an event.
Definition: METSelector.cxx:13
top::SignValueSelector::value
double value() const
Get the cut value assigned in the constructor.
Definition: SignValueSelector.cxx:94
METSelector.h
top::Event
Very simple class to hold event data after reading from a file.
Definition: Event.h:49
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226