VarsAndCuts.h
Go to the documentation of this file.
4 using namespace ana;
5 
6 // ========= Vars ========= //
7 const Var kSliceTime([](const caf::SRProxy *sr)
8  {
9  return sr->slc.meantime/1000;
10  });
11 
12 
13 const Var kBoxMaxY([](const caf::SRProxy *sr)
14  {
15  return sr->slc.boxmax.Y() / 100;
16  });
17 
18 
19 const Var kDirZ([](const caf::SRProxy *sr)
20  {
21  if(sr->trk.kalman.ntracks < 1) return 0.f;
22  return sr->trk.kalman.tracks[0].dir.Z();
23  });
24 
25 const Var kMassFracPOT([](const caf::SRProxy* sr)
26  {
27  return sr->spill.spillpot*(sr->hdr.diblast - sr->hdr.dibfirst + 1)/14.; // check if this can get rod of spill. and hdr.
28  });
29 
30 const Var kSpillPOT = SIMPLEVAR(spill.spillpot);
31 
32 const Var kWOscDumbHere(
33  [](const caf::SRProxy* sr)
34  {
35  if(sr->mc.nu.size() == 0) return 0.;
36  return kWOscDumb(sr);
37  });
38 
39 //const Var kNumuContPID = SIMPLEVAR(sel.cosrej.numucontpid);
40 
41 const Var kNumuContPID ([](const caf::SRProxy* sr)
42  {
43  return sr->sel.cosrej.numucontpid2020;
44  });
45 
46 // ========= Cuts ========= //
47 const Cut kDQCut([](const caf::SRProxy* sr)
48  {
49  return sr->spill.isgoodspill &&
50  sr->slc.nhit > 30;
51  });
52 
53 const Cut kInTimeLoose = SIMPLEVAR(slc.meantime) > 25e3 && SIMPLEVAR(slc.meantime) < 475e3;
54 const Cut kInTimeTight = SIMPLEVAR(slc.meantime) > 217e3 && SIMPLEVAR(slc.meantime) < 229e3;
55 const double timeWindowFactor = double(229-217)/(450-(229-217));
56 
57 /*
58 ////change to this containment cut when we're sure that this branch is righly filled
59 ////so far it's all zeros
60 const Cut kContBasic([](const caf::SRProxy* sr)
61  {
62  return (sr->sel.contain.numucontain==1);
63  });
64 */
65 
67 
68 const Cut kBlinded([](const caf::SRProxy* sr)
69  {
70  return (sr->slc.calE < 0.8 || sr->slc.calE > 3.0);
71  });
72 
73 
76 //const Cut kNusBasic = kNus18CVNnc;
77 
78 
79 const Cut kNumuCosmicRejBasic([](const caf::SRProxy* sr)
80  { return (sr->sel.cosrej.numucontpid2020 > 0.53 &&
81  sr->sel.nuecosrej.pngptp < 0.9
82  );
83  }
84  );
85 
86 const Cut kNumuDecaf2018([](const caf::SRProxy* sr)
87  { return (sr->slc.nhit > 20);
88  }
89  );
90 
91 
92 //const Cut kNueDecaf2018 = kApplySecondAnalysisMask && kVeto && kNueDQ2017CVN && (kCVNSSe > 0.5);
93 
94 // only using numu and nue effects atm
95 // nc selection (here) let lots of bkg in
96 // with or without dq cut has not made a difference
97 //const Cut kCut = (kBlinded && kInCosmicTimingWindow && kContBasic && ( kNumuBasic || kNueBasic));
98 const Cut kCut = (kBlinded && kInCosmicTimingWindow && kDQCut && kContBasic && ( kNumuBasic || kNueBasic));
99 const Cut kCutUnblind = (kInCosmicTimingWindow && kDQCut && kNumuCosmicRejBasic && kContBasic && ( kNumuBasic || kNueBasic));
100 
101 // ========= Binning ========= //
102 const Binning kXYBins = Binning::Simple(18,-9,9);
caf::Proxy< caf::SRSpill > spill
Definition: SRProxy.h:2143
Represent the binning of a Spectrum&#39;s x-axis.
Definition: Binning.h:16
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Cut kInTimeLoose
Definition: VarsAndCuts.h:33
const Cut kNue2020PID([](const caf::SRProxy *sr){if(kIsRHC(sr)) return kNue2020PIDRHC(sr);else return kNue2020PIDFHC(sr);})
Definition: NueCuts2020.h:61
caf::Proxy< size_t > ntracks
Definition: SRProxy.h:1778
const Var kNumuContPID
Definition: NumuVars.cxx:553
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
caf::Proxy< float > spillpot
Definition: SRProxy.h:1407
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:618
#define SIMPLEVAR(CAFNAME)
Definition: Var.h:11
caf::Proxy< short unsigned int > diblast
Definition: SRProxy.h:234
const Cut kCutUnblind
Definition: VarsAndCuts.h:99
const Var kSliceTime([](const caf::SRProxy *sr){return sr->slc.meantime/1000;})
Definition: NumuVars.h:34
const Var kMassFracPOT([](const caf::SRProxy *sr){return sr->spill.spillpot *(sr->hdr.diblast-sr->hdr.dibfirst+1)/14.;})
const Var kDirZ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].dir.Z();})
Definition: NumuVars.h:39
const Cut kInTimeTight
Definition: VarsAndCuts.h:34
caf::Proxy< caf::SRCosRej > cosrej
Definition: SRProxy.h:1252
const Cut kInCosmicTimingWindow
Is the event far from the start and ends of the spill ? For FD cosmic selection.
Definition: TimingCuts.cxx:165
caf::Proxy< caf::SRNueCosRej > nuecosrej
Definition: SRProxy.h:1265
const double timeWindowFactor
Definition: VarsAndCuts.h:55
const Cut kNumu2020PID([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.30 && sr->sel.cvnloosepreselptp.numuid > 0.80);})
Definition: NumuCuts2020.h:21
caf::Proxy< unsigned int > nhit
Definition: SRProxy.h:1315
const Cut kContBasic
Definition: VarsAndCuts.h:66
caf::Proxy< bool > isgoodspill
Definition: SRProxy.h:1377
const Cut kNumuDecaf2018([](const caf::SRProxy *sr){return(sr->slc.nhit > 20);})
caf::Proxy< caf::SRTrackBranch > trk
Definition: SRProxy.h:2145
const Cut kNumuCosmicRejBasic([](const caf::SRProxy *sr){return(sr->sel.cosrej.numucontpid2020 > 0.53 &&sr->sel.nuecosrej.pngptp< 0.9);})
const Var kSpillPOT
Return the POT for the spill.
Definition: SpillVars.cxx:33
const Var kBoxMaxY([](const caf::SRProxy *sr){return sr->slc.boxmax.Y()/100;})
const Cut kNumuBasic
Definition: VarsAndCuts.h:74
const Cut kNumuContainFD2020
Definition: NumuCuts2020.h:42
const Binning kXYBins
Definition: VarsAndCuts.h:102
caf::StandardRecord * sr
const Var kWOscDumbHere([](const caf::SRProxy *sr){if(sr->mc.nu.size()==0) return 0.;return kWOscDumb(sr);})
const Cut kDQCut([](const caf::SRProxy *sr){return sr->trk.cosmic.ntracks > 0 &&sr->slc.ncontplanes >=6;})
caf::Proxy< float > numucontpid2020
Definition: SRProxy.h:884
const Cut kNueBasic
Definition: VarsAndCuts.h:75
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2138
const Var kWOscDumb([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return 0.f;return float(sr->mc.nu[0].woscdumb);})
Definition: TruthVars.h:10
caf::Proxy< caf::SRKalman > kalman
Definition: SRProxy.h:1797
caf::Proxy< caf::SRSlice > slc
Definition: SRProxy.h:2142
caf::Proxy< float > calE
Definition: SRProxy.h:1292
caf::Proxy< float > meantime
Definition: SRProxy.h:1311
const Cut kCut
Definition: VarsAndCuts.h:36
caf::Proxy< float > pngptp
Definition: SRProxy.h:1061
caf::Proxy< std::vector< caf::SRKalmanTrack > > tracks
Definition: SRProxy.h:1780
caf::Proxy< caf::SRIDBranch > sel
Definition: SRProxy.h:2141
const Cut kBlinded([](const caf::SRProxy *sr){return(sr->slc.calE< 0.8||sr->slc.calE > 3.0);})
caf::Proxy< short unsigned int > dibfirst
Definition: SRProxy.h:233
const Binning kZBins
Definition: VarsAndCuts.h:103
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
Definition: Binning.cxx:107
caf::Proxy< caf::SRVector3D > boxmax
Definition: SRProxy.h:1290