rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0

FillCollector specialisation for all Cutflow-like AO. More...

#include <Cutflow.hh>

Inheritance diagram for Rivet::FillCollector< Cutflow >:
Rivet::Cutflow

Public Types

using YAO = Cutflow
 
using Ptr = shared_ptr< FillCollector< YAO > >
 
using BaseT = YODA::BinnedHisto< std::string >
 
using BinningT = BaseT::BinningT
 
using FillType = BaseT::FillType
 
using BinType = BaseT::BinT
 

Public Member Functions

 FillCollector (typename YAO::Ptr yao)
 
int fill (typename YAO::FillType &&fillCoords, const double weight=1.0, const double fraction=1.0)
 
int fill (const std::string val, const double weight=1.0, const double fraction=1.0)
 Fill function using an explicit coordinate.
 
int fillnext (const bool cutresult, const double weight=1.0, const double fraction=1.0)
 Convenience method to fill the next cut step if cutresult is true.
 
int fillnext (const double weight=1.0, const double fraction=1.0)
 Convenience method to fill the next cut step.
 
int fillnext (const std::vector< bool > &cutresults, const double weight=1.0, const double fraction=1.0)
 Convenience method to fill the next cut steps from an n-element results vector cutresult.
 
int fillinit (const double weight=1.0, const double fraction=1.0)
 Convenience method to fill the pre-cut step.
 
void reset () noexcept
 Empty the subevent stack (for start of new event group).
 
const Fills< YAO > & fills () const
 Access the fill info subevent stack.
 
size_t currentIndex () const
 Returns current cutflow index for debugging.
 
void scale (const double factor)
 Scale the cutflow weights by the given factor.
 
void normalizeStep (const std::string &edge, const double norm)
 Scale the cutflow weights so that the weight count after cut edge is norm.
 
void normalizeFirst (const double norm)
 Alias to scale the cutflow weights so that the weight after the pre-init cut is norm.
 
string str () const
 Create a string representation.
 
void print (std::ostream &os) const
 Print string representation to a stream.
 

Protected Member Functions

LoggetLog () const
 Get a logger object.
 

Protected Attributes

size_t icurr
 

Detailed Description

FillCollector specialisation for all Cutflow-like AO.

Constructor & Destructor Documentation

◆ FillCollector()

Rivet::FillCollector< Cutflow >::FillCollector ( typename YAO::Ptr  yao)
inline

Constructor

We call the cheaper constructor based on the binning to avoid copying of the bin content. The underlying binning object is still used in analize() by many routines, e.g. to query numBins() or to loop over bins() with subsequent calls to bin xEdge() etc.

Member Function Documentation

◆ fill() [1/2]

int Rivet::FillCollector< Cutflow >::fill ( const std::string  val,
const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinevirtual

Fill function using an explicit coordinate.

Note
This method will set the current fill position icurr.

Reimplemented from Rivet::Cutflow.

◆ fill() [2/2]

int Rivet::FillCollector< Cutflow >::fill ( typename YAO::FillType &&  fillCoords,
const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinevirtual

Overloaded fill method, which stores Fill info until Multiplexer<T>::collapseEventGroup() is called.

Todo:
Do we need to deal with users using fractions directly?

Reimplemented from Rivet::Cutflow.

◆ fillinit()

int Rivet::FillCollector< Cutflow >::fillinit ( const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinevirtual

Convenience method to fill the pre-cut step.

Reimplemented from Rivet::Cutflow.

◆ fillnext() [1/3]

int Rivet::FillCollector< Cutflow >::fillnext ( const bool  cutresult,
const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinevirtual

Convenience method to fill the next cut step if cutresult is true.

Reimplemented from Rivet::Cutflow.

◆ fillnext() [2/3]

int Rivet::FillCollector< Cutflow >::fillnext ( const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinevirtual

Convenience method to fill the next cut step.

Reimplemented from Rivet::Cutflow.

◆ fillnext() [3/3]

int Rivet::FillCollector< Cutflow >::fillnext ( const std::vector< bool > &  cutresults,
const double  weight = 1.0,
const double  fraction = 1.0 
)
inlinevirtual

Convenience method to fill the next cut steps from an n-element results vector cutresult.

Reimplemented from Rivet::Cutflow.


The documentation for this class was generated from the following file:
  • /Users/chrisg/software/rivet/include/Rivet/Tools/Cutflow.hh