9 #include "CAFAna/Core/HistAxis.h" 90 ( kDistAllBack >= 200 );
96 kNue2017ProngContainment &&
184 kNue2017PeripheralPreselHE &&
185 kNue2017CVNVsCosPIDPeripheralLP &&
190 kNue2017PeripheralPreselHE &&
191 kNue2017CVNVsCosPIDPeripheralMP &&
196 kNue2017PeripheralPresel &&
197 kNue2017CVNVsCosPIDPeripheralLP &&
202 kNue2017PeripheralPresel &&
203 kNue2017CVNVsCosPIDPeripheralMP &&
208 kNue2017PeripheralPreselHE &&
209 kNue2017CVNVsCosPID &&
222 kLongestProng > 100 && kLongestProng < 500;
227 kNue2017ProngContainment &&
281 kNue2017NDFiducial &&
286 kNue2017NDFiducial &&
288 kNue2017NDFrontPlanes &&
294 kNue2017NDFiducial &&
296 kNue2017NDFrontPlanes &&
298 kNue2017NDEnergyHE &&
const Cut kNue2017CVNVsCosPIDPeripheralLP
const Cut kNue2017MRParentSliceCut([](const caf::SRProxy *sr){const caf::SRMRCCParentProxy &parent=sr->parent.mrccpar;if(parent.eff< 0.9||parent.pur< 0.9) return false;if(parent.remid< 0.75) return false;if(parent.numuE< 0|| parent.nhit< 20|| parent.contplanes< 5) return false;if(parent.firstplane< 2 || parent.lastplane > 211|| parent.muonstop.Z() > 1275|| parent.muonfwdcell< 5 || parent.muonbkcell< 9 || parent.hadEinmucat > 0.03) return false;return true;})
const Cut kNearestSliceCosRejCore([](const caf::SRProxy *sr){if(kCVNe(sr) > 0.75 &&kCVNe(sr)< 0.87){return!(sr->slc.closestslicetime >-100.&&sr->slc.closestslicetime< 100.&& sr->slc.closestsliceminfromtop< 400 &&sr->slc.closestslicemindist< 500.);}if(kCVNe(sr) > 0.87){return!(sr->slc.closestslicetime >-100.&&sr->slc.closestslicetime< 100.&& sr->slc.closestsliceminfromtop< 50 &&sr->slc.closestslicemindist< 500.);}return false;})
const Cut kNue2017CorePart
Cuts which define the "core" sample and are reversed for the "peripheral" sample. ...
Represent the binning of a Spectrum's x-axis.
Cuts and Vars for the 2020 FD DiF Study.
const Var kDistAllBottom([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngbottom)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngbottom);})
Distance of all showers in slice from the bottom edge of detector.
const Cut kNue2017Veto([](const caf::SRProxy *sr){return sr->sel.veto.keep;})
cosmic veto cut for FD
const Cut kNue2017NDEnergy
const Var kDistAllWest([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngwest)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngwest);})
Distance of all showers in slice from the west edge of detector.
const Var kDistAllTop([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngtop)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngtop);})
Distance of all showers in slice from the top edge of detector.
const Var kDistAllBack([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngback)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngback);})
Distance of all showers in slice from the back edge of detector.
Proxy for caf::StandardRecord.
const Cut kNue2017BasicPart(kNue2017BasicPartFunc)
const Cut kNue2017FDPeripheralLPsideband
Definition of the FD peripheral Low PID.
const Cut kNue2017FDHE
FD nue selection for "core" HE sample.
const Cut kNue2017CVNVsCosPID
const Cut kNueDQ2017CVN([](const caf::SRProxy *sr){if(sr->sel.nuecosrej.hitsperplane >=8) return false;if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng==0) return false;return true;})
const Cut kNue2017NDCVNSsb
const Cut kNue2017PreselHE
const Cut kNue2017ProngContainment
FD containment cuts, inherited from Second Analysis.
const Cut kNue2017FD
Full FD nue selection for 2017 analysis.
const Binning kNue2017Binning
const Cut kIsFarDet([](const caf::SRProxy *sr){return sr->hdr.det==caf::kFARDET;})
const Cut kNue2017NDProngLength
const Cut kNue2017FDPeripheralHELPsideband
Definition of the FD peripheral High Energy Low PID.
const Cut kNue2017FDLP
FD nue selection for 2017 low PID sideband.
const Cut kNue2017PtPCutLID
Somewhat tighter p_t/P vs maxy cuts suitable for use with LID.
const Cut kNue2017FDPeripheralHEMPsideband
Definition of the FD peripheral High Energy Mid PID.
const Var kSparsenessAsymm
const Var kDistAllEast([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngeast)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngeast);})
Distance of all showers in slice from the east edge of detector.
const Cut kNue2017FullPreselBDTCosRej
Full FD nue preselection cuts for 2017 analysis with BDT-based CosRej.
const Var kPtP
Transverse momentum fraction in slice.
const Cut kNue2017CVNVsCosPIDPeripheralMP
const Cut kNearestSliceCosRejPeripheral([](const caf::SRProxy *sr){if(kNue2017PeripheralPresel(sr)&&kNue2017CVNVsCosPID(sr)){return!(sr->slc.closestslicetime >-100.&&sr->slc.closestslicetime< 100.&& sr->slc.closestsliceminfromtop< 50 &&sr->slc.closestslicemindist< 500.);}return false;})
const Cut kNue2017CVNCut
Close to the s/sqrt(s+b) optimization. TODO: DocDB reference?
const Var kNueEnergy2017([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;return NueRecoE_2017FDFit(kCVNemE(sr), kCVNhadE(sr));})
const Var kMaxY([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1000.0f;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return-1000.0f;float maxyall=-999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;i++){maxyall=std::max(std::max(sr->vtx.elastic.fuzzyk.png[i].shwlid.start.Y(), sr->vtx.elastic.fuzzyk.png[i].shwlid.stop.Y()), maxyall);}return maxyall;})
const Cut kNue2017NDNHits
const Var kLongestProng([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return 0.f;if(sr->vtx.elastic.fuzzyk.npng==0) return 0.f;auto idx=sr->vtx.elastic.fuzzyk.longestidx;return float(sr->vtx.elastic.fuzzyk.png[idx].len);})
const Cut kNue2017FDPeripheral
Definition of the FD peripheral sample around our core selected events.
const Cut kNue2017CorePreselHE
Preselection for 2017 "core" HE sample with Cut-based CosRej.
const Cut kNueDQ2017LID([](const caf::SRProxy *sr){if(sr->sel.nuecosrej.hitsperplane >=8) return false;if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng==0) return false;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.nhitx<=5||sr->vtx.elastic.fuzzyk.png[0].shwlid.nhity<=5) return false;if(sr->vtx.elastic.fuzzyk.png[0].shwlid.gap > 100) return false; if(sr->vtx.elastic.fuzzyk.nshwlid >=2){if((sr->vtx.elastic.fuzzyk.png[0].shwlid.dir). Dot(sr->vtx.elastic.fuzzyk.png[1].shwlid.dir)< -0.95) return false;}float xyhitdiff=abs(sr->vtx.elastic.fuzzyk.png[0].shwlid.nhitx-sr->vtx.elastic.fuzzyk.png[0].shwlid.nhity);float xyhitsum=sr->vtx.elastic.fuzzyk.png[0].shwlid.nhitx+sr->vtx.elastic.fuzzyk.png[0].shwlid.nhity;if(xyhitdiff/xyhitsum >=0.4) return false;float nhitall=0.0;for(unsigned int j=0;j< sr->vtx.elastic.fuzzyk.nshwlid;j++){nhitall+=sr->vtx.elastic.fuzzyk.png[j].shwlid.nhit;}if(nhitall/sr->slc.nhit<=0.7) return false;return true;})
const Cut kNue2017PeripheralPreselHE
const Cut kNue2017NDFrontPlanes
No hits in the first 5 planes of the detector, doc 12879.
bool kNue2017BasicPartFunc(const caf::SRProxy *sr)
const Cut kNue2017PeripheralPresel
const HistAxis kNue2017Axis("NuE Energy / Analysis Bin", kNue2017Binning, kNue2017AnaBin)
const Var kNue2017SelectionBin([](const caf::SRProxy *sr){bool isPeri=kNue2017FDPeripheral(sr);if(isPeri) return float(3.5);if(kCVNe(sr) > 0.75 &&kCVNe(sr)< 0.87) return float(0.5);if(kCVNe(sr) > 0.87 &&kCVNe(sr)< 0.95) return float(1.5);if(kCVNe(sr) > 0.95) return float(2.5);return float(-0.5);})
const Cut kNue2017NDPresel
const Cut kNue2017FDPeripheralHEsideband
Definition of the FD peripheral High Energy sideband.
const Cut kNue2017BackwardCut
FD backward cosmic photon rejection cut, inherited from Second Analysis.
const Var kNue2017AnaBin([](const caf::SRProxy *sr){int selBin=kNue2017SelectionBin(sr);float nuE=kNueEnergy2017(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
const Var kDistAllFront([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngfront)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngfront);})
Distance of all showers in slice from the front edge of detector.
const Var kNue2017AnaBinMergedPeripheral([](const caf::SRProxy *sr){int anaBin=kNue2017AnaBin(sr);anaBin=anaBin > 27?29:anaBin;return anaBin;})
Collect information describing the x-axis of an analysis histogram.
const Cut kNue2017FDPeripheralMPsideband
Definition of the FD peripheral Mid PID.
const Binning kNue2017BinningMergedPeripheral
const Cut kNue2017NDNHitsHE
const Cut kNue2017NDContain([](const caf::SRProxy *sr){for(unsigned int ix=0;ix< sr->vtx.elastic.fuzzyk.nshwlid;++ix){TVector3 start=sr->vtx.elastic.fuzzyk.png[ix].shwlid.start;TVector3 stop=sr->vtx.elastic.fuzzyk.png[ix].shwlid.stop;if(std::min(start.X(), stop.X())< -170.0) return false;if(std::max(start.X(), stop.X()) > 170.0) return false;if(std::min(start.Y(), stop.Y())< -170.0) return false;if(std::max(start.Y(), stop.Y()) > 170.0) return false;if(std::min(start.Z(), stop.Z())< 100.0) return false;if(std::max(start.Z(), stop.Z()) > 1225.0) return false;}return true;})
Loose containtment on start and end of all showers, docdb-12943.
const Cut kNue2017CorePresel
Full preselection for 2017 "core" sample with Cut-based CosRej.
const Cut kNue2017CVNCutLP
Low PID cut for core sidebands.
const Cut kNearestSliceCosRejCoreSideband([](const caf::SRProxy *sr){if(kCVNe(sr) > 0.5 &&kCVNe(sr)< 0.87){return!(sr->slc.closestslicetime >-100.&&sr->slc.closestslicetime< 100.&& sr->slc.closestsliceminfromtop< 400 &&sr->slc.closestslicemindist< 500.);}if(kCVNe(sr) > 0.87){return!(sr->slc.closestslicetime >-100.&&sr->slc.closestslicetime< 100.&&sr->slc.closestsliceminfromtop< 50 &&sr->slc.closestslicemindist< 500.);}return false;})
CosRej for the core sidebands.
const Cut kNue2017CorePartHE
Cuts which define the "core" HE sample and are reversed for the "peripheral" sample.
const Cut kNueFD2017DecafCut
const Cut kNue2017BDTContainment
Lowest BDT value used in Matryoshka binning DocDB 19724. Not finalized.
Template for Cut and SpillCut.
const Cut kNue2017NDEnergyHE
const Cut kNueND2017DecafCut
const Cut kNue2017PtPCutCVN
const Cut kNue2017NDPreselHE
const Cut kNearestSliceCosRejPeripheralSideband([](const caf::SRProxy *sr){return!(sr->slc.closestslicetime >-100.&&sr->slc.closestslicetime< 100.&& sr->slc.closestsliceminfromtop< 50 &&sr->slc.closestslicemindist< 500.);})
const HistAxis kNue2017AxisMergedPeripheral("NuE Energy / Analysis Bin", kNue2017BinningMergedPeripheral, kNue2017AnaBinMergedPeripheral)
const Cut kNue2017FDAllSamplesHEsidebands
All samples - High energy sideband.
const Cut kNue2017FDAllSamples
Our FD selection including all samples, for making predictions, etc.
const Cut kNue2017NDFiducial([](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() > 160.0) return false;if(sr->vtx.elastic.vtx.Y()< -160.0) return false;if(sr->vtx.elastic.vtx.Y() > 100.0) return false;if(sr->vtx.elastic.vtx.Z()< 150.0) return false;if(sr->vtx.elastic.vtx.Z() > 900.0) return false;return true;})
Cut on ND vertex position.