3 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
10 bool hastrk = ( slc->reco.ntrk > 0 );
11 if (!hastrk)
return hastrk;
14 double len = slc->reco.trk[muIdx].len;
20 return ( slc->fmatch.present );
25 return ( slc->fmatch.time > 0 &&
26 slc->fmatch.score > 6 );
34 bool hastrk = ( slc->reco.ntrk > 0 );
35 if (!hastrk)
return hastrk;
38 double len = slc->reco.trk[muIdx].len;
const Cut kNumuTrkLen([](const caf::SRSliceProxy *slc){bool hastrk=(slc->reco.ntrk > 0);if(!hastrk) return hastrk;unsigned int muIdx=(unsigned int) kPrimMuonIdx(slc);double len=slc->reco.trk[muIdx].len;return(len > 50);})
const Var kPrimMuonIdx([](const caf::SRSliceProxy *slc) -> double{if((int) slc->reco.ntrk==0) return-5.0;double best_idx=0;double best_len=-5.0;for(unsigned int trkIdx=0;trkIdx< slc->reco.ntrk;trkIdx++){auto &trk=slc->reco.trk[trkIdx];if(trk.chi2pid[2].pid_ndof< 0) return-5.0;bool isMuonLike=trk.chi2pid[2].chi2_pion > trk.chi2pid[2].chi2_muon;if(isMuonLike &&trk.len > best_len){best_len=trk.len;best_idx=trkIdx;}}return best_idx;})
process_name opflashCryoW ana
const Cut kHasFlashMatch([](const caf::SRSliceProxy *slc){return(slc->fmatch.present);})
const Cut kNumuBasicQual([](const caf::SRSliceProxy *slc){bool hastrk=(slc->reco.ntrk > 0);if(!hastrk) return hastrk;unsigned int muIdx=(unsigned int) kPrimMuonIdx(slc);double len=slc->reco.trk[muIdx].len;return(len > 0);})
caf::Proxy< caf::SRSlice > SRSliceProxy
const Cut kFlashMatchScore([](const caf::SRSliceProxy *slc){return(slc->fmatch.time > 0 &&slc->fmatch.score > 6);})
const Cut kFlashMatchNumuCut
_Cut< caf::SRSliceProxy > Cut
Template for Cut and SpillCut.