get_data.C
Go to the documentation of this file.
1 #include "CAFAna/Vars/Vars.h"
2 #include "CAFAna/Cuts/Cuts.h"
4 #include "CAFAna/Core/Spectrum.h"
10 
11 #include "TFile.h"
12 #include "TTree.h"
13 #include "TH1.h"
14 
16 
17 using namespace ana;
18 
19 
20 void get_data()
21 {
22 
23 
24  const std::string fnameFDData_fhc =
25  "prod_sumrestricteddecaf_R19-11-18-prod5reco.combi_opt2_fd_numi_fhc_full_v1_nue2020_fddatav2";
26  const std::string fnameFDData_rhc =
27  "prod_sumrestricteddecaf_R19-11-18-prod5reco.combi_opt2_fd_numi_rhc_full_v1_nue2020_fddatav2";
28 
29  const Var kRun = SIMPLEVAR(hdr.run);
30  const Var kSubrun = SIMPLEVAR(hdr.subrun);
31  const Var kEvt = SIMPLEVAR(hdr.evt);
32  const Var kSlice = SIMPLEVAR(hdr.subevt);
33 
34  std::vector<const Var*> vars = {&kRun, &kSubrun, &kEvt, &kSlice, &kCVNe_looseptp, &kCosPIDCoreBDT, &kCosPIDPeriBDT};
35 
36 
37  MakeTextListFile(fnameFDData_rhc, {kNue2020FDPeripheral&&kInBeamSpill}, {"peri_search_rhc_2020.txt"},
39  MakeTextListFile(fnameFDData_rhc, {kNue2020FD&&kInBeamSpill}, {"core_search_rhc_2020.txt"},
41 
42  MakeTextListFile(fnameFDData_fhc, {kNue2020FDPeripheral&&kInBeamSpill}, {"peri_search_fhc_2020.txt"},
44  MakeTextListFile(fnameFDData_fhc, {kNue2020FD&&kInBeamSpill}, {"core_search_fhc_2020.txt"},
46 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
void get_data()
Definition: get_data.C:20
#define SIMPLEVAR(CAFNAME)
Definition: Var.h:11
const Var kSubrun
Definition: Vars.cxx:21
void MakeTextListFile(const std::string &wildcard, const std::vector< Cut > &cut, const std::vector< std::string > &output, const std::vector< const Var * > &floatVars, const std::vector< const Var * > &intVars, const SpillCut *spillCut)
Make a file listing all the events passing the specified cut.
Definition: EventList.cxx:193
const Var kEvt
Definition: Vars.cxx:23
const std::map< std::pair< std::string, std::string >, Variable > vars
const Cut kNue2020FD
Definition: NueCuts2020.h:65
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 Var kSlice
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
const Var kRun
Definition: Vars.cxx:20
const Cut kNue2020FDPeripheral(kNue2020FDPeripheralFunc)
const Var kCVNe_looseptp
Definition: Vars.cxx:36
const Var kCosPIDCoreBDT
2020 nue cosmic rejection BDT variable - core
Definition: NueVars.cxx:112
const Var kCosPIDPeriBDT
2020 nue cosmic rejection BDT variable - peripheral
Definition: NueVars.cxx:113
enum BeamMode string