make_numu_decaf.C
Go to the documentation of this file.
1 #include "CAFAna/Cuts/Cuts.h"
4 #include "CAFAna/Vars/Vars.h"
5 
6 using namespace ana;
7 
9 {
10  FileReducer reduce(fname, outname);
11 
12  reduce.SetMetadata("nova.decaf_skim","numu_contain");
13 
14  const Cut kIsND([](const caf::SRProxy* sr)
15  {
16  return sr->hdr.det==1;
17  });
18 
19  const Cut kIsFD([](const caf::SRProxy* sr)
20  {
21  return sr->hdr.det==2;
22  });
23 
24  const Cut kNumuDecafCut = (kIsND && kNumuDecafCutND) || (kIsFD && kNumuDecafCutFD);
25 
26  reduce.AddEventCut(kNumuDecafCut);
27 
29 
30  reduce.Go();
31 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
void ReduceForNumuDecaf(caf::StandardRecord *sr)
const Cut kNumuDecafCutND
Definition: NumuCuts.h:51
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
void SetMetadata(const std::string &key, const std::string &val)
Cause the output file to be systematically shifted.
Definition: FileReducer.h:102
void AddReductionStep(const std::function< ReductionFunc > &f)
Run the specified reduction function over each event.
Definition: FileReducer.h:85
void make_numu_decaf(std::string fname, std::string outname)
void AddEventCut(const Cut &cut)
Only copy records to the output file if they pass this cut.
caf::StandardRecord * sr
virtual void Go() override
Load all the registered spectra.
Create smaller CAFs.
Definition: FileReducer.h:56
const Cut kNumuDecafCutFD
Definition: NumuCuts.h:49
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:232
enum BeamMode string