NumuCuts2020.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Core/Cut.h"
8 #include "CAFAna/Vars/Vars.h"
10 
11 namespace ana
12 {
13 
14  //*************************************************************
15  //************************* PID *****************************
16  //*************************************************************
17 
18  // miniprod5 - same as kNumuPID2018 but removing deprecated cvn2017 variable
19  extern const Cut kNumuPIDMiniprod5;
20 
21  extern const Cut kNumu2020PID;
22  extern const Cut kNumu2020CosRej;
23  extern const Cut kNumu2020CosRejLoose; // For Decafs
24 
25  // Complete Numu cuts for Miniprod5
26  //*************************************************************
27  //********************* Containment *************************
28  //*************************************************************
29  // tuned (docDB 42840) and validated (docDB 42964)
30 
31  extern const Cut kNumuContainND2020;
32 
35  kDistAllTop > 60 &&
36  kDistAllBottom > 12 &&
37  kDistAllEast > 16 &&
38  kDistAllWest > 12 &&
39  kDistAllFront > 18 &&
40  kDistAllBack > 18;
41 
43  kNumuProngsContainFD2020 && kNumuBaseContainFD2020;
44 
45  //*************************************************************
46  //******************** Complete Cuts ************************
47  //*************************************************************
48 
49  // Miniprod5
54 
55 
56  // Prod5
57  const Cut kNumu2020ND =
58  kNumuQuality && kNumuContainND2020 && kNumu2020PID;
59  const Cut kNumu2020FD =
60  kNumuQuality && kNumuContainFD2020 && kNumu2020PID && kNumu2020CosRej && k3flavor2020FDVeto;
61 
62  // Decafs
64  const Cut kNumu2020FDDecafCut = kNumuBasicQuality && kNumuContainFD2020 && kNumu2020CosRejLoose; // && k3flavor2020FDVeto
65 
66 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
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.
Definition: NueVars.h:33
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.
Definition: NueVars.h:36
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 k3flavor2020FDVeto
Definition: 3flavorCuts.h:12
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 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.
Definition: NueVars.h:42
const Cut kNumu2020ND
Definition: NumuCuts2020.h:57
const Cut kNumuCutFDMiniprod5
Definition: NumuCuts2020.h:50
const Cut kNumu2020CosRejLoose([](const caf::SRProxy *sr){return sr->sel.cosrej.numucontpid2020 > 0.4 &&sr->sel.cvnloosepreselptp.numuid > 0.;})
Definition: NumuCuts2020.h:23
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 kNumu2020PID([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.30 && sr->sel.cvnloosepreselptp.numuid > 0.80);})
Definition: NumuCuts2020.h:21
const Cut kNumuContainFD2017
Definition: NumuCuts2017.h:21
const Cut kNumuContainFD2020
Definition: NumuCuts2020.h:42
const Cut kNumu2020FD
Definition: NumuCuts2020.h:59
const Cut kNumu2020CosRej([](const caf::SRProxy *sr){return(sr->sel.cosrej.numucontpid2020 > 0.45);})
Definition: NumuCuts2020.h:22
const Cut kNumu2020FDDecafCut
Definition: NumuCuts2020.h:64
const Cut kNumuPIDMiniprod5([](const caf::SRProxy *sr){std::cout<< "ERROR::kNumuPIDMiniprod5, cutting on cvnProd3Train. Branch doesn't exist anymore."<< std::endl;abort();return false;})
Definition: NumuCuts2020.h:19
const Cut kNumuCutNDMiniprod5
Definition: NumuCuts2020.h:52
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.
Definition: NueVars.h:45
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 kNumuQuality
Definition: NumuCuts.h:18
const Cut kNumuContainND2020([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;++i){const caf::SRVector3DProxy &start=sr->vtx.elastic.fuzzyk.png[i].shwlid.start;const caf::SRVector3DProxy &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())< 40.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: NumuCuts2020.h:31
const Cut kNumu2020NDDecafCut
Definition: NumuCuts2020.h:63
const Cut kNumuProngsContainFD2020
Definition: NumuCuts2020.h:34
const Cut kNumuBaseContainFD2020([](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->sel.contain.kalfwdcell > 6 &&sr->sel.contain.kalbakcell > 6 &&sr->sel.contain.cosfwdcell > 5 &&sr->sel.contain.cosbakcell > 7 &&planestofront > 2 &&planestoback > 3);})
Definition: NumuCuts2020.h:33