Mēnsūra
Public Member Functions | List of all members
JetFunctorFilter Class Reference

Filters events based on the number of jets that pass a generic selection. More...

#include <JetFunctorFilter.hpp>

Inheritance diagram for JetFunctorFilter:
AnalysisPlugin Plugin

Public Member Functions

 JetFunctorFilter (std::string const &name, std::function< bool(Jet const &)> const &selector, unsigned minNumJets, unsigned maxNumJets=-1) noexcept
 Constructor. More...
 
 JetFunctorFilter (std::function< bool(Jet const &)> const &selector, unsigned minNumJets, unsigned maxNumJets=-1) noexcept
 Constructor. More...
 
virtual void BeginRun (Dataset const &)
 Performs initialization for a new dataset. More...
 
virtual PluginClone () const noexcept
 Creates a newly configured clone. More...
 
- Public Member Functions inherited from AnalysisPlugin
 AnalysisPlugin (std::string const &name)
 Constructor.
 
 AnalysisPlugin (AnalysisPlugin const &)=default
 Default copy constructor.
 
 AnalysisPlugin (AnalysisPlugin &&)=default
 Default move constructor.
 
AnalysisPluginoperator= (AnalysisPlugin const &)=default
 Default assignment operator.
 
virtual ~AnalysisPlugin ()
 Trivial destructor.
 
- Public Member Functions inherited from Plugin
 Plugin (std::string const &name)
 Constructor.
 
 Plugin (Plugin const &)=default
 Default copy constructor.
 
 Plugin (Plugin &&)=default
 Default move constructor.
 
Pluginoperator= (Plugin const &)=default
 Default assignment operator.
 
virtual ~Plugin ()
 Trivial destructor.
 
virtual void EndRun ()
 Performs necessary actions needed after processing of a dataset is finished. More...
 
Processor const & GetMaster () const
 Returns a reference to the master. More...
 
std::string const & GetName () const
 Returns name of the plugin.
 
EventOutcome ProcessEventToOutcome ()
 Processes a new event from the current dataset. More...
 
void SetMaster (Processor const *processor)
 Provides a pointer to an instance of Processor class that owns the plugin. More...
 

Additional Inherited Members

- Public Types inherited from Plugin
enum  EventOutcome { EventOutcome::Ok, EventOutcome::FilterFailed, EventOutcome::NoEvents }
 Outcome of processing of an event. More...
 
- Protected Member Functions inherited from Plugin
Plugin const * GetDependencyPlugin (std::string const &name) const
 Returns a pointer to a precedent plugin in the path with the given name. More...
 

Detailed Description

Filters events based on the number of jets that pass a generic selection.

This plugin selects an event if it contains a desired number of jets that pass a selection. The selection is specified with the help of std::function and, therefore, can be very general.

The filter relies on the presence of a JetMETReader with a default name "JetMET".

Constructor & Destructor Documentation

JetFunctorFilter::JetFunctorFilter ( std::string const &  name,
std::function< bool(Jet const &)> const &  selector,
unsigned  minNumJets,
unsigned  maxNumJets = -1 
)
noexcept

Constructor.

Arguments are: name of the plugin, a jet selection, minimal and maximal allowed numbers of jets to pass the selection. If the last argument is omitted, there is no upper limit on the number of jets.

JetFunctorFilter::JetFunctorFilter ( std::function< bool(Jet const &)> const &  selector,
unsigned  minNumJets,
unsigned  maxNumJets = -1 
)
noexcept

Constructor.

A short-cut for the version above that uses a default name "JetFunctorFilter".

Member Function Documentation

void JetFunctorFilter::BeginRun ( Dataset const &  )
virtual

Performs initialization for a new dataset.

Reimplemented from Plugin.

Reimplemented from Plugin.

Plugin * JetFunctorFilter::Clone ( ) const
virtualnoexcept

Creates a newly configured clone.

Implemented from Plugin.

Implements Plugin.


The documentation for this class was generated from the following files: