ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
top::GlobalTrigMatchSelector Class Reference

#include <GlobalTrigMatchSelector.h>

Inheritance diagram for top::GlobalTrigMatchSelector:
Collaboration diagram for top::GlobalTrigMatchSelector:

Public Member Functions

 GlobalTrigMatchSelector ()
 
bool apply (top::Event const &event) const override
 This does stuff based on the information in an event. More...
 
std::string name () const override
 A human readable name. More...
 
virtual bool applyParticleLevel (const top::ParticleLevelEvent &) const
 This does stuff based on the information in a particle level event. More...
 

Private Attributes

ToolHandle< ITrigGlobalEfficiencyCorrectionToolm_globalTriggerSF
 
ToolHandle< ITrigGlobalEfficiencyCorrectionToolm_globalTriggerSFLoose
 

Detailed Description

Definition at line 21 of file GlobalTrigMatchSelector.h.

Constructor & Destructor Documentation

◆ GlobalTrigMatchSelector()

top::GlobalTrigMatchSelector::GlobalTrigMatchSelector ( )

Definition at line 18 of file GlobalTrigMatchSelector.cxx.

19  : m_globalTriggerSF("TrigGlobalEfficiencyCorrectionTool::TrigGlobal")
20  , m_globalTriggerSFLoose("TrigGlobalEfficiencyCorrectionTool::TrigGlobalLoose") {
21  }

Member Function Documentation

◆ apply()

bool top::GlobalTrigMatchSelector::apply ( top::Event const ) const
overridevirtual

This does stuff based on the information in an event.

The idea is that you implement this to return either true or false based on the information held within top::Event. If this returns true then the event is kept. If it returns false then the event is removed.

Parameters
top::EventThe current event.
Returns
true if the event should be kept, false otherwise.

Implements top::EventSelectorBase.

Definition at line 23 of file GlobalTrigMatchSelector.cxx.

23  {
24  auto&& tool = (event.m_isLoose ? m_globalTriggerSFLoose : m_globalTriggerSF);
25  bool result = false;
26 
27  std::vector<xAOD::IParticle const*> particles;
28  particles.insert(particles.end(), event.m_electrons.begin(), event.m_electrons.end());
29  particles.insert(particles.end(), event.m_muons.begin(), event.m_muons.end());
30  particles.insert(particles.end(), event.m_photons.begin(), event.m_photons.end());
31  top::check(tool->checkTriggerMatching(result,
32  particles),
33  "TrigGlobalEfficiencyCorrectionTool::checkTriggerMatching failed");
34  return result;
35  }

◆ applyParticleLevel()

virtual bool top::EventSelectorBase::applyParticleLevel ( const top::ParticleLevelEvent ) const
inlinevirtualinherited

This does stuff based on the information in a particle level event.

The idea is that you implement this to return either true or false, based on the information held within the top::ParticleLevelEvent. If this function returns true, then the event is kept, otherwise it is removed. The function has a default implementation (which returns true) because it is expected that many EventSelector objects do not operate on ParticleLevelEvent objects.

Parameters
top::ParticleLevelEventthe current particle level event.
trueif the event should be kept (i.e. it passed the selector criteria), false otherwise.

Reimplemented in top::JetNGhostSelector, top::PrintEventSelector, top::PseudoTopRecoRun, top::NElectronNMuonTightSelector, top::NElectronNMuonSelector, top::NFwdElectronSelector, top::HTSelector, top::OSLeptonTightSelector, top::MLLSelector, top::MWTSelector, top::NElectronTightSelector, top::NFwdElectronTightSelector, top::NMuonTightSelector, top::OSLeptonSelector, top::METMWTSelector, top::METSelector, top::MLLWindow, top::NElectronSelector, top::NJetSelector, top::NMuonSelector, top::NPhotonSelector, top::NSoftMuonSelector, top::NTauSelector, top::SSLeptonTightSelector, top::SSLeptonSelector, top::ParticleLevelSelector, top::RecoLevelSelector, top::NVarRCJetSelector, top::NLargeJetSelector, and top::NRCJetSelector.

Definition at line 73 of file EventSelectorBase.h.

73 {return true;}

◆ name()

std::string top::GlobalTrigMatchSelector::name ( ) const
overridevirtual

A human readable name.

Mostly used for printing the cut and value to the screen. Must be implemented for each tool.

Implements top::EventSelectorBase.

Definition at line 37 of file GlobalTrigMatchSelector.cxx.

37  {
38  return "GTRIGMATCH";
39  }

Member Data Documentation

◆ m_globalTriggerSF

ToolHandle<ITrigGlobalEfficiencyCorrectionTool> top::GlobalTrigMatchSelector::m_globalTriggerSF
mutableprivate

Definition at line 29 of file GlobalTrigMatchSelector.h.

◆ m_globalTriggerSFLoose

ToolHandle<ITrigGlobalEfficiencyCorrectionTool> top::GlobalTrigMatchSelector::m_globalTriggerSFLoose
mutableprivate

Definition at line 30 of file GlobalTrigMatchSelector.h.


The documentation for this class was generated from the following files:
get_generator_info.result
result
Definition: get_generator_info.py:21
top::GlobalTrigMatchSelector::m_globalTriggerSF
ToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_globalTriggerSF
Definition: GlobalTrigMatchSelector.h:29
top::GlobalTrigMatchSelector::m_globalTriggerSFLoose
ToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_globalTriggerSFLoose
Definition: GlobalTrigMatchSelector.h:30
top::check
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Definition: EventTools.cxx:15
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84