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

#include <TrackJetCleaningSelector.h>

Inheritance diagram for top::TrackJetCleaningSelector:
Collaboration diagram for top::TrackJetCleaningSelector:

Public Member Functions

 TrackJetCleaningSelector (std::shared_ptr< top::TopConfig > config)
 
bool apply (const top::Event &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

std::shared_ptr< top::TopConfigm_config
 

Detailed Description

Definition at line 18 of file TrackJetCleaningSelector.h.

Constructor & Destructor Documentation

◆ TrackJetCleaningSelector()

top::TrackJetCleaningSelector::TrackJetCleaningSelector ( std::shared_ptr< top::TopConfig config)
explicit

Definition at line 11 of file TrackJetCleaningSelector.cxx.

11  :
12  m_config(config) {
13  }

Member Function Documentation

◆ apply()

bool top::TrackJetCleaningSelector::apply ( const top::Event ) 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 15 of file TrackJetCleaningSelector.cxx.

15  {
16  // Selection is applied only if Variable-R track jets are used
17  if (m_config->sgKeyTrackJets() == "AntiKtVR30Rmax4Rmin02PV0TrackJets") {
18  static SG::AuxElement::Accessor<char> acc_passDRcut("passDRcut");
19  for (const xAOD::Jet* jet : event.m_trackJets) {
20  top::check(acc_passDRcut.isAvailable(
21  *jet), "passDRcut info not found in variable-R track jet. Needed for cleaning algorithm.");
22  if (!acc_passDRcut(*jet)) return false;
23  }
24  }
25  return true;
26  }

◆ 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::TrackJetCleaningSelector::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 28 of file TrackJetCleaningSelector.cxx.

28  {
29  return "TRACKJETCLEAN";
30  }

Member Data Documentation

◆ m_config

std::shared_ptr<top::TopConfig> top::TrackJetCleaningSelector::m_config
private

Definition at line 26 of file TrackJetCleaningSelector.h.


The documentation for this class was generated from the following files:
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
top::TrackJetCleaningSelector::m_config
std::shared_ptr< top::TopConfig > m_config
Definition: TrackJetCleaningSelector.h:26
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
top::check
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Definition: EventTools.cxx:15
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57