ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
LArSamples::FuncCut Struct Reference

#include <FilterParams.h>

Collaboration diagram for LArSamples::FuncCut:

Public Member Functions

 FuncCut (const DataFuncSet &f=DataFuncSet(), const DataFuncArgs &a=DataFuncArgs())
 
bool pass (const Data &data) const
 
bool gotMin () const
 
bool gotMax () const
 
void setEqual (double val)
 

Public Attributes

DataFuncSet func
 
DataFuncArgs args
 
double min
 
double max
 

Detailed Description

Definition at line 37 of file FilterParams.h.

Constructor & Destructor Documentation

◆ FuncCut()

LArSamples::FuncCut::FuncCut ( const DataFuncSet f = DataFuncSet(),
const DataFuncArgs a = DataFuncArgs() 
)
inline

Definition at line 38 of file FilterParams.h.

39  : func(f), args(a), min(-DBL_MAX), max(DBL_MAX) { }

Member Function Documentation

◆ gotMax()

bool LArSamples::FuncCut::gotMax ( ) const
inline

Definition at line 42 of file FilterParams.h.

42 { return max < +DBL_MAX/2; }

◆ gotMin()

bool LArSamples::FuncCut::gotMin ( ) const
inline

Definition at line 41 of file FilterParams.h.

41 { return min > -DBL_MAX/2; }

◆ pass()

bool FuncCut::pass ( const Data data) const

Definition at line 33 of file FilterParams.cxx.

34 {
35  double val = func.val(data, args);
36  if (gotMin() && gotMax() && min > max) return (val == min); // for ==
37  if (gotMin() && val < min) return false; // for > (Actually a >=)
38  if (gotMax() && val >= max) return false; // for <
39  return true;
40 }

◆ setEqual()

void LArSamples::FuncCut::setEqual ( double  val)
inline

Definition at line 43 of file FilterParams.h.

43 { min = val; max = val - 1; }

Member Data Documentation

◆ args

DataFuncArgs LArSamples::FuncCut::args

Definition at line 45 of file FilterParams.h.

◆ func

DataFuncSet LArSamples::FuncCut::func

Definition at line 44 of file FilterParams.h.

◆ max

double LArSamples::FuncCut::max

Definition at line 46 of file FilterParams.h.

◆ min

double LArSamples::FuncCut::min

Definition at line 46 of file FilterParams.h.


The documentation for this struct was generated from the following files:
LArSamples::FuncCut::gotMax
bool gotMax() const
Definition: FilterParams.h:42
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
LArSamples::FuncCut::args
DataFuncArgs args
Definition: FilterParams.h:45
LArSamples::FuncCut::min
double min
Definition: FilterParams.h:46
hist_file_dump.f
f
Definition: hist_file_dump.py:135
LArSamples::FuncCut::func
DataFuncSet func
Definition: FilterParams.h:44
LArSamples::FuncCut::max
double max
Definition: FilterParams.h:46
a
TList * a
Definition: liststreamerinfos.cxx:10
LArSamples::FuncCut::gotMin
bool gotMin() const
Definition: FilterParams.h:41
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
LArSamples::DataFuncSet::val
double val(const Data &data, const DataFuncArgs &args) const
Definition: Data.h:61