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

A plugin that implements a reweighting to account for b-tagging scale factors. More...

#include <BTagWeight.hpp>

Inheritance diagram for BTagWeight:
EventWeightPlugin AnalysisPlugin Plugin

Public Member Functions

 BTagWeight (std::string const &name, BTagger bTagger, double minPt=0.)
 Creates a service with the given name.
 
 BTagWeight (BTagger bTagger, double minPt=0.)
 A short-cut for the above version with a default name "BTagWeight".
 
 BTagWeight (BTagWeight const &)=default
 Default copy constructor.
 
 BTagWeight (BTagWeight &&)=default
 Default move constructor.
 
BTagWeight operator= (BTagWeight const &)=delete
 Assignment operator is deleted.
 
virtual ~BTagWeight () noexcept
 Trivial virtual destructor.
 
virtual void BeginRun (Dataset const &) override
 Performs initialization for a new dataset. More...
 
virtual PluginClone () const override
 Creates a newly configured clone. More...
 
void RequestSystematics (bool on=true)
 Switch on or off computations of systematic variations in weights.
 
- Public Member Functions inherited from EventWeightPlugin
 EventWeightPlugin (std::string const &name)
 Constructs an instance with the given name.
 
double GetWeight () const
 Returns the nominal weight.
 
unsigned GetNumVariations () const noexcept
 Returns the number of systematic variations.
 
double GetWeightUp (unsigned iSource) const
 Returns an "up" systematic variation with the given index. More...
 
double GetWeightDown (unsigned iSource) const
 Returns a "down" systematic variation with the given index. More...
 
std::vector< double > const & GetWeights () const noexcept
 Returns a vector with nominal weight and all systematic variations. 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...
 
- Protected Attributes inherited from EventWeightPlugin
std::vector< double > weights
 Weights assigned to the current event. More...
 

Detailed Description

A plugin that implements a reweighting to account for b-tagging scale factors.

Reweighting is performed according to a recipe described in [1]. Tag configuration is not affected, i.e. if a jet is b-tagged, it stays b-tagged after the reweighting is applied. The user can provide a pt threshold, which a jet much satisfy in order to be considered in the procedure. [1] https://twiki.cern.ch/twiki/bin/viewauth/CMS/BTagSFMethods?rev=27#1a_Event_reweighting_using_scale

In the default configuration only the nominal event weight is calculated. Evaluation of the effect of systematic uncertainties can be requested with the help of method RequestSystematics.

This plugin exploits a JetReader (default name is "JetMET") and a number of services to access b-tagging working points ("BTagWP"), efficiencies ("BTagEff"), and scale factors ("BTagSF").

Member Function Documentation

void BTagWeight::BeginRun ( Dataset const &  )
overridevirtual

Performs initialization for a new dataset.

Reimplemented from Plugin.

Reimplemented from Plugin.

Plugin * BTagWeight::Clone ( ) const
overridevirtual

Creates a newly configured clone.

Implemented from Plugin.

Implements Plugin.


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