NumuCCIncCuts.h
Go to the documentation of this file.
1 #pragma once
2 #include "CAFAna/Core/Cut.h"
4 #include "CAFAna/Vars/Vars.h"
6 
9 
10 #include "TMath.h"
11 #include "TVector3.h"
12 #include "TParticlePDG.h"
13 //#include "myownvar.h"
14 namespace ana
15 {
16  // Optimized fiducial for analysis
17  const TVector3 vtxmin(-130, -130, 100);
18  const TVector3 vtxmax( 140, 140, 1000);
19 
20  // Detector limits (fiducial should fit inside this box)
21  const TVector3 tvtxmin(-191, -187, 0);
22  const TVector3 tvtxmax( 192, 194, 1270);
23 
24 
25  extern const Cut kNumuMyQuality;
26 
27  extern const Cut kIsFiducial;
28 
29  extern const Cut kNumuTightContainND;
30 
33 
34  extern const NuTruthCut kTrueECutST;
35 
36  extern const NuTruthCut kIsNumuCCST;
37  extern const NuTruthCut kIsNCST;
40  extern const NuTruthCut kIsNueCCST;
41  extern const NuTruthCut kIsAntiNueCCST;
42 
43  extern const Cut kIsNumuCCCut;
44  extern const Cut kIsNCCut;
45  extern const Cut kIsAntiNumuCC;
46  extern const Cut kIsNueorbarCC;
47  extern const Cut kIsNueCC;
48  extern const Cut kIsAntiNueCC;
49 
50  extern const NuTruthCut kTrueMuKECutST;
51  extern const NuTruthCut kTrueMuCosCutST;
52 
54 
55  extern const Cut kTrueMuKECut;
56  extern const Cut kTrueMuCosCut;
57  extern const Cut kTrueECut;
58  extern const Cut kTrueFiducial;
59  extern const Cut kTrueDetector;
60  extern const Cut kTrueMuonPhaseSpaceCut;
61 
62  extern const Cut kRecoMuCosCut;
63  extern const Cut kRecoMuKECut;
64 
66 
67  extern const Cut kRecoECut;
68  extern const Cut kMuonIDCut;
69 
70  // --------------------------------------------------------------
71  // analysis signal cuts
72 
73  extern const Cut kAllNumuCCCuts;
74  extern const Cut kAllNumuCC1DCuts;
75 
76  extern const NuTruthCut kIsTrueSigST;
77  extern const NuTruthCut kIsTrueSig1DST;
78  extern const Cut kIsTrueSig;
79 
80  // Don't want to delete this yet, in case it is used. Defining new ones.
81  extern const NuTruthCut kIsTrueSignalST;
82 
83  extern const Cut kIsTrueSignal;
84 
86  extern const Cut kIsTrueFiducialNumuCC;
87 
88  extern const Cut kPreSel;
89 
90  extern const Cut kAllNumuCCCutsTrueFiducial;
92 
93  // --------------------------------------------------------------
94  extern const Cut kTrueMuon;
95 
96  extern const Cut kActive;
97 
98  extern const Cut kActiveandCatcher;
99 
100  ////Cuts related to muon energy scale systematics:
101 
102  extern const Cut kRecoMuKECutUp;
103  extern const Cut kRecoMuKECutDw;
104 
105  extern const Cut kRecoMuonPhaseSpaceCutUp;
106  extern const Cut kRecoMuonPhaseSpaceCutDw;
107 
108  extern const Cut kAllNumuCCCutsUp;
109  extern const Cut kAllNumuCCCutsDw;
110 
111 
112 }//end of namespace
const Cut kPreSel
const NuTruthCut kIsNCST([](const caf::SRNeutrinoProxy *truth){return!truth->iscc;})
Definition: NumuCCIncCuts.h:37
const Cut kRecoMuCosCut
const NuTruthCut kIsNueCCST([](const caf::SRNeutrinoProxy *truth){return(truth->iscc &&truth->pdg==12);})
Definition: NumuCCIncCuts.h:40
const NuTruthCut kIsTrueSigST
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Cut kNumuTightContainND([](const caf::SRProxy *sr){if(sr->vtx.nelastic< 1) return false;int ibesttrk=kBestTrack(sr);for(unsigned int i=0;i< sr->vtx.elastic[0].fuzzyk.nshwlid;++i){TVector3 start=sr->vtx.elastic[0].fuzzyk.png[i].shwlid.start;TVector3 stop=sr->vtx.elastic[0].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(int i=0;i< int(sr->trk.kalman.ntracks);++i){if(i==ibesttrk) continue;else if(sr->trk.kalman.tracks[i].start.Z() > 1275|| sr->trk.kalman.tracks[i].stop.Z() > 1275) return false;}if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;return((sr->trk.kalman.tracks[ibesttrk].stop.Z()< 1275 ||sr->trk.kalman.tracks[ibesttrk].trkyposattrans< 55) &&sr->trk.kalman.tracks[ibesttrk].trkfwdcellnd > 5 &&sr->trk.kalman.tracks[ibesttrk].trkbakcellnd > 10);})
Definition: NumuCCIncCuts.h:29
const NuTruthCut kTrueMuCosCutST
const NuTruthCut kIsTrueSignalST
const TVector3 vtxmin(-130,-176, 225)
const NuTruthCut kIsTrueSig1DST
const NuTruthCut kTrueDetectorST([](const caf::SRNeutrinoProxy *sr){return(sr->vtx.X()< tvtxmax.X()&& sr->vtx.X() > tvtxmin.X()&& sr->vtx.Y() > tvtxmin.Y()&& sr->vtx.Y()< tvtxmax.Y()&& sr->vtx.Z() > tvtxmin.Z()&& sr->vtx.Z()< tvtxmax.Z());})
Definition: NumuCCIncCuts.h:32
const Cut kAllNumuCCCutsTrueNotFiducial
const Cut kTrueMuCosCut
const Cut kTrueMuKECut
const NuTruthCut kTrueECutST([](const caf::SRNeutrinoProxy *truth){return(truth->E > 0.75 && truth->E< 4.0);})
Definition: NumuCCIncCuts.h:34
const Cut kActiveandCatcher([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return false;int ibesttrk=kBestTrack(sr);if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;return(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat > 0);})
Definition: NumuCCIncCuts.h:98
const NuTruthCut kIsAntiNumuCCST([](const caf::SRNeutrinoProxy *truth){return(truth->iscc && truth->pdg==-14);})
Definition: NumuCCIncCuts.h:38
const Cut kNumuMyQuality([](const caf::SRProxy *sr){return(sr->trk.kalman.ntracks > 0 && sr->slc.nhit > 20 && sr->slc.ncontplanes > 4);})
Definition: NumuCCIncCuts.h:25
const Cut kRecoECut
const NuTruthCut kTrueFiducialST([](const caf::SRNeutrinoProxy *sr){return(sr->vtx.X()< vtxmax.X()&& sr->vtx.X() > vtxmin.X()&& sr->vtx.Y() > vtxmin.Y()&& sr->vtx.Y()< vtxmax.Y()&& sr->vtx.Z() > vtxmin.Z()&& sr->vtx.Z()< vtxmax.Z());})
Definition: NumuCCIncCuts.h:31
const Cut kRecoMuKECut
const Cut kActive([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return false;int ibesttrk=kBestTrack(sr);if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;return(sr->trk.kalman.tracks[ibesttrk].leninact > 0 && sr->trk.kalman.tracks[ibesttrk].lenincat< 0);})
Definition: NumuCCIncCuts.h:96
const Cut kRecoMuKECutDw
const NuTruthCut kIsTrueFiducialNumuCCST
const Cut kRecoMuonPhaseSpaceCutUp
const Cut kIsNCCut
const Cut kRecoMuonPhaseSpaceCutDw
const Cut kIsAntiNueCC
const Cut kIsTrueFiducialNumuCC
const Cut kTrueFiducial
const Cut kRecoMuKECutUp
const Cut kTrueMuon([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return false;int ibesttrk=kBestTrack(sr);if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;bool muon=std::abs(sr->trk.kalman.tracks[ibesttrk].truth.pdg)==13;if(!muon) return false;return muon;})
Definition: NumuCCIncCuts.h:94
const NuTruthCut kTrueMuKECutST
const Cut kIsNumuCCCut
const NuTruthCut kTrueMuonPhaseSpaceCutST([](const caf::SRNeutrinoProxy *truth){float trueMuKE=kTrueMuKEST(truth);float trueMuCostheta=kTrueMuCosthetaST(truth);return((trueMuKE >=0.5)&&( (trueMuCostheta >=0.94 &&trueMuCostheta<=1.00 &&trueMuKE< 2.5)|| (trueMuCostheta >=0.91 &&trueMuCostheta< 0.94 &&trueMuKE< 2.2)|| (trueMuCostheta >=0.88 &&trueMuCostheta< 0.91 &&trueMuKE< 1.9)|| (trueMuCostheta >=0.85 &&trueMuCostheta< 0.88 &&trueMuKE< 1.8)|| (trueMuCostheta >=0.80 &&trueMuCostheta< 0.85 &&trueMuKE< 1.4)|| (trueMuCostheta >=0.74 &&trueMuCostheta< 0.80 &&trueMuKE< 1.4)|| (trueMuCostheta >=0.68 &&trueMuCostheta< 0.74 &&trueMuKE< 1.4)|| (trueMuCostheta >=0.62 &&trueMuCostheta< 0.68 &&trueMuKE< 1.3)|| (trueMuCostheta >=0.56 &&trueMuCostheta< 0.62 &&trueMuKE< 1.2)|| (trueMuCostheta >=0.50 &&trueMuCostheta< 0.56 &&trueMuKE< 1.1)));})
Definition: NumuCCIncCuts.h:53
const Cut kMuonIDCut
const Cut kIsFiducial([](const caf::SRProxy *sr){int ibesttrk=kBestTrack(sr);if(sr->trk.kalman.ntracks< 1) return false;if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;bool isfid=(sr->trk.kalman.tracks[ibesttrk].start.X()< vtxmax.X()&&sr->trk.kalman.tracks[ibesttrk].start.X() > vtxmin.X()&&sr->trk.kalman.tracks[ibesttrk].start.Y() > vtxmin.Y()&&sr->trk.kalman.tracks[ibesttrk].start.Y()< vtxmax.Y()&&sr->trk.kalman.tracks[ibesttrk].start.Z() > vtxmin.Z()&&sr->trk.kalman.tracks[ibesttrk].start.Z()< vtxmax.Z());return isfid;})
Definition: NumuCCIncCuts.h:27
const Cut kTrueECut
const Cut kIsNueorbarCC
const TVector3 tvtxmax(192, 194, 1270)
const Cut kIsTrueSig
const Cut kAllNumuCC1DCuts
const Cut kAllNumuCCCutsTrueFiducial
const Cut kRecoMuonPhaseSpaceCut([](const caf::SRProxy *sr){float recoMuKE=kRecoMuKE(sr);float recoMuCostheta=kRecoMuCostheta(sr);return((recoMuKE >=0.5)&&( (recoMuCostheta >=0.94 &&recoMuCostheta<=1.00 &&recoMuKE< 2.5)|| (recoMuCostheta >=0.91 &&recoMuCostheta< 0.94 &&recoMuKE< 2.2)|| (recoMuCostheta >=0.88 &&recoMuCostheta< 0.91 &&recoMuKE< 1.9)|| (recoMuCostheta >=0.85 &&recoMuCostheta< 0.88 &&recoMuKE< 1.8)|| (recoMuCostheta >=0.80 &&recoMuCostheta< 0.85 &&recoMuKE< 1.4)|| (recoMuCostheta >=0.74 &&recoMuCostheta< 0.80 &&recoMuKE< 1.4)|| (recoMuCostheta >=0.68 &&recoMuCostheta< 0.74 &&recoMuKE< 1.4)|| (recoMuCostheta >=0.62 &&recoMuCostheta< 0.68 &&recoMuKE< 1.3)|| (recoMuCostheta >=0.56 &&recoMuCostheta< 0.62 &&recoMuKE< 1.2)|| (recoMuCostheta >=0.50 &&recoMuCostheta< 0.56 &&recoMuKE< 1.1)));})
Definition: NumuCCIncCuts.h:65
const Cut kAllNumuCCCutsUp
const TVector3 tvtxmin(-191,-187, 0)
const NuTruthCut kIsNueorbarCCST([](const caf::SRNeutrinoProxy *truth){return(truth->iscc && std::abs(truth->pdg)==12);})
Definition: NumuCCIncCuts.h:39
Template for Cut and SpillCut.
Definition: Cut.h:15
const TVector3 vtxmax(160, 160, 1000)
const Cut kTrueDetector
const NuTruthCut kIsAntiNueCCST([](const caf::SRNeutrinoProxy *truth){return(truth->iscc && truth->pdg==-12);})
Definition: NumuCCIncCuts.h:41
const Cut kAllNumuCCCutsDw
const Cut kIsAntiNumuCC
const Cut kIsTrueSignal
const Cut kIsNueCC
const Cut kAllNumuCCCuts
const NuTruthCut kIsNumuCCST([](const caf::SRNeutrinoProxy *truth){return(truth->iscc &&truth->pdg==14);})
Definition: NumuCCIncCuts.h:36
const Cut kTrueMuonPhaseSpaceCut