15 template<
class T>
class _Cut 22 _Cut(
const std::function<CutFunc_t>&
func,
23 const std::function<ExposureFunc_t>& liveFunc = 0,
24 const std::function<ExposureFunc_t>& potFunc = 0);
62 #ifdef DICT_FOR_PYTHON 65 _Cut<T> __invert__()
const {
return !(*this);}
72 operator bool()
const;
75 _Cut(
const std::function<CutFunc_t>& fun,
76 const std::function<ExposureFunc_t>& liveFunc,
77 const std::function<ExposureFunc_t>& potFunc,
std::function< ExposureFunc_t > fPOTFunc
Cuts and Vars for the 2020 FD DiF Study.
double Livetime(const caf::SRSpillProxy *spill) const
Provide a Livetime function if your cut is a timing cut etc.
bool operator()(const T *) const
bool( CutFunc_t)(const T *sr)
The type of the function part of a cut.
static int fgNextID
The next ID that hasn't yet been assigned.
_Cut(const std::function< CutFunc_t > &func, const std::function< ExposureFunc_t > &liveFunc=0, const std::function< ExposureFunc_t > &potFunc=0)
std::function can wrap a real function, function object, or lambda
double POT(const caf::SRSpillProxy *spill) const
Could be useful for cuts on specific batches?
double( ExposureFunc_t)(const caf::SRSpillProxy *spill)
_Cut< caf::SRNeutrinoProxy > NuTruthCut
Cut designed to be used over the nuTree, ie all neutrinos, not just those that got slices...
_Cut< T > operator&&(const _Cut< T > &c) const
const NuTruthCut kNoNuTruthCut
The simplest possible cut: pass everything, used as a default.
_Cut< caf::SRProxy > Cut
Representation of a cut (selection) to be applied to a caf::StandardRecord object.
int ID() const
Cuts with the same definition will have the same ID.
double func(double x, double y)
std::function< ExposureFunc_t > fLiveFunc
_Cut< caf::SRSpillProxy > SpillCut
Equivalent of Cut acting on caf::SRSpill. For use in spill-by-spill data quality cuts.
const SpillCut kNoSpillCut
The simplest possible cut: pass everything, used as a default.
_Cut & operator=(const _Cut< T > &c)
_Cut< T > operator||(const _Cut< T > &b) const
_Cut< T > operator!() const
Template for Cut and SpillCut.
std::function< CutFunc_t > fFunc
bool operator()(const T *sr) const
Allows a cut to be called with bool result = myCut(sr) syntax.
const Cut kNoCut
The simplest possible cut: pass everything, used as a default.