reduce_numu_ana2017.C
Go to the documentation of this file.
1 #include "CAFAna/Cuts/Cuts.h"
5 #include "CAFAna/Vars/Vars.h"
6 
7 using namespace ana;
8 
10 {
11  FileReducer reduce(fname, outname);
12 
13  reduce.SetMetadata("nova.decaf_skim","numu_contain");
14 
15  const Cut kIsND([](const caf::SRProxy* sr)
16  {
17  return sr->hdr.det==caf::kNEARDET;
18  });
19 
20  const Cut kIsFD([](const caf::SRProxy* sr)
21  {
22  return sr->hdr.det==caf::kFARDET;
23  });
24 
25  const Cut kNumuDecafCut = (kIsND && kNumuDecafCutND2017) || (kIsFD && kNumuDecafCutFD2017);
26 
27  reduce.AddEventCut(kNumuDecafCut);
28 
30 
31  reduce.Go();
32 }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
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 reduce_numu_ana2017(std::string fname, std::string outname)
void AddReductionStep(const std::function< ReductionFunc > &f)
Run the specified reduction function over each event.
Definition: FileReducer.h:85
void AddEventCut(const Cut &cut)
Only copy records to the output file if they pass this cut.
caf::StandardRecord * sr
const Cut kNumuDecafCutFD2017
Definition: NumuCuts2017.h:33
virtual void Go() override
Load all the registered spectra.
Create smaller CAFs.
Definition: FileReducer.h:56
const Cut kNumuDecafCutND2017
Definition: NumuCuts2017.h:35
void ClearMultiNuInfo(caf::StandardRecord *sr)
Definition: FileReducer.cxx:25
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:232
enum BeamMode string