3 return !slc->is_clear_cosmic;
8 for(
auto const &slc : sr->slc)
10 if(!slc.is_clear_cosmic)
return true;
20 double bestValue = -std::numeric_limits<double>::max();
22 for(
auto const &slc : sr->slc)
24 if(!slc.is_clear_cosmic)
26 if(slc.crumbs_result.score > bestValue)
27 bestValue = slc.crumbs_result.score;
37 unsigned bestId = std::numeric_limits<unsigned>::max();
38 double bestValue = -std::numeric_limits<double>::max();
40 for(
auto const &slc : sr->slc)
42 if(!slc.is_clear_cosmic)
44 if(slc.crumbs_result.score > bestValue)
46 bestValue = slc.crumbs_result.score;
63 return slc->crumbs_result.score > -0.05;
const SpillVar kBestCRUMBSScore([](const caf::SRSpillProxy *sr) -> double{double bestValue=-std::numeric_limits< double >::max();for(auto const &slc:sr->slc){if(!slc.is_clear_cosmic){bestValue=slc.crumbs_result.score;}}return bestValue;})
const Cut kCRUMBSCut([](const caf::SRSliceProxy *slc){return slc->crumbs_result.score >-0.05;})
const SpillVar kBestCRUMBSSliceID([](const caf::SRSpillProxy *sr) -> double{unsigned id=0;unsigned bestId=std::numeric_limits< unsigned >::max();double bestValue=-std::numeric_limits< double >::max();for(auto const &slc:sr->slc){if(!slc.is_clear_cosmic){if(slc.crumbs_result.score > bestValue){bestValue=slc.crumbs_result.score;bestId=id;}}++id;}return bestId;})
const SpillCut kBestCRUMBSSliceCut([](const caf::SRSpillProxy *sr){return sr->slc[kBestCRUMBSSliceID(sr)].crumbs_result.score >-0.05;})
const SpillCut kHasNonUnambiguousSlice([](const caf::SRSpillProxy *sr){for(auto const &slc:sr->slc){if(!slc.is_clear_cosmic) return true;}return false;})
caf::Proxy< caf::SRSlice > SRSliceProxy
_Var< caf::SRSliceProxy > Var
Representation of a variable to be retrieved from a caf::StandardRecord object.
_Var< caf::SRSpillProxy > SpillVar
Equivalent of Var acting on caf::SRSpill.
_Cut< caf::SRSliceProxy > Cut
caf::Proxy< caf::StandardRecord > SRSpillProxy
_Cut< caf::SRSpillProxy > SpillCut
Equivalent of Cut acting on caf::SRSpill. For use in spill-by-spill data quality cuts.
const SpillVar kBestCRUMBSSliceNTracks([](const caf::SRSpillProxy *sr) -> float{return sr->slc[kBestCRUMBSSliceID(sr)].reco.ntrk;})
#define SIMPLEVAR(CAFNAME)
For Vars where literally all you need is a single CAF variable.
const Cut kNonUnambiguousSlice([](const caf::SRSliceProxy *slc){return!slc->is_clear_cosmic;})