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