16 template<
class T>
class _Cut;
27 template<
class T>
class _Cut
34 _Cut(
const std::function<CutFunc_t>& func,
35 const std::function<ExposureFunc_t>& liveFunc = 0,
36 const std::function<ExposureFunc_t>& potFunc = 0);
45 double Livetime(
const caf::SRSpill* spill)
const
51 double POT(
const caf::SRSpill* spill)
const
62 friend std::function<ExposureFunc_t>
CombineExposures(
const std::function<ExposureFunc_t>&
a,
const std::function<ExposureFunc_t>& b);
70 _Cut(
const std::function<CutFunc_t>& fun,
71 const std::function<ExposureFunc_t>& liveFunc,
72 const std::function<ExposureFunc_t>& potFunc,
106 template<
class T>
_Cut<T> operator<(const _Var<T>& v,
double c);
108 template<
class T>
_Cut<T> operator<=(const _Var<T>& v,
double c);
113 template<
class T>
_Cut<T> operator<(const _Var<T>&
a,
const _Var<T>& b);
115 template<
class T>
_Cut<T> operator<=(const _Var<T>&
a,
const _Var<T>& b);
120 template<
class T>
_Cut<T> operator<(double c, const _Var<T>& v);
122 template<
class T>
_Cut<T> operator<=(double c, const _Var<T>& v);
const Cut kNoCut([](const caf::SRSliceProxy *){return true;})
The simplest possible cut: pass everything, used as a default.
std::function< ExposureFunc_t > fPOTFunc
_Cut< T > operator!(const _Cut< T > &a)
_Cut< T > operator&&(const _Cut< T > &a, const _Cut< T > &b)
static int fgNextID
The next ID that hasn't yet been assigned.
double Livetime(const caf::SRSpill *spill) const
Provide a Livetime function if your cut is a timing cut etc.
_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
_Cut< T > operator||(const _Cut< T > &a, const _Cut< T > &b)
process_name opflashCryoW ana
caf::Proxy< caf::SRSlice > SRSliceProxy
double( ExposureFunc_t)(const caf::SRSpill *spill)
_Cut(const std::function< CutFunc_t > &fun, const std::function< ExposureFunc_t > &liveFunc, const std::function< ExposureFunc_t > &potFunc, int id)
bool( CutFunc_t)(const T *sr)
The type of the function part of a cut.
_Cut< T > operator>=(const _Var< T > &v, double c)
double POT(const caf::SRSpill *spill) const
Could be useful for cuts on specific batches?
_Cut< caf::SRSliceProxy > Cut
caf::Proxy< caf::StandardRecord > SRSpillProxy
int ID() const
Cuts with the same definition will have the same ID.
const SpillCut kNoSpillCut([](const caf::SRSpillProxy *){return true;})
The simplest possible cut: pass everything, used as a default.
std::function< ExposureFunc_t > fLiveFunc
_Cut< T > operator!=(const _Var< T > &v, double c)
An SRSlice contains overarching information for a slice.
_Cut< caf::SRSpillProxy > SpillCut
Equivalent of Cut acting on caf::SRSpill. For use in spill-by-spill data quality cuts.
friend std::function< ExposureFunc_t > CombineExposures(const std::function< ExposureFunc_t > &a, const std::function< ExposureFunc_t > &b)
The StandardRecord is the primary top-level object in the Common Analysis File trees.
_Cut< caf::SRSpillTruthBranch > SpillTruthCut
Cut designed to be used over the nuTree, ie all neutrinos, not just those that got slices...
_Cut< caf::SRSliceProxy > SliceCut
Representation of a cut (selection) to be applied to a caf::StandardRecord object.
_Cut< T > operator==(const _Var< T > &v, double c)
Template for Cut and SpillCut.
std::function< CutFunc_t > fFunc
_Cut< T > operator>(const _Var< T > &v, double c)
Most useful for combining weights.
bool operator()(const T *sr) const
Allows a cut to be called with bool result = myCut(sr) syntax.