train_reduce.C
Go to the documentation of this file.
1 #ifdef __CINT__
3 {
4  std::cout << "Sorry, you must run in compiled mode" << std::endl;
5 }
6 #else
7 
8 #include "CAFAna/Cuts/Cuts.h"
9 #include "CAFAna/Cuts/NumuCuts2017.h"
10 #include "CAFAna/Cuts/TruthCuts.h"
12 #include "CAFAna/Vars/Vars.h"
13 #include "CAFAna/Vars/NumuVars.h"
14 
15 using namespace ana;
16 
18 {
19  FileReducer reduce(fname, outname);
20 
21  const Cut kEbelow5 = kTrueE < 5.0;
22  const Cut kEabove0 = kTrueE > 0;
23  const Cut kEwell = kEabove0 && kEbelow5;
24 
25  const Cut kCCEabove0 = kCCE > 0;
26  const Cut kCCEbelow5 = kCCE < 5.0;
27  const Cut kErecoWell = kCCEabove0 && kCCEbelow5;
28 
29  const Var kGoodMuon = SIMPLEVAR(energy.numu.mc.truegoodmuon);
30  const Cut kTrueGoodMuon = kGoodMuon > 0;
31 
32  reduce.AddEventCut(kIsNumuCC);
33  reduce.AddEventCut(kEwell);
34  reduce.AddEventCut(kErecoWell);
35  reduce.AddEventCut(kTrueGoodMuon);
36 
37  reduce.Go();
38 }
39 
40 #endif
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
#define SIMPLEVAR(CAFNAME)
Definition: Var.h:11
void train_reduce(std::string fname, std::string outname)
Definition: train_reduce.C:17
const Var kTrueE([](const caf::SRProxy *sr){assert(sr->mc.nnu==1);return sr->mc.nu[0].E;})
Definition: Vars.cxx:85
void AddEventCut(const Cut &cut)
Only copy records to the output file if they pass this cut.
const Var kCCE
Definition: NumuVars.h:21
double energy
Definition: plottest35.C:25
virtual void Go() override
Load all the registered spectra.
Create smaller CAFs.
Definition: FileReducer.h:56
OStream cout
Definition: OStream.cxx:6
enum BeamMode string