4 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
27 std::vector<double> positions;
28 for(
const auto&
hit : sr->crt_hits){
29 positions.push_back(
hit.position.x);
36 std::vector<double> positions;
37 for(
const auto&
hit : sr->crt_hits){
38 positions.push_back(
hit.position.y);
45 std::vector<double> positions;
46 for(
const auto&
hit : sr->crt_hits){
47 positions.push_back(
hit.position.z);
54 std::vector<double> pes;
55 for(
const auto&
hit : sr->crt_hits){
56 pes.push_back(
hit.pe);
63 std::vector<double> times;
64 for(
const auto&
hit : sr->crt_hits){
65 times.push_back(
hit.time);
75 std::vector<double> times;
76 for(
const auto&
hit : sr->crt_hits){
77 auto thistime =
hit.time - 1600.;
78 times.push_back(thistime);
103 return slc->nu_score;
108 return slc->fmatch.present;
113 return ((
bool)
kSlcHasFlash(slc) ? (
float)slc->fmatch.score : -5.f);
118 return !slc->is_clear_cosmic;
const SpillVar kSpillUnweighted([](const caf::SRSpillProxy *){return 1;})
const SpillMultiVar kCRTHitTime([](const caf::SRSpillProxy *sr){std::vector< double > times;for(const auto &hit:sr->crt_hits){times.push_back(hit.time);}return times;})
const SpillMultiVar kCRTHitX([](const caf::SRSpillProxy *sr){std::vector< double > positions;for(const auto &hit:sr->crt_hits){positions.push_back(hit.position.x);}return positions;})
#define SIMPLESPILLVAR(CAFNAME)
const SpillMultiVar kCRTHitTimeFD([](const caf::SRSpillProxy *sr){std::vector< double > times;for(const auto &hit:sr->crt_hits){auto thistime=hit.time-1600.;times.push_back(thistime);}return times;})
const Var kSlcFlashScore([](const caf::SRSliceProxy *slc) -> double{return((bool) kSlcHasFlash(slc)?(float) slc->fmatch.score:-5.f);})
process_name opflashCryoW ana
caf::Proxy< caf::SRSlice > SRSliceProxy
_Var< caf::SRSliceProxy > Var
Representation of a variable to be retrieved from a caf::StandardRecord object.
const SpillMultiVar kCRTHitPE([](const caf::SRSpillProxy *sr){std::vector< double > pes;for(const auto &hit:sr->crt_hits){pes.push_back(hit.pe);}return pes;})
const Cut kSlcIsRecoNu([](const caf::SRSliceProxy *slc){return!slc->is_clear_cosmic;})
_MultiVar< caf::SRSpillProxy > SpillMultiVar
caf::Proxy< caf::StandardRecord > SRSpillProxy
const SpillMultiVar kCRTHitY([](const caf::SRSpillProxy *sr){std::vector< double > positions;for(const auto &hit:sr->crt_hits){positions.push_back(hit.position.y);}return positions;})
const SpillMultiVar kCRTHitZ([](const caf::SRSpillProxy *sr){std::vector< double > positions;for(const auto &hit:sr->crt_hits){positions.push_back(hit.position.z);}return positions;})
const Var kSlcVtxX([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.x;})
const Var kUnweighted([](const caf::SRSliceProxy *){return 1;})
The simplest possible Var, always 1. Used as a default weight.
const SpillVar kSpillCounting
const Var kSlcVtxZ([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.z;})
const Var kSlcVtxY([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.y;})
Most useful for combining weights.
const Var kSlcHasFlash([](const caf::SRSliceProxy *slc) -> double{return slc->fmatch.present;})
const Var kSlcNuScore([](const caf::SRSliceProxy *slc) -> double{return slc->nu_score;})