RAPIDO
Repeatable Analysis Programming for Interpretability, Durability, and Organization
Loading...
Searching...
No Matches
LambdaCut Class Reference

#include <cutflow.h>

Inheritance diagram for LambdaCut:
Cut

Public Member Functions

 LambdaCut (std::string new_name, std::function< bool()> new_evaluate_lambda)
 
 LambdaCut (std::string new_name, std::function< bool()> new_evaluate_lambda, std::function< double()> new_weight_lambda)
 
LambdaCutclone (std::string new_name)
 
bool evaluate ()
 
double weight ()
 
- Public Member Functions inherited from Cut
 Cut (std::string new_name)
 
virtual ~Cut ()
 
void print ()
 
bool getResult ()
 
double getWeight ()
 

Public Attributes

std::function< bool()> evaluate_lambda
 
std::function< double()> weight_lambda
 
- Public Attributes inherited from Cut
std::string name
 
Cutparent
 
Cutright
 
Cutleft
 
int n_pass
 
int n_fail
 
double n_pass_weighted
 
double n_fail_weighted
 
Utilities::RunningStat runtimes
 

Detailed Description

Object that represents a single cut in an analysis with functionality defined in lambda functions

Constructor & Destructor Documentation

◆ LambdaCut() [1/2]

LambdaCut::LambdaCut ( std::string new_name,
std::function< bool()> new_evaluate_lambda )

LambadCut object constructor (assumes weight == 1.0)

Parameters
new_namenew cut name
new_evaluate_lambdalambda function that evaluates new cut conditional logic
Returns
none

◆ LambdaCut() [2/2]

LambdaCut::LambdaCut ( std::string new_name,
std::function< bool()> new_evaluate_lambda,
std::function< double()> new_weight_lambda )

LambdaCut object constructor

Parameters
new_namenew cut name
new_evaluate_lambdalambda function that evaluates new cut conditional logic
new_weight_lambdalambda function that computes event weight
Returns
none

Member Function Documentation

◆ clone()

LambdaCut * LambdaCut::clone ( std::string new_name)
virtual

Create a copy of this cut object

Parameters
new_namename of cut copy
Returns
pointer to a copy of this cut object

Reimplemented from Cut.

◆ evaluate()

bool LambdaCut::evaluate ( )
virtual

Evaluate cut logic

Returns
passed/failed (true/false)

Reimplemented from Cut.

◆ weight()

double LambdaCut::weight ( )
virtual

Get even weight for this cut only

Returns
event weight

Reimplemented from Cut.

Member Data Documentation

◆ evaluate_lambda

std::function<bool()> LambdaCut::evaluate_lambda

Lambda function that evaluates conditional logic (i.e. the cut itself)

◆ weight_lambda

std::function<double()> LambdaCut::weight_lambda

Lambda function that computes event weight


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