3 #include "CAFAna/Core/Cut.h" const Cut kNusFDFiducial([](const caf::SRProxy *sr){ if(!sr->vtx.elastic.IsValid) return false;const TVector3 vtx=sr->vtx.elastic.vtx;if(vtx.X()< -680.0) return false;if(vtx.X() > 650.0) return false;if(vtx.Y()< -720.0) return false;if(vtx.Y() > 500.0) return false;if(vtx.Z()< 50.0) return false;if(vtx.Z() > 5450.0) return false;return true;})
FD Fiducial volume from docdb 15285.
Cuts and Vars for the 2020 FD DiF Study.
const Cut kApplySecondAnalysisMask([](const caf::SRProxy *sr){if(sr->hdr.det!=caf::kFARDET) return true; std::bitset< 14 > binary(sr->hdr.dibmask);std::pair< int, int > planesA=calcFirstLastLivePlane(sr->slc.firstplane, binary);std::pair< int, int > planesB=calcFirstLastLivePlane(sr->slc.lastplane, binary);if((planesA.first!=planesB.first)||(planesA.second!=planesB.second)) return false;return((planesA.second-planesA.first+1)/64 >=4);})
const Cut kNusEventQuality([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->sel.nuecosrej.hitsperplane >=8) return false;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.gap >=100.) return false;if(sr->slc.ncontplanes<=2) return false;return true;})
Data Quality cuts from docdb 14241.
const Cut kNusNDFiducial([](const caf::SRProxy *sr){assert(sr->vtx.elastic.IsValid &&"Must apply DQ cuts");if(sr->vtx.elastic.vtx.X()< -100.0) return false;if(sr->vtx.elastic.vtx.X() > 100.0) return false;if(sr->vtx.elastic.vtx.Y()< -100.0) return false;if(sr->vtx.elastic.vtx.Y() > 100.0) return false;if(sr->vtx.elastic.vtx.Z()< 200.0) return false;if(sr->vtx.elastic.vtx.Z() > 1000.0) return false;return true;})
ND Fiducial volume from docdb 15242.
const Cut kNusFDContain([](const caf::SRProxy *sr){const caf::SRNueCosRejProxy &cr=sr->sel.nuecosrej;if(std::min(cr.starteast, cr.stopeast)< 10) return false;if(std::min(cr.startwest, cr.stopwest)< 10) return false;if(std::min(cr.starttop, cr.stoptop) < 10) return false;if(std::min(cr.startbottom, cr.stopbottom)< 10) return false;if(std::min(cr.startfront, cr.stopfront)< 10) return false;if(std::min(cr.startback, cr.stopback)< 10) return false;return true;})
Containment variable for NC events from docdb 14241.
const Cut kNusFDFidLoose([](const caf::SRProxy *sr){double buf=10.;if(!sr->vtx.elastic.IsValid) return false;const TVector3 vtx=sr->vtx.elastic.vtx;if(vtx.X()< (FDL+buf)) return false;if(vtx.X() >(FDR-buf)) return false;if(vtx.Y()< (FDB+buf)) return false;if(vtx.Y() >(FDT-buf)) return false;if(vtx.Z()< (FDF+buf)) return false;if(vtx.Z() >(FDE-buf)) return false;return true;})
const Cut kNusNCSel([](const caf::SRProxy *sr){if(sr->slc.nhit >=200) return false;if(sr->slc.nhit< 20) return false;if(sr->sel.cvn.ncid< 0.2) return false;return true;})
Cut that is more CC rejection than NC selection from docdb 15285.
const Cut kNusNDFidLoose([](const caf::SRProxy *sr){double buf=10.;if(!sr->vtx.elastic.IsValid) return false;const TVector3 vtx=sr->vtx.elastic.vtx;if(vtx.X()< (NDL+buf)) return false;if(vtx.X() >(NDR-buf)) return false;if(vtx.Y()< (NDB+buf)) return false;if(vtx.Y() >(NDT-buf)) return false;if(vtx.Z()< (NDF+buf)) return false;if(vtx.Z() >(NDE-buf)) return false;return true;})
const Var kCaloE
Summed calorimetric energy of all hits in slice, uncorrected.
const Cut kNusFDDecafCut([](const caf::SRProxy *sr){if(sr->sel.cosrej.numucontpid2019<=0.42) return false;return true;})
Decaf cut motivated by doc-db 15152.
const Cut kNusNDHarshTrk([](const caf::SRProxy *sr){double buf=25.;if(sr->trk.kalman.ntracks==0) return false;for(unsigned int i=0, n=sr->trk.kalman.ntracks;i< n;++i){TVector3 start=sr->trk.kalman.tracks[i].start;TVector3 stop=sr->trk.kalman.tracks[i].stop;if(std::min(start.X(), stop.X())< (NDL+buf)) return false;if(std::max(start.X(), stop.X()) >(NDR-buf)) return false;if(std::min(start.Y(), stop.Y())< (NDB+buf)) return false;if(std::max(start.Y(), stop.Y()) >(NDT-buf)) return false;if(std::min(start.Z(), stop.Z())< (NDF+buf)) return false;if(std::max(start.Z(), stop.Z()) >(NDE-buf)) return false;}return true;})
Extra containment cut for the ND first motivated in docdb 13402.
const Cut kNusNDContain([](const caf::SRProxy *sr){const caf::SRNueCosRejProxy &cr=sr->sel.nuecosrej;if(std::min(cr.starteast, cr.stopeast)< 25) return false;if(std::min(cr.startwest, cr.stopwest)< 25) return false;if(std::min(cr.starttop, cr.stoptop) < 25) return false;if(std::min(cr.startbottom, cr.stopbottom)< 25) return false;if(std::min(cr.startfront, cr.stopfront)< 25) return false;if(std::min(cr.startback, cr.stopback)< 25) return false;return true;})
Containment variable for NC events from docdb 15242.
const Cut kNusCosRejMod([](const caf::SRProxy *sr){double partptp=sr->sel.nuecosrej.partptp;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return false;if(partptp >=0.8) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.lid.ismuon==1) return false;double nhit=(double) sr->slc.nhit;if(nhit<=0.) return false;if(sr->slc.calE/nhit<=0.009) return false;return true;})
const Cut kCosmicVeto([](const caf::SRProxy *sr){return sr->sel.veto.keep;})
const Cut kNusCosRej([](const caf::SRProxy *sr){double numucontpid2019=sr->sel.cosrej.numucontpid2019;double partptp=sr->sel.nuecosrej.partptp;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return false;if(numucontpid2019<=0.5) return false;if(partptp >=0.8) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.lid.ismuon==1) return false;double nhit=(double) sr->slc.nhit;if(nhit<=0.) return false;if(sr->slc.calE/nhit<=0.018) return false;if(std::min(sr->sel.nuecosrej.starttop, sr->sel.nuecosrej.stoptop)< 480) return false;return true;})
Cosmic rejection for the NC sample from docdb 15241.