Functions
NueExtrap.C File Reference
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Cuts/Cuts.h"
#include "CAFAna/Cuts/SpillCuts.h"
#include "3FlavorAna/Cuts/NumuCuts2020.h"
#include "3FlavorAna/Cuts/NueCuts2020.h"
#include "CAFAna/Cuts/TimingCuts.h"
#include "3FlavorAna/Vars/HistAxes.h"
#include "CAFAna/Vars/Vars.h"
#include "3FlavorAna/Vars/NueVars.h"
#include "CAFAna/Vars/PPFXWeights.h"
#include "CAFAna/Vars/GenieWeights.h"
#include "CAFAna/Prediction/PredictionNoExtrap.h"
#include "3FlavorAna/Prediction/PredictionGenerator3Flavor.h"
#include "CAFAna/Prediction/PredictionExtrap.h"
#include "CAFAna/Core/Loaders.h"
#include "CAFAna/Core/LoadFromFile.h"
#include "TFile.h"
#include <iostream>
#include <cmath>

Go to the source code of this file.

Functions

void NueExtrap (string beam="fhc", string cvntype="oldpresel")
 

Function Documentation

void NueExtrap ( string  beam = "fhc",
string  cvntype = "oldpresel" 
)

Definition at line 28 of file NueExtrap.C.

References axis_numu, POTSpillRate::beam, cut_nuend, cut_numund, ana::NoExtrapGenerator::Generate(), ana::NuePropExtrapGenerator::Generate(), ana::NuePropExtrapRHCGenerator::Generate(), ana::NueComboExtrapGenerator::Generate(), ana::Loaders::Go(), ana::kBeam, ana::Loaders::kData, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::kNoShift, ana::kNue2020Axis, ana::kNue2020AxisMergedPeripheral, ana::kNue2020FDAllSamples, ana::kNue2020ND, ana::kNumu2020ND, ana::kNumuCCOptimisedAxis, ana::kPPFXFluxCVWgt, ana::kStandardSpillCuts, ana::Loaders::kTauSwap, ana::kXSecCVWgt2020, loaders, outFile, ana::IPrediction::SaveTo(), ana::Loaders::SetLoaderPath(), ana::Loaders::SetSpillCut(), and string.

Referenced by make_nue_filesyst_pred(), make_nueFDprediction_kinematics(), make_nueFDprediction_kinematics_FHC(), make_nueFDprediction_kinematics_FHC_REW(), make_nueFDprediction_kinematics_REW(), test_micheldecomp(), and test_nueextrapsyst().

29 {
30 
32  auto cut_numund = kNumu2020ND;
33  auto axis_nue = kNue2020Axis;
34  auto axis_nue_merged = kNue2020AxisMergedPeripheral;
35  auto cut_nuend = kNue2020ND;
36  auto cut_nuefd = kNue2020FDAllSamples;
37 
39  std::string ldrFDNonSwap = "prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_nonswap_fhc_nova_v08_full_v1";
40  std::string ldrFDFlxSwap = "prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_fhc_nova_v08_full_v1";
41  std::string ldrFDTauSwap = "prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_tau_fhc_nova_v08_full_v1";
42  std::string ldrNDNonSwap = "prod_caf_R19-11-18-prod5reco.d.h_nd_genie_N1810j0211a_nonswap_fhc_nova_v08_full_v1";
43  std::string ldrNDData = "prod_caf_R19-11-18-prod5reco.d.f.h_nd_numi_fhc_period235910_v1";
44 
45  if (beam == "rhc"){
46  ldrFDNonSwap = "prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_nonswap_rhc_nova_v08_full_v1";
47  ldrFDFlxSwap = "prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_rhc_nova_v08_full_v1";
48  ldrFDTauSwap = "prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_tau_rhc_nova_v08_full_v1";
49  ldrNDNonSwap = "prod_caf_R19-11-18-prod5reco.d_nd_genie_N1810j0211a_nonswap_rhc_nova_v08_full_v1";
50  ldrNDData = "prod_caf_R19-11-18-prod5reco.g_nd_numi_rhc_full_v1_goodruns";
51  }
52 
53  loaders.SetLoaderPath(ldrFDNonSwap,caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kNonSwap);
54  loaders.SetLoaderPath(ldrFDFlxSwap,caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kFluxSwap);
56  loaders.SetLoaderPath(ldrNDNonSwap,caf::kNEARDET, Loaders::kMC, ana::kBeam, Loaders::kNonSwap);
57  loaders.SetLoaderPath(ldrNDData,caf::kNEARDET, Loaders::kData, ana::kBeam, Loaders::kNonSwap);
58 
60 
61  NueComboExtrapGenerator *decomp_combo = new NueComboExtrapGenerator(axis_nue,
62  axis_numu,
63  cut_nuefd,
64  cut_nuend,
65  cut_numund,
66  kNoShift,
68 
69 
70  IPrediction * pred_extrap_combo = decomp_combo->Generate(loaders).release();
71 
72  IPrediction * pred_extrap_prop;
73  if (beam == "rhc"){
74  NuePropExtrapRHCGenerator *decomp_prop = new NuePropExtrapRHCGenerator(axis_nue,
75  axis_numu,
76  cut_nuefd,
77  cut_nuend,
78  cut_numund,
79  kNoShift,
81  pred_extrap_prop = decomp_prop->Generate(loaders).release();
82  }
83  if (beam == "fhc"){
84  NuePropExtrapGenerator *decomp_prop = new NuePropExtrapGenerator(axis_nue,
85  axis_numu,
86  cut_nuefd,
87  cut_nuend,
88  cut_numund,
89  kNoShift,
91  pred_extrap_prop = decomp_prop->Generate(loaders).release();
92  }
93 
94  NoExtrapGenerator *noextrap = new NoExtrapGenerator(axis_nue_merged, cut_nuefd, kPPFXFluxCVWgt*kXSecCVWgt2020);
95  IPrediction * pred_noextrap = noextrap->Generate(loaders).release();
96 
97  NoExtrapGenerator *noextrap_for_extand = new NoExtrapGenerator(axis_nue, cut_nuefd, kPPFXFluxCVWgt*kXSecCVWgt2020);
98  IPrediction * pred_noextrap_for_extand = noextrap_for_extand->Generate(loaders).release();
99 
100  loaders.Go();
101 
102  TFile* outFile = new TFile(("fd_nue_pred_"+beam+".root").c_str(),"RECREATE");
103  outFile->cd();
104  pred_extrap_combo->SaveTo(outFile, "extrap_combo");
105  pred_extrap_prop->SaveTo(outFile, "extrap_prop");
106  pred_noextrap->SaveTo(outFile, "noextrap");
107  pred_noextrap_for_extand->SaveTo(outFile, "noextrap_for_extand");
108  outFile->Close();
109 }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Cut cut_numund
const Var kPPFXFluxCVWgt
Definition: PPFXWeights.h:16
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
const Color_t kMC
const Cut kNumu2020ND
Definition: NumuCuts2020.h:57
virtual void SaveTo(TDirectory *dir, const std::string &name) const
const Cut kNue2020ND
Definition: NueCuts2020.h:178
Generates FD-only predictions (no extrapolation)
const Cut cut_nuend
void Go()
Call Go() on all the loaders.
Definition: Loaders.cxx:162
void SetSpillCut(const SpillCut &cut)
Definition: Loaders.cxx:121
Generates extrapolated Nue predictions using ProportionalDecomp.
TFile * outFile
Definition: PlotXSec.C:135
const HistAxis kNue2020AxisMergedPeripheral("NuE Energy / Analysis Bin", kNue2020BinningMergedPeripheral, kNue2020AnaBinMergedPeripheral)
Definition: NueCuts2020.h:200
const HistAxis kNue2020Axis("NuE Energy / Analysis Bin", kNue2020Binning, kNue2020AnaBin)
Use this Axis for Ana2020, official Axis.
Definition: NueCuts2020.h:195
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
const HistAxis kNumuCCOptimisedAxis("Reconstructed Neutrino Energy (GeV)", kNumuCCEOptimisedBinning, kCCE)
HistAxis that implements optimised numuCCE from L. Vinton. See docdb 16332. This was close to &#39;custC&#39;...
Definition: HistAxes.h:24
const SystShifts kNoShift
Definition: SystShifts.cxx:22
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
const HistAxis axis_numu
std::vector< Loaders * > loaders
Definition: syst_header.h:386
Generates extrapolated Nue predictions using Michel+BEN decomposition.
Standard interface to all prediction techniques.
Definition: IPrediction.h:57
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
const Cut kNue2020FDAllSamples
Definition: NueCuts2020.h:84
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.
Definition: Loaders.cxx:25
const Var kXSecCVWgt2020
Definition: XsecTunes.h:105
enum BeamMode string