Functions
get_data.C File Reference
#include "CAFAna/Vars/Vars.h"
#include "CAFAna/Cuts/Cuts.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Cuts/TimingCuts.h"
#include "CAFAna/Core/Utilities.h"
#include "CAFAna/Core/EventList.h"
#include "CAFAna/Cuts/SpillCuts.h"
#include "3FlavorAna/Cuts/NueCuts2020.h"
#include "TFile.h"
#include "TTree.h"
#include "TH1.h"
#include "StandardRecord/Proxy/SRProxy.h"

Go to the source code of this file.

Functions

void get_data ()
 

Function Documentation

void get_data ( )

Definition at line 20 of file get_data.C.

References ana::kCosPIDCoreBDT, ana::kCosPIDPeriBDT, ana::kCVNe_looseptp, ana::kEvt, ana::kInBeamSpill, ana::kNue2020FD, ana::kNue2020FDPeripheral(), ana::kRun, kSlice, ana::kStandardSpillCuts, ana::kSubrun, ana::MakeTextListFile(), SIMPLEVAR, string, and vars.

Referenced by boost::python::map_indexing_suite< Container, NoProxy, final_map_derived_policies< Container, NoProxy > >::extension_def().

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 }
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
#define SIMPLEVAR(CAFNAME)
For Vars where literally all you need is a single CAF variable.
Definition: Var.h:88
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 SpillVar kRun([](const caf::SRSpillProxy *spill){return spill->run;})
const Var kSlice
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
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