struct Gambit::ColliderBit::Cutflows

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

#include <Cutflow.hpp>

Public Functions

Name
Cutflows()
Do-nothing default constructor.
Cutflows(const vector< Cutflow > & cutflows)
Populating constructor.
voidaddCutflow(const Cutflow & cf)
Append a provided Cutflow to the list.
voidaddCutflow(const string & cfname, const vector< string > & cutnames)
Append a newly constructed Cutflow to the list.
Cutflow &operator[](size_t i)
Access the i’thCutflow.
const Cutflow &operator[](size_t i) const
Access the i’thCutflow (const)
Cutflow &operator[](const string & name)
Access the Cutflow whose name is name.
const Cutflow &operator[](const string & name) const
Access the i’thCutflow (const)
voidfillinit(double weight =1.)
Fill the pre-cuts state counter for all contained {Cutflow}s.
boolfill(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.
boolfill(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)
boolfill(size_t icut, const vector< bool > & cutresults, double weight =1.)
Fill cut-state counters from an n-element results vector, starting at icut.
boolfillall(const vector< bool > & cutresults, double weight =1.)
Fill all cut-state counters from an Ncut-element results vector, starting at icut=1.
boolfillnext(bool cutresult, double weight =1.)
Fill the next post-cut counter.
boolfillnext(double weight =1.)
Fill the next post-cut counter, assuming a true result.
boolfillnext(const vector< bool > & cutresults, double weight =1.)
Fill the next cut-state counters from an n-element results vector.
voidscale(double factor)
Scale the contained {Cutflow}s by the given factor.
voidnormalize(double norm, size_t icut =0)
stringstr() const
Create a string representation.
voidprint(std::ostream & os) const
Print string representation to a stream.

Public Attributes

Name
vector< Cutflow >cfs

Public Functions Documentation

function Cutflows

inline Cutflows()

Do-nothing default constructor.

function Cutflows

inline Cutflows(
    const vector< Cutflow > & cutflows
)

Populating constructor.

function addCutflow

inline void addCutflow(
    const Cutflow & cf
)

Append a provided Cutflow to the list.

function addCutflow

inline void addCutflow(
    const string & cfname,
    const vector< string > & cutnames
)

Append a newly constructed Cutflow to the list.

function operator[]

inline Cutflow & operator[](
    size_t i
)

Access the i’thCutflow.

function operator[]

inline const Cutflow & operator[](
    size_t i
) const

Access the i’thCutflow (const)

function operator[]

inline Cutflow & operator[](
    const string & name
)

Access the Cutflow whose name is name.

function operator[]

inline const Cutflow & operator[](
    const string & name
) const

Access the i’thCutflow (const)

function fillinit

inline void fillinit(
    double weight =1.
)

Fill the pre-cuts state counter for all contained {Cutflow}s.

function fill

inline 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.

function fill

inline 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)

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

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.

function fill

inline 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.

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

function fillall

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

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

function fillnext

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

Fill the next post-cut counter.

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

function fillnext

inline bool fillnext(
    double weight =1.
)

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

function fillnext

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

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

function scale

inline void scale(
    double factor
)

Scale the contained {Cutflow}s by the given factor.

function normalize

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

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

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

function str

inline string str() const

Create a string representation.

function print

inline void print(
    std::ostream & os
) const

Print string representation to a stream.

Public Attributes Documentation

variable cfs

vector< Cutflow > cfs;

Updated on 2023-06-26 at 21:36:52 +0000