38 std::vector <SpectDef>
defs;
39 defs.push_back({
"core_no_pid", axis_core, core_no_pid});
40 defs.push_back({
"peri_no_pid", axis_peri, peri_no_pid});
45 if(suffix.Contains(
"cosmics")){
47 if(
beam==
"fhc") ldr =
"prod_sumdecaf_R19-11-18-prod5reco.i_fd_cosmic_fhc_full_v1_goodruns_nue2020";
48 if(
beam==
"rhc") ldr =
"prod_sumdecaf_R19-11-18-prod5reco.i_fd_cosmic_rhc_full_v1_goodruns_nue2020";
52 std::vector <Spectrum*> spects;
53 for(
auto const & def:defs){
58 TString
filename =
"spectra_"+
beam +
"_" + suffix +
".root";
59 auto file =
new TFile(filename,
"recreate");
60 for(
uint i =0;
i < spects.size(); ++
i){
61 spects[
i]->SaveTo(
file,
"cosm_" + defs[
i].
name);
71 if(suffix.Contains(
"prediction")){
73 std::string ldrFDNonSwap, ldrFDFlxSwap, ldrFDTauSwap;
75 ldrFDNonSwap =
"prod_sumdecaf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_nonswap_fhc_nova_v08_full_v1_nue2020";
76 ldrFDFlxSwap =
"prod_sumdecaf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_fhc_nova_v08_full_v1_nue2020";
77 ldrFDTauSwap =
"prod_sumdecaf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_tau_fhc_nova_v08_full_v1_nue2020";
80 ldrFDNonSwap =
"prod_sumdecaf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_nonswap_rhc_nova_v08_full_v1_nue2020";
81 ldrFDFlxSwap =
"prod_sumdecaf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_rhc_nova_v08_full_v1_nue2020";
82 ldrFDTauSwap =
"prod_sumdecaf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_tau_rhc_nova_v08_full_v1_nue2020";
90 std::vector <IPrediction *> preds;
91 for(
auto const & def:defs){
97 TString
filename =
"preds_"+
beam +
"_" + suffix +
".root";
98 auto file =
new TFile(filename,
"recreate");
99 for(
uint i =0;
i < preds.size(); ++
i){
100 preds[
i]->SaveTo(
file,
"pred_" + defs[
i].
name);
void get_spectra_2dplots(TString beam="fhc", TString suffix="cosmics")
Far Detector at Ash River.
Cuts and Vars for the 2020 FD DiF Study.
Collection of SpectrumLoaders for many configurations.
const Cut kNue2020FDNearestSlice([](const caf::SRProxy *sr){const double hibin=kIsRHC(sr)?kNue2020CVNRHCHighEdge:kNue2020CVNFHCHighEdge;const double topcut=(kCVNe_looseptp(sr) >=hibin)?50:400;return(fabs(sr->slc.closestslicetime) >=100|| sr->slc.closestsliceminfromtop >=topcut|| sr->slc.closestslicemindist >=500);})
void SetSpillCut(const SpillCut &cut)
const Cut kNue2020CorePresel
void Go()
Call Go() on all the loaders.
const Cut kInCosmicTimingWindow
Is the event far from the start and ends of the spill ? For FD cosmic selection.
void SetSpillCut(const SpillCut &cut)
const Cut kNue2020PeripheralBasicEventCut
virtual void Go() override
Load all the registered spectra.
const HistDef defs[kNumVars]
std::vector< float > Spectrum
const SystShifts kNoShift
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
const Var kCosPIDCoreBDT
2020 nue cosmic rejection BDT variable - core
const Var kCosPIDPeriBDT
2020 nue cosmic rejection BDT variable - peripheral