5 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
11 return ((trk.end.x < -71.1 - 5 && trk.end.x > -369.33 + 5)
12 || (trk.end.x > 71.1 + 5 && trk.end.x < 369.33 - 5))
13 && trk.end.y > -181.7 + 5 && trk.end.y < 134.8 - 5
14 && trk.end.z > -895.95 + 5 && trk.end.z < 895.95 - 5;
22 return ( !isnan(slc->vertex.x) &&
23 ( ( slc->vertex.x < -71.1 - 25 && slc->vertex.x > -369.33 + 25 ) ||
24 ( slc->vertex.x > 71.1 + 25 && slc->vertex.x < 369.33 - 25 ) ) &&
25 !isnan(slc->vertex.y) &&
26 ( slc->vertex.y > -181.7 + 25 && slc->vertex.y < 134.8 - 25 ) &&
27 !isnan(slc->vertex.z) &&
28 ( slc->vertex.z > -895.95 + 30 && slc->vertex.z < 895.95 - 50 ) );
37 if (idx >= 0) muID = slc->reco.trk.at(idx).pfp.id;
38 for(
auto& trk: slc->reco.trk) {
39 if(trk.pfp.id != muID && trk.pfp.parent_is_primary)
const Cut kIcarus202208NoPion
const Cut kIcarus202208ContainedMuon([](const caf::SRSliceProxy *slc){return kIcarus202208FoundMuon(slc)&&Icarus202208contained(slc->reco.trk.at(kIcarus202208MuonIdx(slc)));})
const Cut kIcarus202208LongTrackDirCut
const Cut kIcarus202208FoundMuon
const Var kIcarus202208NumPions([](const caf::SRSliceProxy *slc){int count=0;auto idx=kIcarus202208MuonIdx(slc);int muID=-1;if(idx >=0) muID=slc->reco.trk.at(idx).pfp.id;for(auto &trk:slc->reco.trk){++count;}return count;})
process_name opflashCryoW ana
caf::Proxy< caf::SRSlice > SRSliceProxy
const Cut kIcarus202208NumuSelection
_Cut< caf::SRSliceProxy > Cut
const Var kCRLongestTrackDirY
const Cut kIcarus202208QELike
const Cut kIcarus202208FMTimeCut
static bool Icarus202208contained(const caf::SRTrackProxy &trk)
const Cut kIcarus202208FMScoreCut
Template for Cut and SpillCut.
const Var kIcarus202208MuonIdx([](const caf::SRSliceProxy *slc) -> int{float Longest(0);int PTrackInd(-1);for(std::size_t i(0);i< slc->reco.trk.size();++i){auto const &trk=slc->reco.trk.at(i);if(trk.bestplane==-1) continue;const float Atslc=std::hypot(slc->vertex.x-trk.start.x, slc->vertex.y-trk.start.y, slc->vertex.z-trk.start.z);const bool AtSlice=(Atslc< 10.0 &&trk.pfp.parent_is_primary);const float Chi2Proton=trk.chi2pid[trk.bestplane].chi2_proton;const float Chi2Muon=trk.chi2pid[trk.bestplane].chi2_muon;const bool Contained=(!isnan(trk.end.x)&&((trk.end.x< -71.1-5 &&trk.end.x >-369.33+5)||(trk.end.x< 71.1+5 &&trk.end.x >+369.33-5))&&!isnan(trk.end.y)&&(trk.end.y >-181.7+5 &&trk.end.y< 134.8-5)&&!isnan(trk.end.z)&&(trk.end.z >-895.95+5 &&trk.end.z< 895.95-5));const bool MaybeMuonExiting=(!Contained &&trk.len > 100);const bool MaybeMuonContained=(Contained &&Chi2Proton > 60 &&Chi2Muon< 30 &&trk.len > 50);if(AtSlice &&(MaybeMuonExiting||MaybeMuonContained)&&trk.len > Longest){Longest=trk.len;PTrackInd=i;}}return PTrackInd;})
const Cut kIcarus202208QELikeContainedMuon
const Cut kIcarus202208ContainedMuonAndHadrons
const Cut kIcarus202208ContainedHadrons([](const caf::SRSliceProxy *slc){auto idx=kIcarus202208MuonIdx(slc);int muID=-1;if(idx >=0) muID=slc->reco.trk.at(idx).pfp.id;for(auto &trk:slc->reco.trk){if(!Icarus202208contained(trk)) return false;}return true;})
const Cut kIcarus202208RecoFiducial([](const caf::SRSliceProxy *slc){return(!isnan(slc->vertex.x)&&((slc->vertex.x< -71.1-25 &&slc->vertex.x >-369.33+25)||(slc->vertex.x > 71.1+25 &&slc->vertex.x< 369.33-25))&&!isnan(slc->vertex.y)&&(slc->vertex.y >-181.7+25 &&slc->vertex.y< 134.8-25)&&!isnan(slc->vertex.z)&&(slc->vertex.z >-895.95+30 &&slc->vertex.z< 895.95-50));})