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/Cut.h"
15 
16 #include "TVector3.h"
17 
18 namespace ana { namespace xsec { namespace numubarcc
19 {
20  ////////////////////////////////////
21  /// Main analysis truth cuts
22  ////////////////////////////////////
23 
24  extern bool VtxInBounds(const caf::SRVector3DProxy * vec, const TVector3 * vmin, const TVector3 * vmax);
25 
27  extern const Cut kIsNumubarCC;
28  extern const NuTruthCut kIsNumuCC_NT;
29  extern const Cut kIsNumuCC;
30 
31  extern const TVector3 * detector_vtx_min;
32  extern const TVector3 * detector_vtx_min;
33 
34  extern const TVector3 * loose_vtx_min;
35  extern const TVector3 * loose_vtx_max;
36 
38  extern const Cut kTrueVtxDetectorCut;
39 
41  extern const Cut kTrueVtxLooseCut;
42 
43  extern const NuTruthCut kTrueVtxCut_NT;
44  extern const Cut kTrueVtxCut;
45 
46  ////////////////////////////////////
47  /// Signal definitions
48  ////////////////////////////////////
49  extern const NuTruthCut kIsNueCC_NT;
50  extern const Cut kIsNueCC;
51  extern const NuTruthCut kIsNuebarCC_NT;
52  extern const Cut kIsNuebarCC;
54  extern const Cut kIsNueorbarCC;
55  extern const NuTruthCut kIsCC_NT;
56  extern const Cut kIsCC;
57  extern const NuTruthCut kIsNC_NT;
58  extern const Cut kIsNC;
59 
60  ////////////////////////////////////
61  /// Preselection Cuts
62  ////////////////////////////////////
63  extern const Cut kQualityCut;
64  extern const Cut kContainmentCut;
65 
66  ////////////////////////////////////
67  /// Main analysis reconstruction cuts
68  ////////////////////////////////////
69  // const Cut kTrueMubarTrk([](const caf::SRProxy* sr)
70  // {
71  // unsigned int ibesttrk = 0;
72  // if (sr->trk.kalman.ntracks < 1)
73  // return false;
74  // return (sr->trk.kalman.tracks[ibesttrk].truth.pdg == -13);
75  // });
76 
77  // const Cut kTrueMuonTrk([](const caf::SRProxy* sr)
78  // {
79  // unsigned int ibesttrk = 0;
80  // if (sr->trk.kalman.ntracks < 1)
81  // return false;
82  // return (sr->trk.kalman.tracks[ibesttrk].truth.pdg == +13);
83  // });
84 
85  // const Cut kTrueMuOrMubarTrk([](const caf::SRProxy* sr)
86  // {
87  // unsigned int ibesttrk = 0;
88  // if (sr->trk.kalman.ntracks < 1)
89  // return false;
90  // return (std::abs(sr->trk.kalman.tracks[ibesttrk].truth.pdg) == 13);
91  // });
92 
93  extern const Cut kRecoVtxDetectorCut;
94  extern const Cut kRecoVtxLooseCut;
95  extern const Cut kRecoVtxCut;
96 
97 } } } //end of namespace ana::xsec::numubarcc
const NuTruthCut kIsNueCC_NT([](const caf::SRNeutrinoProxy *nu){return(nu->iscc &&(nu->pdg==12));})
Signal cuts.
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 kIsNuebarCC_NT([](const caf::SRNeutrinoProxy *nu){return(nu->iscc &&(nu->pdg==-12));})
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));})
Eigen::VectorXd vec
const NuTruthCut kIsNC_NT
const NuTruthCut kIsNumuCC_NT([](const caf::SRNeutrinoProxy *nu){return(nu->iscc &&nu->pdg==+14);})
Double_t xsec[nknots]
Definition: testXsec.C:47
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.
Template for Cut and SpillCut.
Definition: Cut.h:15
const NuTruthCut kTrueVtxCut_NT
const NuTruthCut kIsNumubarCC_NT([](const caf::SRNeutrinoProxy *nu){return(nu->iscc &&nu->pdg==-14);})
const Cut kContainmentCut([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;int ibesttrk=ana::muonid_classifier::kBestMuonTrack(sr);if(ibesttrk< 0||ibesttrk >=int(sr->trk.kalman.ntracks)) return false;TVector3 *containLow=new TVector3(-180,-180, 20);TVector3 *containHigh=new TVector3(180, 180, 1525);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=1270;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 * detector_vtx_min
Geometry.
const NuTruthCut kTrueVtxLooseCut_NT([](const caf::SRNeutrinoProxy *nu){return VtxInBounds(&nu->vtx, loose_vtx_min, loose_vtx_max);})
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);})
bool VtxInBounds(const caf::SRVector3DProxy *vec, const TVector3 *vmin, const TVector3 *vmax)
Main analysis truth cuts.