NumuCuts2018.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Core/Cut.h"
7 #include "CAFAna/Vars/Vars.h"
9 
10 namespace ana
11 {
12  // Decaf preselection
13  extern const Cut kNumuDecafPresel2018;
14 
15  // Loose cosmic rejection (for deCAFs)
17 
18  //Cosmic rejection cut for the 2018 analysis (to be tuned)
19  extern const Cut kNumuCosmicRej2018;
20 
21  //PID cuts for the 2018 analysis (Extremely preliminary, use with great care)
22  extern const Cut kNumuPID2018;
23 
24  //Loose KalFwdCell to be used in the Cosmic decaf cuts
25  extern const Cut kLooseKFC;
26  extern const Cut kLooseKBC;
27 
28  const Cut kCosmicDecafCut2019 = kNumuBasicQuality && kCCE < 7 && kDistAllWest > 4 && kDistAllEast > 4 && kDistAllTop > 4 && kLooseKFC && kLooseKBC;
29 
30  Cut k2018PIDs(double bdtCut = 0.5, double remidCut = 0.5, double cvnCut = 0.5);
31 
32  // Decaf cuts for the 2018 (FHC+RHC) analysis. Keep up to date
34  kNumuDecafPresel2018 && ( kNumuContainFD2017 || kNumuContainFD) && ( kNumuCosmicRejLoose2018 || kNumuSACosmicRejLoose );
36  kNumuDecafPresel2018 && ( kNumuContainND2017 || kNumuContainND);
37 
38  //Complete 2018 NuMu cuts
43 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
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.
Definition: NueVars.h:30
const Cut kNumuContainND2017([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;++i){TVector3 start=sr->vtx.elastic.fuzzyk.png[i].shwlid.start;TVector3 stop=sr->vtx.elastic.fuzzyk.png[i].shwlid.stop;if(std::min(start.X(), stop.X())< -180.0) return false;if(std::max(start.X(), stop.X()) > 180.0) return false;if(std::min(start.Y(), stop.Y())< -180.0) return false;if(std::max(start.Y(), stop.Y()) > 180.0) return false;if(std::min(start.Z(), stop.Z())< 20.0) return false;if(std::max(start.Z(), stop.Z()) > 1525.0) return false;}if(sr->trk.kalman.ntracks< 1) return false;for(unsigned int i=0;i< sr->trk.kalman.ntracks;++i){if(i==sr->trk.kalman.idxremid) continue;else if(sr->trk.kalman.tracks[i].start.Z() > 1275||sr->trk.kalman.tracks[i].stop.Z() > 1275) return false;}return(sr->trk.kalman.ntracks > sr->trk.kalman.idxremid &&sr->slc.firstplane > 1 &&sr->slc.lastplane< 212 &&sr->trk.kalman.tracks[0].start.Z()< 1100 &&(sr->trk.kalman.tracks[0].stop.Z()< 1275 ||sr->sel.contain.kalyposattrans< 55) &&sr->sel.contain.kalfwdcellnd > 5 &&sr->sel.contain.kalbakcellnd > 10);})
Definition: NumuCuts2017.h:11
const Cut kNumuCutND2018
Definition: NumuCuts2018.h:41
const Cut kNumuSACosmicRejLoose([](const caf::SRProxy *sr){return( sr->sel.cosrej.numucontpid2019 > 0.5);})
Definition: NumuCuts.h:36
const Cut kNumuContainFD([](const caf::SRProxy *sr){ std::pair< int, int > planes=calcFirstLastLivePlane(sr->slc.firstplane, std::bitset< 14 >(sr->hdr.dibmask));int planestofront=sr->slc.firstplane-planes.first;int planestoback=planes.second-sr->slc.lastplane;return( sr->slc.ncellsfromedge > 1 &&planestofront > 1 &&planestoback > 1 &&sr->sel.contain.kalfwdcell > 10 &&sr->sel.contain.kalbakcell > 10 &&sr->sel.contain.cosfwdcell > 0 &&sr->sel.contain.cosbakcell > 0);})
Definition: NumuCuts.h:20
const Cut kNumuDecafPresel2018([](const caf::SRProxy *sr){std::cout<< "ERROR::kNumuPIDMiniprod5, cutting on both cvnProd3Train and cvn2017."<< " Neither exist."<< std::endl;abort();return false;})
Definition: NumuCuts2018.h:13
const Cut kNumuContainND([](const caf::SRProxy *sr){return( sr->trk.kalman.ntracks > sr->trk.kalman.idxremid &&sr->slc.ncellsfromedge > 1 &&sr->slc.firstplane > 1 &&sr->slc.lastplane< 212 &&sr->trk.kalman.tracks[0].start.Z()< 1150 &&( sr->trk.kalman.tracks[0].stop.Z()< 1275 ||sr->sel.contain.kalyposattrans< 55) &&( sr->energy.numu.ndhadcalcatE +sr->energy.numu.ndhadcaltranE)< 0.03 &&sr->sel.contain.kalfwdcellnd > 4 &&sr->sel.contain.kalbakcellnd > 8);})
Definition: NumuCuts.h:22
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.
Definition: NueVars.h:39
const Cut kNumuCosmicRej2018([](const caf::SRProxy *sr){return(sr->sel.cosrej.anglekal > 0.5 && sr->sel.cosrej.numucontpid2019 > 0.53 && sr->slc.nhit< 400 && sr->sel.nuecosrej.pngptp< 0.9 );})
Definition: NumuCuts2018.h:19
Cut k2018PIDs(double bdtCut, double remidCut, double cvnCut)
const Cut kNumuContainFD2017
Definition: NumuCuts2017.h:21
const Cut kNumuDecafCutND2018
Definition: NumuCuts2018.h:35
const Cut kCosmicDecafCut2019
Definition: NumuCuts2018.h:28
const Cut kLooseKBC
const Cut kNumuDecafCutFD2018
Definition: NumuCuts2018.h:33
const Cut kNumuBasicQuality([](const caf::SRProxy *sr){return(sr->energy.numu.trkccE > 0 && sr->sel.remid.pid > 0 && sr->slc.nhit > 20 && sr->slc.ncontplanes > 4 && sr->trk.cosmic.ntracks > 0);})
Definition: NumuCuts.h:14
const Cut kNumuPID2018([](const caf::SRProxy *sr){std::cout<< "ERROR::kNumuPID2018, cutting on both cvnProd3Train and cvn2017."<< " Neither branch exists anymore. Returning False."<< std::endl;abort();return false;})
Definition: NumuCuts2018.h:22
const Cut kNumuCutFD2018
Definition: NumuCuts2018.h:39
const Cut kNumuCosmicRejLoose2018([](const caf::SRProxy *sr){return( sr->sel.cosrej.numucontpid2020 > 0.48||sr->sel.cosrej.numucontpid2019 > 0.48);})
Definition: NumuCuts2018.h:16
Template for Cut and SpillCut.
Definition: Cut.h:15
const Cut kNumuQuality
Definition: NumuCuts.h:18
const Cut kLooseKFC
Definition: NumuCuts2018.cxx:9