rivet is hosted by Hepforge, IPPP Durham
Rivet 3.1.6
Rivet::Cutflows Struct Reference

A container for several Cutflow objects, with some convenient batch access. More...

#include <Cutflow.hh>

Public Member Functions

 Cutflows ()
 Do-nothing default constructor.
 
 Cutflows (const vector< Cutflow > &cutflows)
 Populating constructor.
 
void addCutflow (const Cutflow &cf)
 Append a provided Cutflow to the list.
 
void addCutflow (const string &cfname, const vector< string > &cutnames)
 Append a newly constructed Cutflow to the list.
 
Cutflowoperator[] (size_t i)
 Access the i'th Cutflow.
 
const Cutflowoperator[] (size_t i) const
 Access the i'th Cutflow (const)
 
Cutflowoperator[] (const string &name)
 Access the Cutflow whose name is name.
 
const Cutflowoperator[] (const string &name) const
 Access the i'th Cutflow (const)
 
void fillinit (double weight=1.)
 Fill the pre-cuts state counter for all contained {Cutflow}s.
 
bool fill (size_t icut, bool cutresult=true, double weight=1.)
 Fill the {icut}'th post-cut counter, starting at icut=1 for first cut, with the same result for all {Cutflow}s.
 
bool fill (size_t icut, double weight)
 Fill the {icut}'th post-cut counter, starting at icut=1 for first cut, with the same result for all {Cutflow}s (cutresult=true overload) More...
 
bool fill (size_t icut, const vector< bool > &cutresults, double weight=1.)
 Fill cut-state counters from an n-element results vector, starting at icut. More...
 
bool fillnext (bool cutresult, double weight=1.)
 Fill the next post-cut counter. More...
 
bool fillnext (double weight=1.)
 Fill the next post-cut counter, assuming a true result. More...
 
bool fillnext (const vector< bool > &cutresults, double weight=1.)
 Fill the next cut-state counters from an n-element results vector. More...
 
bool fillall (const vector< bool > &cutresults, double weight=1.)
 Fill all cut-state counters from an Ncut-element results vector, starting at icut=1. More...
 
void scale (double factor)
 Scale the contained {Cutflow}s by the given factor.
 
void normalize (double norm, size_t icut=0)
 
string str () const
 Create a string representation.
 
void print (std::ostream &os) const
 Print string representation to a stream.
 

Public Attributes

vector< Cutflowcfs
 

Detailed Description

A container for several Cutflow objects, with some convenient batch access.

Member Function Documentation

◆ fill() [1/2]

bool Rivet::Cutflows::fill ( size_t  icut,
const vector< bool > &  cutresults,
double  weight = 1. 
)
inline

Fill cut-state counters from an n-element results vector, starting at icut.

Note
Returns the overall cut result to allow 'side-effect' cut-flow filling in an if-statement

◆ fill() [2/2]

bool Rivet::Cutflows::fill ( size_t  icut,
double  weight 
)
inline

Fill the {icut}'th post-cut counter, starting at icut=1 for first cut, with the same result for all {Cutflow}s (cutresult=true overload)

This version exists to allow calling fill(i, weight) without the weight getting cast to a bool, or having to explicitly add a 'true' middle arg.

Note
Returns the cut result to allow 'side-effect' cut-flow filling in an if-statement

References fill().

◆ fillall()

bool Rivet::Cutflows::fillall ( const vector< bool > &  cutresults,
double  weight = 1. 
)
inline

Fill all cut-state counters from an Ncut-element results vector, starting at icut=1.

Deprecated:
Prefer to use vector fillinit() and vector fill()

◆ fillnext() [1/3]

bool Rivet::Cutflows::fillnext ( bool  cutresult,
double  weight = 1. 
)
inline

Fill the next post-cut counter.

Note
Returns the cut result to allow 'side-effect' cut-flow filling in an if-statement

◆ fillnext() [2/3]

bool Rivet::Cutflows::fillnext ( const vector< bool > &  cutresults,
double  weight = 1. 
)
inline

Fill the next cut-state counters from an n-element results vector.

Note
Returns the cut result to allow 'side-effect' cut-flow filling in an if-statement

◆ fillnext() [3/3]

bool Rivet::Cutflows::fillnext ( double  weight = 1.)
inline

Fill the next post-cut counter, assuming a true result.

Note
Returns the cut result to allow 'side-effect' cut-flow filling in an if-statement

◆ normalize()

void Rivet::Cutflows::normalize ( double  norm,
size_t  icut = 0 
)
inline

Scale the cutflow weights so that all the weight counts after cut icut are norm

Todo:
Provide a version that takes a vector of norms?

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