23 std::string fnameData_rhc =
"defname: prod4_sumrestricteddecaf_fd_numi_rhc_full_goodruns_nue2019";
24 std::string fnameData_fhc =
"defname: prod4_sumrestricteddecaf_fd_numi_fhc_full_goodruns_nue2019";
38 TFile*
fout =
new TFile(
"nue_data_2019.root",
"RECREATE");
39 data_rhc.
SaveTo(fout,
"spect_rhc");
40 data_fhc.
SaveTo(fout,
"spect_fhc");
47 TFile *
file =
new TFile (
"nue_data_2019.root",
"READ");
50 TH1* hrhc = data_rhc->ToTH1(data_rhc->POT());
51 TH1* hfhc = data_fhc->ToTH1(data_fhc->POT());
52 cout<<
" data rhc: "<<hrhc->Integral()<<
" POT "<<data_rhc->POT()<<
endl;
53 cout<<
" data fhc: "<<hfhc->Integral()<<
" POT "<<data_fhc->POT()<<
endl;
Cuts and Vars for the 2020 FD DiF Study.
void SetSpillCut(const SpillCut &cut)
Representation of a spectrum in any variable, with associated POT.
static std::unique_ptr< Spectrum > LoadFrom(TDirectory *dir, const std::string &name)
const HistAxis kNue2018AxisMergedPeripheral("NuE Energy / Analysis Bin", kNue2018BinningMergedPeripheral, kNue2018AnaBinMergedPeripheral)
virtual void Go() override
Load all the registered spectra.
void SaveTo(TDirectory *dir, const std::string &name) const
const SystShifts kNoShift
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
const Cut kNue2018FDAllSamples
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?
void get_data_histogram()
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.