NumuCuts2017.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Core/Cut.h"
6 #include "CAFAna/Vars/Vars.h"
8 
9 namespace ana
10 {
11  extern const Cut kNumuContainND2017;
12 
13  extern const Cut kNumuDecafPresel2017;
14 
15  //Re-optimized versisons of FD containment cuts that were used in SA
17 
18  //Prongs cut for FD
20  //Numu Containment for FD
21  const Cut kNumuContainFD2017 = kNumuProngsContainFD2017 && kNumuOptimizedContainFD2017;
22 
23  //Cosmic rejection cut for the 2017 analysis
24  extern const Cut kNumuCosmicRej2017;
25 
26  //PID cuts for the 2017 analysis
27  extern const Cut kNumuPID2017;
28 
29  /// cosmic veto cut for FD
30  extern const Cut kNumu2017Veto;
31 
32  // Decaf cuts for the 2017 analysis. Keep up to date
34  kNumuDecafPresel2017 && ( kNumuContainFD2017 || kNumuContainFD) && ( kNumuCosmicRejLoose || kNumuSACosmicRejLoose );
36  kNumuDecafPresel2017 && ( kNumuContainND2017 || kNumuContainND);
37 
38  //Complete 2017 NuMu cuts
40  kNumuQuality && kNumuContainFD2017 && kNumuPID2017 && kNumuCosmicRej2017;
42  kNumuQuality && kNumuContainND2017 && kNumuPID2017;
43 
44  /////////////////// Cuts to reproduce 3A //////////////////////
46 
47  extern const Cut kNumuPID2017Prod4;
48 
49  //Complete third analysis 2017 NuMu cuts for use on Prod4 files
51  kNumuQuality && kNumuContainFD2017 && kNumuPID2017Prod4 && kNumuCosmicRej2017Prod4;
53  kNumuQuality && kNumuContainND2017 && kNumuPID2017Prod4;
54 
55 }
const Cut kNumuPID2017Prod4([](const caf::SRProxy *sr){std::cout<< "ERROR::kNumuPID2017Prod4, cutting on cvn2017. Branch doesn't exist anymore."<< std::endl;abort();return false; })
Definition: NumuCuts2017.h:47
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Cut kNumuCutFD2017Prod4
Definition: NumuCuts2017.h:50
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 Cut kNumuCutFD2017
Definition: NumuCuts2017.h:39
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 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 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 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 kNumuCosmicRej2017Prod4([](const caf::SRProxy *sr){return(sr->sel.cosrej.anglekal > 0.5 && sr->sel.cosrej.numucontpid2019 > 0.5 && sr->slc.nhit< 400);})
Definition: NumuCuts2017.h:45
const Cut kNumu2017Veto([](const caf::SRProxy *sr){return sr->sel.veto.keep;})
cosmic veto cut for FD
Definition: NumuCuts2017.h:30
const Cut kNumuContainFD2017
Definition: NumuCuts2017.h:21
const Cut kNumuOptimizedContainFD2017([](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 > 0 &&sr->sel.contain.cosbakcell > 7 &&planestofront > 1 &&planestoback > 1);})
Definition: NumuCuts2017.h:16
const Cut kNumuProngsContainFD2017
Definition: NumuCuts2017.h:19
const Cut kNumuCutND2017
Definition: NumuCuts2017.h:41
const Cut kNumuDecafCutFD2017
Definition: NumuCuts2017.h:33
const Cut kNumuDecafPresel2017([](const caf::SRProxy *sr){return(sr->slc.nhit > 20 &&sr->sel.remid.pid > 0 &&sr->sel.cvn.numuid > 0);})
Definition: NumuCuts2017.h:13
const Cut kNumuPID2017([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.5 &&sr->sel.cvn.numuid > 0.5);})
Definition: NumuCuts2017.h:27
const Cut kNumuCosmicRej2017([](const caf::SRProxy *sr){return(sr->sel.cosrej.anglekal > 0.5 && sr->sel.cosrej.numucontpid2020 > 0.5 && sr->slc.nhit< 400);})
Definition: NumuCuts2017.h:24
const Cut kNumuCutND2017Prod4
Definition: NumuCuts2017.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 kNumuQuality
Definition: NumuCuts.h:18
const Cut kNumuDecafCutND2017
Definition: NumuCuts2017.h:35
const Cut kNumuCosmicRejLoose([](const caf::SRProxy *sr){return(sr->sel.cosrej.numucontpid2020 > 0.48);})
Definition: NumuCuts.h:34