5 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
48 if(slc->truth.index < 0)
return false;
49 return slc->truth.pdg < 0;
53 if(slc->truth.index < 0)
return false;
54 return slc->truth.pdg > 0;
58 return slc->truth.index >= 0;
62 return slc->truth.index >= 0 &&
abs(slc->truth.pdg) == 12;
66 return slc->truth.index >= 0 &&
abs(slc->truth.pdg) == 14;
70 return slc->truth.index >= 0 &&
abs(slc->truth.pdg) == 16;
74 if(slc->truth.index < 0)
return false;
75 return (slc->truth.iscc==1);
79 if(slc->truth.index < 0)
return false;
80 return (slc->truth.isnc==1);
84 if(slc->truth.index < 0)
return true;
89 if(slc->truth.index < 0)
return false;
97 return (sr->mc.nnu == 0);
101 return (sr->mc.nnu < 2);
106 return (
std::abs(sr->mc.nu[0].pdg) == 12);
111 return (
std::abs(sr->mc.nu[0].pdg) == 14);
116 return (
std::abs(sr->mc.nu[0].pdg) == 16);
121 return ((
bool)sr->mc.nu[0].iscc);
126 return ((
bool)sr->mc.nu[0].isnc);
const SpillCut kIsCosmicSpill([](const caf::SRSpillProxy *sr){return(sr->mc.nnu==0);})
const Cut kSlcCompletenessCut([](const caf::SRSliceProxy *slc){if(slc->truth.index< 0) return false;return(kCompletness(slc) > 0.5);})
const Cut kIsNC([](const caf::SRSliceProxy *slc){return kHasMatchedNu(slc)&&slc->truth.isnc;})
Is this a Neutral Current event?
const Cut kTrueFiducialVolumeFDCryo1([](const caf::SRSliceProxy *slc){return kHasNu(slc)&&PtInVol(slc->truth.position, fvfd_cryo1);})
const Cut kTrueFiducialVolumeND([](const caf::SRSliceProxy *slc){return kHasNu(slc)&&PtInVolAbsX(slc->truth.position, fvndAbs);})
const Var kCompletness([](const caf::SRSliceProxy *slc) -> double{return(kHasTruthMatch(slc)?(float) slc->tmatch.eff:-5.f);})
bool PtInVolAbsX(const caf::SRVector3DProxy &pt, const FidVol &vol)
const Cut kIsCC([](const caf::SRSliceProxy *slc){return kHasMatchedNu(slc)&&slc->truth.iscc;})
const Cut kTrueActiveVolumeFDCryo1([](const caf::SRSliceProxy *slc){return kHasNu(slc)&&PtInVol(slc->truth.position, avfd_cryo1);})
const Var kTruthVtxDistMag([](const caf::SRSliceProxy *slc) -> double{return(kHasTruthMatch(slc)?(float) std::hypot(kTruthVtxDistX(slc), kTruthVtxDistY(slc), kTruthVtxDistZ(slc)):-5.f);})
const Cut kIsNu([](const caf::SRSliceProxy *slc){if(slc->truth.index< 0) return false;return slc->truth.pdg > 0;})
process_name opflashCryoW ana
caf::Proxy< caf::SRSlice > SRSliceProxy
const Cut kIsNue([](const caf::SRSliceProxy *slc){return slc->truth.index >=0 &&abs(slc->truth.pdg)==12;})
const Cut kIsNutau([](const caf::SRSliceProxy *slc){return slc->truth.index >=0 &&abs(slc->truth.pdg)==16;})
const Cut kHasNu([](const caf::SRSliceProxy *slc){return slc->truth.index >=0;})
const SpillCut kIsNueSpill([](const caf::SRSpillProxy *sr){if(kIsCosmicSpill(sr)||!kIsSingleNuSpill(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==12);})
_Cut< caf::SRSliceProxy > Cut
const Cut kIsNumu([](const caf::SRSliceProxy *slc){return slc->truth.index >=0 &&abs(slc->truth.pdg)==14;})
caf::Proxy< caf::StandardRecord > SRSpillProxy
const SpillCut kIsSingleNuSpill([](const caf::SRSpillProxy *sr){return(sr->mc.nnu< 2);})
_Cut< caf::SRSpillProxy > SpillCut
Equivalent of Cut acting on caf::SRSpill. For use in spill-by-spill data quality cuts.
const SpillCut kIsNCSpill([](const caf::SRSpillProxy *sr){if(kIsCosmicSpill(sr)||!kIsSingleNuSpill(sr)) return false;return((bool) sr->mc.nu[0].isnc);})
const Cut kTrueActiveVolumeND([](const caf::SRSliceProxy *slc){return kHasNu(slc)&&PtInVolAbsX(slc->truth.position, avnd);})
const SpillCut kIsCCSpill([](const caf::SRSpillProxy *sr){if(kIsCosmicSpill(sr)||!kIsSingleNuSpill(sr)) return false;return((bool) sr->mc.nu[0].iscc);})
const SpillCut kIsNumuSpill([](const caf::SRSpillProxy *sr){if(kIsCosmicSpill(sr)||!kIsSingleNuSpill(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==14);})
const Cut kTrueActiveVolumeFDCryo2([](const caf::SRSliceProxy *slc){return kHasNu(slc)&&PtInVol(slc->truth.position, avfd_cryo2);})
const Cut kIsAntiNu([](const caf::SRSliceProxy *slc){return kHasMatchedNu(slc)&&slc->truth.pdg< 0;})
Is this truly an antineutrino?
const Cut kVtxDistMagCut([](const caf::SRSliceProxy *slc){if(slc->truth.index< 0) return true;return(kTruthVtxDistMag(slc)< 1);})
const SpillCut kIsNutauSpill([](const caf::SRSpillProxy *sr){if(kIsCosmicSpill(sr)||!kIsSingleNuSpill(sr)) return false;return(std::abs(sr->mc.nu[0].pdg)==16);})
bool PtInVol(const caf::SRVector3DProxy &pt, const FidVol &vol)
const Cut kTrueFiducialVolumeFDCryo2([](const caf::SRSliceProxy *slc){return kHasNu(slc)&&PtInVol(slc->truth.position, fvfd_cryo2);})