SimpleCut keeps predicate (lambda function with vector of arguments) and list of Variables.
More...
#include <SimpleCut.hpp>
|
| SimpleCut (const SimpleCut &cut)=default |
|
| SimpleCut (SimpleCut &&cut)=default |
|
SimpleCut & | operator= (SimpleCut &&)=default |
|
SimpleCut & | operator= (const SimpleCut &cut)=default |
|
| SimpleCut (std::vector< std::string > vars, std::function< bool(std::vector< double > &)> lambda, std::string title="") |
|
template<class T > |
bool | Apply (const T &object) const |
| Evaluates cut.
|
|
bool | Apply (const BranchChannel &object) const |
|
bool | Apply (std::vector< const BranchChannel * > &bch, std::vector< size_t > &id) const |
|
bool | Apply (const BranchChannel &a, size_t a_id, const BranchChannel &b, size_t b_id) const |
|
void | Print () const |
|
std::vector< Variable > & | Variables () |
|
ANALYSISTREE_ATTR_NODISCARD const std::vector< Variable > & | GetVariables () const |
|
ANALYSISTREE_ATTR_NODISCARD const std::set< std::string > & | GetBranches () const |
|
|
| SimpleCut (const Variable &var, double min, double max, std::string title="") |
|
| SimpleCut (const Variable &var, int value, std::string title="") |
|
void | FillBranchNames () |
|
| ClassDef (SimpleCut, 1) |
|
|
std::string | title_ |
|
std::vector< Variable > | vars_ {} |
|
std::set< std::string > | branch_names_ {} |
|
std::function< bool(std::vector< double > &)> | lambda_ |
| function used to evaluate the cut.
|
|
|
SimpleCut | RangeCut (const std::string &variable_name, double lo, double hi, const std::string &title="") |
|
SimpleCut | EqualsCut (const std::string &variable_name, int value, const std::string &title="") |
|
SimpleCut | RangeCut (const Variable &var, double lo, double hi, const std::string &title="") |
|
SimpleCut | EqualsCut (const Variable &var, int value, const std::string &title="") |
|
bool | operator== (const SimpleCut &that, const SimpleCut &other) |
|
SimpleCut keeps predicate (lambda function with vector of arguments) and list of Variables.
◆ SimpleCut()
AnalysisTree::SimpleCut::SimpleCut |
( |
std::vector< std::string > | vars, |
|
|
std::function< bool(std::vector< double > &)> | lambda, |
|
|
std::string | title = "" ) |
|
inline |
Constructor for generic cut: bool f(var1, var2, ..., varn)
- Parameters
-
vars | vector of variable NAMES needed for a cut |
lambda | function of fields, returns bool |
◆ Apply()
template<class T >
bool AnalysisTree::SimpleCut::Apply |
( |
const T & | object | ) |
const |
|
inline |
Evaluates cut.
- Template Parameters
-
T | type of data-object associated with TTree |
- Parameters
-
- Returns
- result of cut
◆ EqualsCut [1/2]
SimpleCut EqualsCut |
( |
const std::string & | variable_name, |
|
|
int | value, |
|
|
const std::string & | title = "" ) |
|
friend |
Constructor for integers and bool fields for cut: field == value
- Parameters
-
variable_name | name of the variable in format "branch.field" |
value | only objects with field == value will be accepted |
◆ EqualsCut [2/2]
SimpleCut EqualsCut |
( |
const Variable & | var, |
|
|
int | value, |
|
|
const std::string & | title = "" ) |
|
friend |
Constructor for integers and bool fields for cut: field == value
- Parameters
-
variable | name of the pre-defined variable |
value | only objects with field == value will be accepted |
◆ RangeCut [1/2]
SimpleCut RangeCut |
( |
const std::string & | variable_name, |
|
|
double | lo, |
|
|
double | hi, |
|
|
const std::string & | title = "" ) |
|
friend |
Constructor for range cut: min <= field <= max
- Parameters
-
variable_name | name of the variable in format "branch.field" |
min | minimal accepted value |
max | maximal accepted value |
◆ RangeCut [2/2]
SimpleCut RangeCut |
( |
const Variable & | var, |
|
|
double | lo, |
|
|
double | hi, |
|
|
const std::string & | title = "" ) |
|
friend |
Constructor for range cut: min <= field <= max
- Parameters
-
variable | name of the pre-defined variable |
min | minimal accepted value |
max | maximal accepted value |
The documentation for this class was generated from the following files: