5 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
12 return ( slc->vertex.x > (-199.15 + 10) && slc->vertex.x < (199.15 - 10) && slc->vertex.y > (-200. + 10) && slc->vertex.y < (200. - 10) && slc->vertex.z > (0.0 + 10) && slc->vertex.z < (500. - 50));
17 if(std::isnan(slc->fmatch.time))
return false;
19 bool InBeam = (slc->fmatch.time > 0. && slc->fmatch.time < 1.800);
25 return ( slc->fmatch.score < 7 );
34 return ( ptrkid != -1 && !isnan(ptrkrecop) && ptrkrecop > 0. && ptrkrecop < 7.5);
42 const caf::SRTrackProxy&
ptrk = slc->reco.trk[ptrkid];
43 return ( isnan(ptrk.crttrack.angle) || ptrk.crttrack.angle > 0.05);
49 const caf::SRCRTHitMatchProxy&
crthit = slc->reco.trk[ptrkid].crthit;
52 if(std::isnan(crthit.hit.time) || std::isnan(crthit.distance))
return true;
55 return crthit.distance > 5 || (crthit.hit.time > 0. && crthit.hit.time < 1.800);
const Cut kSlcFlashMatchTimeCut([](const caf::SRSliceProxy *slc){if(std::isnan(slc->fmatch.time)) return false;bool InBeam=(slc->fmatch.time > 0.&&slc->fmatch.time< 1.800);return(InBeam);})
const Cut kHasPrimaryMuonTrk([](const caf::SRSliceProxy *slc){int ptrkid=kPrimaryMuonTrkIdx(slc);double ptrkrecop=kPrimaryMuonTrkP(slc);return(ptrkid!=-1 &&!isnan(ptrkrecop)&&ptrkrecop > 0.&&ptrkrecop< 7.5);})
process_name opflashCryoW ana
caf::Proxy< caf::SRSlice > SRSliceProxy
const Cut kCRTTrackAngleCut([](const caf::SRSliceProxy *slc){int ptrkid=kPrimaryMuonTrkIdx(slc);const caf::SRTrackProxy &ptrk=slc->reco.trk[ptrkid];return(isnan(ptrk.crttrack.angle)||ptrk.crttrack.angle > 0.05);})
const Var kPrimaryMuonTrkIdx([](const caf::SRSliceProxy *slc){double longest=-1;int best_idx=-1;double dist=-1;bool atslc, contained, maybe_muon_exiting, maybe_muon_contained;float chi2_proton, chi2_muon;for(unsigned int trkidx=0;trkidx< slc->reco.trk.size();++trkidx){const caf::SRTrackProxy &trk=slc->reco.trk[trkidx];if(trk.bestplane==-1) continue;dist=sqrt((pow(trk.start.x-slc->vertex.x, 2))+(pow(trk.start.y-slc->vertex.y, 2))+(pow(trk.start.z-slc->vertex.z, 2)));atslc=dist< 10;if(!atslc||!trk.pfp.parent_is_primary) continue;contained=((-199.15+10)< trk.end.x &&trk.end.x< (199.15-10)&&(-200.+10)< trk.end.y &&trk.end.y< (200.-10)&&(0.0+10)< trk.end.z &&trk.end.z< (500.-50));chi2_proton=trk.chi2pid[trk.bestplane].chi2_proton;chi2_muon=trk.chi2pid[trk.bestplane].chi2_muon;maybe_muon_exiting=!contained &&trk.len > 100;maybe_muon_contained=contained &&chi2_proton > 60 &&chi2_muon< 30 &&trk.len > 50;if(!maybe_muon_contained &&!maybe_muon_exiting) continue;if(trk.len > longest){longest=trk.len;best_idx=trkidx;}}return best_idx;})
_Cut< caf::SRSliceProxy > Cut
BEGIN_PROLOG opflashTPC3 mcopflashTPC3 sequence::icarus_reco_flash sequence::icarus_mc_reco_opt gaushitsel gaushitTPC0 gaushitTPC1 gaushitTPC2 gaushitTPC3 icarushit icarushit icarusHitTPC0 icarusHitTPC1 icarusHitTPC2 icarusHitTPC3 sequence::icarus_reco_signalprocessingraw pmAlgKalmanTrackGaus pmAlgKalmanTrackICARUS pandoraKalmanTrackGaus pandoraKalmanTrackGausCryo0 pandoraKalmanTrackGausCryo1 pandoraKalmanTrackICARUS pandoraTrackICARUSCryo0 pandoraTrackICARUSCryo1 pandoraGausSCEPidCryo0 pandoraGausSCEPidCryo1 pandoraGausCaloCryo1 pandoraGausSCECaloCryo1 SBNShowerTestGausCryo0 SBNShowerTestGausCryo1 sequence::icarus_reco_pandoraICARUSCryo0 sequence::icarus_reco_pandoraICARUSCryo1 sequence::icarus_reco_SigProcTPC1Mixed sequence::icarus_reco_SigProcTPC3Mixed mcassociationsGausCryo1 mcassociationsICARUSCryo1 crthit
const Var kPrimaryMuonTrkP([](const caf::SRSliceProxy *slc){float recop(-5.f);bool contained(false);if(kPrimaryMuonTrkIdx(slc) >=0){auto const &ptrk=slc->reco.trk.at(kPrimaryMuonTrkIdx(slc));contained=((-199.15+10)< ptrk.end.x &&ptrk.end.x< (199.15-10)&&(-200.+10)< ptrk.end.y &&ptrk.end.y< (200.-10)&&(0.0+10)< ptrk.end.z &&ptrk.end.z< (500.-50));if(contained) recop=ptrk.rangeP.p_muon;else recop=ptrk.mcsP.fwdP_muon;}return recop;})
const Cut kCRTHitDistanceCut([](const caf::SRSliceProxy *slc){int ptrkid=kPrimaryMuonTrkIdx(slc);const caf::SRCRTHitMatchProxy &crthit=slc->reco.trk[ptrkid].crthit;if(std::isnan(crthit.hit.time)||std::isnan(crthit.distance)) return true;return crthit.distance > 5||(crthit.hit.time > 0.&&crthit.hit.time< 1.800);})
const Cut kSlcFlashMatchScoreCut([](const caf::SRSliceProxy *slc){return(slc->fmatch.score< 7);})
const Cut kInFV([](const caf::SRSliceProxy *slc){return(slc->vertex.x >(-199.15+10)&&slc->vertex.x< (199.15-10)&&slc->vertex.y >(-200.+10)&&slc->vertex.y< (200.-10)&&slc->vertex.z >(0.0+10)&&slc->vertex.z< (500.-50));})