concat_fd_events.C
Go to the documentation of this file.
1 /*
2  * concat_fd_events.C
3  *
4  * Create a concat of the selected FD events.
5  *
6  * Created on: May 4, 2018
7  * Author: J. Wolcott <jwolcott@fnal.gov>
8  */
9 
10 
11 #include "CAFAna/Cuts/Cuts.h"
15 
16 using namespace ana;
17 
18 void concat_fd_events(std::string polarity, std::string outname)
19 {
20  if (polarity != "fhc" && polarity != "rhc")
21  {
22  std::cout << "Options for polarity are fhc and rhc. Try again." << std::endl;
23  return;
24  }
25 
26  // this starts from prod4 concats
27  FileReducer reduce("prod4_sumrestricteddecaf_fd_numi_" + polarity + "_full_goodruns_numu2018", outname);
28 
29  reduce.SetMetadata("nova.decaf_skim","numu_selected");
30 
31  // note: spill cuts already applied in prod4 concat step
33  reduce.Go();
34 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
void SetMetadata(const std::string &key, const std::string &val)
Cause the output file to be systematically shifted.
Definition: FileReducer.h:102
void concat_fd_events(std::string polarity, std::string outname)
void AddEventCut(const Cut &cut)
Only copy records to the output file if they pass this cut.
virtual void Go() override
Load all the registered spectra.
Create smaller CAFs.
Definition: FileReducer.h:56
OStream cout
Definition: OStream.cxx:6
const Cut kInBeamSpill([](const caf::SRProxy *sr){if(sr->spill.run > util::kLastBadTimingRun) return kInBeamSpill_main(sr);else return kInBeamSpill_main(sr)||kInBeamSpill_shifted(sr);}, [](const caf::SRSpillProxy *spill){if(spill->run > util::kLastBadTimingRun) return kInBeamSpill_main.Livetime(spill);else return kInBeamSpill_main.Livetime(spill)+kInBeamSpill_shifted.Livetime(spill);}, [](const caf::SRSpillProxy *spill) -> double{return spill->spillpot;})
Does the event fall inside the window we call the beam spill?
Definition: TimingCuts.h:8
const Cut kNumuCutFD2018
Definition: NumuCuts2018.h:39
enum BeamMode string