NumubarCCIncCuts.h
Go to the documentation of this file.
1 ////////////////////////////////////////////
2 /// \brief Numu bar CC inclusive analysis will reuse whatever is already defined in
3 /// the numu CC inclusive analysis. Only Vars and Cuts that are specific to
4 /// numu bar are defined here.
5 /// \author Connor Johnson
6 /// \date June, 2019
7 ////////////////////////////////////////////
8 
9 #pragma once
10 
11 // #include "NDAna/numucc_inc/NumuCCIncCuts.h" // Removing old cuts to ensure no modifications partway through
12 
13 #include "CAFAna/Core/Var.h"
14 #include "CAFAna/Core/Cut.h"
15 
16 // #include "NDAna/numubarcc_inc/NumubarCCIncVars.h"
18 
23 
24 #include "TVector3.h"
25 
26 namespace ana { namespace xsec { namespace numubarcc
27 {
28  ////////////////////////////////////
29  /// Main analysis truth cuts
30  ////////////////////////////////////
31 
32  extern bool VtxInBounds(const caf::SRVector3DProxy * vec, const TVector3 * vmin, const TVector3 * vmax);
33 
35  extern const Cut kIsNumubarCC;
36  extern const NuTruthCut kIsNumuCC_NT;
37  extern const Cut kIsNumuCC;
38  extern const NuTruthCut kIsNumuNumubarCC_NT;
39  extern const Cut kIsNumuNumubarCC;
40 
41  extern const TVector3 * detector_vtx_min;
42  extern const TVector3 * detector_vtx_min;
43 
44  extern const TVector3 * loose_vtx_min;
45  extern const TVector3 * loose_vtx_max;
46 
47  extern const TVector3 * numucc_fiducial_min;
48  extern const TVector3 * numucc_fiducial_max;
49 
50  extern const TVector3 * contain_low;
51  extern const TVector3 * contain_high;
52 
54  extern const Cut kTrueVtxDetectorCut;
55 
57  extern const Cut kTrueVtxLooseCut;
58 
59  extern const NuTruthCut kTrueVtxCut_NT;
60  extern const Cut kTrueVtxCut;
61 
63  extern const Cut kTrueVtxNumuFiducialCut;
64 
65  ////////////////////////////////////
66  /// Signal definitions
67  ////////////////////////////////////
68  extern const NuTruthCut kIsNueCC_NT;
69  extern const Cut kIsNueCC;
70  extern const NuTruthCut kIsNuebarCC_NT;
71  extern const Cut kIsNuebarCC;
73  extern const Cut kIsNueorbarCC;
74  extern const NuTruthCut kIsCC_NT;
75  extern const Cut kIsCC;
76  extern const NuTruthCut kIsNC_NT;
77  extern const Cut kIsNC;
78 
79  extern const NuTruthCut kTrueMuon_NT;
80  extern const Cut kTrueMuon;
81 
82  extern const Cut kTrueKalmanMuon;
83 
84  ////////////////////////////////////
85  /// Preselection Cuts
86  ////////////////////////////////////
87  extern const Cut kQualityCut;
88  extern const Cut kContainmentCut;
89  extern const Cut kPreselect;
90 
91  ////////////////////////////////////
92  /// Main analysis reconstruction cuts
93  ////////////////////////////////////
94  // const Cut kTrueMubarTrk([](const caf::SRProxy* sr)
95  // {
96  // unsigned int ibesttrk = 0;
97  // if (sr->trk.kalman.ntracks < 1)
98  // return false;
99  // return (sr->trk.kalman.tracks[ibesttrk].truth.pdg == -13);
100  // });
101 
102  // const Cut kTrueMuonTrk([](const caf::SRProxy* sr)
103  // {
104  // unsigned int ibesttrk = 0;
105  // if (sr->trk.kalman.ntracks < 1)
106  // return false;
107  // return (sr->trk.kalman.tracks[ibesttrk].truth.pdg == +13);
108  // });
109 
110  // const Cut kTrueMuOrMubarTrk([](const caf::SRProxy* sr)
111  // {
112  // unsigned int ibesttrk = 0;
113  // if (sr->trk.kalman.ntracks < 1)
114  // return false;
115  // return (std::abs(sr->trk.kalman.tracks[ibesttrk].truth.pdg) == 13);
116  // });
117 
118  extern const Cut kRecoVtxDetectorCut;
119  extern const Cut kRecoVtxLooseCut;
121  extern const Cut kRecoVtxCut;
122 
123  // Oh god this is a disaster
124  extern const Var kBestMuonIDIndex;
125  extern const Var kMuonID;
126  extern const float kMuonIDCutVal;
127  extern const Cut kMuonIDCut;
128 
129  ////////////////////////////////////
130  ///
131  ////////////////////////////////////
132  extern const Cut kActive;
133  extern const Cut kActiveAndCatcher;
134 } } } //end of namespace ana::xsec::numubarcc
const NuTruthCut kIsNueCC_NT([](const caf::SRNeutrinoProxy *nu){return(nu->iscc &&(nu->pdg==12));})
Signal cuts.
const Cut kRecoVtxNumuFiducialCut([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;return VtxInBounds(&sr->vtx.elastic.vtx, numucc_fiducial_min, numucc_fiducial_max);})
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const NuTruthCut kTrueVtxDetectorCut_NT([](const caf::SRNeutrinoProxy *nu){return VtxInBounds(&nu->vtx, detector_vtx_min, detector_vtx_max);})
const NuTruthCut kTrueMuon_NT([](const caf::SRNeutrinoProxy *nu){for(int iprim=0;iprim< (int) nu->prim.size();++iprim) if(std::abs(nu->prim[iprim].pdg)==13) return true;return false;})
const Cut kActive([](const caf::SRProxy *sr){int ibesttrk=kBestMuonIDIndex(sr);if(sr->trk.kalman.ntracks< 1||ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;const caf::SRKalmanTrackProxy &bestmuon=sr->trk.kalman.tracks[ibesttrk];return(bestmuon.leninact > 0 && bestmuon.lenincat< 0);})
const TVector3 * numucc_fiducial_max
const NuTruthCut kIsNuebarCC_NT([](const caf::SRNeutrinoProxy *nu){return(nu->iscc &&(nu->pdg==-12));})
const Cut kActiveAndCatcher([](const caf::SRProxy *sr){int ibesttrk=kBestMuonIDIndex(sr);if(sr->trk.kalman.ntracks< 1||ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;const caf::SRKalmanTrackProxy &bestmuon=sr->trk.kalman.tracks[ibesttrk];return(bestmuon.leninact > 0 && bestmuon.lenincat > 0);})
const TVector3 * loose_vtx_max
const Cut kQualityCut([](const caf::SRProxy *sr){return(sr->trk.kalman.ntracks > 0 &&sr->slc.nhit > 20 &&sr->slc.ncontplanes > 4);})
Preselection.
const NuTruthCut kIsNueorbarCC_NT([](const caf::SRNeutrinoProxy *nu){return(nu->iscc &&(std::abs(nu->pdg)==12));})
Proxy for caf::SRVector3D.
Definition: SRProxy.h:78
const Cut kContainmentCut([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;int ibesttrk=kBestMuonIDIndex(sr);if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;for(const caf::SRFuzzyKProngProxy &prong:sr->vtx.elastic.fuzzyk.png) if(!VtxInBounds(&prong.shwlid.start, containLow, containHigh)||!VtxInBounds(&prong.shwlid.stop, containLow, containHigh)) return false;if(sr->trk.kalman.ntracks< 1) return false;const unsigned short muon_catcher_edge=1275;for(unsigned int i=0;i< sr->trk.kalman.ntracks;++i){if(int(i)==ibesttrk) continue;if(sr->trk.kalman.tracks[i].start.Z() > muon_catcher_edge|| sr->trk.kalman.tracks[i].stop.Z() > muon_catcher_edge) return false;}const caf::SRKalmanTrackProxy &besttrack=sr->trk.kalman.tracks[ibesttrk];return((besttrack.stop.Z()< muon_catcher_edge||besttrack.trkyposattrans< 55) &&besttrack.trkfwdcellnd > 5 &&besttrack.trkbakcellnd > 10);})
const TVector3 * contain_high
const TVector3 * contain_low
const NuTruthCut kIsNumuNumubarCC_NT
Eigen::VectorXd vec
const NuTruthCut kIsNC_NT
const NuTruthCut kIsNumuCC_NT([](const caf::SRNeutrinoProxy *nu){return(nu->iscc &&nu->pdg==+14);})
const TVector3 * numucc_fiducial_min
Double_t xsec[nknots]
Definition: testXsec.C:47
const Cut kTrueKalmanMuon([](const caf::SRProxy *sr){ int ibesttrk=kBestMuonIDIndex(sr);if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;return std::abs(sr->trk.kalman.tracks[ibesttrk].truth.pdg)==13;})
const Cut kRecoVtxDetectorCut([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;return VtxInBounds(&sr->vtx.elastic.vtx, detector_vtx_min, detector_vtx_max);})
Main analysis reconstruction cuts.
const NuTruthCut kTrueVtxCut_NT
const NuTruthCut kIsNumubarCC_NT([](const caf::SRNeutrinoProxy *nu){return(nu->iscc &&nu->pdg==-14);})
const NuTruthCut kTrueVtxNumuFiducialCut_NT([](const caf::SRNeutrinoProxy *nu){return VtxInBounds(&nu->vtx, numucc_fiducial_min, numucc_fiducial_max);})
enum BeamMode numubarcc
const TVector3 * detector_vtx_min
Geometry.
const NuTruthCut kTrueVtxLooseCut_NT([](const caf::SRNeutrinoProxy *nu){return VtxInBounds(&nu->vtx, loose_vtx_min, loose_vtx_max);})
Template for Cut and SpillCut.
Definition: Cut.h:15
const TVector3 * loose_vtx_min
const Cut kRecoVtxLooseCut([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;return VtxInBounds(&sr->vtx.elastic.vtx, loose_vtx_min, loose_vtx_max);})
const NuTruthCut kIsCC_NT([](const caf::SRNeutrinoProxy *nu){return(nu->iscc);})
const Cut kMuonIDCut([](const caf::SRProxy *sr){return kMuonID(sr) >=kMuonIDCutVal;})
bool VtxInBounds(const caf::SRVector3DProxy *vec, const TVector3 *vmin, const TVector3 *vmax)
Main analysis truth cuts.